/*
Theme Name: Mie Shinagawa Sangyo
Theme URI: https://example.local/
Author: Codex
Description: Custom block theme for Mie Shinagawa Sangyo local site.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Version: 1.1.7
Text Domain: mie-shinagawa
*/

:root {
  --ms-green: #1e7f4e;
  --ms-green-2: #43a576;
  --ms-green-3: #8cca98;
  --ms-cyan: #5bbec8;
  --ms-red: #e60012;
  --ms-mint: #e6f4ea;
  --ms-pale: #f2faf5;
  --ms-paper: #ffffff;
  --ms-bg: #f3f6f4;
  --ms-ink: #183526;
  --ms-soft-ink: #4b6357;
  --ms-muted: #6f7f76;
  --ms-line: #dce8df;
  --ms-shadow: 0 18px 48px rgba(22, 68, 43, .1);
  --ms-soft-shadow: 0 10px 26px rgba(22, 68, 43, .07);
  --ms-radius-lg: 26px;
  --ms-radius-md: 18px;
  --ms-radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(91, 190, 200, .18), transparent 26vw),
    radial-gradient(circle at 92% 12%, rgba(30, 127, 78, .16), transparent 24vw),
    linear-gradient(90deg, rgba(30, 127, 78, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(30, 127, 78, .04) 1px, transparent 1px),
    var(--ms-bg);
  background-size: auto, auto, 48px 48px, 48px 48px, auto;
  color: var(--ms-ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.ms-page {
  width: min(100% - 28px, 1240px);
  margin: 0 auto;
  padding: 16px 0 22px;
}

.ms-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 15px 22px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(248, 252, 250, .9));
  border: 1px solid rgba(220, 232, 223, .8);
  border-radius: 22px;
  box-shadow: var(--ms-soft-shadow);
  backdrop-filter: blur(14px);
}

.ms-header::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(30, 127, 78, .45), rgba(91, 190, 200, .35), transparent);
}

.ms-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  line-height: 1.1;
}

.ms-logo img {
  display: block;
  width: min(250px, 42vw);
  max-height: 46px;
  object-fit: contain;
}

.ms-logo-mark {
  position: relative;
  width: 28px;
  height: 36px;
  flex: 0 0 auto;
}

.ms-logo-mark::before,
.ms-logo-mark::after {
  content: "";
  position: absolute;
  border: 3px solid var(--ms-green);
  border-radius: 70% 30% 70% 30%;
  transform: rotate(35deg);
}

.ms-logo-mark::before {
  inset: 1px 8px 12px 2px;
  background: #fff;
}

.ms-logo-mark::after {
  inset: 16px 3px 1px 9px;
  background: var(--ms-green-2);
}

.ms-logo span:last-child {
  display: block;
  color: var(--ms-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}

.ms-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 3vw, 34px);
  margin-left: auto;
  color: #1d3528;
  font-size: 13px;
  font-weight: 800;
}

.ms-btn,
.ms-btn-outline,
.ms-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 44px;
  padding: 0 25px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ms-btn {
  background: linear-gradient(135deg, var(--ms-green), #248f5b);
  color: #fff;
  box-shadow: 0 10px 20px rgba(30, 127, 78, .22);
}

.ms-btn-outline {
  background: #fff;
  color: var(--ms-green);
  border: 1px solid var(--ms-green);
}

.ms-text-link {
  color: var(--ms-green);
  padding-inline: 0;
}

.ms-btn::after,
.ms-btn-outline::after,
.ms-text-link::after,
.ms-card-link::after {
  content: "→";
  font-size: 16px;
  line-height: 1;
}

.ms-menu {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  background:
    linear-gradient(var(--ms-green), var(--ms-green)) center 12px / 18px 2px no-repeat,
    linear-gradient(var(--ms-green), var(--ms-green)) center 19px / 18px 2px no-repeat,
    linear-gradient(var(--ms-green), var(--ms-green)) center 26px / 18px 2px no-repeat;
}

.ms-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: clamp(620px, 62vw, 760px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .82) 32%, rgba(255, 255, 255, .2) 56%, rgba(255, 255, 255, 0) 100%),
    url("assets/hero-sunflower-lpgas.png") center / cover no-repeat;
  border-radius: 28px;
  box-shadow: var(--ms-shadow);
}

.ms-hero::before {
  content: none;
  position: absolute;
  inset: 0;
}

.ms-hero::after,
.ms-page-hero::after,
.ms-ai-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 127, 78, .12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(91, 190, 200, .12) 1px, transparent 1px),
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, .62), transparent 110px);
  background-size: 44px 44px, 44px 44px, auto;
  mask-image: linear-gradient(90deg, transparent 0%, #000 46%, #000 100%);
  opacity: .32;
}

.ms-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 720px;
  padding: clamp(56px, 7vw, 96px) clamp(28px, 6vw, 72px);
}

.ms-eyebrow {
  margin: 0 0 24px;
  color: var(--ms-green);
  font-size: clamp(16px, 1.7vw, 23px);
  font-weight: 600;
  letter-spacing: .12em;
}

