:root {
  --bg: #FFF6EA;
  --bg-2: #FCEBD5;
  --bg-3: #F3DDBF;
  --surface: #FFFFFF;
  --ink: #3E2A1F;
  --ink-2: #765B4B;
  --ink-3: #A88E7B;
  --line: #F0DFC8;
  --brown: #8B5A3C;
  --brown-d: #5A3624;
  --gold: #FFC53D;
  --gold-d: #E3A010;
  --sky: #3BA7D9;
  --mall-bg: #FDE5CF;
  --mall-fg: #B65D20;
  --hotel-bg: #DFEDF7;
  --hotel-fg: #2D6C99;
  --t0: #B9A493;
  --t1: #E2574C;
  --t2: #F08A3C;
  --t3: #E3A21F;
  --t4: #7DB544;
  --t5: #2FA56B;
  --shadow-sm: 0 1px 2px rgba(62, 42, 31, .06), 0 3px 10px rgba(62, 42, 31, .07);
  --shadow: 0 2px 6px rgba(62, 42, 31, .08), 0 14px 34px rgba(62, 42, 31, .16);
  --font: "Nunito", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --display: "Fredoka", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --sheet-h: 50vh;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 600 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(59, 167, 217, .55); outline-offset: 2px; }
.ico { flex: none; }
.poop { flex: none; display: block; }
.poop path { fill: var(--brown); }

.t1 { --tier: var(--t1); }
.t2 { --tier: var(--t2); }
.t3 { --tier: var(--t3); }
.t4 { --tier: var(--t4); }
.t5 { --tier: var(--t5); }

/* ---------- map ---------- */

#map { position: fixed; inset: 0; background: #FBF1E2; }
.maplibregl-ctrl-top-left { top: calc(var(--safe-t) + 64px); }
.maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(255, 246, 234, .9);
  border-radius: 12px;
  font-size: 11px;
}
.maplibregl-ctrl-attrib a { color: var(--ink-2); }

/* ---------- top bar ---------- */

.topbar {
  position: fixed; z-index: 30;
  top: calc(var(--safe-t) + 10px); left: 10px; right: 10px;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 16px 4px 5px;
  border: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow);
  text-align: left;
}
.brand { min-width: 0; }
.brand img { display: block; flex: none; width: 38px; height: 38px; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font: 700 17px/1.1 var(--display); letter-spacing: .02em; }
.brand-text small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang {
  flex: none; margin-left: 8px;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--surface); box-shadow: var(--shadow);
  font: 700 15px var(--display);
}

/* ---------- sheet ---------- */

.sheet {
  position: fixed; z-index: 20;
  left: 0; right: 0; bottom: 0; height: 50vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -6px 30px rgba(62, 42, 31, .18);
  transition: height .34s var(--ease);
  padding-bottom: var(--safe-b);
}
.sheet.is-dragging { transition: none; }
.sheet-handle { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sheet-handle span { width: 42px; height: 5px; border-radius: 3px; background: var(--bg-3); }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 28px; }
[data-grab] { touch-action: none; }
.chips[data-grab] { touch-action: pan-x; }

/* ---------- home ---------- */

.home-head { padding-bottom: 2px; }
.search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 16px;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm);
  color: var(--ink-3);
}
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: 700 16px var(--font); color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--bg-2); color: var(--ink-2); display: grid; place-items: center;
}

