:root {
  --navy: #061a35;
  --navy2: #0d2b52;
  --ink: #102038;
  --muted: #657389;
  --gold: #c9a45c;
  --gold2: #e9cf8d;
  --cream: #fbf7ee;
  --line: rgba(16, 32, 56, .12);
  --shadow: 0 24px 70px rgba(7, 23, 49, .16);
  --shadow-soft: 0 14px 38px rgba(7, 23, 49, .10);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Yu Gothic", YuGothic, "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, #f8f4ec 0%, #fff 28%, #f6f1eb 100%);
  letter-spacing: .04em;
  line-height: 1.95;
}
a { color: inherit; text-decoration: none }
img { display: block; max-width: 100%; height: auto }

.section-inner {
  width: min(1100px, calc(100% - 64px));
  margin-inline: auto;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #03162e 0%, #071f3e 52%, #0d2e55 100%);
  color: #fff;
  box-shadow: 0 12px 38px rgba(0, 0, 0, .18);
}
.utility-bar {
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
}
.utility-inner {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.utility-inner p { margin: 0 }
.utility-links { display: flex; gap: 24px; white-space: nowrap }
.utility-links a::before { content: "↓"; color: var(--gold); margin-right: .45em }
.utility-links a + a::before { content: "✉" }

.header-inner {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.brand {
  flex: 0 0 auto;
}
.brand img {
  width: 245px;
}
.global-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}
.global-nav a {
  padding: 10px 16px;
  border-left: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px;
  white-space: nowrap;
  color: rgba(255, 255, 255, .9);
}
.global-nav a:hover { color: var(--gold2) }
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  height: 50px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ead08e 0%, #b88a3f 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 26px rgba(0, 0, 0, .2);
}
.header-cta::after {
  content: "›";
  font-size: 26px;
  margin-left: 12px;
  line-height: 1;
}

.mobile-menu {
  display: none;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

/* ===== Hero (legal page) ===== */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  background:
    radial-gradient(circle at 88% 18%, rgba(233, 207, 141, .26) 0 12%, transparent 30%),
    radial-gradient(circle at 12% 90%, rgba(108, 91, 154, .18) 0 12%, transparent 32%),
    linear-gradient(135deg, #061a35 0%, #0d2b52 55%, #061a35 100%);
  color: #fff;
}
.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .8), transparent 92%);
  pointer-events: none;
}
.legal-hero .section-inner { position: relative; z-index: 1 }

.eyebrow {
  margin: 0 0 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--gold);
  font-size: 13px;
}
.legal-hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  color: #fff;
  line-height: 1.3;
  letter-spacing: .08em;
}
.legal-hero .lead {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 16px;
  line-height: 1.95;
  max-width: 760px;
}
.legal-hero .meta {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(233, 207, 141, .34);
  color: var(--gold2);
  font-size: 13px;
  letter-spacing: .12em;
}

/* ===== Article body ===== */
.legal-body {
  padding: 96px 0 120px;
}
.intro-card {
  margin: 0 0 44px;
  padding: 32px 36px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(201, 164, 92, .32);
  box-shadow: var(--shadow-soft);
}
.intro-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 2;
  color: #2a384e;
}
.intro-card p + p { margin-top: 14px }

.article-grid {
  display: grid;
  gap: 22px;
}
.article-grid article {
  position: relative;
  padding: 32px 36px 30px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.article-grid article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
}
.article-grid h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--navy);
  letter-spacing: .06em;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.article-grid h2 .num {
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: .14em;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(201, 164, 92, .14);
  border: 1px solid rgba(201, 164, 92, .32);
  white-space: nowrap;
}
.article-grid p {
  margin: 0;
  color: #2a384e;
  font-size: 15px;
  line-height: 1.95;
}
.article-grid p + p,
.article-grid p + ul,
.article-grid p + ol,
.article-grid ul + p,
.article-grid ol + p { margin-top: 12px }

.article-grid ul,
.article-grid ol {
  margin: 12px 0 0;
  padding: 0 0 0 4px;
  list-style: none;
  display: grid;
  gap: 8px;
}
.article-grid ul li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: #2a384e;
  line-height: 1.85;
}
.article-grid ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.article-grid ol {
  counter-reset: ol-counter;
}
.article-grid ol li {
  position: relative;
  padding-left: 32px;
  font-size: 14.5px;
  color: #2a384e;
  line-height: 1.85;
  counter-increment: ol-counter;
}
.article-grid ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold2);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 12px;
}

/* Contact card (Privacy) */
.contact-card {
  margin-top: 40px;
  padding: 36px;
  border-radius: 26px;
  background: linear-gradient(135deg, #061a35, #123963);
  color: #fff;
  box-shadow: var(--shadow);
}
.contact-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold2);
  margin-bottom: 10px;
  letter-spacing: .08em;
}
.contact-card p {
  margin: 0;
  color: rgba(255, 255, 255, .85);
  line-height: 2;
}
.contact-card .contact-image {
  display: block;
  max-width: 250px;
  width: 100%;
  height: auto;
}