.ms-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #113b25;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 700;
  line-height: 1.38;
}

.ms-hero-lead {
  max-width: 590px;
  margin: 30px 0 34px;
  color: #1d3228;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 500;
  line-height: 2.05;
}

.ms-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.ms-section {
  position: relative;
  margin-top: 16px;
  padding: clamp(30px, 4.8vw, 56px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .9));
  border: 1px solid rgba(220, 232, 223, .72);
  border-radius: var(--ms-radius-lg);
  box-shadow: var(--ms-soft-shadow);
}

.ms-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(91, 190, 200, .08), transparent 36%),
    linear-gradient(90deg, transparent 0 82%, rgba(230, 0, 18, .08) 82% 82.4%, transparent 82.4%);
}

.ms-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.ms-kicker {
  margin: 0 0 8px;
  color: var(--ms-green);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ms-section h2 {
  margin: 0;
  color: var(--ms-ink);
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.45;
}

.ms-section-desc {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--ms-soft-ink);
  font-size: 15px;
  font-weight: 600;
}

.ms-grid {
  display: grid;
  gap: 18px;
}

.ms-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ms-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ms-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ms-card {
  position: relative;
  min-height: 100%;
  padding: 28px 22px;
  background:
    linear-gradient(180deg, rgba(248, 252, 249, .96) 0%, rgba(255, 255, 255, .98) 100%),
    linear-gradient(135deg, rgba(91, 190, 200, .12), transparent 48%);
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-md);
  box-shadow: 0 8px 20px rgba(31, 61, 45, .05);
}

.ms-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(30, 127, 78, .5), rgba(91, 190, 200, .5), transparent);
}

.ms-card-centered {
  text-align: center;
}

.ms-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  color: var(--ms-green);
  border: 1px solid rgba(30, 127, 78, .42);
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 24%, rgba(91, 190, 200, .22), transparent 44%),
    #fff;
  font-size: 30px;
  font-weight: 900;
}

.ms-card h3 {
  margin: 4px 0 8px;
  color: var(--ms-green);
  font-size: 18px;
  font-weight: 900;
}

.ms-card p {
  margin: 0;
  color: var(--ms-soft-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;
}

.ms-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-top: 26px;
  margin-top: 30px;
  border-top: 1px solid var(--ms-line);
}

.ms-metric {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 74px;
  padding: 0 22px;
  border-right: 1px solid var(--ms-line);
}

.ms-metric:last-child {
  border-right: 0;
}

.ms-metric strong {
  color: var(--ms-green);
  font-size: 30px;
  line-height: 1;
}

.ms-metric small {
  display: block;
  color: var(--ms-soft-ink);
  font-weight: 800;
}

.ms-news {
  display: grid;
  gap: 0;
}

.ms-news-row {
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--ms-line);
  color: var(--ms-ink);
  font-size: 14px;
  font-weight: 700;
}

.ms-news-row time {
  color: var(--ms-muted);
  font-weight: 800;
}

.ms-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  background: var(--ms-mint);
  color: var(--ms-green);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.ms-info-card {
  overflow: hidden;
  padding: 0;
}

.ms-info-visual {
  height: 134px;
  background:
    linear-gradient(135deg, rgba(30,127,78,.18), rgba(255,255,255,.1)),
    var(--visual, linear-gradient(135deg, #d9eadf, #fff));
  background-size: cover;
  background-position: center;
}

.ms-info-body {
  padding: 18px 20px 20px;
}

.ms-info-body h3 {
  color: var(--ms-ink);
  font-size: 16px;
}

.ms-card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--ms-green);
  font-weight: 900;
}

.ms-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--ms-mint);
}

.ms-cta p {
  margin: 4px 0 0;
  color: var(--ms-soft-ink);
  font-weight: 700;
}

.ms-footer {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, .72fr) 1.15fr;
  gap: clamp(20px, 3vw, 42px);
  margin-top: 18px;
  padding: clamp(34px, 5vw, 54px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(135deg, #247e50, #1d7047 70%, #285d64);
  background-size: 42px 42px, 42px 42px, auto;
  border-radius: var(--ms-radius-lg);
}

.ms-footer h2,
.ms-footer h3,
.ms-footer p,
.ms-footer a {
  color: #fff;
}

.ms-footer h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.ms-footer ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
}

.ms-footer .ms-logo-mark::before,
.ms-footer .ms-logo-mark::after {
  border-color: #fff;
}

.ms-footer .ms-logo-mark::after {
  background: rgba(255, 255, 255, .35);
}

.ms-service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.ms-service-item {
  padding: 14px 16px;
  background: #f6fbf3;
  border: 1px solid var(--ms-line);
  border-radius: 12px;
  color: var(--ms-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.ms-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  font-size: 14px;
}

.ms-page-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: clamp(42px, 6vw, 76px);
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(236, 246, 240, .86)),
    url("assets/hero-tank.png") right bottom / min(42vw, 430px) auto no-repeat;
  border: 1px solid rgba(220, 232, 223, .78);
  border-radius: 28px;
  box-shadow: var(--ms-shadow);
}

