/* =========================================================
   luckywin-liying.com.cn  /assets/site.css
   共享外壳：侧边导览轨道 + 控制台面板语言
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --deep-900: #061A2E;
  --deep-700: #0B2A45;
  --deep-500: #123B5C;
  --cyan-500: #18C7D8;
  --cyan-300: #7FE7F2;
  --gold-500: #E7A83E;
  --gold-300: #F5D28A;
  --gray-100: #E9EEF3;
  --gray-300: #C3CED9;
  --ink: #F4F8FB;
  --ok: #3ED598;
  --warn: #F2B84B;

  --rail-w: 268px;
  --shell-max: 1160px;
  --gutter: clamp(18px, 3.2vw, 44px);
  --cut: 16px;

  --line: rgba(195, 206, 217, 0.16);
  --line-strong: rgba(195, 206, 217, 0.32);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

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

/* ---------- 3. Document ---------- */
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--deep-900);
  background-image:
    linear-gradient(180deg, rgba(11, 42, 69, 0.92) 0%, rgba(6, 26, 46, 0) 580px),
    radial-gradient(860px 540px at 8% -6%, rgba(24, 199, 216, 0.15), transparent 62%),
    radial-gradient(780px 500px at 100% 0%, rgba(231, 168, 62, 0.1), transparent 58%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  overflow-x: hidden;
}

::selection { background: rgba(24, 199, 216, 0.32); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan-300);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. Utilities ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.text-dim { color: var(--gray-300); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.slash {
  height: 2px;
  border: 0;
  background: repeating-linear-gradient(90deg, rgba(24, 199, 216, 0.55) 0 10px, transparent 10px 20px);
}
.divider { height: 1px; border: 0; background: var(--line); }

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold-500);
  color: #20160A;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
  box-shadow: 0 14px 30px -16px rgba(231, 168, 62, 0.9);
  transition: top 0.22s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 6. Chips / status / tags ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--gray-300);
  background: rgba(233, 238, 243, 0.05);
  border: 1px solid var(--line);
  border-radius: 3px;
  white-space: nowrap;
}
.chip--cyan {
  color: var(--cyan-300);
  border-color: rgba(24, 199, 216, 0.42);
  background: rgba(24, 199, 216, 0.09);
}
.chip--gold {
  color: var(--gold-300);
  border-color: rgba(231, 168, 62, 0.42);
  background: rgba(231, 168, 62, 0.1);
}
.chip--ghost { color: var(--gray-300); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray-300);
}
.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  box-shadow: 0 0 0 3px rgba(195, 206, 217, 0.15);
  flex: none;
}
.status--ok::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62, 213, 152, 0.18);
  animation: breathe 3.2s var(--ease) infinite;
}
.status--warn::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(242, 184, 75, 0.2);
  animation: breathe 3.2s var(--ease) infinite;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--gray-300);
  background: rgba(233, 238, 243, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tag--cyan { color: var(--cyan-300); border-color: rgba(24, 199, 216, 0.4); background: rgba(24, 199, 216, 0.08); }
.tag--gold { color: var(--gold-300); border-color: rgba(231, 168, 62, 0.4); background: rgba(231, 168, 62, 0.08); }

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.22s var(--ease),
              box-shadow 0.25s var(--ease);
}
.btn--primary {
  background: var(--gold-500);
  color: #21160A;
  box-shadow: 0 12px 26px -16px rgba(231, 168, 62, 0.95);
}
.btn--primary:hover { background: var(--gold-300); transform: translateY(-2px); }
.btn--ghost {
  background: rgba(233, 238, 243, 0.05);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: rgba(24, 199, 216, 0.6);
  background: rgba(24, 199, 216, 0.12);
  color: var(--cyan-300);
  transform: translateY(-2px);
}
.btn--quiet { color: var(--gray-300); padding: 8px 12px; }
.btn--quiet:hover { color: var(--cyan-300); background: rgba(24, 199, 216, 0.1); }
.btn--block { width: 100%; }

/* ---------- 8. Header / rail ---------- */
.site-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 26px 20px 22px;
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(24, 199, 216, 0.16), transparent 70%),
    linear-gradient(180deg, #0B2A45 0%, #08213A 58%, #061A2E 100%);
  border-right: 1px solid var(--line);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 199, 216, 0.4) transparent;
}
.site-rail::-webkit-scrollbar { width: 6px; }
.site-rail::-webkit-scrollbar-thumb { background: rgba(24, 199, 216, 0.35); border-radius: 3px; }

.rail__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.rail__mark { display: inline-flex; align-items: center; gap: 9px; }
.rail__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(24, 199, 216, 0.16), 0 0 14px rgba(24, 199, 216, 0.7);
  animation: breathe 3.6s var(--ease) infinite;
  flex: none;
}
.rail__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.rail__sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--gray-300);
}

.rail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0 12px;
}