/* Company info table */
.company-table {
  margin-top: 8px;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.company-table dl {
  margin: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
}
.company-table dt,
.company-table dd { margin: 0; padding: 22px 28px }
.company-table dt {
  background: linear-gradient(135deg, #061a35, #0d2b52);
  color: var(--gold2);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .08em;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.company-table dd {
  font-size: 16px;
  color: #1a2742;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.company-table dl > :nth-last-child(-n+2) { border-bottom: 0 }

.map-card {
  margin-top: 32px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  background: #fff;
}
.map-card iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* ===== Footer ===== */
.site-footer {
  padding: 36px 24px calc(36px + env(safe-area-inset-bottom));
  background: #03162e;
  color: rgba(255, 255, 255, .72);
  text-align: center;
  font-size: 13px;
}
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.site-footer .footer-links a {
  color: rgba(255, 255, 255, .82);
  border-bottom: 1px solid rgba(233, 207, 141, .28);
  padding-bottom: 2px;
}
.site-footer .footer-links a:hover { color: var(--gold2) }
.site-footer p { margin: 0 }

/* ===== Responsive ===== */
@media (max-width: 1120px) {
  .section-inner { width: min(100% - 48px, 1040px) }
  .global-nav { display: none }
  .mobile-menu { display: inline-flex; margin-left: auto }
  .header-cta { margin-left: 0 }
  .company-table dl { grid-template-columns: 1fr }
  .company-table dt { border-bottom: 0 }
  .company-table dd { border-bottom: 1px solid var(--line) }

  .site-header.nav-open .global-nav {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px 18px 18px;
    background: linear-gradient(180deg, #03162e, #071f3e);
    border-top: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 24px 50px rgba(0, 0, 0, .42);
    gap: 0;
    z-index: 55;
  }
  .site-header.nav-open .global-nav a {
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding: 14px 4px;
    font-size: 15px;
    text-align: left;
  }
  .site-header.nav-open .global-nav a:last-child { border-bottom: 0 }
  .mobile-menu[aria-expanded="true"] {
    background: rgba(233, 207, 141, .22);
    border-color: rgba(233, 207, 141, .55);
    color: var(--gold2);
  }
}

@media (max-width: 768px) {
  body { background: #faf7f1 }
  .section-inner { width: min(100% - 32px, 640px) }
  .utility-bar { display: none }
  .header-inner { height: 64px; gap: 16px }
  .brand img { width: 200px }
  .header-cta { display: none }
  .legal-hero { padding: 60px 0 56px }
  .legal-body { padding: 60px 0 80px }
  .intro-card { padding: 24px 22px }
  .article-grid article { padding: 26px 22px }
  .article-grid h2 { font-size: 19px; flex-wrap: wrap; gap: 10px }
  .contact-card { padding: 26px 22px }
  .company-table dt, .company-table dd { padding: 16px 20px; font-size: 14.5px }
  .map-card iframe { height: 320px }
}

h1, h2, h3, p, li, a, span, strong, small {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ===== Responsive repair: overflow and mobile layout ===== */
/* Width guards for legal/company pages */
html,
body {
  width: 100%;
}

body {
  overflow-x: hidden;
}

main,
section,
article,
div,
nav,
figure,
ul,
ol,
li,
header,
footer,
dl,
dt,
dd {
  min-width: 0;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

.article-grid,
.article-grid article,
.intro-card,
.contact-card,
.company-table,
.company-table dl,
.map-card {
  min-width: 0;
  max-width: 100%;
}

.article-grid article > *,
.article-grid li,
.article-grid p,
.article-grid h2 {
  min-width: 0;
}

@media (max-width: 1120px) {
  .utility-inner {
    height: auto;
    min-height: 38px;
    padding-block: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
    line-height: 1.5;
  }

  .utility-inner p {
    flex: 1 1 100%;
  }

  .utility-links {
    flex-wrap: wrap;
    white-space: normal;
    gap: 8px 18px;
  }
}

@media (max-width: 768px) {
  h1,
  h2,
  h3,
  p,
  li,
  a,
  span,
  strong,
  small,
  dd,
  dt {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .legal-hero h1 {
    font-size: clamp(28px, 8vw, 36px);
  }

  .article-grid article {
    width: 100%;
  }

  .article-grid h2 {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .article-grid h2 .num {
    width: fit-content;
  }
}

/* ===== Final publish overflow guard ===== */
html,
body {
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

.btn,
.header-cta,
.plan-cta,
.floating-cta a {
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  h1,
  h2,
  h3,
  h4,
  p,
  li,
  dt,
  dd,
  a,
  span,
  strong,
  small,
  summary,
  figcaption {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .section-inner {
    max-width: 100%;
  }

  .utility-inner p,
  .lead,
  .section-heading p {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .section-inner {
    width: min(100% - 28px, 640px);
  }

  .brand img {
    max-width: min(210px, 60vw);
    height: auto;
  }
}