.ms-page-hero h1,
.ms-page-hero .wp-block-query-title {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: var(--ms-ink);
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.35;
}

.ms-page-hero p,
.ms-page-hero .taxonomy-description {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-top: 18px;
  color: var(--ms-soft-ink);
  font-weight: 700;
}

.ms-reading {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.ms-reading h2 {
  color: var(--ms-green);
  font-size: clamp(24px, 3vw, 34px);
}

.ms-post-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ms-post-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius-md);
  box-shadow: var(--ms-soft-shadow);
}

.ms-post-card-visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  background:
    radial-gradient(circle at 28% 26%, rgba(91, 190, 200, .22), transparent 36%),
    linear-gradient(135deg, var(--ms-mint), #fff);
  color: var(--ms-green);
  font-size: 52px;
  font-weight: 900;
}

.ms-post-card-visual img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.ms-post-card-body {
  padding: 20px;
}

.ms-post-card-body h2,
.ms-post-card-body h3 {
  margin: 8px 0;
  color: var(--ms-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
}

.ms-post-card-body p,
.ms-post-card-body .wp-block-post-excerpt__excerpt {
  margin: 0;
  color: var(--ms-soft-ink);
  font-size: 14px;
  font-weight: 600;
}

.ms-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ms-muted);
  font-size: 12px;
  font-weight: 800;
}

.ms-empty {
  padding: 22px;
  background: var(--ms-pale);
  border: 1px dashed rgba(30, 127, 78, .35);
  border-radius: 16px;
  color: var(--ms-soft-ink);
  font-weight: 700;
}

.ms-contact-panel {
  display: grid;
  gap: 6px;
  padding: 24px;
  margin: 26px 0;
  background: var(--ms-green);
  color: #fff;
  border-radius: 18px;
}

.ms-contact-panel .ms-kicker,
.ms-contact-panel strong,
.ms-contact-panel span {
  color: #fff;
}

.ms-contact-panel strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.ms-table th,
.ms-table td {
  padding: 14px 16px;
  border: 1px solid var(--ms-line);
  vertical-align: top;
}

.ms-table th {
  background: var(--ms-green);
  color: #fff;
  text-align: left;
}

.ms-table td:first-child {
  width: 160px;
  background: var(--ms-pale);
  color: var(--ms-green);
  font-weight: 900;
}

.ms-company-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ms-line);
  border-radius: 16px;
}

.ms-company-list dt,
.ms-company-list dd {
  padding: 14px 18px;
  margin: 0;
  border-bottom: 1px solid var(--ms-line);
}

.ms-company-list dt {
  background: var(--ms-pale);
  color: var(--ms-green);
}

.ms-company-list dd {
  background: #fff;
  font-weight: 700;
}

.ms-company-list dt:last-of-type,
.ms-company-list dd:last-of-type {
  border-bottom: 0;
}

@media (max-width: 980px) {
  .ms-nav {
    display: none;
  }

  .ms-menu {
    display: block;
  }

  .ms-hero {
    grid-template-columns: 1fr;
    min-height: 620px;
  }

  .ms-hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.96) 0 45%, rgba(255,255,255,.22) 68%, rgba(255,255,255,.02) 100%),
      url("assets/hero-tank.png") center bottom / min(92vw, 560px) auto no-repeat;
  }

  .ms-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ms-post-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ms-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .ms-page {
    width: min(100% - 20px, 1240px);
    padding-top: 10px;
  }

  .ms-header {
    top: 8px;
    padding: 12px 15px;
    border-radius: 0;
  }

  .ms-logo {
    font-size: 14px;
  }

  .ms-logo span:last-child {
    font-size: 8px;
  }

  .ms-hero {
    min-height: 650px;
    border-radius: 0;
  }

  .ms-hero-copy {
    align-self: start;
    padding: 34px 22px;
  }

  .ms-eyebrow {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .ms-hero h1 {
    font-size: 30px;
    line-height: 1.62;
  }

  .ms-hero-lead {
    margin-top: 18px;
    font-size: 14px;
  }

  .ms-section {
    margin-top: 12px;
    padding: 28px 18px;
    border-radius: 22px;
  }

  .ms-section-header {
    display: block;
  }

  .ms-grid-3,
  .ms-grid-2,
  .ms-grid-4,
  .ms-metrics,
  .ms-footer,
  .ms-cta,
  .ms-post-cards {
    grid-template-columns: 1fr;
  }

  .ms-metric {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--ms-line);
  }

  .ms-metric:last-child {
    border-bottom: 0;
  }

  .ms-news-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ms-service-list,
  .ms-company-list {
    grid-template-columns: 1fr;
  }

  .ms-company-list dt {
    padding-bottom: 6px;
    border-bottom: 0;
  }

  .ms-cta {
    text-align: left;
  }
}

/* ─── Refinements ──────────────────────────────────────────────────────── */

/* Design tokens */
:root {
  --ms-radius-lg: 0;
  --ms-radius-md: 0;
  --ms-radius-sm: 0;
  --ms-shadow: 0 10px 24px rgba(31, 61, 45, .06);
  --ms-soft-shadow: 0 6px 18px rgba(31, 61, 45, .045);
}

