/* =========================================================
   艾乐棋牌局 · 共享外壳样式 /assets/site.css
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol, hr { margin: 0; }
ul, ol { padding: 0; }
ul[class], ol[class] { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 900; line-height: 1.15; letter-spacing: -.005em; }

/* ---------- 2. Tokens ---------- */
:root {
  --night-900: #0B1526;
  --night-700: #142A4A;
  --night-500: #24446F;
  --gold: #E7B44A;
  --gold-soft: #F6DEA3;
  --table: #0F5A45;
  --jade: #2FBF9B;
  --neon: #7B5CFF;
  --paper: #FAF6EE;
  --ink: #12141A;
  --muted: #6B7280;

  --top-h: 66px;
  --rail-w: 212px;
  --seam: 6px;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-pill: 999px;

  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo,
    Consolas, "Courier New", monospace;

  --line-dark: rgba(231, 180, 74, .24);
  --line-soft: rgba(18, 20, 26, .1);
  --shadow-panel: 0 26px 60px -48px rgba(11, 21, 38, .72);
}

/* ---------- 3. Page base ---------- */
body {
  min-height: 100vh;
  padding-top: var(--top-h);
  background-color: var(--paper);
  background-image:
    radial-gradient(58% 44% at 90% 2%, rgba(231, 180, 74, .16), transparent 62%),
    radial-gradient(52% 42% at 0% 84%, rgba(36, 68, 111, .1), transparent 60%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

p { max-width: 38em; }
p:last-child { margin-bottom: 0; }

#main-content { scroll-margin-top: calc(var(--top-h) + 18px); display: block; }

.wrap {
  width: min(1120px, 100% - 36px);
  margin-inline: auto;
}

.muted { color: var(--muted); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: .02em;
}

.chip-cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  left: 14px;
  top: -120px;
  z-index: 200;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--night-900);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 5. Header / L-frame ---------- */
.site-header { position: relative; }

.header-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--top-h);
  background: linear-gradient(90deg, var(--night-900) 0%, var(--night-700) 58%, var(--night-900) 100%);
  border-bottom: 1px solid var(--line-dark);
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, .95);
}

.rail-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}

.rail-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rail-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft) 58%, var(--neon));
  will-change: transform;
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background:
    repeating-conic-gradient(from 0deg, rgba(11, 21, 38, .22) 0deg 12deg, rgba(11, 21, 38, 0) 12deg 24deg),
    linear-gradient(150deg, var(--gold-soft), var(--gold) 62%, #C08F21);
  color: var(--night-900);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(11, 21, 38, .18), 0 10px 20px -14px rgba(231, 180, 74, .95);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.16; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: .05em; }
.brand-domain {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: rgba(246, 222, 163, .62);
}

.brand-tagline {
  display: none;
  align-items: center;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid rgba(246, 222, 163, .22);
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* nav toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(246, 222, 163, .34);
  border-radius: var(--r-md);
  background: rgba(36, 68, 111, .5);
  color: var(--gold-soft);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--gold); color: #fff; }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* frame nav (left rail) */
.frame-nav {
  position: fixed;
  top: var(--top-h);
  left: 0;
  bottom: 0;
  z-index: 88;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 16px 22px;
  background: linear-gradient(180deg, var(--night-700) 0%, var(--night-900) 82%);
  border-right: 1px solid var(--line-dark);
  overflow-y: auto;
  visibility: visible;
}

.frame-label {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: rgba(246, 222, 163, .55);
}
.frame-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(246, 222, 163, .42), rgba(246, 222, 163, 0));
}

