/* ============================================================
   What Should We Eat? — design system
   Dark-first, mobile-first, generous spacing, spring motion.
   ============================================================ */

:root {
  /* surfaces */
  --bg:            #0a0a0d;
  --bg-2:          #101015;
  --card:          rgba(255,255,255,.045);
  --card-2:        rgba(255,255,255,.075);
  --card-solid:    #14141b;
  --stroke:        rgba(255,255,255,.085);
  --stroke-strong: rgba(255,255,255,.16);

  /* text */
  --text:      #f4f3f7;
  --text-2:    #a7a5b4;
  --text-3:    #6f6d7d;

  /* brand — warm, appetite-forward */
  --accent:     #ff7a4d;
  --accent-2:   #ffb45c;
  --accent-3:   #ff4d7d;
  --grad:       linear-gradient(135deg, #ff7a4d 0%, #ff4d7d 100%);
  --grad-warm:  linear-gradient(135deg, #ffb45c 0%, #ff6a3d 100%);

  --good:  #4ade80;
  --warn:  #fbbf24;
  --bad:   #fb7185;

  /* geometry */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --pad:  20px;

  --shadow-sm: 0 2px 10px rgba(0,0,0,.3);
  --shadow-md: 0 10px 30px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease:   cubic-bezier(.22, .61, .36, 1);

  --tabbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Inter, Roboto, "Helvetica Neue", system-ui, sans-serif;
}

html[data-theme="light"] {
  --bg:            #f7f6f9;
  --bg-2:          #ffffff;
  --card:          rgba(20,18,30,.035);
  --card-2:        rgba(20,18,30,.06);
  --card-solid:    #ffffff;
  --stroke:        rgba(20,18,30,.09);
  --stroke-strong: rgba(20,18,30,.18);
  --text:   #16151c;
  --text-2: #5d5b6b;
  --text-3: #8b8898;
  --shadow-sm: 0 2px 10px rgba(30,25,60,.06);
  --shadow-md: 0 12px 30px rgba(30,25,60,.10);
  --shadow-lg: 0 24px 60px rgba(30,25,60,.16);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 8% -12%, rgba(255,122,77,.13), transparent 60%),
    radial-gradient(900px 560px at 96% 4%, rgba(255,77,125,.11), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
/* Reset the chrome on text-ish inputs only — doing this to a range input
   removes its thumb entirely and makes the slider undraggable on iOS. */
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
textarea, select { -webkit-appearance: none; appearance: none; }
a { color: inherit; text-decoration: none; }

/* ---------- layout shell ---------- */
.app { max-width: 640px; margin: 0 auto; position: relative; }

.screen {
  padding: calc(var(--safe-t) + 20px) var(--pad)
           calc(var(--tabbar-h) + var(--safe-b) + 26px);
  min-height: 100svh;
}

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--safe-b) + 10px);
  height: var(--tabbar-h);
  display: flex; align-items: center; gap: 2px; padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-solid) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
}
.tabbar .tab {
  width: 52px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; font-size: 21px; line-height: 1;
  opacity: .45; transition: opacity .2s var(--ease), transform .3s var(--spring), background .2s;
}
.tabbar .tab[aria-current="page"] { opacity: 1; background: var(--card-2); }
.tabbar .tab:active { transform: scale(.88); }

/* ---------- typography ---------- */
.h1 {
  font-size: clamp(30px, 8.6vw, 40px); line-height: 1.05;
  letter-spacing: -.035em; font-weight: 800; margin: 0;
}
.h2 { font-size: 22px; letter-spacing: -.022em; font-weight: 750; margin: 0; }
/* Home title: one line on a phone, shrinking rather than wrapping. */
.h1-home {
  font-size: clamp(20px, 6.3vw, 30px); line-height: 1.1; white-space: nowrap;
  letter-spacing: -.035em; font-weight: 800; margin: 0;
}
.h3 { font-size: 17px; letter-spacing: -.014em; font-weight: 700; margin: 0; }
.sub { color: var(--text-2); font-size: 15.5px; margin: 8px 0 0; line-height: 1.45; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: 11px;
  font-weight: 700; color: var(--text-3);
}
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* small round control, e.g. the theme toggle */
.icon-btn {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: var(--card); border: 1px solid var(--stroke); color: var(--text);
  transition: transform .3s var(--spring), background .2s;
}
.icon-btn:active { transform: scale(.88); background: var(--card-2); }