/* Base */
body {
  background:
    radial-gradient(circle at 8% 8%, rgba(30, 127, 78, .08), transparent 24vw),
    radial-gradient(circle at 92% 10%, rgba(91, 190, 200, .06), transparent 22vw),
    #f6f8f6;
  color: #1f3328;
  font-weight: 400;
}

.ms-header::after,
.ms-section::before,
.ms-hero::after,
.ms-page-hero::after,
.ms-ai-surface::after {
  display: none;
}

/* Layout */
.ms-page {
  width: min(100% - 20px, 1240px);
  padding-top: 0;
}

/* Header */
.ms-header {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 1240px);
  box-sizing: border-box;
  padding: 5px 16px;
  margin-bottom: 0;
  justify-content: flex-start;
  box-shadow: 0 10px 28px rgba(31, 61, 45, .06);
  z-index: 100;
  border-radius: 0;
}

/* Hero / page-hero — square corners */
.ms-hero,
.ms-page-hero {
  border-radius: 0;
}

.ms-header-contact {
  display: none;
}

.ms-nav {
  justify-content: flex-start;
  margin-left: 20px;
  font-weight: 500;
}

.ms-nav-contact {
  display: none;
}

/* Logo */
.ms-header .ms-logo img {
  width: 420px;
  max-width: 52vw;
  max-height: 78px;
}

/* Hero */
.ms-hero {
  min-height: clamp(520px, 48vw, 640px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .88) 34%, rgba(255, 255, 255, .35) 58%, rgba(255, 255, 255, 0) 100%),
    url("assets/hero-sunflower-lpgas.png") right center / cover no-repeat;
}

.ms-hero-copy {
  max-width: 620px;
  padding: clamp(42px, 5vw, 70px) clamp(28px, 5vw, 60px);
}

.ms-eyebrow {
  font-size: clamp(14px, 1.25vw, 18px);
  letter-spacing: .08em;
}