.chips {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -16px; padding: 12px 16px 10px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip-gap { flex: none; width: 1px; margin: 6px 2px; background: var(--line); }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font: 800 14px var(--font); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip .poop path { fill: currentColor; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin: 2px 0 8px; padding: 4px;
  background: var(--bg-2); border-radius: 16px;
}
.tabs button {
  height: 40px; border: 0; border-radius: 12px; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font: 800 14px var(--font); color: var(--ink-2);
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.row {
  display: flex; align-items: center; gap: 12px;
  width: calc(100% + 16px); margin: 0 -8px; padding: 8px;
  border: 0; border-radius: 20px; background: none; text-align: left;
}
.row:active { background: var(--bg-2); }
@media (hover: hover) { .row:hover { background: var(--bg-2); } }
.thumb { flex: none; width: 60px; height: 60px; border-radius: 18px; overflow: hidden; display: grid; place-items: center; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty.k-mall { background: var(--mall-bg); color: var(--mall-fg); }
.thumb-empty.k-hotel { background: var(--hotel-bg); color: var(--hotel-fg); }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font: 800 16px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; margin-top: 3px; font-size: 13px; color: var(--ink-3); font-weight: 700; }
.row-meta i { font-style: normal; opacity: .55; }
.row-meta .ico { margin-right: -2px; }
.row-grade { display: inline-flex; align-items: center; gap: 3px; color: #B07C00; }

.score-badge {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 30px; padding: 0 10px 0 8px; border-radius: 999px;
  background: var(--tier, var(--t0)); color: #fff;
  font: 700 15px var(--display);
}
.score-badge .poop path { fill: rgba(255, 255, 255, .92); }
.score-badge.is-empty { background: var(--bg-2); color: var(--ink-3); font: 800 12px var(--font); padding: 0 10px; }

.rank { flex: none; width: 26px; display: flex; flex-direction: column; align-items: center; color: var(--ink-3); font: 700 16px/1 var(--display); }
.rank .ico { margin-bottom: 1px; }
.rank.r1 { color: #E2A000; }
.rank.r2 { color: #93A1AE; }
.rank.r3 { color: #C47B45; }

.thumb-sm { width: 46px; height: 46px; border-radius: 14px; }
.visit {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 10px; padding: 10px 10px 10px 10px;
  border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm);
  border: 2px solid var(--gold);
}
.visit-copy { flex: 1; min-width: 0; }
.visit-copy small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 800; }
.visit-copy strong { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-sm { height: 38px; padding: 0 12px; border-radius: 13px; font-size: 14px; box-shadow: 0 3px 0 var(--gold-d); gap: 5px; }
.visit-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--ink-2); display: grid; place-items: center; }
.add-nearby { margin-top: 8px; }
.locate-cta {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 2px 0 8px; padding: 12px 14px;
  border: 0; border-radius: 16px; background: #E0F1F9; color: #1F6E93;
  font: 800 14px var(--font); text-align: left;
}
.locate-cta span { flex: 1; }
.add-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; margin: 14px 0 4px;
  border: 2px dashed var(--bg-3); border-radius: 18px; background: transparent;
  color: var(--brown); font: 800 15px var(--font);
}
.empty { padding: 30px 12px 18px; text-align: center; color: var(--ink-3); font-weight: 800; }
.empty .poop { margin: 0 auto 8px; }
.empty .poop path { fill: var(--bg-3); }
.empty p { margin: 0; }
.empty.small { padding: 20px 12px 10px; }
.credits { margin: 20px 0 4px; text-align: center; font-size: 11px; line-height: 1.7; color: var(--ink-3); }

/* ---------- ad ---------- */

/* Attunely brand: night indigo, cream text, lime for the one next step. */
.ad {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin: 12px 0; padding: 14px 14px 14px 12px;
  border-radius: 22px; text-decoration: none; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #3A2D7A 0%, #1D1640 55%, #140F30 100%);
  color: #FFFDF8; box-shadow: var(--shadow-sm);
}
.ad::before, .ad::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(2px);
}
.ad::before { right: 18%; top: -38px; width: 90px; height: 90px; background: radial-gradient(circle, rgba(168, 139, 255, .45), transparent 70%); }
.ad::after { left: -24px; bottom: -40px; width: 110px; height: 110px; background: radial-gradient(circle, rgba(92, 200, 250, .3), transparent 70%); }
.ad-badge {
  position: absolute; top: 8px; right: 12px; z-index: 1;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; color: rgba(255, 253, 248, .5);
}
.ad-mark {
  position: relative; z-index: 1; flex: none; width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  background: rgba(255, 253, 248, .1); color: #FFFDF8;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .14);
}
.ad-copy { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ad-copy strong { display: block; font: 800 14px/1.3 var(--font); color: #FFFDF8; }
.ad-copy span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: rgba(255, 253, 248, .82); }
.ad-cta {
  flex: none; position: relative; z-index: 1; align-self: flex-end;
  display: inline-flex; align-items: center; gap: 1px;
  height: 32px; padding: 0 8px 0 12px; border-radius: 999px;
  background: #F1FF52; color: #101733; font: 800 13px var(--font);
  box-shadow: 0 2px 0 #9AB00E;
}
.row-bidet { display: inline-flex; align-items: center; gap: 3px; color: var(--sky); }

/* ---------- detail ---------- */

.bar-top {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 -16px; padding: 2px 16px 8px; background: var(--bg);
}
.bar-title { font: 700 17px var(--display); }
.icon-btn {
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-sm);
  display: grid; place-items: center; color: var(--ink);
}
.icon-btn.ghost { visibility: hidden; }
.fastest {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 16px;
  background: var(--gold); box-shadow: 0 3px 0 var(--gold-d);
  font-weight: 800;
}
.fastest b { margin-left: auto; }
.place-name { margin: 2px 0 8px; font: 700 25px/1.2 var(--display); letter-spacing: -.005em; overflow-wrap: anywhere; }
.place-name.sm { font-size: 21px; }
.place-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; font-weight: 800; color: var(--ink-3); }
.kind-badge { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; }
.kind-badge.k-mall { background: var(--mall-bg); color: var(--mall-fg); }
.kind-badge.k-hotel { background: var(--hotel-bg); color: var(--hotel-fg); }
.grade-badge { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; background: #FFF0C2; color: #9A6A00; }
.place-addr { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.place-addr .ico { margin-top: 2px; }

.gallery {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 14px -16px 0; padding: 0 16px 2px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.ph {
  position: relative; flex: none; width: 132px; height: 132px; padding: 0;
  border: 0; border-radius: 20px; overflow: hidden;
  background: var(--bg-2); scroll-snap-align: start;
}
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph.sm { width: 68px; height: 68px; border-radius: 14px; }
.ph-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 2px dashed var(--bg-3); background: transparent;
  color: var(--brown); font: 800 13px var(--font);
}
.ph-x {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; background: rgba(30, 19, 13, .72); color: #fff;
  display: grid; place-items: center;
}
.gallery-empty {
  display: flex; align-items: center; gap: 14px; width: 100%;
  margin-top: 14px; padding: 14px;
  border: 2px dashed var(--bg-3); border-radius: 22px; background: rgba(255, 255, 255, .55);
  text-align: left;
}
.ge-icon { flex: none; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: var(--mall-bg); color: var(--brown); }
.gallery-empty strong { display: block; font: 800 15px var(--font); }
.gallery-empty small { display: block; font-size: 13px; color: var(--ink-3); font-weight: 700; }

/* A free preview of the place, until someone uploads the real bathroom. */
.cover {
  position: relative; margin-top: 14px; aspect-ratio: 16 / 10;
  border-radius: 22px; overflow: hidden; background: var(--bg-2);
}
.cover-img { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
@supports not (aspect-ratio: 1 / 1) {
  .cover { height: 0; padding-top: 62.5%; }
  .cover-img { position: absolute; top: 0; left: 0; }
}
.cover-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-credit {
  position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px);
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px 0 8px; border-radius: 999px;
  background: rgba(30, 19, 13, .58); color: #fff; font: 800 12px var(--font);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none;
}
.cover-credit .ico { flex: none; }
.cover-credit > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cover-add {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px 0 11px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--brown-d); font: 800 14px var(--font);
  box-shadow: 0 2px 10px rgba(30, 19, 13, .25);
}

.score-card {
  display: flex; align-items: center; gap: 16px;
  margin-top: 14px; padding: 16px 18px;
  border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.score-big { min-width: 76px; text-align: center; font: 700 48px/1 var(--display); letter-spacing: -.02em; color: var(--tier, var(--ink-3)); }
.score-side { min-width: 0; }
.score-big.empty-poop { display: grid; place-items: center; }
.score-big.empty-poop .poop path { fill: var(--bg-3); }
.score-word { margin-top: 7px; font-size: 13px; color: var(--ink-3); font-weight: 700; }
.score-word b { color: var(--ink); font-weight: 800; }

.poops { position: relative; display: inline-flex; line-height: 0; }
.poops-bg, .poops-fg { display: inline-flex; gap: 3px; }
.poops-bg .poop path { fill: var(--bg-3); }
.poops-fg { position: absolute; top: 0; left: 0; bottom: 0; width: var(--pct); overflow: hidden; }
.poops-fg .poop path { fill: var(--brown); }

.metrics {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 12px;
  margin: 16px 4px 2px; font-size: 14px; font-weight: 800; color: var(--ink-2);
}
.metric { display: contents; }
.bar { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 6px; background: var(--tier, var(--t0)); }
.metric b { min-width: 28px; text-align: right; font: 700 15px var(--display); color: var(--ink); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag-cloud span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 6px 0 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: 13px; font-weight: 800; color: var(--ink-2);
}
.tag-cloud b { min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-2); font-size: 12px; }

.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 6px; }
.btn {
  height: 54px; padding: 0 16px; border: 0; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 16px var(--font); text-decoration: none; white-space: nowrap;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .65; cursor: default; }