/* tappable chip (who's deciding) */
button.chip {
  transition: transform .3s var(--spring), border-color .2s, background .2s;
  white-space: nowrap;
}
button.chip:active { transform: scale(.94); background: var(--card-2); }

/* compact side-by-side tiles (traveling / discover) */
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.mini {
  display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 12px 13px; min-height: 58px;
  border-radius: var(--r-md); background: var(--card); border: 1px solid var(--stroke);
  transition: transform .3s var(--spring), border-color .2s, background .2s;
}
.mini:active { transform: scale(.95); background: var(--card-2); }
.mini .e { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.mini .l { font-size: 13px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }

/* footer actions under the mode grid */
.home-footer { display: flex; gap: 10px; margin-top: 14px; }
.home-footer .btn {
  flex: 1; white-space: nowrap; gap: 5px; font-size: 13px;
  padding: 11px 8px; min-height: 42px;
}
.home-footer .badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 999px; background: var(--grad); color: #fff;
  font-size: 11px; font-weight: 800; margin-left: 6px;
}

/* couple mode — fast yes/no list */
.vote-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border-radius: var(--r-md); background: var(--card); border: 1px solid var(--stroke);
}
.vote-row .who-name { flex: 1; min-width: 0; }
.vote-row .who-name strong { display: block; font-size: 14.5px; letter-spacing: -.01em; }
.vote-row .who-name span { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.vote-row .vote-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.vote-btn {
  width: 42px; height: 38px; border-radius: var(--r-sm); font-size: 17px;
  border: 1.5px solid var(--stroke); background: transparent;
  display: grid; place-items: center; filter: grayscale(1) opacity(.45);
  transition: transform .28s var(--spring), filter .2s, border-color .2s, background .2s;
}
.vote-btn:active { transform: scale(.9); }
.vote-btn[aria-pressed="true"] { filter: none; }
.vote-btn.yes[aria-pressed="true"] { border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.14); }
.vote-btn.no[aria-pressed="true"]  { border-color: rgba(251,113,133,.5); background: rgba(251,113,133,.14); }
.vote-row.closed { opacity: .55; }

/* ---------- header ---------- */
.page-head { margin-bottom: 22px; }
.page-head .row { display: flex; align-items: center; gap: 12px; }
.back {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: var(--card); border: 1px solid var(--stroke); color: var(--text);
  transition: transform .3s var(--spring), background .2s;
}
.back:active { transform: scale(.9); background: var(--card-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 20px; border-radius: var(--r-md); font-weight: 700; font-size: 15.5px;
  letter-spacing: -.01em; border: 1px solid transparent;
  transition: transform .28s var(--spring), filter .2s, background .2s, border-color .2s;
  min-height: 50px;
}
.btn:active { transform: scale(.965); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(255,90,80,.28); }
.btn-primary:active { filter: brightness(1.07); }
.btn-ghost { background: var(--card); border-color: var(--stroke); color: var(--text); }
.btn-ghost:active { background: var(--card-2); }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-danger { background: rgba(251,113,133,.13); color: var(--bad); border-color: rgba(251,113,133,.28); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 14px; min-height: 40px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .45; pointer-events: none; }

.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--stroke);
  border-radius: var(--r-lg); padding: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* mode grid on home */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  position: relative; overflow: hidden; text-align: left;
  border-radius: var(--r-lg); padding: 13px 14px;
  background: var(--card); border: 1px solid var(--stroke);
  min-height: 74px; display: flex; flex-direction: column; justify-content: center; gap: 7px;
  transition: transform .34s var(--spring), border-color .2s, background .2s;
  animation: rise .5s var(--ease) backwards;
}
.mode:active { transform: scale(.955); border-color: var(--stroke-strong); }
.mode .glow {
  position: absolute; inset: -40% -30% auto -30%; height: 130%;
  background: var(--g, var(--grad)); filter: blur(34px); opacity: .17;
  transition: opacity .3s;
}
.mode:active .glow { opacity: .3; }
.mode .ic { font-size: 22px; position: relative; display: block; }
.mode .txt { position: relative; display: block; }
.mode .t { font-size: 15px; font-weight: 750; letter-spacing: -.02em; display: block; line-height: 1.2; }
/* Descriptions only appear where a card genuinely needs one (Couple Mode). */
.mode .d { font-size: 12px; color: var(--text-2); margin-top: 3px; display: block; line-height: 1.3; }
.mode.wide { grid-column: 1 / -1; min-height: 74px; }

