:root {
  --bg: #080706;
  --card: #161310;
  --card-2: #1c1814;
  --gold: #d4b483;
  --gold-2: #f3d29b;
  --warm: #f5f2eb;
  --muted: #9a9488;
  --dim: #5c5750;
  --line: #2a2622;
  --accent: #b85c38;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --phone-w: min(430px, 100vw);
  --phone-h: min(932px, 100dvh);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", -apple-system, sans-serif;
  background: #050403;
  color: var(--warm);
  overflow: hidden;
}

.stage {
  height: 100dvh;
  display: grid;
  place-items: center;
}

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
}

@media (min-width: 520px) {
  .phone {
    width: 390px;
    height: min(844px, calc(100dvh - 32px));
    border-radius: 36px;
    border: 1px solid #2a241c;
  }
  .phone::before {
    content: "";
    position: absolute;
    top: 10px; left: 50%;
    transform: translateX(-50%);
    width: 92px; height: 22px;
    background: #050403;
    border-radius: 12px;
    z-index: 40;
    pointer-events: none;
  }
  .cover-copy { padding-top: 36px; }
  .chrome-logo { top: 36px; left: 14px; }
}

.chrome-logo {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 12px;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 3px;
  background: rgba(8, 7, 6, .52);
  border: 1px solid rgba(212, 180, 131, .22);
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chrome-logo img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.chrome-logo span {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .04em;
  color: var(--warm);
  padding-right: 4px;
}

.progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #1a1612;
  z-index: 30;
}
.progress > i {
  display: block;
  height: 100%;
  width: 6.25%;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .35s ease;
}

.deck {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.deck::-webkit-scrollbar { display: none; }

.slide {
  min-height: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero {
  position: relative;
  height: 34%;
  min-height: 180px;
  flex-shrink: 0;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,7,6,.08) 20%, rgba(8,7,6,.55) 70%, var(--bg) 100%);
}
.hero.tall { height: 100%; min-height: 100%; }
.hero.tall::after {
  background: linear-gradient(180deg, rgba(8,7,6,.15) 10%, rgba(8,7,6,.45) 45%, rgba(8,7,6,.92) 100%);
}

.body {
  flex: 1;
  min-height: 0;
  padding: 2px 18px calc(64px + var(--safe-bot));
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.kicker {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--gold);
  font-weight: 600;
}
.title {
  font-size: clamp(22px, 6.2vw, 28px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: .01em;
}
.lede {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.quote {
  color: var(--gold-2);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}
.gold-rule {
  width: 36px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.chip, .card {
  background: var(--card);
  border: 1px solid #241f1a;
  border-radius: 14px;
  padding: 10px 12px;
}
.chip .n, .card .n {
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}
.chip h3, .card h3 {
  font-size: 14px;
  font-weight: 650;
  margin: 3px 0 2px;
}
.chip p, .card p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.list-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border-radius: 12px;
  padding: 9px 11px;
  border: 1px solid #241f1a;
}
.num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 8px;
  background: #221c16;
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.list-row h3 { font-size: 14px; }
.list-row p { color: var(--muted); font-size: 12px; margin-top: 2px; }

.era {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.era + .era { margin-top: 8px; }
.era-bar {
  width: 4px;
  border-radius: 4px;
  background: var(--gold);
  flex-shrink: 0;
}
.era .card { flex: 1; }

.cover-copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 24px 22px calc(78px + var(--safe-bot));
}
.cover-copy .brand {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 18px;
}
.cover-copy h1 {
  font-size: clamp(30px, 8vw, 38px);
  line-height: 1.18;
  margin: 10px 0 12px;
}
.cover-copy .sub {
  font-size: 15px;
  color: var(--gold-2);
  line-height: 1.45;
  margin-bottom: 14px;
}

.nav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px calc(12px + var(--safe-bot));
  background: linear-gradient(180deg, transparent, rgba(8,7,6,.92) 40%);
}
.dots { display: none; }
.nav-btns { display: flex; gap: 8px; }
.nav-btns button, .notes-btn {
  border: 0;
  background: #221c16;
  color: var(--warm);
  width: 40px; height: 36px;
  border-radius: 12px;
  font-size: 16px;
}
.page-ind {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .08em;
  min-width: 52px;
  text-align: right;
}

.sheet {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 50;
  display: none;
}
.sheet.open { display: block; }
.sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 72%;
  overflow: auto;
  background: #12100e;
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(24px + var(--safe-bot));
  border-top: 1px solid #2a241c;
}
.sheet-panel h4 { color: var(--gold); font-size: 13px; margin-bottom: 8px; }
.sheet-panel p { color: #cfc6b8; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; }

.hint {
  position: absolute;
  bottom: 78px;
  left: 0; right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  z-index: 4;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%,100% { transform: translateY(0); opacity: .7; }
  50% { transform: translateY(6px); opacity: 1; }
}

.lang-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lang-row span {
  background: var(--card);
  border: 1px solid #2a241c;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.split .card h3 { color: var(--gold); font-size: 12px; margin-bottom: 6px; }
.split li { list-style: none; font-size: 13px; padding: 4px 0; color: var(--warm); }
.split.cloud li { color: var(--muted); }

.path .on .num { background: var(--gold); color: #1a140e; }
.path .list-row { margin-bottom: 6px; }

.close-line {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gold-2);
}