.ms-hero h1 {
  max-width: 620px;
  font-size: clamp(32px, 3.05vw, 44px);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

.ms-hero-lead {
  max-width: 520px;
  font-size: clamp(14px, 1.08vw, 16px);
  line-height: 1.95;
}

/* Page hero */
.ms-page-hero,
.ms-hero {
  margin-top: 0;
}

.ms-page-hero {
  min-height: 220px;
  padding: clamp(26px, 3.6vw, 44px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(242, 250, 245, .88)),
    url("assets/hero-tank.png") right bottom / min(40vw, 400px) auto no-repeat;
  box-shadow: 0 10px 28px rgba(31, 61, 45, .06);
}

.ms-page-hero h1,
.ms-page-hero .wp-block-query-title {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.28;
  font-weight: 700;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  letter-spacing: .01em;
}

/* Sections */
.ms-header,
.ms-section,
.ms-card,
.ms-post-card {
  box-shadow: 0 10px 28px rgba(31, 61, 45, .06);
}

.ms-section h2 {
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.45;
  font-weight: 700;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  letter-spacing: .01em;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

/* Typography weights */
.ms-nav,
.ms-btn,
.ms-btn-outline,
.ms-text-link,
.ms-eyebrow,
.ms-section-desc,
.ms-card p,
.ms-news-row,
.ms-service-item,
.ms-company-list dd,
.ms-post-card-body p,
.ms-post-card-body .wp-block-post-excerpt__excerpt,
.ms-page-hero p,
.ms-page-hero .taxonomy-description {
  font-weight: 500;
}

.ms-hero h1,
.ms-page-hero h1,
.ms-page-hero .wp-block-query-title {
  font-weight: 700;
  letter-spacing: .01em;
}

.ms-section h2,
.ms-card h3,
.ms-info-body h3,
.ms-post-card-body h2,
.ms-post-card-body h3,
.ms-reading h2 {
  font-weight: 700;
  letter-spacing: .01em;
}

.ms-kicker,
.ms-tag,
.ms-news-row time,
.ms-post-meta {
  font-weight: 600;
  letter-spacing: .04em;
}

/* Cards */
.ms-card {
  background: linear-gradient(180deg, #fbfdfb 0%, #fff 100%);
}

.ms-card::before {
  background: linear-gradient(90deg, transparent, rgba(30, 127, 78, .24), transparent);
}

/* Icons */
.ms-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  color: transparent;
  font-size: 0;
  line-height: 1;
  font-weight: 700;
  background: #fff;
  border-color: rgba(30, 127, 78, .28);
}

.ms-icon::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  background: var(--ms-green);
  -webkit-mask: var(--ms-icon-url) center / contain no-repeat;
  mask: var(--ms-icon-url) center / contain no-repeat;
}

.ms-icon-tank {
  --ms-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 18h28a5 5 0 0 1 5 5v30a5 5 0 0 1-5 5H18a5 5 0 0 1-5-5V23a5 5 0 0 1 5-5Z'/%3E%3Cpath d='M21 18V8m22 10V8M17 29h30M25 41c0-4 7-10 7-10s7 6 7 10a7 7 0 0 1-14 0Z'/%3E%3Cpath d='M32 38v8'/%3E%3C/svg%3E");
}

.ms-icon-shield {
  --ms-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 6 53 16v14c0 14-8 24-21 29C19 54 11 44 11 30V16L32 6Z'/%3E%3Cpath d='M32 18v28M32 46c-8-7-12-12-12-18 0-5 4-8 8-8 2 0 3 .6 4 2 1-1.4 2-2 4-2 4 0 8 3 8 8 0 6-4 11-12 18Z'/%3E%3C/svg%3E");
}

.ms-icon-bottles {
  --ms-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 16h18v39H14zM18 10h10v6H18zM19 28h8M19 42h8'/%3E%3Cpath d='M42 21h10v8H42zM38 36h18v18H38zM43 31h8v5h-8zM44 45h6'/%3E%3Cpath d='M34 18h5'/%3E%3C/svg%3E");
}

/* News rows */
.ms-news-row {
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 9px 0;
}

.ms-news-row time {
  font-size: 11px;
}

.ms-news-row span {
  min-width: 0;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Tables */
.ms-table td:first-child {
  font-weight: 700;
}

.ms-table .ms-nowrap {
  white-space: nowrap;
  font-size: clamp(12px, .9vw, 14px);
  line-height: 1.65;
}

.ms-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Company list */
.ms-company-list dt {
  font-weight: 700;
}

/* Price */
.ms-price-summary {
  margin-bottom: clamp(34px, 4vw, 54px);
}

.ms-price-lines {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Intro layout */
.ms-intro .ms-section-header {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(420px, 1.1fr);
  align-items: center;
}

.ms-intro .ms-section-desc {
  max-width: none;
}

.ms-post-meta {
  min-height: 0;
}

/* Post cards */
.ms-post-card-body h2,
.ms-post-card-body h3,
.ms-post-card-body .wp-block-post-title {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
}

/* Archive */
.ms-archive-rows {
  display: grid;
  gap: 0;
}

.ms-archive-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--ms-line);
}

.ms-archive-row .ms-post-date {
  margin: 0;
  color: var(--ms-muted);
  font-size: 16px;
  font-weight: 700;
}

.ms-archive-row .wp-block-post-title {
  margin: 0;
  font-size: clamp(18px, 1.35vw, 22px);
  line-height: 1.55;
}

.ms-archive-row .wp-block-post-title a {
  color: var(--ms-ink);
  text-decoration: none;
}

/* Single / archive page hero titles */
.single-post .ms-page-hero h1,
.single-post .ms-page-hero .wp-block-post-title {
  max-width: 860px;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.32;
}

.archive .ms-page-hero .wp-block-query-title,
.category .ms-page-hero .wp-block-query-title {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.25;
}

/* Footer */
.ms-footer {
  grid-template-columns: 1.25fr repeat(3, .72fr) 1.15fr;
  gap: clamp(20px, 2.5vw, 36px);
  align-items: start;
  padding: clamp(34px, 5vw, 54px);
  background: linear-gradient(135deg, #247a4d, #1e6d45);
  background-size: auto;
  overflow: hidden;
}

.ms-footer h3 {
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 16px;
  font-weight: 700;
}

.ms-footer p,
.ms-footer a,
.ms-footer li {
  font-size: 14px;
  line-height: 1.75;
}

.ms-footer ul,
.ms-footer li,
.ms-footer a {
  font-weight: 500;
}

.ms-footer li {
  word-break: keep-all;
  overflow-wrap: normal;
}

.ms-footer .ms-logo {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.ms-footer .ms-logo img {
  display: block;
  width: min(280px, 100%);
  max-height: 76px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.ms-footer .ms-btn-outline {
  color: var(--ms-green);
  background: #fff;
  border-color: #fff;
}

.ms-footer .ms-btn-outline::after {
  color: var(--ms-green);
}

.ms-footer-brand {
  display: inline-block;
  color: #fff;
  font-size: clamp(32px, 2.4vw, 40px);
  font-weight: 800;
  line-height: 1.18;
  white-space: nowrap;
  letter-spacing: .02em;
}

.ms-footer-address {
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.85;
}

.ms-footer-contact {
  display: block;
}

/* Phone */
.ms-phone {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  width: min(100%, 286px);
  padding: 20px 22px;
}

.ms-phone p {
  margin: 0;
  font-size: 13px;
  line-height: 1.42;
}

.ms-phone p strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.25;
}

.ms-phone .ms-phone-number {
  display: block;
  margin: 8px 0;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.2;
  letter-spacing: .04em;
  white-space: nowrap;
}

.ms-phone .ms-phone-number span {
  display: inline;
  font-size: inherit;
  line-height: inherit;
}

.ms-phone small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .ms-page {
    width: min(100% - 32px, 1240px);
  }

  .ms-hero {
    min-height: 560px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .72) 52%, rgba(255, 255, 255, .08) 100%),
      url("assets/hero-sunflower-lpgas.png") 66% center / cover no-repeat;
  }

  .ms-hero h1 {
    max-width: 560px;
    font-size: clamp(30px, 5.2vw, 42px);
  }

  .ms-footer {
    grid-template-columns: 1fr 1fr;
  }

  .ms-nav {
    margin-left: 0;
  }

  .ms-header-contact {
    display: none;
  }

  .ms-nav-contact {
    display: block;
  }

  .ms-intro .ms-section-header {
    grid-template-columns: 1fr;
  }

  .ms-header.is-menu-open .ms-nav {
    order: 5;
    display: grid;
    flex: 0 0 100%;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 12px;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(30, 127, 78, .16);
  }

  .ms-header.is-menu-open .ms-nav a {
    padding: 11px 4px;
    border-bottom: 1px solid rgba(30, 127, 78, .1);
  }
}