/* ---------- restaurant card ---------- */
.rcard {
  border-radius: var(--r-lg); overflow: hidden; background: var(--card);
  border: 1px solid var(--stroke); box-shadow: var(--shadow-sm);
  animation: rise .45s var(--ease) backwards;
}
.rcard .photo {
  height: 132px; position: relative; display: grid; place-items: center;
  font-size: 46px; overflow: hidden;
}
.rcard .photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.rcard .photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.5) 100%);
}
.rcard .photo .badges {
  position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; z-index: 2; flex-wrap: wrap;
}
.rcard .photo .score-pill {
  position: absolute; right: 12px; top: 12px; z-index: 2;
}
.rcard .body { padding: 15px 16px 16px; }
.rcard .title-row { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.rcard .meta { color: var(--text-2); font-size: 13px; margin-top: 5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rcard .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

.photo-tall { height: 190px; font-size: 62px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px); color: #fff;
  border: 1px solid rgba(255,255,255,.14); letter-spacing: .01em;
}
.pill.open  { background: rgba(74,222,128,.2);  color: #86efac; border-color: rgba(74,222,128,.32); }
.pill.closed{ background: rgba(251,113,133,.18);color: #fda4af; border-color: rgba(251,113,133,.3); }
.pill.soon  { background: rgba(251,191,36,.18); color: #fcd34d; border-color: rgba(251,191,36,.3); }
.pill.special { background: var(--grad); border-color: transparent; color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
  background: var(--card-2); border: 1px solid var(--stroke); color: var(--text-2);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.ratings { display: flex; gap: 8px; margin-top: 12px; }
.rating-box {
  flex: 1; background: var(--card-2); border: 1px solid var(--stroke);
  border-radius: var(--r-sm); padding: 9px 11px;
}
.rating-box .who { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }
.rating-box .val { font-size: 16px; font-weight: 750; margin-top: 2px; letter-spacing: -.02em; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.actions .btn { min-height: 44px; font-size: 14px; padding: 11px 12px; }
.actions .span2 { grid-column: 1 / -1; }

/* ---------- option grids (decision flow) ---------- */
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt-grid.two { grid-template-columns: 1fr 1fr; }
.opt-grid.four { grid-template-columns: repeat(4, 1fr); }
.opt {
  border-radius: var(--r-md); background: var(--card); border: 1.5px solid var(--stroke);
  padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  transition: transform .3s var(--spring), border-color .2s, background .2s;
  animation: rise .4s var(--ease) backwards;
}
.opt .e { font-size: 26px; line-height: 1; }
.opt .l { font-size: 12.5px; font-weight: 650; letter-spacing: -.01em; text-align: center; }
.opt:active { transform: scale(.94); }
.opt[aria-pressed="true"], .opt.sel {
  border-color: var(--accent); background: rgba(255,122,77,.12);
  box-shadow: 0 0 0 3px rgba(255,122,77,.1);
}
.opt.tall { padding: 20px 10px; }

/* progress */
.progress { display: flex; gap: 6px; margin-bottom: 20px; }
.progress i {
  height: 4px; flex: 1; border-radius: 99px; background: var(--card-2);
  transition: background .35s var(--ease);
}
.progress i.on { background: var(--grad); }

/* ---------- recommendation hero ---------- */
.hero {
  border-radius: var(--r-xl); overflow: hidden; position: relative;
  border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-lg);
  background: var(--card-solid);
  animation: heroIn .6s var(--spring) backwards;
}
.hero .art {
  height: 210px; display: grid; place-items: center; font-size: 74px; position: relative;
}
.hero .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.72) 100%);
}
.hero .art .top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 2; gap: 8px; }
.hero .art .name { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; }
.hero .art .name h2 { font-size: 27px; font-weight: 800; letter-spacing: -.03em; margin: 0; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hero .art .name p { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.86); }
.hero .why { padding: 18px 18px 6px; }
.why-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 9px; }
.why-list li {
  display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.35;
  animation: slideIn .45s var(--ease) backwards;
}
.why-list li .tick { color: var(--good); font-weight: 800; flex: 0 0 auto; }
.why-list li .tick.neg { color: var(--text-3); }
.hero .cta { padding: 16px 18px 18px; display: grid; gap: 9px; }

