:root {
  --bg: #050a16;
  --bg-2: #08111f;
  --card: #0c1728;
  --line: #1a2940;
  --ink: #f7f9fc;
  --muted: #8fa0b8;
  --red: #ff1744;
  --blue: #3267ff;
  --gold: #ffc928;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --sans: "Inter", "Avenir Next", sans-serif;
  --display: "Space Grotesk", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(50, 103, 255, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 0%, rgba(255, 23, 68, 0.14), transparent 55%),
    var(--bg);
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a { cursor: pointer; }
img { max-width: 100%; height: auto; }
a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: #111;
  padding: 8px 12px;
  z-index: 8;
}
.skip:focus { top: 12px; }
.wrap { width: min(1280px, calc(100% - 32px)); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.top {
  position: sticky;
  top: 0;
  z-index: 6;
  background: rgba(5, 10, 22, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.top-bar {
  width: min(1280px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.mark { width: 34px; height: 34px; display: block; }
.brand-text { display: grid; line-height: 1; }
.brand-text strong {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}
.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a[aria-current="page"], .nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); }
.nav-toggle { display: none; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.vote-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0b1528;
  white-space: nowrap;
}
.vote-counter strong {
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.vote-counter span { color: var(--muted); font-size: 0.82rem; font-weight: 650; }
.search { width: min(240px, 28vw); }
.search input, .field input, .field textarea, .filter-bar select {
  width: 100%;
  background: #070f1e;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
}
.search input:focus, .field input:focus, .field textarea:focus, .filter-bar select:focus {
  border-color: var(--blue);
}
.icon-round, .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #0b1528;
  flex: 0 0 auto;
}
.icon-round svg { width: 18px; height: 18px; fill: var(--ink); }
.avatar {
  background: linear-gradient(160deg, #3267ff, #ff1744);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.avatar.lg { width: 46px; height: 46px; }

.hero {
  position: relative;
  display: block;
  min-height: 640px;
  margin-top: 16px;
  padding: 46px 48px 40px;
  border-radius: 22px;
  overflow: hidden;
  background: #050814 url("../img/scenes/hero-night.jpg") center right / cover no-repeat;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(560px, 52%);
}
.title-line:last-child { font-size: 0.92em; white-space: nowrap; }
.eyebrow {
  margin: 0 0 10px;
  color: #c5d0e0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.15rem, 3.1vw, 3.7rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-transform: uppercase;
}
.title-line { display: block; }
.lede { max-width: 46ch; color: #c5d0e0; font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: white;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost {
  background: rgba(8, 14, 28, 0.35);
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}
.btn-slim { padding: 10px 14px; font-size: 0.88rem; }
.stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 22px;
  margin: 8px 0 0;
}
.stats div { display: flex; align-items: center; gap: 10px; }
.stats svg { width: 22px; height: 22px; fill: #d5deea; }
.stats dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}
.stats dt { color: #c5d0e0; font-size: 0.78rem; }

.hero-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
}
.hero-can {
  position: absolute;
  bottom: -28px;
  width: auto;
  height: 520px;
  max-width: none;
  pointer-events: auto;
  filter: drop-shadow(0 30px 18px rgba(0, 0, 0, 0.55));
  z-index: 1;
}
.can-a { left: 55%; height: 455px; transform: rotate(-6deg); bottom: -16px; }
.can-b { left: 66%; height: 545px; bottom: -42px; z-index: 2; }
.can-c { right: 0; height: 485px; transform: rotate(5deg); bottom: -24px; }
.can-d { right: -7%; height: 300px; bottom: 8px; opacity: 0.9; z-index: 0; }
.bubble {
  position: absolute;
  top: 36px;
  right: 36px;
  z-index: 3;
  margin: 0;
  width: 150px;
  font-family: "Caveat", cursive;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 0.92;
  font-size: 1.85rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -46px;
  width: 70px;
  height: 48px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-radius: 0 0 0 70px;
  transform: rotate(8deg);
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 18px 0 36px;
  align-items: start;
}
.panel, .side-card {
  background: rgba(12, 23, 40, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.panel { padding: 16px; margin-bottom: 16px; }
.panel-head, .panel-head h2, .side-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head { margin-bottom: 12px; }
.panel h2, .side-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.panel-head p, .side-card p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.panel-head h2 span, .trophy { font-weight: 500; color: var(--muted); font-family: var(--sans); font-size: 0.86rem; }
.trophy { margin-right: 6px; }
.more { color: var(--muted); text-decoration: none; font-size: 0.88rem; white-space: nowrap; }
.more:hover { color: var(--ink); }
.can-ico {
  width: 14px;
  height: 18px;
  margin-right: 8px;
  border-radius: 3px;
  display: inline-block;
  background: linear-gradient(#ff1744, #3267ff);
  vertical-align: -3px;
}

.top5 {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}
.top-card, .flavor {
  background: #091322;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease;
}
.top-card:hover, .flavor:hover { transform: translateY(-3px) scale(1.02); border-color: #314864; }
.scene {
  position: relative;
  height: 156px;
  display: grid;
  place-items: end center;
  padding-bottom: 6px;
  background-size: cover;
  background-position: center;
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 35%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}
.scene .can-photo, .scene .can { position: relative; z-index: 1; }
.scene .can-photo, .scene .can {
  width: auto;
  height: auto;
  max-width: 72px;
  max-height: 128px;
  margin: 0;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.45));
}
.rank-badge, .score-badge, .heart {
  position: absolute;
  top: 8px;
  z-index: 1;
}
.rank-badge, .score-badge {
  left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(5, 10, 22, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
}
.score-badge { color: var(--gold); gap: 3px; }
.score-badge svg { width: 12px; height: 12px; fill: var(--gold); }
.heart {
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(5, 10, 22, 0.55);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.heart svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.heart.on { color: var(--red); }
.heart.on svg { fill: var(--red); }
.card-copy { padding: 8px 10px 12px; }
.card-copy h3 { margin: 0; font-size: 0.92rem; letter-spacing: -0.02em; }
.name-row { display: flex; align-items: center; gap: 6px; }
.name-row > span:first-child { min-width: 0; }
.name-flag { font-size: 0.95rem; flex: 0 0 auto; }
.card-copy .line { margin: 2px 0 8px; color: var(--muted); font-size: 0.78rem; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; }
.pill {
  border-radius: 999px;
  padding: 3px 7px;
  background: #101c30;
  color: var(--muted);
  font-size: 0.68rem;
}
.mini-score { color: var(--gold); font-weight: 700; font-size: 0.82rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
#untasted-filter[aria-pressed="true"] {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}
.rank-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.rank-row {
  display: grid;
  grid-template-columns: 42px 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #0c1728;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}
.rank-row:hover { border-color: #314864; }
.rank-place { font-family: var(--display); font-size: 1.35rem; color: var(--gold); }
.rank-can { display: grid; place-items: center; }
.rank-can .can-photo, .rank-can .can { max-height: 78px; max-width: 42px; width: auto; height: auto; }
.rank-row h3 { margin: 0; font-size: 1.05rem; }
.rank-meta { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.rank-score { text-align: right; }
.rank-score strong { font-family: var(--display); font-size: 1.35rem; }
.sheet-actions { flex-wrap: wrap; }
#ranking .panel-head { margin-bottom: 8px; }
#ranking[hidden], #flavor[hidden], #home[hidden] { display: none; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.flavor .scene { height: 188px; }
.flavor .scene .can-photo, .flavor .scene .can { max-height: 156px; max-width: 84px; }

.rail { display: grid; gap: 12px; position: sticky; top: 88px; }
.side-card { padding: 14px; }
.profile { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.profile .btn { grid-column: 1 / -1; }
.profile p { margin: 2px 0 0; }
.progress-label { margin: 0; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #101c30;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7aa2ff);
  transition: width 280ms ease;
}
.pct { margin: 0; color: var(--blue); font-weight: 700; white-space: nowrap; }
.side-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  text-align: center;
}
.side-stats li {
  background: #101c30;
  border-radius: 12px;
  padding: 10px 4px;
}
.side-stats strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.side-stats span { color: var(--muted); font-size: 0.75rem; }
.level { display: flex; gap: 10px; align-items: center; }
.badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #111;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font-size: 1.1rem;
}
.review {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.review:first-child { border-top: 0; padding-top: 4px; }
.review .who { font-weight: 700; font-size: 0.9rem; }
.review .meta { color: var(--gold); font-size: 0.8rem; }
.review p { margin: 2px 0 0; color: var(--muted); font-size: 0.84rem; }
.empty { color: var(--muted); }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); }
.foot-grid { display: grid; gap: 14px; }
.foot-brand {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.disclaimer { margin: 0; max-width: 78ch; font-size: 0.88rem; }
.foot-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.text-btn {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn.danger { color: #ff8d9a; }
.file-btn input { display: none; }

.flag { font-size: 1rem; line-height: 1; }
.card-flag { position: absolute; top: 8px; right: 40px; }
.sheet-flag { position: absolute; top: 18px; right: 56px; font-size: 1.4rem; }

.can {
  width: 54px;
  height: 92px;
  border-radius: 6px;
  position: relative;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 24%, transparent 68%, rgba(255, 255, 255, 0.28)),
    linear-gradient(180deg, var(--light), var(--can) 46%, var(--dark));
}
.can span {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 34px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a120e;
  font-size: 0.5rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}
.can.lg { width: 92px; height: 150px; }
.can-photo { width: 72px; height: auto; display: block; }
.can-photo.lg { width: 132px; }
.can-hit { display: block; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.can-hit:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.zoom {
  width: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 28px 12px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.zoom::backdrop { background: rgba(1, 8, 22, 0.88); }
.zoom-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(86vw, 380px);
  max-height: min(78vh, 860px);
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-out;
  filter: drop-shadow(0 28px 22px rgba(0, 8, 24, 0.6));
}
#zoom-caption {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}
.zoom .icon-btn { position: fixed; top: 16px; right: 16px; }

.sheet {
  width: min(560px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #08111f;
  color: var(--ink);
  padding: 22px;
  box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgba(1, 8, 22, 0.76); }
.sheet-add { width: min(460px, calc(100vw - 24px)); }
.account-tabs { display: flex; gap: 8px; margin: 16px 0 4px; }
.account-tabs button {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}
.account-tabs button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
#account-form[hidden], #account-in[hidden], #pseudo-field[hidden], .account-tabs[hidden] { display: none; }
#account-message.is-error { color: var(--red); }
.sheet h2 { margin: 0; font-family: var(--display); letter-spacing: -0.03em; }
.sheet-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.sheet-line { margin: 0; color: var(--gold); }
.sheet-blurb { color: var(--muted); margin-top: 6px; }
.sheet-votes { margin-top: 10px; color: var(--gold); font-family: var(--display); font-weight: 700; }
.icon-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #050a16;
  font-size: 1.3rem;
  line-height: 1;
}
fieldset { border: 0; margin: 14px 0 0; padding: 0; }
legend { font-weight: 650; margin-bottom: 8px; }
.stars { display: flex; gap: 6px; }
.star {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: #5c6578;
  display: grid;
  place-items: center;
}
.star[aria-checked="true"], .star.on { color: var(--gold); background: rgba(255, 201, 40, 0.1); }
.star svg, .mini-score svg { width: 18px; height: 18px; fill: currentColor; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.verdict {
  min-height: 1.4em;
  margin: 6px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
}
.tag[aria-pressed="true"] { background: var(--gold); color: #111; border-color: var(--gold); }
.field { display: grid; gap: 6px; margin-top: 14px; font-weight: 650; }
.field textarea, .field input { border-radius: 12px; font-weight: 400; }
.field input[type="file"] { padding: 10px 12px; }
.save-state { min-height: 1.2em; color: #9eb6ff; font-size: 0.88rem; }
.sheet-actions { display: flex; justify-content: space-between; gap: 12px; }
.tasting-photo {
  width: min(100%, 280px);
  height: auto;
  margin-top: 10px;
  border-radius: 16px;
}
.tasting-photo[hidden] { display: none; }
#tasting-photo-clear { margin-top: 8px; }
.add-preview { width: 72px; margin-top: 8px; }
.flavor-page { padding: 28px 0 56px; }
.back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.back:hover { color: var(--ink); }
.flavor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.flavor-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  background: #0c1728;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.official, .personal { min-width: 0; position: relative; }
.gallery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #1c2838;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}
.gallery-btn:hover { background: #24344a; }
.personal .visually-hidden { position: absolute; }
.flavor-visual .can-photo.lg { width: min(180px, 100%); }
.flavor-visual .can.lg { margin: 12px auto 0; }
.flavor-info h2 { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.04em; }
.flavor-info .name-row { align-items: baseline; gap: 10px; }
.flavor-info .sheet-flag { position: static; font-size: 1.6rem; }
.personal .tasting-photo { margin-inline: auto; }
.families {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.families li {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.families .mini {
  height: 6px;
  border-radius: 99px;
  background: #101c30;
  overflow: hidden;
}
.families .mini span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), #7aa2ff);
}
.is-untasted .can-photo,
.is-untasted .can {
  filter: grayscale(1) brightness(0.38);
  opacity: 0.85;
}

h1 .accent, .vos-avis { color: var(--red); }

@media (max-width: 1100px) {
  .stage { grid-template-columns: 1fr; }
  .rail { position: static; }
  .top5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { min-height: 0; padding: 28px 22px 300px; background-position: 70% center; }
  .hero-copy { width: 100%; }
  .hero-stage { min-height: 0; }
  .can-b { height: 280px; left: auto; right: 22%; bottom: -20px; }
  .can-a { height: 230px; left: auto; right: 42%; bottom: -8px; }
  .can-c { height: 250px; right: 4%; bottom: -12px; }
  .can-d { display: none; }
  .bubble { top: auto; bottom: 250px; right: 16px; font-size: 1.45rem; }
}
@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
  }
  .top-tools { margin-left: 0; }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 14px;
    background: rgba(5, 10, 22, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .search { width: 42vw; }
  .top5, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flavor-layout, .flavor-visual { grid-template-columns: 1fr; }
  .rank-row { grid-template-columns: 28px 40px minmax(0, 1fr); }
  .rank-score { grid-column: 2 / -1; text-align: left; }
  .sheet {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .top-card, .flavor, .bar span { transition: none; }
}
