/* Choizi v1 — Ember solid design system */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #141311;
  --bg2: #1c1b18;
  --text: #f5f1ea;
  --muted: rgba(245, 241, 234, .62);
  --faint: rgba(245, 241, 234, .42);
  --accent: #e8590c;
  --accent-soft: rgba(232, 89, 12, .14);
  --accent-text: #ffab7a;
  --glass: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .1);
  --danger: #ff5a5a;
  --ok: #7ee2a8;
  --radius: 18px;
  --font-d: 'Sora', -apple-system, sans-serif;
  --font-b: 'Inter', -apple-system, sans-serif;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(232, 89, 12, .14), transparent 60%),
    radial-gradient(500px 500px at -10% 110%, rgba(232, 89, 12, .07), transparent 60%);
}

#app { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100dvh; padding: 0 20px calc(96px + env(safe-area-inset-bottom)); }

/* ---------- type ---------- */
.wordmark { font-family: var(--font-d); font-weight: 800; font-size: 21px; letter-spacing: -.5px; }
.wordmark em { font-style: normal; color: var(--accent); }
h1.hero { font-family: var(--font-d); font-weight: 800; font-size: 32px; line-height: 1.12; letter-spacing: -.8px; margin: 14px 0 8px; }
.sub { color: var(--muted); font-size: 14px; line-height: 1.55; }
.sec-label { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }

/* ---------- glass primitives ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 34px -18px rgba(0,0,0,.7);
}

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  font-family: var(--font-d); font-weight: 700; font-size: 15.5px;
  padding: 17px; border-radius: 20px; color: #fff; background: var(--accent);
  box-shadow: 0 14px 30px -10px rgba(232, 89, 12, .55), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s ease, box-shadow .2s ease;
  letter-spacing: -.2px;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn.ghost { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: none; color: var(--text); font-size: 14px; padding: 14px; }
.btn.small { padding: 12px; font-size: 13.5px; border-radius: 14px; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { margin-top: 0; }

/* ---------- inputs ---------- */
.field {
  width: 100%; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 15px 16px; color: var(--text);
  font-family: var(--font-b); font-size: 15px; outline: none;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--accent); }
.search-wrap { display: flex; align-items: center; gap: 10px; }
.search-wrap .field { flex: 1; }

/* ---------- chips / segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); cursor: pointer;
  transition: all .15s ease; white-space: nowrap;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 16px; }
.seg button { flex: 1; border: none; background: none; color: var(--muted); font-family: var(--font-b); font-weight: 600; font-size: 13px; padding: 11px 0; border-radius: 12px; cursor: pointer; }
.seg button.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius); cursor: pointer; }
.toggle { width: 46px; height: 27px; border-radius: 999px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(19px); }

/* ---------- result cards ---------- */
.pick { border-radius: 22px; overflow: hidden; margin-bottom: 16px; animation: rise .55s cubic-bezier(.2,.9,.25,1.15) both; }
.pick:nth-child(2) { animation-delay: .08s; }
.pick-photo { height: 128px; background: linear-gradient(135deg, #2b2119, #141210); position: relative; display: flex; align-items: flex-end; padding: 12px 14px; }
.pick-photo.alt { background: linear-gradient(135deg, #232032, #121016); }
.badge { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; padding: 6px 11px; border-radius: 999px; background: var(--accent); color: #fff; }
.pick-body { padding: 16px; }
.pick-name { font-family: var(--font-d); font-weight: 700; font-size: 19px; letter-spacing: -.4px; }
.pick-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.pick-why { font-size: 13.5px; color: var(--text); opacity: .85; margin-top: 10px; line-height: 1.55; font-style: italic; }
.pick-actions { display: flex; gap: 8px; margin-top: 14px; }
.mini-btn { flex: 1; padding: 11px 6px; border-radius: 13px; font-size: 12px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); }
.mini-btn.accent { background: var(--accent-soft); border-color: rgba(232,89,12,.4); color: var(--accent-text); }
.heart { width: 42px; flex-shrink: 0; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.heart.saved { color: var(--accent); border-color: var(--accent); }

/* ---------- vote ---------- */
.countdown { font-family: var(--font-d); font-weight: 800; font-size: 26px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ok); }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: blink 1.6s ease-in-out infinite; font-style: normal; }
.vote-opt { border-radius: 20px; padding: 16px; margin-bottom: 12px; animation: rise .55s cubic-bezier(.2,.9,.25,1.15) both; }
.vote-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 12px; }
.vote-fill { height: 100%; border-radius: 999px; background: var(--accent); width: 0; transition: width 1s cubic-bezier(.2,.8,.3,1); }
.vote-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.voter { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.09); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #141311; margin-right: -9px; border: 2px solid var(--bg2); }
.winner-banner { text-align: center; padding: 26px 18px; border-radius: 24px; margin-bottom: 16px; background: var(--accent-soft); border: 1px solid rgba(232,89,12,.45); animation: rise .6s cubic-bezier(.2,.9,.25,1.2) both; }
.winner-banner .t { font-size: 12px; letter-spacing: 1.6px; font-weight: 700; color: var(--accent-text); text-transform: uppercase; }
.winner-banner .n { font-family: var(--font-d); font-weight: 800; font-size: 30px; letter-spacing: -.8px; margin-top: 8px; }

/* ---------- nav ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: center; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); background: rgba(20,19,17,.78); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-top: 1px solid var(--glass-border); }
.tabbar-inner { display: flex; width: 100%; max-width: 520px; }
.tab { flex: 1; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--faint); text-decoration: none; padding: 6px 0; letter-spacing: .2px; }
.tab.on { color: var(--accent-text); }
.tab svg { display: block; margin: 0 auto 4px; }

/* ---------- states ---------- */
.error-box { border-radius: var(--radius); padding: 16px; background: rgba(255,90,90,.1); border: 1px solid rgba(255,90,90,.35); color: #ffb4b4; font-size: 13.5px; line-height: 1.55; margin-top: 14px; }
.skel { border-radius: 22px; overflow: hidden; margin-bottom: 16px; }
.skel .ph { height: 128px; background: linear-gradient(100deg, var(--bg2) 40%, #262420 50%, var(--bg2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skel .ln { height: 14px; border-radius: 7px; margin: 14px 16px 0; background: linear-gradient(100deg, var(--bg2) 40%, #262420 50%, var(--bg2) 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skel .ln.short { width: 55%; margin-bottom: 16px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 12px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 4px; }
.back { border: none; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text); width: 40px; height: 40px; border-radius: 14px; font-size: 17px; cursor: pointer; }
.timer-picks { display: flex; gap: 8px; }
.timer-picks .chip { flex: 1; text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.rise { animation: rise .55s cubic-bezier(.2,.9,.25,1.15) both; }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; }