/* ---------- elimination ---------- */
.elim-stage { position: relative; height: 420px; margin: 6px 0 18px; }
.elim-card {
  position: absolute; inset: 0; border-radius: var(--r-xl); overflow: hidden;
  background: var(--card-solid); border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow-lg); will-change: transform, opacity; touch-action: pan-y;
}
.elim-card .art { height: 250px; display: grid; place-items: center; font-size: 80px; position: relative; }
.elim-card .art::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.6)); }
.elim-card .info { padding: 16px 18px; }
.stamp {
  position: absolute; top: 26px; z-index: 5; font-size: 26px; font-weight: 900;
  letter-spacing: .06em; padding: 8px 16px; border-radius: 12px; opacity: 0;
  border: 3px solid currentColor; text-transform: uppercase;
}
.stamp.keep { left: 22px; color: var(--good); transform: rotate(-14deg); }
.stamp.nope { right: 22px; color: var(--bad); transform: rotate(14deg); }

.elim-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.elim-btn {
  border-radius: var(--r-md); padding: 15px 8px; font-size: 13px; font-weight: 700;
  border: 1.5px solid var(--stroke); background: var(--card);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .28s var(--spring);
}
.elim-btn .e { font-size: 22px; }
.elim-btn:active { transform: scale(.92); }
.elim-btn.keep { border-color: rgba(74,222,128,.35); color: #86efac; }
.elim-btn.nope { border-color: rgba(251,113,133,.35); color: #fda4af; }

/* head to head */
.vs-wrap { display: grid; gap: 12px; }
.vs-card {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--stroke);
  background: var(--card); position: relative;
  transition: transform .3s var(--spring), border-color .2s;
  animation: rise .45s var(--ease) backwards;
}
.vs-card:active { transform: scale(.97); }
.vs-card .art { height: 118px; display: grid; place-items: center; font-size: 42px; position: relative; }
.vs-card .info { padding: 13px 15px 15px; }
.vs-divider {
  text-align: center; font-weight: 900; letter-spacing: .14em; font-size: 13px;
  color: var(--text-3); position: relative;
}

/* ---------- wheel ---------- */
.wheel-wrap { position: relative; display: grid; place-items: center; margin: 8px 0 22px; }
.wheel-pointer {
  position: absolute; top: -6px; z-index: 5; width: 0; height: 0;
  border-left: 13px solid transparent; border-right: 13px solid transparent;
  border-top: 22px solid var(--accent);
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.5));
}
#wheel { max-width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(0,0,0,.5)); }

.confetti {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 200; display: none;
}
.confetti.on { display: block; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .flabel {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.input, textarea.input, select.input {
  width: 100%; padding: 14px 15px; border-radius: var(--r-md);
  background: var(--card); border: 1.5px solid var(--stroke); color: var(--text);
  font-size: 16px; transition: border-color .2s, background .2s;
}
.input:focus { outline: none; border-color: var(--accent); background: var(--card-2); }
.input::placeholder { color: var(--text-3); }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.5; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px;
}
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 7px; line-height: 1.45; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px;
  border-radius: 999px; background: var(--card); border: 1.5px solid var(--stroke);
  font-size: 13.5px; font-weight: 650; color: var(--text-2);
  transition: transform .28s var(--spring), border-color .2s, color .2s, background .2s;
}
.check:active { transform: scale(.94); }
.check[aria-pressed="true"] {
  border-color: var(--accent); color: var(--text); background: rgba(255,122,77,.13);
}