.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item { margin: 0; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: #D6E2F4;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-link::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 2px;
  background: rgba(214, 226, 244, .3);
  transition: background-color .18s ease, transform .18s ease;
}
.nav-link:hover { background: rgba(36, 68, 111, .6); color: #fff; transform: translateX(2px); }
.nav-link:hover::before { background: var(--neon); }
.nav-link[aria-current="page"] {
  background: rgba(231, 180, 74, .14);
  border-color: rgba(231, 180, 74, .45);
  color: #fff;
  font-weight: 700;
}
.nav-link[aria-current="page"]::before { background: var(--gold); transform: rotate(45deg); }

.frame-meta {
  margin-top: auto;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: rgba(214, 226, 244, .4);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-gold {
  background: var(--gold);
  color: var(--night-900);
  box-shadow: 0 12px 26px -16px rgba(231, 180, 74, .95);
}
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  border-color: rgba(246, 222, 163, .36);
  color: var(--gold-soft);
}
.btn-ghost:hover { border-color: var(--gold); color: #fff; transform: translateY(-2px); }

.btn-table {
  background: var(--table);
  color: #EAF7F2;
  box-shadow: 0 12px 26px -18px rgba(15, 90, 69, .95);
}
.btn-table:hover { background: #0C6B54; transform: translateY(-2px); }

.btn-line {
  background: #fff;
  border-color: rgba(18, 20, 26, .14);
  color: var(--ink);
}
.btn-line:hover { border-color: var(--gold); transform: translateY(-2px); }

.rail-actions .btn { padding: 11px 19px; font-size: 14.5px; }

/* ---------- 7. Panels & sections ---------- */
.stack-panels { display: flex; flex-direction: column; gap: var(--seam); }

.panel {
  position: relative;
  padding: clamp(20px, 3.2vw, 38px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow-panel);
}
.panel--dark {
  background: linear-gradient(150deg, var(--night-700) 0%, var(--night-900) 88%);
  border-color: rgba(231, 180, 74, .22);
  color: #DCE7F6;
}
.panel--table {
  background: linear-gradient(150deg, var(--table) 0%, #0A3F30 92%);
  border-color: rgba(47, 191, 155, .3);
  color: #E8F7F1;
}
.panel--gold {
  background: linear-gradient(150deg, var(--gold-soft) 0%, #FBEECB 100%);
  border-color: rgba(231, 180, 74, .5);
}

.sec-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: none;
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--night-500);
}
.sec-mark {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 2px;
  background: var(--gold);
  transform-origin: center;
}
.sec-num { font-weight: 700; letter-spacing: .1em; }

.panel--dark .sec-label,
.panel--table .sec-label { color: var(--gold-soft); }
.panel--dark .sec-num,
.panel--table .sec-num { color: var(--gold); }

.t-h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -.012em; }
.t-h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.16; }
.t-h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; line-height: 1.28; }
.t-h4 { font-size: 20px; font-weight: 800; line-height: 1.35; }