@media (max-width: 720px) {
  .ms-page {
    width: min(100% - 16px, 1240px);
  }

  .ms-header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 0;
  }

  .ms-header .ms-logo {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
  }

  .ms-header .ms-logo img {
    width: min(380px, calc(100vw - 70px));
    max-width: none;
    max-height: 72px;
  }

  .ms-menu {
    grid-column: 3;
    justify-self: end;
    width: 34px;
    height: 34px;
  }

  .ms-header.is-menu-open .ms-nav {
    grid-column: 1 / -1;
  }

  .ms-hero {
    min-height: 490px;
    overflow: hidden;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .84) 45%, rgba(255, 255, 255, .16) 100%),
      url("assets/hero-sunflower-lpgas.png") 62% center / cover no-repeat;
  }

  .ms-hero-copy {
    padding: 22px 22px 18px;
    max-width: 100%;
  }

  .ms-hero h1 {
    font-size: clamp(22px, 6.25vw, 27px);
    line-height: 1.52;
    max-width: 92%;
  }

  .ms-hero-lead {
    max-width: 100%;
    margin-top: 18px;
    font-size: 12.5px;
    line-height: 1.82;
  }

  .ms-actions {
    gap: 10px;
    margin-top: 18px;
    max-width: 280px;
  }

  .ms-actions .ms-btn,
  .ms-actions .ms-btn-outline {
    min-height: 48px;
  }

  .ms-page-hero {
    min-height: 180px;
    padding: 22px 20px;
  }

  .ms-page-hero h1,
  .ms-page-hero .wp-block-query-title {
    font-size: 25px;
  }

  .ms-section h2 {
    font-size: 23px;
  }

  .ms-footer {
    grid-template-columns: 1fr;
    padding: 34px 24px;
  }

  .ms-footer-brand {
    font-size: clamp(22px, 5.6vw, 28px);
  }

  .ms-footer-contact {
    display: flex;
    flex-wrap: wrap;
  }

  .ms-news-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ms-news-row span {
    font-size: 16px;
    overflow-wrap: anywhere;
  }

  .ms-phone {
    aspect-ratio: auto;
    width: min(100%, 300px);
    padding: 24px 18px;
  }

  .ms-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: auto;
  }

  .ms-table {
    display: table;
    width: 880px;
    min-width: 880px;
    table-layout: fixed;
  }

  .ms-table th,
  .ms-table td {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: normal;
    vertical-align: top;
  }

  .ms-table th:nth-child(1),
  .ms-table td:nth-child(1) {
    width: 155px;
  }

  .ms-table th:nth-child(2),
  .ms-table td:nth-child(2) {
    width: 325px;
  }

  .ms-table th:nth-child(3),
  .ms-table td:nth-child(3) {
    width: 400px;
  }

  .ms-price-lines {
    min-width: 0;
    line-height: 1.8;
  }

  .ms-archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 0;
  }

  .single-post .ms-page-hero h1,
  .single-post .ms-page-hero .wp-block-post-title {
    font-size: 30px;
    line-height: 1.45;
  }

  .archive .ms-page-hero .wp-block-query-title,
  .category .ms-page-hero .wp-block-query-title {
    font-size: 30px;
  }

  #declaration.ms-section {
    padding: 28px 22px;
  }

  #declaration .ms-section-header {
    gap: 12px;
    margin-bottom: 18px;
  }

  #declaration h2 {
    font-size: 24px;
    line-height: 1.45;
  }

  #declaration .ms-grid {
    gap: 14px;
  }

  #declaration .ms-card {
    padding: 22px 20px;
  }

  #declaration .ms-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  #declaration .ms-card p {
    font-size: 14px;
    line-height: 1.75;
  }
}

/* ─── Sticky header spacing ─────────────────────────────────────────────── */

main.ms-page {
  padding-top: 80px;
}

/* ─── Section header spacing ────────────────────────────────────────────── */

.ms-section-header {
  margin-bottom: 16px;
}

/* ─── Declaration cards compact ─────────────────────────────────────────── */

#declaration .ms-card {
  padding: 16px 18px;
}

#declaration .ms-card h3 {
  font-size: 14px;
  margin-bottom: 5px;
}

#declaration .ms-card p {
  font-size: 12px;
  line-height: 1.65;
}

/* ─── History list ───────────────────────────────────────────────────────── */

.ms-history-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
}