.hours-row {
  display: grid; grid-template-columns: 46px 1fr 12px 1fr auto; gap: 8px;
  align-items: center; margin-bottom: 9px;
}
.hours-row .day { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.hours-row .input { padding: 10px 11px; font-size: 14px; border-radius: var(--r-sm); }
.hours-row.closed .input { opacity: .35; pointer-events: none; }
.tiny-toggle {
  font-size: 11px; padding: 6px 9px; border-radius: 8px; background: var(--card-2);
  border: 1px solid var(--stroke); color: var(--text-3); font-weight: 700; white-space: nowrap;
}
.tiny-toggle[aria-pressed="true"] { color: var(--bad); border-color: rgba(251,113,133,.3); }

/* ---------- sheet / modal ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 100;
  backdrop-filter: blur(3px); animation: fade .25s var(--ease);
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 101;
  max-width: 640px; margin: 0 auto;
  background: var(--card-solid); border: 1px solid var(--stroke);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px var(--pad) calc(22px + var(--safe-b));
  max-height: 88svh; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow-lg);
  animation: sheetIn .4s var(--spring);
}
.sheet .grabber {
  width: 40px; height: 4px; border-radius: 99px; background: var(--stroke-strong);
  margin: 6px auto 16px;
}
.sheet.closing { animation: sheetOut .22s var(--ease) forwards; }
.scrim.closing { animation: fadeOut .22s var(--ease) forwards; }

.reason-list { display: grid; gap: 8px; margin-top: 6px; }
.reason {
  display: flex; align-items: center; gap: 11px; padding: 15px 16px;
  border-radius: var(--r-md); background: var(--card); border: 1px solid var(--stroke);
  font-size: 15px; font-weight: 600; text-align: left; width: 100%;
  transition: transform .28s var(--spring), background .2s;
}
.reason:active { transform: scale(.97); background: var(--card-2); }

/* ---------- toast ---------- */
.toast-root {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  z-index: 150; display: grid; gap: 8px; justify-items: center; pointer-events: none;
  padding: 0 16px;
}
.toast {
  background: var(--card-solid); border: 1px solid var(--stroke-strong);
  color: var(--text); padding: 13px 18px; border-radius: 999px; font-size: 14px;
  font-weight: 650; box-shadow: var(--shadow-md); max-width: 100%;
  animation: toastIn .4s var(--spring);
}
.toast.out { animation: toastOut .3s var(--ease) forwards; }

/* ---------- misc ---------- */
.list { display: grid; gap: 12px; }
.stack { display: grid; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }

.empty {
  text-align: center; padding: 46px 24px; color: var(--text-2);
}
.empty .e { font-size: 44px; display: block; margin-bottom: 12px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  border-radius: var(--r-lg); padding: 16px; background: var(--card);
  border: 1px solid var(--stroke);
}
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }
.stat .v { font-size: 20px; font-weight: 800; letter-spacing: -.025em; margin-top: 6px; line-height: 1.15; }
.stat .s { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

.bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }

.banner {
  border-radius: var(--r-md); padding: 13px 15px; font-size: 13.5px; line-height: 1.45;
  background: rgba(255,180,92,.1); border: 1px solid rgba(255,180,92,.25); color: #fcd9a8;
}
html[data-theme="light"] .banner { color: #7a5410; }
.banner.travel { background: rgba(96,165,250,.12); border-color: rgba(96,165,250,.3); color: #bfdbfe; }
html[data-theme="light"] .banner.travel { color: #1e40af; }

.search-wrap { position: relative; margin-bottom: 16px; }
.search-wrap .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-wrap .input { padding-left: 42px; border-radius: 999px; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--stroke-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 0 auto;
}
.loading { display: grid; gap: 12px; place-items: center; padding: 40px 0; color: var(--text-2); font-size: 14px; }

.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--stroke);
}
.seg button {
  flex: 1; padding: 9px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--text-3); transition: background .25s var(--ease), color .2s;
}
.seg button[aria-pressed="true"] { background: var(--card-2); color: var(--text); }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); font-weight: 650; }
.kv dd { margin: 0; }

.link { color: var(--accent-2); text-decoration: none; font-weight: 650; word-break: break-word; }

.divider { height: 1px; background: var(--stroke); margin: 18px 0; }

.starrow { display: flex; gap: 4px; }
.starrow button { font-size: 22px; line-height: 1; transition: transform .25s var(--spring); filter: grayscale(1) opacity(.35); }
.starrow button.on { filter: none; }
.starrow button:active { transform: scale(1.25); }

/* ---------- animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { to { opacity: 0 } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.8); opacity: 0 } 60% { transform: scale(1.06) } 100% { transform: none; opacity: 1 } }
@keyframes shake { 10%,90% { transform: translateX(-2px) } 30%,70% { transform: translateX(4px) } 50% { transform: translateX(-4px) } }

.screen > * { animation: rise .42s var(--ease) backwards; }
.stagger > * { animation: rise .45s var(--ease) backwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (min-width: 560px) {
  .mode-grid { gap: 14px; }
  .opt-grid { gap: 12px; }
  .actions .btn { font-size: 14.5px; }
}
