
:root {
  --bg: #0e1613;
  --bg-2: #16211d;
  --card: #1b2823;
  --line: rgba(243, 236, 223, 0.14);
  --cream: #f4efe4;
  --cream-2: #fffdf8;
  --ink: #221e18;
  --muted: #5e584e;
  --gold: #e0c48a;
  --gold-ink: #2a2112;
  --good: #8ddec0;
  --good-ink: #1f7a62;
  --bad: #ffb4b8;
  --bad-ink: #8e3038;
  --soft: #d9d1c3;
  --dim: #b7b0a4;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --serif: "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lang-pending body { visibility: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--soft);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, .serif, .result-net {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
}
html.cjk h1,
html.cjk h2,
html.cjk h3,
html.cjk .serif,
html.cjk .result-net {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 10px; }

.stage { min-height: 100%; }
.phone {
  position: relative;
  min-height: 100%;
  background: #070c0b;
  isolation: isolate;
}
.phone::before,
.phone::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.phone::before {
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 72% at 50% 8%, rgba(255, 196, 70, 0.92), transparent 68%),
    radial-gradient(ellipse 85% 64% at 100% 42%, rgba(255, 40, 100, 0.82), transparent 66%),
    radial-gradient(ellipse 90% 70% at 0% 58%, rgba(20, 255, 160, 0.75), transparent 68%),
    radial-gradient(ellipse 80% 60% at 78% 100%, rgba(160, 70, 255, 0.72), transparent 68%),
    radial-gradient(ellipse 70% 50% at 18% 100%, rgba(255, 140, 30, 0.8), transparent 70%),
    linear-gradient(165deg, #5a3012 0%, #0f3a30 40%, #14102e 100%);
  background-size: 170% 170%, 160% 160%, 170% 170%, 160% 160%, 150% 150%, 100% 100%;
  animation: aurora 11s ease-in-out infinite alternate;
}
.phone::after {
  z-index: 0;
  background:
    repeating-linear-gradient(-22deg, transparent 0 36px, rgba(255, 228, 170, 0.28) 36px 38px),
    radial-gradient(circle, rgba(255, 244, 210, 0.95) 0.8px, transparent 1.1px);
  background-size: auto, 16px 16px;
  opacity: 0.8;
  mix-blend-mode: screen;
  animation: sheen 16s linear infinite;
}
.phone-scroll,
.tabbar { position: relative; z-index: 1; }
.phone-scroll { min-height: 100%; }
@keyframes aurora {
  from { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0 0; }
  to { background-position: 18% 8%, -12% 6%, 10% -8%, -8% 10%, 12% -6%, 0 0; }
}
@keyframes sheen {
  from { background-position: 0 0, 0 0; }
  to { background-position: 220px 90px, 18px 36px; }
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(10px + env(safe-area-inset-top)) 16px 0;
  background: rgba(14, 22, 19, 0.9);
  backdrop-filter: blur(16px);
}
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.logo { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--cream); font-weight: 650; }
.logo svg { width: 32px; height: 32px; flex: 0 0 auto; filter: drop-shadow(0 0 8px rgba(255, 196, 80, 0.55)); }
.wordmark {
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.02rem;
  background: linear-gradient(105deg, #fff8e6 0%, #ffe08a 38%, #fff6d0 55%, #e0ae52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo small { display: block; font-weight: 450; color: var(--dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
html.cjk .logo small { letter-spacing: 0.04em; text-transform: none; }
.lang {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  border-radius: 999px;
  max-width: 118px;
  min-height: 36px;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress { height: 2px; margin-top: 8px; background: transparent; }
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
}

.hero { position: relative; min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 54%;
  object-fit: cover;
  object-position: 70% 58%;
  background: #c4a15a;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 24, 8, 0.38) 0%, rgba(40, 24, 8, 0.05) 16%, rgba(40, 24, 8, 0) 34%, rgba(8, 12, 10, 0.55) 52%, rgba(8, 12, 10, 0.2) 100%);
}
.hero-copy { position: relative; padding: 0 18px 18px; }
.eyebrow, .kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 600;
}
html.cjk .eyebrow, html.cjk .kicker { letter-spacing: 0.06em; text-transform: none; font-size: 13px; }
.hero h1 { margin: 0; font-size: 2.45rem; line-height: 1.04; color: #f7f3ea; }
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 560; }
html.cjk .hero h1 em { font-style: normal; }
.lede { margin: 12px 0 0; color: var(--soft); font-size: 1.02rem; max-width: 36em; }
.cta { display: flex; gap: 8px; margin-top: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  flex: 1;
  text-align: center;
  touch-action: manipulation;
}
.btn.gold {
  background: linear-gradient(180deg, #ffe7b4 0%, #e7c170 46%, #c89034 100%);
  color: var(--gold-ink);
  font-weight: 650;
  box-shadow: 0 0 22px rgba(255, 196, 80, 0.55), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.btn.ghost { background: transparent; border-color: rgba(244, 239, 228, 0.35); color: var(--cream); }
.btn.line, .btn.quiet {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 12px;
  min-height: 46px;
}
.btn.quiet { color: var(--dim); }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 16px 8px;
}
.stats div {
  border: 1px solid rgba(255, 210, 130, 0.42);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(8, 10, 9, 0.42);
  box-shadow: 0 0 24px rgba(255, 180, 60, 0.16);
}
.stats strong { display: block; color: var(--cream); font-size: 0.98rem; }
.stats span { color: var(--dim); font-size: 0.82rem; }

.tools { padding: 12px 16px 28px; }
.tool-intro h2 { margin: 8px 0 6px; font-size: 1.8rem; color: var(--cream); }
.tool-intro p { margin: 0 0 14px; color: var(--soft); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button, .seg button, .chips button, .tabbar button, .lot button, .actions button, .quiz-opt, .checks button {
  touch-action: manipulation;
}
.tabs button {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
}
.tabs button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.panel[hidden] { display: none !important; }
.panel-head { display: flex; justify-content: space-between; gap: 10px; align-items: end; margin-bottom: 10px; }
.panel-head p { margin: 0; color: var(--dim); font-size: 0.92rem; }
.unit { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--gold); min-width: 88px; }
.seg { display: flex; padding: 4px; gap: 4px; background: #0c1311; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 10px; }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--soft); }
.seg button.on { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; font-size: 12px; color: var(--dim); }
.field.full { grid-column: 1 / -1; }
input, select {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(224, 196, 138, 0.28);
  background: #0c1311;
  color: var(--cream);
  padding: 0 12px;
  font-size: 16px;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 16px) 22px, calc(100% - 11px) 22px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.hint { margin: 0 0 8px; color: var(--dim); font-size: 0.84rem; }
.warn { margin: 0 0 8px; color: #f0d7a2; font-size: 0.88rem; min-height: 0; }
.warn:empty { display: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(224, 196, 138, 0.35);
  background: transparent;
  color: var(--gold);
}
.chips button.on { background: var(--gold); color: var(--gold-ink); }
.result {
  margin-top: 4px;
  padding: 12px;
  border-radius: 16px;
  background: #101815;
  border: 1px solid var(--line);
}
.result-kicker { margin: 0; color: var(--dim); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
html.cjk .result-kicker { text-transform: none; letter-spacing: 0; }
.result-net { margin: 2px 0 0; font-size: 2.5rem; line-height: 1.05; color: var(--cream); font-variant-numeric: tabular-nums; }
.result-net.up { color: var(--good); }
.result-net.down { color: var(--bad); }
.result-sub { margin: 4px 0 10px; color: var(--soft); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0; }
.result-grid div { min-width: 0; }
.result-grid dt { color: var(--dim); font-size: 11px; }
.result-grid dd { margin: 2px 0 0; color: var(--cream); font-variant-numeric: tabular-nums; font-size: 0.92rem; }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: #0c1311; margin: 10px 0; }
.bar i { display: block; height: 100%; }
.bar .net { background: #1f7a62; }
.bar .fee { background: var(--gold); }
.bar .down { background: #8e3038; }
.how, .note { margin: 0; color: var(--dim); font-size: 0.86rem; }
.how { font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.note.bad { color: #ffb4b8; }
.note.good { color: var(--good); }
.lines { list-style: none; margin: 8px 0 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lines span { color: var(--dim); }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions button { flex: 1; }
.lot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.lot-top { display: flex; justify-content: space-between; align-items: center; color: var(--gold); font-size: 13px; }
.textbtn { border: 0; background: transparent; color: var(--dim); min-height: 36px; padding: 0 4px; }
.addlot { width: 100%; margin: 4px 0 8px; }
.history { margin-top: 16px; }
.history h3 { margin: 0 0 8px; font-size: 1.15rem; color: var(--cream); }
.note-card {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--soft);
}
.note-card b { display: block; color: var(--cream); font-weight: 600; }
.note-card small { color: var(--dim); }
.note-card .x { border: 0; background: transparent; color: var(--dim); min-width: 44px; }

.journal {
  background: var(--paper, var(--cream));
  background: #f3eee4;
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  padding: 28px 18px 8px;
}
.journal .kicker { color: #8a6a32; }
.journal h2 { font-size: 1.85rem; line-height: 1.15; margin: 0 0 8px; }
.journal h3 { font-size: 1.28rem; line-height: 1.25; margin: 1.3em 0 0.4em; }
.journal p, .journal li { font-size: 1.02rem; line-height: 1.7; }
.journal .deck { font-size: 1.08rem; color: #3c362e; }
.toc { list-style: none; padding: 0; margin: 14px 0 8px; display: grid; gap: 6px; }
.toc a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  background: var(--cream-2);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #e6dccb;
}
.toc a span { color: #8a6a32; font-variant-numeric: tabular-nums; }
.shot { margin: 14px 0; }
.shot img { width: 100%; height: 210px; object-fit: cover; border-radius: 16px; }
.shot figcaption { color: var(--muted); font-size: 0.82rem; line-height: 1.45; margin-top: 6px; }
.formula {
  background: #221e18;
  color: #f4efe4;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
}
.formula p { margin: 0 0 8px; font-variant-numeric: tabular-nums; font-size: 0.95rem !important; line-height: 1.45 !important; }
.formula p:last-child { margin-bottom: 0; }
.pull {
  margin: 14px 0;
  padding: 2px 0 2px 12px;
  border-left: 2px solid #b8893d;
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.35;
}
html.cjk .pull { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-weight: 700; }
.stack { list-style: none; padding: 0; margin: 10px 0; }
.stack li { background: var(--cream-2); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e6dccb; }
.stack b { display: block; }
.paper-card {
  background: var(--cream-2);
  border: 1px solid #e6dccb;
  border-radius: 18px;
  padding: 12px;
  margin: 12px 0;
}
.journal input, .journal select {
  background: #fffdf8;
  color: var(--ink);
  border-color: #e3d9c8;
}
.journal .unit { color: #8a6a32; }
.journal .result { background: #fffdf8; border-color: #e6dccb; }
.journal .result-net { color: var(--ink); }
.journal .result-net.up { color: var(--good-ink); }
.journal .result-net.down { color: var(--bad-ink); }
.journal .how, .journal .note, .journal .result-kicker, .journal .result-grid dt { color: var(--muted); }
.journal .result-grid dd, .journal .lines li { color: var(--ink); }
.journal .warn { color: #7a5414; }
.journal .btn.line { color: var(--ink); border-color: #d9d0c2; }

.checks { list-style: none; padding: 0; margin: 0; }
.checks button {
  width: 100%;
  display: flex;
  gap: 10px;
  text-align: left;
  background: var(--cream-2);
  border: 1px solid #e6dccb;
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 8px;
  color: var(--ink);
  min-height: 52px;
}
.checks .box {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1.5px solid #8a6a32;
}
.checks button[aria-pressed="true"] { background: #e7f4ee; border-color: #1f7a62; }
.checks button[aria-pressed="true"] .box { background: #1f7a62; box-shadow: inset 0 0 0 3px #e7f4ee; }

.rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.city {
  flex: 0 0 84%;
  scroll-snap-align: start;
  background: var(--cream-2);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e6dccb;
}
.city img { height: 150px; width: 100%; object-fit: cover; }
.city div { padding: 12px; }
.city p { margin: 6px 0; color: #3f392f; }
.pair { display: grid; gap: 12px; }
.story { margin-top: 18px; }
.story img { height: 200px; }

.gloss-tools { margin: 10px 0; }
.terms { display: grid; gap: 8px; }
.term { background: var(--cream-2); border: 1px solid #e6dccb; border-radius: 16px; padding: 12px; }
.term[hidden] { display: none !important; }
.term h3 { margin: 0 0 4px; font-size: 1.12rem; }
.term p { margin: 0; }
.empty { color: var(--muted); }

.quiz-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.88rem; }
.dots { display: flex; gap: 5px; margin: 8px 0 12px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: #e0d5c4; display: block; }
.dots i.on { background: #8a6a32; }
.quiz-opt { width: 100%; text-align: left; min-height: 52px; border-radius: 14px; border: 1px solid #e3d9c8; background: #fffdf8; margin-bottom: 8px; padding: 12px; color: var(--ink); }
.quiz-opt.good { border-color: #1f7a62; background: #e7f6f1; }
.quiz-opt.bad { border-color: #a33b45; background: #fbeeee; }
.quiz-opt:disabled { cursor: default; }
.explain { background: #fffdf8; border-radius: 14px; padding: 12px; border: 1px solid #e6dccb; }
.score { font-size: 3rem; margin: 6px 0; }

.journal .chips button {
  color: #5c4518;
  border-color: #c9b89a;
  background: #fffdf8;
}
.journal .chips button.on {
  background: #2a2112;
  color: #f6f1e7;
  border-color: #2a2112;
}
.city .btn, #quizBox .btn { width: 100%; margin-top: 8px; }
#tools, #guide, #examples, #glossary, #quiz, #faq,
#s-price, #s-round, #s-fees, #s-basis, #s-even, #s-size, #s-books, #s-mistakes, #s-limits {
  scroll-margin-top: 76px;
}
.faq { border-bottom: 1px solid #e0d5c4; }
.faq summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:before { content: "+"; color: #8a6a32; font-size: 1.3rem; line-height: 1; }
.faq[open] summary:before { content: "–"; }
.faq p { margin: 0 0 12px; }

.foot {
  background: transparent;
  color: var(--soft);
  padding: 28px 18px 24px;
}
.foot h2 { color: var(--cream); font-size: 1.6rem; margin: 0 0 8px; }
.foot a { color: var(--gold); }
.fine { color: var(--dim); font-size: 0.84rem; }
.foot details { margin-top: 10px; }
.foot summary { cursor: pointer; color: var(--gold); }

.tabbar {
  display: flex;
  background: rgba(14, 22, 19, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  z-index: 30;
}
.tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--dim);
  min-height: 58px;
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  font-size: 11px;
}
.tabbar button.on { color: var(--gold); }
html[dir="rtl"] .progress span { transform-origin: right center; }
.lang-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lang-sheet[hidden] { display: none !important; }
.lang-card {
  width: min(420px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: #121a17;
  color: var(--cream);
  border-radius: 22px 22px 0 0;
  padding: 14px 14px 22px;
}
.lang-card p { margin: 0 0 10px; color: var(--dim); font-size: 0.86rem; }
.lang-card input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1311;
  padding: 0 12px;
  margin-bottom: 8px;
}
.lang-list { display: grid; gap: 6px; }
.lang-list button {
  text-align: start;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0 12px;
}
.lang-list button.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 700; }
.lang-card .close-lang { width: 100%; margin-top: 8px; }
.safari-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 186, 70, 0.28), transparent 58%),
    rgba(18, 10, 4, 0.78);
}
.safari-gate[hidden] { display: none !important; }
.safari-card {
  width: min(400px, 100%);
  overflow: hidden;
  background: #140e08;
  color: #f7f3ea;
  border: 1px solid rgba(255, 214, 140, 0.62);
  border-radius: 26px;
  box-shadow:
    0 0 0 1px rgba(255, 214, 140, 0.2),
    0 0 48px rgba(255, 176, 60, 0.32),
    0 28px 70px rgba(0, 0, 0, 0.55);
}
.safari-visual { position: relative; height: 188px; }
.safari-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 58%;
}
.safari-visual:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40, 24, 8, 0.05) 20%, rgba(20, 14, 8, 0.35) 62%, #140e08 100%);
}
.safari-copy { position: relative; margin-top: -28px; padding: 0 18px 18px; }
.safari-mark {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.safari-lead {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.48rem;
  line-height: 1.22;
  color: #f7f3ea;
  font-weight: 600;
}
html.cjk .safari-lead { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; font-weight: 700; }
.safari-note { margin: 12px 0 0; color: var(--soft); font-size: 0.98rem; }
.safari-gate .btn { flex: none; width: 100%; margin-top: 16px; }
html.safari-locked .phone-scroll { overflow: hidden; }
.tabbar svg { width: 20px; height: 20px; display: block; margin: 0 auto 3px; }

@media (max-width: 919px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (min-width: 920px) {
  html, body { height: 100%; overflow: hidden; }
  .stage {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 18px 0;
    box-sizing: border-box;
    background:
      radial-gradient(ellipse at 12% 18%, rgba(255, 190, 70, 0.42), transparent 42%),
      radial-gradient(ellipse at 88% 84%, rgba(46, 220, 160, 0.32), transparent 46%),
      radial-gradient(ellipse at 80% 10%, rgba(255, 70, 120, 0.22), transparent 36%),
      linear-gradient(180deg, rgba(6, 10, 8, 0.28), rgba(6, 10, 8, 0.5)),
      url("img/image-1.jpg") center / cover no-repeat;
  }
  .phone {
    width: 420px;
    height: calc(100vh - 36px);
    max-height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(255, 214, 140, 0.45);
    box-shadow:
      0 0 0 1px rgba(255, 214, 140, 0.2),
      0 0 48px rgba(255, 176, 60, 0.35),
      0 30px 90px rgba(0, 0, 0, 0.48);
  }
  .phone::before,
  .phone::after { position: absolute; }
  .phone-scroll { flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: #b8893d transparent; }
  .tabbar { position: relative; flex: 0 0 auto; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 2.05rem; }
  .result-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