.btn-ink { background: var(--ink); color: var(--bg); box-shadow: 0 4px 0 #1F130D; }
.btn-ink:active { box-shadow: 0 2px 0 #1F130D; }
.btn-ink .poop path { fill: var(--gold); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--gold-d); }
.btn-gold:active { box-shadow: 0 2px 0 var(--gold-d); }
.btn-gold .poop path { fill: var(--brown); }
.btn-block { width: 100%; }
.cta-row .btn { min-width: 0; padding: 0 10px; }
.empty .retry { margin-top: 12px; }

/* Small phones (iPhone SE 1st gen and similar). */
@media (max-width: 360px) {
  .btn { font-size: 15px; gap: 6px; }
  .cta-row { gap: 8px; }
  .place-name { font-size: 22px; }
  .sos { font-size: 16px; padding-right: 18px; }
}

.section-title { display: flex; align-items: baseline; gap: 8px; margin: 26px 0 4px; font: 700 19px var(--display); }
.section-title small { font: 800 13px var(--font); color: var(--ink-3); }
.review { padding: 14px 0; border-top: 1.5px dashed var(--line); }
.review:first-child { border-top: 0; }
.review-head { display: flex; align-items: center; gap: 10px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--h) 70% 91%); }
.avatar .poop path { fill: hsl(var(--h) 40% 42%); }
.review-who { flex: 1; min-width: 0; }
.review-who strong { font-weight: 800; overflow-wrap: anywhere; }
.review-who small { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.floor { padding: 0 7px; border-radius: 7px; background: var(--bg-2); color: var(--brown); font-weight: 800; }
.me-badge { margin-left: 6px; padding: 1px 7px; border-radius: 7px; background: var(--gold); font-size: 11px; font-weight: 800; }
.review-text { margin: 8px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.mini-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mini-tags span { padding: 2px 9px; border-radius: 999px; background: var(--bg-2); font-size: 12px; font-weight: 800; color: var(--ink-2); }
.review-photos { display: flex; gap: 6px; margin-top: 10px; }
.skeleton {
  height: 64px; margin-top: 10px; border-radius: 18px;
  background: linear-gradient(90deg, var(--bg-2) 20%, #fff 50%, var(--bg-2) 80%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}

/* ---------- rate ---------- */

.score-card.live { margin-bottom: 4px; }
.pick { margin-top: 12px; padding: 12px 14px 8px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pick-label { display: flex; justify-content: space-between; font-weight: 800; }
.pick-label em { font-style: normal; color: var(--brown); }
.pick-poops { display: grid; grid-template-columns: repeat(5, 1fr); }
.pick-poops button {
  height: 50px; border: 0; background: none; border-radius: 14px;
  display: grid; place-items: center;
  transition: transform .18s cubic-bezier(.3, 1.7, .5, 1);
}
.pick-poops button .poop path { fill: var(--bg-3); transition: fill .15s; }
.pick-poops button.on .poop path { fill: var(--brown); }
.pick-poops button.on { transform: scale(1.1); }
.pick-poops button:active { transform: scale(.88); }
.field-title { margin: 20px 0 8px; font-weight: 800; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-pick .ph { width: 86px; height: 86px; border-radius: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: block; margin-top: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 800; }
.field input, .field textarea {
  display: block; width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 16px; outline: 0;
  background: var(--surface); font: 700 16px/1.4 var(--font); color: var(--ink);
  resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: #C4B0A0; }
.field input:focus, .field textarea:focus { border-color: var(--brown); }
/* The rate form ends in a sticky submit bar, so its scroller needs no bottom padding. */
body[data-view="rate"] .sheet-scroll { padding-bottom: 0; }
.submit-bar {
  position: sticky; bottom: 0; z-index: 3;
  margin: 10px -16px 0; padding: 16px 16px 14px;
  background: linear-gradient(to top, var(--bg) 72%, rgba(255, 246, 234, 0));
}
.ph-loading {
  background: linear-gradient(90deg, var(--bg-2) 20%, #fff 50%, var(--bg-2) 80%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite;
}

/* ---------- add ---------- */

.hint {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 4px 0 4px; padding: 12px 14px; border-radius: 16px;
  background: var(--mall-bg); color: var(--brown-d); font-size: 14px; font-weight: 800;
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.seg button {
  height: 54px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 15px var(--font);
}
.seg button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.add-pin { display: flex; flex-direction: column; align-items: center; cursor: grab; filter: drop-shadow(0 8px 8px rgba(62, 42, 31, .3)); }
.add-pin img { animation: bob 1.5s ease-in-out infinite; }
.add-pin span { width: 12px; height: 6px; margin-top: 1px; border-radius: 50%; background: rgba(62, 42, 31, .35); }

/* ---------- floating buttons ---------- */

.fabs {
  position: fixed; z-index: 15; right: 12px;
  bottom: calc(var(--sheet-h) + 14px);
  display: flex; flex-direction: column; gap: 10px;
  transition: bottom .34s var(--ease), opacity .2s;
}
.fab {
  width: 50px; height: 50px; border: 0; border-radius: 17px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab.is-busy svg { animation: spin 1s linear infinite; }
.sos {
  position: fixed; z-index: 15; left: 50%;
  bottom: calc(var(--sheet-h) + 14px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 22px 0 8px;
  border: 0; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  box-shadow: 0 4px 0 var(--gold-d), var(--shadow);
  font: 800 17px var(--font); white-space: nowrap;
  transition: bottom .34s var(--ease), opacity .2s, transform .08s;
}
.sos:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 2px 0 var(--gold-d), var(--shadow); }
.sos-icon { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.sos-icon img { display: block; }
.sos.is-busy .sos-icon img { animation: wiggle .5s ease-in-out infinite; }
.sheet.is-dragging ~ .fabs, .sheet.is-dragging ~ .sos { transition: none; }
.sheet[data-snap="full"] ~ .fabs,
.sheet[data-snap="full"] ~ .sos,
body[data-view="rate"] .sos, body[data-view="rate"] .fabs,
body[data-view="add"] .sos, body[data-view="add"] .fabs { opacity: 0; pointer-events: none; }

.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(var(--safe-t) + 68px);
  width: max-content; max-width: calc(100vw - 32px); padding: 11px 18px;
  border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 800; font-size: 14px; text-align: center;
  transform: translate(-50%, -10px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.lightbox {
  position: fixed; z-index: 100; inset: 0;
  display: grid; place-items: center;
  background: rgba(24, 15, 10, .94);
}
.lightbox img { max-width: calc(100vw - 24px); max-height: calc(100vh - 120px); border-radius: 14px; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center;
}
.lb-close { top: calc(var(--safe-t) + 14px); right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; bottom: calc(var(--safe-b) + 20px); left: 50%; transform: translateX(-50%);
  max-width: calc(100vw - 32px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: rgba(255, 255, 255, .8); font-weight: 800;
}

.confetti { position: fixed; z-index: 70; left: 50%; bottom: 35%; pointer-events: none; }
.confetti span { position: absolute; left: 0; top: 0; animation: pop 1.3s cubic-bezier(.15, .8, .3, 1) forwards; opacity: 0; }

@keyframes pop {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), -260px) scale(1) rotate(var(--r)); opacity: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- wide screens: the sheet becomes a side panel ---------- */

@media (min-width: 768px) {
  .topbar { top: 16px; left: 16px; right: auto; width: 412px; padding: 14px 14px 0 16px; }
  .brand { box-shadow: none; background: transparent; padding: 0; }
  .brand img { width: 44px; height: 44px; }
  .brand-text strong { font-size: 20px; }
  .brand-text small { font-size: 12px; }
  .lang { box-shadow: none; background: var(--bg-2); width: 42px; height: 42px; }
  .sheet {
    top: 16px; left: 16px; bottom: 16px; right: auto;
    width: 412px; height: auto !important;
    padding-top: 74px; border-radius: 28px;
    box-shadow: var(--shadow);
  }
  .sheet-handle { display: none; }
  .sheet-scroll { padding: 0 20px 24px; }
  .chips { margin: 0 -20px; padding: 12px 20px 10px; flex-wrap: wrap; overflow: visible; }
  .chip-gap { display: none; }
  .bar-top { margin: 0 -20px; padding: 2px 20px 8px; }
  .gallery { margin: 14px -20px 0; padding: 0 20px 2px; }
  .submit-bar { margin: 10px -20px 0; padding: 16px 20px; }
  .maplibregl-ctrl-top-left { top: 8px; left: 436px; }
  .fabs { bottom: 24px; right: 20px; }
  .sos { left: calc(50% + 222px); bottom: 24px; }
  .sheet[data-snap="full"] ~ .fabs, .sheet[data-snap="full"] ~ .sos { opacity: 1; pointer-events: auto; }
  .toast { left: calc(50% + 222px); top: 24px; }
}

/* ---------- tier list: the home screen ---------- */

.tiers {
  position: fixed; z-index: 40; inset: 0;
  display: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 12% 0%, #FFE7B8 0, transparent 34%),
    radial-gradient(circle at 100% 18%, #FFE0E4 0, transparent 30%),
    var(--bg);
}
body[data-view="tiers"] .tiers { display: block; }
body[data-view="tiers"] #map,
body[data-view="tiers"] .topbar,
body[data-view="tiers"] .sheet,
body[data-view="tiers"] .fabs,
body[data-view="tiers"] .sos { visibility: hidden; }
.tiers-inner { max-width: 820px; margin: 0 auto; padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 120px); }

.tiers-head { display: flex; align-items: center; gap: 10px; }
.tiers-head img { flex: none; animation: sway 3.2s ease-in-out infinite; }
.tiers-brand { flex: 1; min-width: 0; }
.tiers-brand strong { display: block; font: 700 22px/1.1 var(--display); }
.tiers-brand small { display: block; margin-top: 2px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.tiers-head .lang { flex: none; }

.tiers-hero {
  position: relative; margin-top: 16px; padding: 18px 18px 16px;
  border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.tiers-hero h1 { margin: 0; font: 700 26px/1.2 var(--display); }
.tiers-hero p { margin: 6px 0 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tiers-legend { display: flex; gap: 6px; margin-top: 12px; }
.tiers-legend span {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font: 700 17px var(--display); color: #fff; background: var(--tc);
}

.tier-S { --tc: linear-gradient(145deg, #FFD54F, #FFA726); }
.tier-A { --tc: linear-gradient(145deg, #7EDBA9, #33B07A); }
.tier-B { --tc: linear-gradient(145deg, #FFC48A, #FF8F4D); }
.tier-C { --tc: linear-gradient(145deg, #FFA3A3, #F06272); }
.tier-none { --tc: linear-gradient(145deg, #D8CBBE, #B9A493); }

.tier { margin-top: 26px; }
.tier-head { display: flex; align-items: center; gap: 12px; }
.tier-letter {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 19px;
  display: grid; place-items: center; transform: rotate(-5deg);
  font: 700 32px var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .12);
  background: var(--tc); box-shadow: 0 4px 0 rgba(62, 42, 31, .12), var(--shadow-sm);
}
.tier-letter i { position: absolute; top: -13px; left: 50%; transform: translateX(-50%) rotate(8deg); color: #E3A010; }
.tier-title strong { display: block; font: 700 19px var(--display); }
.tier-title small { display: block; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.tier.is-empty { margin-top: 12px; opacity: .7; }
.tier.is-empty .tier-letter { width: 40px; height: 40px; border-radius: 14px; font-size: 23px; }
.tier.is-empty .tier-letter i { top: -11px; }
.tier.is-empty .tier-title strong { font-size: 16px; }

.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
@media (min-width: 620px) { .tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tcard {
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left;
  border: 0; border-radius: 22px; overflow: hidden; color: var(--ink);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.tcard:active { transform: scale(.97); }
@media (hover: hover) { .tcard:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: var(--shadow); } }
.tcard-photo { display: block; aspect-ratio: 4 / 3; background: var(--bg-2); }
.tcard-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tcard-photo.is-empty {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--hotel-bg); color: var(--hotel-fg);
}
.tcard-photo.is-empty .poop path { fill: var(--brown); opacity: .5; }
.tcard-tier {
  position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center; transform: rotate(-6deg);
  font: 700 20px var(--display); color: #fff; background: var(--tc);
  border: 2.5px solid #fff; box-shadow: var(--shadow-sm);
}
.tcard-rank {
  position: absolute; top: 9px; right: 9px; padding: 2px 8px; border-radius: 999px;
  background: rgba(30, 19, 13, .62); color: #fff; font: 700 13px var(--display);
}
.tcard-real {
  position: absolute; right: 8px; top: 9px; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px; background: #fff; color: var(--brown); font: 800 11px var(--font);
}
.tcard-rank + .tcard-real { top: 36px; }
.tcard-body { display: block; padding: 9px 11px 12px; }
.tcard-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: 800 14.5px/1.3 var(--font); min-height: 2.6em;
}
.tcard-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.tcard-score {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 8px 0 6px;
  border-radius: 999px; background: var(--tier, var(--t0)); color: #fff; font: 700 13px var(--display);
}
.tcard-score .poop path { fill: rgba(255, 255, 255, .92); }
.tcard-first { display: inline-flex; align-items: center; gap: 4px; color: var(--brown); }

.find-btn {
  position: fixed; z-index: 41; left: 50%; bottom: calc(var(--safe-b) + 18px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  height: 60px; padding: 0 22px 0 9px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--ink); white-space: nowrap;
  box-shadow: 0 4px 0 var(--gold-d), var(--shadow);
  font: 800 18px var(--font);
}
.find-btn:active { transform: translateX(-50%) translateY(2px); box-shadow: 0 2px 0 var(--gold-d), var(--shadow); }
.find-icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; }

.to-tiers {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin: 12px 0 6px; padding: 11px 14px; border: 0; border-radius: 16px;
  background: #FFF0C2; color: #8A5A00; font: 800 14px var(--font); text-align: left;
}
.to-tiers span { flex: 1; }

@keyframes sway { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .tiers-head img { animation: none; } }

/* ---------- tier screen: the fun layer ---------- */

.tiers {
  background:
    radial-gradient(circle at 10% 2%, #FFE29A 0, transparent 30%),
    radial-gradient(circle at 95% 12%, #FFD3DC 0, transparent 26%),
    radial-gradient(circle at 50% 60%, #FFF1D6 0, transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%238B5A3C' fill-opacity='.05'%3E%3Cpath d='M22 30c3 0 5 2 4 5h-9c0-3 2-5 5-5zM17 35h10a3 3 0 0 1 0 6H17a3 3 0 0 1 0-6zM15 41h14a3.5 3.5 0 0 1 0 7H15a3.5 3.5 0 0 1 0-7z'/%3E%3Ccircle cx='86' cy='88' r='9'/%3E%3Ccircle cx='86' cy='88' r='3' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E"),
    var(--bg);
}
.tiers-hero, .tiers-legend { display: none; }

.hero2 {
  position: relative; margin-top: 12px; padding: 18px 18px 18px; overflow: hidden; text-align: center;
  border-radius: 32px; color: #fff;
  background: linear-gradient(160deg, #6B3E26 0%, #8B5A3C 45%, #B5764A 100%);
  box-shadow: 0 6px 0 #4E2C1B, var(--shadow);
}
.hero2-throne { position: relative; width: 170px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.hero2-rays {
  position: absolute; inset: -40px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 213, 79, .35) 0 10deg, transparent 10deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%);
  animation: rays 18s linear infinite;
}
.hero2-throne img { position: relative; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .3)); animation: throne 2.6s ease-in-out infinite; }
.hero2-spark { position: absolute; color: #FFE082; font-size: 20px; animation: twinkle 1.8s ease-in-out infinite; }
.hero2-spark.s1 { top: 14px; left: 18px; }
.hero2-spark.s2 { top: 30px; right: 14px; font-size: 14px; animation-delay: .6s; }
.hero2-spark.s3 { bottom: 22px; left: 30px; font-size: 16px; animation-delay: 1.1s; }
.hero2-roll { position: absolute; right: 6px; bottom: 6px; font-size: 30px; transform: rotate(18deg); animation: roll 3.5s ease-in-out infinite; }
.hero2-kicker { margin: 4px 0 0; font-size: 12px; font-weight: 900; letter-spacing: .12em; color: #FFD57A; }
.hero2 h1 { margin: 2px 0 0; font: 700 33px/1.12 var(--display); text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
.hero2 h1 span { display: block; color: #FFC53D; font-size: 1.12em; transform: rotate(-2deg); }
.hero2-sub { margin: 8px auto 0; max-width: 30em; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .86); }
.hero2-stats { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero2-stats span {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); font-size: 12px; font-weight: 800;
}
.hero2-stats b { font: 700 18px var(--display); color: #FFE082; }

.ticker {
  margin: 14px -16px 0; overflow: hidden; white-space: nowrap;
  background: var(--gold); color: var(--brown-d); transform: rotate(-1.2deg);
  box-shadow: 0 3px 0 var(--gold-d);
}
.ticker-track { display: inline-flex; animation: ticker 40s linear infinite; }
.ticker span { padding: 9px 22px; font: 800 13px var(--font); }
.ticker span::after { content: '•'; margin-left: 22px; opacity: .5; }

.podium { margin-top: 26px; text-align: center; }
.podium h2, .tiers-h2 { margin: 0; font: 700 22px var(--display); }
.tiers-h2 { margin-top: 30px; text-align: left; }
.podium-row { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-top: 14px; }
.seat {
  display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0;
  border: 0; background: none; color: var(--ink); text-align: center;
}
.seat-face {
  position: relative; width: 74px; height: 74px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface); color: var(--ink-3);
  border: 4px solid var(--medal); box-shadow: var(--shadow-sm); font: 700 30px var(--display);
}
.seat-1 .seat-face { width: 92px; height: 92px; }
.seat-face img { width: 100%; height: 100%; object-fit: cover; }
.seat-medal {
  margin-top: -14px; z-index: 1; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--medal); color: #fff;
  border: 3px solid #fff; font: 700 14px var(--display);
}
.seat-name {
  margin-top: 6px; max-width: 100%; padding: 0 4px; font: 800 12.5px/1.25 var(--font);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.seat.is-empty .seat-name { color: var(--ink-3); }
.seat-score {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; padding: 1px 8px; border-radius: 999px;
  background: var(--brown); color: #fff; font: 700 12px var(--display);
}
.seat-score .poop path { fill: #fff; }
.seat-base {
  position: relative; width: 100%; margin-top: 8px; border-radius: 16px 16px 6px 6px;
  background: var(--medal); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12);
}
.seat-base i { position: absolute; left: 50%; top: 10px; width: 46%; height: 12px; transform: translateX(-50%); border-radius: 50%; background: rgba(255, 255, 255, .45); }
.seat-1 { --medal: linear-gradient(160deg, #FFD54F, #F2A51A); }
.seat-2 { --medal: linear-gradient(160deg, #E3E8EE, #A9B5C2); }
.seat-3 { --medal: linear-gradient(160deg, #F2B98A, #C47B45); }
.seat-1 .seat-face { border-color: #F2A51A; }
.seat-2 .seat-face { border-color: #A9B5C2; }
.seat-3 .seat-face { border-color: #C47B45; }
.seat-1 .seat-base { height: 86px; }
.seat-2 .seat-base { height: 62px; }
.seat-3 .seat-base { height: 44px; }
.seat.is-empty .seat-face { border-style: dashed; background: rgba(255, 255, 255, .6); }
.seat-1:not(.is-empty) .seat-face::after {
  content: '👑'; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
}
.podium-note { margin: 10px 0 0; font-size: 13px; font-weight: 800; color: var(--ink-3); }

.tier-head { position: relative; }
.tier-range {
  margin-left: auto; flex: none; padding: 4px 10px; border-radius: 999px; transform: rotate(2deg);
  background: var(--surface); box-shadow: var(--shadow-sm); font: 800 11px var(--font); color: var(--ink-2);
}
.tier:not(.is-empty) .tier-letter { animation: stamp .5s var(--ease) both; }
.tier-grid .tcard:nth-child(odd) { transform: rotate(-.8deg); }
.tier-grid .tcard:nth-child(even) { transform: rotate(.8deg); }
.tier-grid .tcard:active { transform: scale(.96) rotate(0); }
@media (hover: hover) { .tier-grid .tcard:hover { transform: translateY(-4px) rotate(-1.5deg) scale(1.02); } }
.tcard { border: 3px solid #fff; }
.tcard-first { animation: nudge 2.4s ease-in-out infinite; }

.find-btn { animation: find-bob 2.2s ease-in-out infinite; }
.find-btn::before {
  content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 3px solid var(--gold);
  animation: find-ring 2.2s ease-out infinite; pointer-events: none;
}
.find-urgent {
  position: absolute; top: -12px; right: -6px; padding: 3px 8px; border-radius: 999px; transform: rotate(10deg);
  background: #F06272; color: #fff; border: 2.5px solid #fff; font: 700 12px var(--display);
}

@keyframes rays { to { transform: rotate(360deg); } }
@keyframes throne { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg) scale(1.04); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes roll { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-8deg) translateY(-4px); } }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes stamp { 0% { transform: rotate(-5deg) scale(1.6); opacity: 0; } 70% { transform: rotate(-8deg) scale(.92); opacity: 1; } 100% { transform: rotate(-5deg) scale(1); } }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: rotate(-6deg); } 95% { transform: rotate(6deg); } }
@keyframes find-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
@keyframes find-ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .hero2-rays, .hero2-throne img, .hero2-spark, .hero2-roll, .ticker-track, .find-btn, .find-btn::before, .tcard-first, .tier-letter { animation: none !important; }
}
.seat-example {
  margin-top: 4px; padding: 1px 7px; border-radius: 999px;
  background: rgba(139, 90, 60, .12); color: var(--ink-3); font: 800 10px var(--font);
}

/* ---------- 王座: the luxury layer ---------- */

:root {
  --serif: "Cormorant Garamond", "Noto Serif TC", "Songti TC", serif;
  --onyx: #15110D;
  --onyx-2: #241B13;
  --ivory: #F6F0E4;
  --gold-1: #F3DE9A;
  --gold-2: #C9A24A;
  --gold-3: #9C7428;
  --gold-grad: linear-gradient(135deg, #F7E6AC 0%, #D6AC52 42%, #A87A27 70%, #EED38A 100%);
  --hairline: rgba(201, 162, 74, .45);
}

.tiers { background: radial-gradient(circle at 50% -10%, #FFF8EA 0, transparent 55%), var(--ivory); }
.tiers-head img { animation: none; }
.tiers-brand strong { font: 900 25px/1 var(--serif); letter-spacing: .12em; }
.tiers-brand small { letter-spacing: .14em; color: var(--gold-3); }
.tiers-head .lang { background: transparent; border: 1px solid var(--hairline); color: var(--onyx); box-shadow: none; }

.hero2 {
  padding: 26px 20px 22px; border-radius: 26px; color: var(--ivory);
  background: radial-gradient(circle at 50% 18%, #3A2B1B 0, transparent 60%), linear-gradient(170deg, var(--onyx-2), var(--onyx));
  box-shadow: 0 18px 40px rgba(21, 17, 13, .28);
  outline: 1px solid var(--hairline); outline-offset: -9px;
}
.hero2-throne { height: 128px; }
.hero2-rays {
  background: repeating-conic-gradient(from 0deg, rgba(214, 172, 82, .16) 0 4deg, transparent 4deg 12deg);
  animation-duration: 60s;
}
.hero2-throne img { filter: drop-shadow(0 6px 16px rgba(214, 172, 82, .35)); animation: crest 5s ease-in-out infinite; }
.hero2-spark { color: var(--gold-1); }
.hero2-kicker { margin-top: 8px; font: 700 11px var(--font); letter-spacing: .32em; color: var(--gold-2); }
.hero2 h1 {
  margin-top: 6px; font: 900 64px/1 var(--serif); letter-spacing: .18em; text-indent: .18em; text-shadow: none;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero2-quote { margin: 14px auto 0; max-width: 22em; font: 700 17px/1.6 var(--serif); color: var(--ivory); }
.hero2-quote::before, .hero2-quote::after {
  content: ''; display: block; width: 46px; height: 1px; margin: 10px auto; background: var(--gold-2);
}
.hero2-sub { margin-top: 2px; font-size: 13px; color: rgba(246, 240, 228, .7); }
.hero2-stats span { background: transparent; border: 1px solid var(--hairline); color: rgba(246, 240, 228, .8); }
.hero2-stats b { font: 700 20px var(--serif); color: var(--gold-1); }

.ticker { transform: none; margin-top: 16px; background: var(--onyx); color: var(--gold-1); box-shadow: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.ticker span { font-weight: 700; letter-spacing: .04em; }

.podium h2, .tiers-h2 { font: 900 24px var(--serif); letter-spacing: .06em; }
.podium h2 { color: var(--onyx); }
.seat-face { border-width: 3px; box-shadow: 0 0 0 4px var(--ivory), 0 0 0 5px var(--hairline), var(--shadow-sm); }
.seat-medal { font-family: var(--serif); font-weight: 700; }
.seat-base { border-radius: 10px 10px 4px 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -8px 14px rgba(0, 0, 0, .12); }
.seat-score { background: var(--onyx); color: var(--gold-1); }
.seat-score .poop path { fill: var(--gold-1); }

.tier-letter, .tier.is-empty .tier-letter {
  transform: none; animation: none !important; text-shadow: none;
  background: var(--onyx); border: 1px solid var(--gold-2);
  box-shadow: inset 0 0 0 3px var(--onyx), inset 0 0 0 4px var(--hairline);
  font-family: var(--serif); font-weight: 700;
}
.tier-letter { color: var(--gold-1); }
.tier-letter > i { color: var(--gold-2); }
.tier-title strong { font: 900 19px var(--serif); letter-spacing: .04em; }
.tier.is-empty { opacity: .62; }
.tier-range { transform: none; box-shadow: none; background: transparent; border: 1px solid var(--hairline); color: var(--gold-3); }

.tier-grid .tcard:nth-child(n) { transform: none; }
.tcard { border: 1px solid var(--hairline); border-radius: 18px; box-shadow: 0 10px 24px rgba(21, 17, 13, .08); }
@media (hover: hover) { .tier-grid .tcard:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(21, 17, 13, .14); } }
.tcard-tier {
  transform: none; border: 1px solid var(--gold-2); background: var(--onyx);
  font-family: var(--serif); color: var(--gold-1);
}
.tcard-rank { background: var(--onyx); color: var(--gold-1); font-family: var(--serif); }
.tcard-first { animation: none; color: var(--gold-3); }
.tcard-photo.is-empty { background: linear-gradient(160deg, #EFE6D3, #E2D4B8); color: var(--gold-3); }

.find-btn {
  background: var(--onyx); color: var(--gold-1); border: 1px solid var(--gold-2);
  box-shadow: 0 12px 30px rgba(21, 17, 13, .35); animation-duration: 3.4s;
  font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .08em;
}
.find-btn:active { box-shadow: 0 6px 16px rgba(21, 17, 13, .35); }
.find-btn::before { border-color: var(--gold-2); }
.find-icon { background: var(--onyx-2); border: 1px solid var(--hairline); }
.find-urgent { background: #8E2B2B; border-color: var(--gold-1); font-family: var(--serif); }

.to-tiers { background: var(--onyx); color: var(--gold-1); font-family: var(--serif); letter-spacing: .06em; }
.brand-text strong { font-family: var(--serif); font-weight: 900; letter-spacing: .1em; }

@keyframes crest { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.podium h2 { display: flex; align-items: center; justify-content: center; gap: 14px; }
.podium h2::before, .podium h2::after { content: ''; width: 36px; height: 1px; background: var(--gold-2); }
.seat-1.is-empty .seat-face { border-color: var(--gold-2); }