.rail-nav { padding: 4px 0 14px; }
.rail-nav__list { display: flex; flex-direction: column; gap: 2px; }
.rail-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 3px;
  transition: background 0.25s var(--ease), color 0.2s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.rail-nav__link:hover {
  background: rgba(24, 199, 216, 0.1);
  border-left-color: var(--cyan-300);
  color: var(--cyan-300);
  transform: translateX(3px);
}
.rail-nav__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(24, 199, 216, 0.18), rgba(24, 199, 216, 0));
  border-left-color: var(--cyan-500);
  color: var(--cyan-300);
  font-weight: 600;
}
.rail-nav__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  opacity: 0.75;
}
.rail-nav__link[aria-current="page"] .rail-nav__idx { color: var(--cyan-300); opacity: 1; }

.rail-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.rail-actions__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-300);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(233, 238, 243, 0.06);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-toggle:hover { border-color: rgba(24, 199, 216, 0.55); background: rgba(24, 199, 216, 0.1); }
.nav-toggle__bars { position: relative; display: block; width: 16px; height: 10px; flex: none; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.28s var(--ease), top 0.28s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.site-rail[data-open] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.site-rail[data-open] .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }
.site-rail[data-open] .nav-toggle { border-color: rgba(24, 199, 216, 0.6); color: var(--cyan-300); }

/* ---------- 9. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, rgba(11, 42, 69, 0.78), rgba(6, 26, 46, 0.98) 62%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-500), var(--gold-500), transparent);
  opacity: 0.55;
}

.footer-shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(30px, 4.5vw, 58px) var(--gutter) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 3.4vw, 40px);
  padding-bottom: clamp(22px, 3vw, 34px);
}

.footer-col--brand { max-width: 40ch; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.footer-brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(24, 199, 216, 0.15);
  flex: none;
}
.footer-tagline {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--gray-300);
}
.footer-note {
  margin-top: 14px;
  padding-left: 10px;
  border-left: 2px solid rgba(231, 168, 62, 0.5);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--gold-300);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-300);
  margin-bottom: 12px;
}
.footer-col__links { display: flex; flex-direction: column; gap: 9px; }
.footer-col__links a {
  font-size: 14.5px;
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.22s var(--ease);
}
.footer-col__links a:hover { color: var(--cyan-300); padding-left: 5px; }

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: clamp(16px, 2.4vw, 22px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.copy-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 11px;
  font-family: var(--font-mono);
  background: rgba(233, 238, 243, 0.05);
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
              transform 0.22s var(--ease), color 0.25s var(--ease);
}
.copy-btn:hover {
  border-color: rgba(24, 199, 216, 0.55);
  background: rgba(24, 199, 216, 0.1);
  transform: translateY(-1px);
}
.copy-btn__key { font-size: 11px; letter-spacing: 0.08em; color: var(--gray-300); }
.copy-btn__val { font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink); }
.copy-btn[data-copy-state="ok"] { border-color: rgba(62, 213, 152, 0.6); background: rgba(62, 213, 152, 0.12); }
.copy-btn[data-copy-state="ok"] .copy-btn__val { color: var(--ok); }
.copy-btn[data-copy-state="ok"]::after {
  content: "已复制";
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ok);
}
.copy-btn[data-copy-state="fail"] { border-color: rgba(242, 184, 75, 0.55); }
.copy-btn[data-copy-state="fail"]::after {
  content: "请手动选中文案";
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--warn);
}

.footer-addr,
.footer-hours {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--gray-300);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 22px;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
}

/* ---------- 10. Layout: shell / grid / panel ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: clamp(26px, 4vw, 54px) var(--gutter) clamp(48px, 6vw, 84px);
}

.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--12 > * { grid-column: 1 / -1; }

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(155deg, rgba(18, 59, 92, 0.92), rgba(11, 42, 69, 0.84));
  border: 1px solid var(--line);
  border-radius: 4px;
}
.panel--cut {
  border-radius: 0;
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}
.panel--raised {
  box-shadow: 0 26px 60px -44px rgba(0, 0, 0, 0.9);
}
.panel--accent {
  border-color: rgba(24, 199, 216, 0.48);
  box-shadow: 0 0 0 1px rgba(24, 199, 216, 0.08), 0 30px 60px -44px rgba(24, 199, 216, 0.75);
}
.panel--gold {
  border-color: rgba(231, 168, 62, 0.45);
  box-shadow: 0 0 0 1px rgba(231, 168, 62, 0.07), 0 30px 60px -44px rgba(231, 168, 62, 0.7);
}
.panel--light {
  background: var(--gray-100);
  border-color: rgba(6, 26, 46, 0.12);
  color: #0A2136;
}
.panel--light .panel__label,
.panel--light .text-dim { color: #45607A; }

.panel__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-300);
}

/* ---------- 11. Section / heading rhythm ---------- */
.section { margin-top: clamp(40px, 5.6vw, 76px); }
.section__head { margin-bottom: clamp(16px, 2.2vw, 26px); }
.section__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section__lead {
  max-width: 66ch;
  margin-top: 10px;
  font-size: 16px;
  color: var(--gray-300);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-300);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan-500), transparent);
  flex: none;
}