.lede { font-size: 19px; line-height: 1.8; color: #3A4152; }
.panel--dark .lede { color: #B9C8E0; }
.panel--table .lede { color: #BFE3D5; }

/* ---------- 8. Grids ---------- */
.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* ---------- 9. Cards & tags ---------- */
.card {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-panel);
}
.card--gold {
  border-color: rgba(231, 180, 74, .5);
  box-shadow: 0 0 0 1px rgba(231, 180, 74, .26), var(--shadow-panel);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid rgba(36, 68, 111, .18);
  border-radius: var(--r-pill);
  background: rgba(36, 68, 111, .1);
  color: var(--night-500);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.6;
}
.tag--gold { background: rgba(231, 180, 74, .18); border-color: rgba(231, 180, 74, .48); color: #8A6414; }
.tag--jade { background: rgba(47, 191, 155, .16); border-color: rgba(47, 191, 155, .44); color: #0C6B54; }
.tag--neon { background: rgba(123, 92, 255, .14); border-color: rgba(123, 92, 255, .42); color: #4B32C4; }

/* ---------- 10. Rows (dense index) ---------- */
.row-list { border-top: 1px solid var(--line-soft); }
.row-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line-soft);
  transition: transform .18s ease, background-color .18s ease;
}
.row-item:hover,
.row-item:focus-within { transform: translateY(-2px); background: rgba(231, 180, 74, .09); }

.row-idx { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.row-title { font-weight: 700; }
.row-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.row-note {
  grid-column: 2 / -1;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  transition: max-height .26s ease, opacity .2s ease;
}
.row-item:hover .row-note,
.row-item:focus-within .row-note { max-height: 96px; opacity: 1; }

/* ---------- 11. Segmented tabs ---------- */
.seg { display: block; }

.seg-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(36, 68, 111, .16);
  border-radius: var(--r-pill);
  background: rgba(36, 68, 111, .1);
}

.seg-tab {
  padding: 9px 17px;
  border-radius: var(--r-pill);
  color: var(--night-500);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.seg-tab:hover { background: rgba(255, 255, 255, .72); color: var(--night-900); }
.seg-tab[aria-selected="true"] { background: var(--gold); color: var(--night-900); }

.seg--dark .seg-list { background: rgba(250, 246, 238, .08); border-color: rgba(246, 222, 163, .24); }
.seg--dark .seg-tab { color: #CBD8EC; }
.seg--dark .seg-tab:hover { background: rgba(250, 246, 238, .14); color: #fff; }
.seg--dark .seg-tab[aria-selected="true"] { background: var(--gold); color: var(--night-900); }

.seg-panels { margin-top: 20px; }
.seg-panel[hidden] { display: none; }
.seg-panel { animation: segIn .18s ease both; }

@keyframes segIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 12. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(231, 180, 74, .2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(70% 90% at 22% 12%, rgba(123, 92, 255, .28), transparent 60%),
    radial-gradient(80% 90% at 82% 88%, rgba(47, 191, 155, .22), transparent 62%),
    linear-gradient(150deg, var(--night-500), var(--night-900));
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  max-width: none;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: rgba(11, 21, 38, .6);
  color: rgba(255, 255, 255, .9);
  font-size: 12.5px;
  line-height: 1.6;
}
.media--empty::after {
  content: "画面占位";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  color: rgba(246, 222, 163, .55);
}
.media--21x9 { aspect-ratio: 21 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--3x4 { aspect-ratio: 3 / 4; }

/* ---------- 13. Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}
.crumbs a {
  color: var(--night-500);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.crumbs a:hover { color: var(--neon); border-bottom-color: var(--neon); }
.crumbs-sep { color: rgba(18, 20, 26, .28); }
.crumbs [aria-current="page"] { color: var(--ink); }

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 6vw, 92px);
  padding: clamp(44px, 6vw, 72px) 18px 22px;
  background: var(--night-900);
  color: #C9D6EA;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  pointer-events: none;
  background:
    radial-gradient(110% 100% at 10% 100%, rgba(123, 92, 255, .2), transparent 62%),
    radial-gradient(90% 90% at 92% 100%, rgba(47, 191, 155, .16), transparent 60%),
    linear-gradient(0deg, rgba(231, 180, 74, .1), transparent 70%);
}

.footer-inner {
  position: relative;
  width: min(1120px, 100%);
  margin-inline: auto;
}

.footer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(231, 180, 74, .26);
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, var(--night-700) 0%, rgba(36, 68, 111, .68) 100%);
}

.footer-kicker {
  max-width: none;
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold);
}
.footer-brand-name {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .02em;
  color: #fff;
}
.footer-line { margin: 0 0 4px; color: rgba(201, 214, 234, .88); font-size: 15px; line-height: 1.8; }
.footer-domain {
  max-width: none;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: rgba(246, 222, 163, .72);
}

.footer-contact { display: grid; gap: 12px; align-content: start; }

.contact-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  max-width: none;
  font-size: 15px;
}
.contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(246, 222, 163, .62);
}
.contact-value { color: #fff; word-break: break-word; }
.footer-note {
  max-width: none;
  margin-top: 2px;
  color: rgba(201, 214, 234, .68);
  font-size: 13px;
  line-height: 1.75;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: clamp(28px, 3.6vw, 42px);
}

.footer-col { padding-left: 16px; border-left: 1px solid rgba(231, 180, 74, .28); }
.footer-col-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--gold-soft);
}
.footer-links { display: grid; gap: 8px; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #D9E4F5;
  font-size: 15px;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.footer-link::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 2px;
  background: rgba(217, 228, 245, .3);
  transition: background-color .18s ease;
}
.footer-link:hover { color: var(--gold); transform: translateX(3px); }
.footer-link:hover::before { background: var(--gold); }

.footer-base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px dashed rgba(246, 222, 163, .22);
  font-size: 13px;
  color: rgba(201, 214, 234, .62);
}
.footer-base p { margin: 0; max-width: none; }
.footer-legal { color: rgba(246, 222, 163, .78); }
.footer-icp { font-family: var(--font-mono); letter-spacing: .06em; }
.footer-copy { font-family: var(--font-mono); letter-spacing: .04em; }

/* ---------- 15. Reveal motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .52s ease, transform .52s cubic-bezier(.22, .72, .3, 1);
  transition-delay: calc(var(--d, 0) * 60ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
html:not(.has-js) [data-reveal] { opacity: 1; transform: none; }

/* ---------- 16. Focus ---------- */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.panel--dark :where(a, button):focus-visible,
.panel--table :where(a, button):focus-visible,
.site-footer :where(a, button):focus-visible { outline-color: var(--gold-soft); }

/* ---------- 17. Responsive ---------- */
@media (min-width: 700px) {
  .brand-tagline { display: inline-flex; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail-inner { padding-left: 24px; padding-right: 26px; }
  .wrap,
  .footer-inner,
  .footer-base { width: min(1120px, 100% - 64px); }
}

@media (max-width: 1023px) {
  .frame-nav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-height: min(76vh, 560px);
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    border-right: 0;
    border-top: 1px solid var(--line-dark);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -30px 64px -34px rgba(0, 0, 0, .9);
    transform: translateY(102%);
    visibility: hidden;
    transition: transform .28s cubic-bezier(.22, .7, .28, 1), visibility 0s linear .28s;
  }
  .frame-nav[data-open] {
    transform: translateY(0);
    visibility: visible;
    transition: transform .28s cubic-bezier(.22, .7, .28, 1), visibility 0s linear 0s;
  }
  .nav-toggle { display: grid; }
  .frame-meta { margin-top: 6px; }
  .grid-7-5,
  .grid-5-7 { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-panel { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .footer-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 719px) {
  body { font-size: 16px; }
  .rail-actions .btn-ghost { display: none; }
  .brand-domain { display: none; }
  .brand-name { font-size: 16.5px; }
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-nav-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .contact-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .seg-list { width: 100%; justify-content: space-between; }
  .seg-tab { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 419px) {
  .rail-inner { gap: 8px; padding: 0 12px; }
  .rail-actions .btn { padding: 10px 14px; font-size: 13.5px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 18. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .row-item:hover .row-note,
  .row-item:focus-within .row-note { max-height: none; }
  .rail-progress { transition: none; }
}