.ms-history-list dt {
  padding: 11px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ms-green);
  border-bottom: 1px solid var(--ms-line);
}

.ms-history-list dd {
  padding: 11px 0 11px 24px;
  font-size: 14px;
  border-bottom: 1px solid var(--ms-line);
}

/* ─── Map ────────────────────────────────────────────────────────────────── */

.ms-map-wrap {
  margin-top: 28px;
  border-radius: var(--ms-radius-md);
  overflow: hidden;
  border: 1px solid var(--ms-line);
}

.ms-map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ─── Hero load animation ────────────────────────────────────────────────── */

@keyframes msFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ms-hero-copy > * {
  animation: msFadeUp .75s ease both;
}
.ms-hero-copy > *:nth-child(1) { animation-delay: .12s; }
.ms-hero-copy > *:nth-child(2) { animation-delay: .30s; }
.ms-hero-copy > *:nth-child(3) { animation-delay: .50s; }
.ms-hero-copy > *:nth-child(4) { animation-delay: .70s; }

/* ─── Scroll fade-in ─────────────────────────────────────────────────────── */

.ms-fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.ms-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Thumb-list (商品紹介・左サムネイル) ───────────────────────────────── */

.ms-thumb-list {
  display: grid;
  gap: 0;
}

.ms-thumb-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--ms-line);
  color: var(--ms-ink);
  text-decoration: none;
}

.ms-thumb-row:first-child {
  padding-top: 0;
}

.ms-thumb-visual {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ms-radius-sm);
  background: var(--ms-mint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-thumb-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ms-thumb-visual-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--ms-green);
  background: linear-gradient(135deg, rgba(30,127,78,.1), rgba(91,190,200,.15));
}

.ms-thumb-body time {
  font-size: 11px;
  color: var(--ms-muted);
  font-weight: 700;
  letter-spacing: .04em;
}

.ms-thumb-body h3 {
  margin: 5px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ms-ink);
  line-height: 1.5;
  word-break: keep-all;
}

/* ─── Mobile card compact (about / service) ─────────────────────────────── */

@media (max-width: 720px) {
  .ms-card-centered {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 14px;
    padding: 14px 16px;
  }

  .ms-card-centered .ms-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin: 0;
  }

  .ms-card-centered .ms-icon::before {
    width: 24px;
    height: 24px;
  }

  .ms-card-centered h3 {
    font-size: 14px;
    margin: 0 0 4px;
    text-align: left;
  }

  .ms-card-centered p {
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
  }

  .ms-thumb-row {
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  /* Hero h1 overflow fix */
  .ms-hero h1 {
    word-break: normal;
    overflow-wrap: anywhere;
    font-size: clamp(20px, 5.5vw, 25px);
  }
}

/* ─── School list (スクールIE 縦リスト) ─────────────────────────────────── */

.ms-school-list {
  display: grid;
  gap: 0;
}

.ms-school-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--ms-line);
}

.ms-school-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ms-school-category {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ms-muted);
  letter-spacing: .04em;
}

.ms-school-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ms-ink);
  line-height: 1.4;
}

.ms-school-info {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0;
}

.ms-school-info dt,
.ms-school-info dd {
  padding: 6px 0;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  border-bottom: 1px solid rgba(220, 232, 223, .5);
  line-height: 1.65;
  color: var(--ms-soft-ink);
}

.ms-school-info dt {
  font-weight: 500;
  color: var(--ms-muted);
}

.ms-school-info dd {
  padding-left: 10px;
}

.ms-school-info dd a {
  color: var(--ms-ink);
  font-weight: 600;
  text-decoration: none;
}

.ms-school-info dt:last-of-type,
.ms-school-info dd:last-of-type {
  border-bottom: 0;
}

@media (max-width: 720px) {
  .ms-school-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ─── Company list font size (match history list) ───────────────────────── */

.ms-company-list dt {
  font-size: 13px;
}

.ms-company-list dd {
  font-size: 13px;
}

/* ─── Photo card (About / Service アイコン代替) ─────────────────────────── */

.ms-card-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 14px;
}

.ms-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .ms-card-centered:has(.ms-card-photo) {
    flex-direction: column;
    text-align: center;
  }

  .ms-card-centered:has(.ms-card-photo) .ms-card-photo {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* ─── Final refinements ───────────────────────────────────────────────── */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-width: 0;
}

.ms-contact-form-wrap {
  margin-top: 28px;
}

.ms-price-line {
  display: block;
  white-space: nowrap;
}

.ms-table .ms-price-lines {
  min-width: 300px;
  white-space: nowrap;
}

.ms-table .ms-price-lines br {
  display: none;
}

.ms-table th:nth-child(2),
.ms-table td:nth-child(2) {
  width: 32%;
}

.ms-table th:nth-child(3),
.ms-table td:nth-child(3) {
  width: 46%;
}