.page-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* ---------- 12. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(16px, 2vw, 26px);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
}
.breadcrumb a { color: var(--gray-300); text-decoration: none; transition: color 0.2s var(--ease); }
.breadcrumb a:hover { color: var(--cyan-300); }
.breadcrumb__sep { opacity: 0.5; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* ---------- 13. Prose ---------- */
.prose {
  font-size: 16.5px;
  line-height: 1.85;
  color: #DCE6EF;
}
.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 1em; }
.prose h2 {
  margin: 1.8em 0 0.6em;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose h3 {
  margin: 1.5em 0 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.4;
  color: var(--ink);
}
.prose ul { display: flex; flex-direction: column; gap: 8px; }
.prose li { position: relative; padding-left: 18px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 1px;
  background: var(--cyan-500);
}
.prose strong { color: var(--ink); font-weight: 700; }

/* ---------- 14. Media placeholders ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(127, 231, 242, 0.24), transparent 58%),
    linear-gradient(150deg, rgba(24, 199, 216, 0.18), rgba(11, 42, 69, 0.92) 52%, rgba(6, 26, 46, 0.98));
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(6, 26, 46, 0.55), transparent 55%),
    repeating-linear-gradient(90deg, rgba(244, 248, 251, 0.05) 0 1px, transparent 1px 56px);
}
.media--wide { aspect-ratio: 16 / 7; }
.media--screen { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }
.media__label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cyan-300);
  background: rgba(6, 26, 46, 0.74);
  border: 1px solid rgba(24, 199, 216, 0.32);
  border-radius: 2px;
}

/* ---------- 15. Injected UI: scroll progress + to-top ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan-500), var(--gold-500));
}
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: rgba(11, 42, 69, 0.92);
  border: 1px solid rgba(24, 199, 216, 0.4);
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.to-top[data-visible] { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { border-color: var(--cyan-300); color: var(--cyan-300); }

/* ---------- 16. Reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal][data-revealed] { opacity: 1; transform: none; }

/* ---------- 17. Keyframes ---------- */
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- 18. Responsive ---------- */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 760px) {
  .col-3 { grid-column: span 3 / span 3; }
  .col-4 { grid-column: span 4 / span 4; }
  .col-5 { grid-column: span 5 / span 5; }
  .col-6 { grid-column: span 6 / span 6; }
  .col-7 { grid-column: span 7 / span 7; }
  .col-8 { grid-column: span 8 / span 8; }
  .col-9 { grid-column: span 9 / span 9; }
  .col-12 { grid-column: span 12 / span 12; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .footer-grid { grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(120px, 1fr)); }
}

@media (max-width: 1023px) {
  .site-rail {
    position: sticky;
    inset: auto;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 12px 16px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.95);
  }
  .rail__brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }
  .rail__name { font-size: 17px; }
  .rail__sub { display: none; }
  .rail__meta { padding: 0; flex: 0 0 auto; }
  .rail__meta .chip { font-size: 10.5px; }
  .nav-toggle { display: inline-flex; }

  .rail-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line);
  }
  .site-rail[data-open] .rail-nav { display: block; animation: railDrop 0.28s var(--ease); }
  .rail-nav__list { flex-direction: column; gap: 2px; }
  .rail-nav__link { padding: 11px 10px; font-size: 15px; }
  .rail-nav__link:hover { transform: none; }

  .rail-actions {
    order: 5;
    flex: 1 0 100%;
    display: none;
    margin-top: 0;
    padding-top: 12px;
    padding-bottom: 6px;
    flex-direction: row;
    flex-wrap: wrap;
    border-top: 0;
  }
  .site-rail[data-open] .rail-actions { display: flex; }
  .rail-actions__label { flex: 1 0 100%; }
  .rail-actions .btn { flex: 1 1 44%; }

  .to-top { right: 12px; bottom: 12px; }
}

@media (min-width: 1024px) and (max-height: 700px) {
  .site-rail { padding: 18px 16px 16px; }
  .rail__name { font-size: 18px; }
  .rail-nav__link { padding: 7px 10px; font-size: 13.5px; }
  .rail-actions { gap: 6px; padding-top: 12px; }
  .rail-actions .btn { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .footer-contact { flex-direction: column; align-items: flex-start; }
  .copy-btn { width: 100%; justify-content: space-between; }
  .copy-btn__val { word-break: break-all; text-align: right; }
}

@keyframes railDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .rail__dot { animation: none; }
  .status--ok::before,
  .status--warn::before { animation: none; }
}