.ms-thumb-row {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.ms-thumb-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.ms-thumb-body time {
  font-size: 10px;
  font-weight: 600;
}

.ms-header {
  top: 0;
  width: 100%;
  max-width: none;
  border-left: 0;
  border-right: 0;
}

.ms-header .ms-logo img {
  width: min(240px, 24vw);
  max-height: 38px;
  object-fit: contain;
}

main.ms-page {
  padding-top: 56px;
}

@media (min-width: 981px) {
  .ms-intro .ms-section-header {
    grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr);
    gap: clamp(28px, 4vw, 56px);
  }

  .ms-intro .ms-section-desc {
    max-width: 760px;
  }
}

@media (max-width: 720px) {
  main.ms-page {
    padding-top: 50px;
  }

  .ms-page,
  .ms-header,
  .ms-hero,
  .ms-page-hero,
  .ms-section,
  .ms-footer {
    max-width: 100%;
  }

  .ms-section {
    padding-inline: 20px;
  }

  .ms-actions {
    max-width: 100%;
  }

  .ms-page h1,
  .ms-page h2,
  .ms-page h3,
  .ms-page p,
  .ms-page li,
  .ms-page a,
  .ms-thumb-body,
  .ms-thumb-body h3 {
    min-width: 0;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .ms-header .ms-logo img {
    width: min(190px, calc(100vw - 160px));
    max-height: 30px;
  }

  .ms-table-scroll {
    overflow-x: visible;
  }

  .ms-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .ms-table thead {
    display: none;
  }

  .ms-table tbody,
  .ms-table tr,
  .ms-table td {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .ms-table th:nth-child(1),
  .ms-table td:nth-child(1),
  .ms-table th:nth-child(2),
  .ms-table td:nth-child(2),
  .ms-table th:nth-child(3),
  .ms-table td:nth-child(3) {
    width: 100%;
  }

  .ms-table tr {
    padding: 0;
    border: 1px solid var(--ms-line);
    background: #fff;
  }

  .ms-table tr + tr {
    margin-top: 14px;
  }

  .ms-table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--ms-line);
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .ms-table td:last-child {
    border-bottom: 0;
  }

  .ms-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--ms-green);
    font-size: 11px;
    font-weight: 700;
  }

  .ms-table td:nth-child(1)::before { content: "料金項目"; }
  .ms-table td:nth-child(2)::before { content: "金額（税込）"; }
  .ms-table td:nth-child(3)::before { content: "内容"; }

  .ms-table .ms-price-lines {
    min-width: 0;
    white-space: normal;
    line-height: 1.55;
  }

  .ms-table .ms-price-line {
    margin: 0;
    white-space: normal;
  }

  .ms-thumb-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }

  .ms-thumb-body h3 {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.42;
  }

  .ms-thumb-body time {
    font-size: 9px;
  }

  .ms-contact-panel {
    margin: 18px 0;
    padding: 18px;
    border-radius: 14px;
  }

  .ms-contact-panel strong {
    font-size: 32px;
  }
}

.ms-editable-content {
  width: min(100% - 20px, 1240px);
  margin: 16px auto 0;
}

.ms-editable-content:empty {
  display: none;
}

/* ─── Contact Form 7 ──────────────────────────────────────────────────── */
.ms-contact-form-wrap .ms-cf7-form {
  display: grid;
  gap: 22px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--ms-line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(22, 68, 43, .06);
}

.ms-contact-form-wrap .ms-cf7-form p {
  display: contents;
  margin: 0;
}

.ms-contact-form-wrap .ms-cf7-form br {
  display: none;
}

.ms-contact-form-wrap .ms-cf7-field {
  display: grid;
  gap: 6px;
}

.ms-contact-form-wrap .ms-cf7-field > label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--ms-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.ms-contact-form-wrap .ms-cf7-required {
  color: var(--ms-red);
  font-size: 11px;
  font-weight: 600;
}

.ms-contact-form-wrap .wpcf7-form-control-wrap {
  display: block;
  margin: 0;
}

.ms-contact-form-wrap input,
.ms-contact-form-wrap textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid var(--ms-line);
  border-radius: 10px;
  background: var(--ms-pale);
  color: var(--ms-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.ms-contact-form-wrap textarea {
  min-height: 130px;
  resize: vertical;
}

.ms-contact-form-wrap input:focus,
.ms-contact-form-wrap textarea:focus {
  outline: 2px solid rgba(30, 127, 78, .18);
  border-color: var(--ms-green);
  background: #fff;
}

.ms-contact-form-wrap .wpcf7-submit {
  width: auto;
  min-width: 160px;
  margin-top: 0;
  padding: 11px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ms-green);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ms-contact-form-wrap .wpcf7-submit:hover,
.ms-contact-form-wrap .wpcf7-submit:focus {
  background: var(--ms-green-2);
}

@media (max-width: 720px) {
  .ms-contact-form-wrap {
    margin-top: 18px;
  }

  .ms-contact-form-wrap .ms-cf7-form {
    gap: 16px;
    padding: 16px;
  }

  .ms-contact-form-wrap .ms-cf7-field {
    gap: 4px;
  }

  .ms-contact-form-wrap .ms-cf7-field > label {
    font-size: 14px;
  }

  .ms-contact-form-wrap .wpcf7-submit {
    width: 100%;
  }
}
