/* The Tiebreaker — shared styles */
:root {
  --ink: #101114;
  --paper: #F4F2EE;
  --orange: #FF7A2E;
  --muted: #C9C6BF;
  --line: #3A3B40;
  --card: #1A1B1F;
  --radius: 14px;
  --display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
}
a { color: var(--orange); }
button { font: inherit; cursor: pointer; }
input, textarea { font: inherit; }
.stripes { height: 8px; background: repeating-linear-gradient(90deg, var(--paper) 0 20px, var(--ink) 20px 40px); }
.wrap { max-width: 520px; margin: 0 auto; padding: 18px 20px 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.brand { font-family: var(--display); font-size: 24px; letter-spacing: 1px; color: inherit; text-decoration: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; opacity: .85; }
.iconbtn:hover { opacity: 1; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .5px; margin: 0; line-height: 1; }
h1 { font-size: 44px; }
h2 { font-size: 30px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1 1 0; }
.label { font-size: 14px; font-weight: 600; opacity: .8; }
.field { min-height: 50px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: inherit; font-size: 16px; }
.field:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: inherit; font-weight: 600; font-size: 14px; }
.chip.on { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn { min-height: 54px; width: 100%; border: 0; border-radius: 12px; background: var(--orange); color: var(--ink); font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 18px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1.5px solid currentColor; color: inherit; }
.btn.small { min-height: 46px; font-size: 15px; }
.mode { min-height: 64px; padding: 0 16px; border-radius: 12px; border: 2px solid transparent; display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 700; text-align: left; }
.mode span { font-size: 13px; font-weight: 500; opacity: .85; }
.mode.quick { background: #FFF1CC; color: #1C1A16; }
.mode.council { background: #1E3A2B; color: #F3EBD8; }
.mode.wheel { background: #000; color: #EDEDED; border-color: #333; }
.mode.on { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card); }
.item .grow { flex-grow: 1; font-weight: 600; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; opacity: .7; font-size: 20px; line-height: 1; }
.x:hover { opacity: 1; }
.note { font-size: 13px; opacity: .75; line-height: 1.45; }
.center { text-align: center; align-items: center; }
.spacer { flex-grow: 1; }
.big { font-family: var(--display); font-size: 84px; line-height: .9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Theme: Quick Pick (light, playful) ---------- */
body.t-quick { background: #FFF6DD; color: #1C1A16; }
body.t-quick .field { background: #fff; border-color: #E9D49A; }
body.t-quick .item { background: #fff; }
body.t-quick .btn { background: #C2410C; color: #fff; }
body.t-quick .btn.ghost { background: transparent; color: #1C1A16; }
body.t-quick a { color: #C2410C; }
body.t-quick h1, body.t-quick h2, body.t-quick .big { font-family: 'Fredoka', var(--body); font-weight: 700; }
.swipe-zone { position: relative; height: 380px; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.card { position: absolute; width: min(320px, 88vw); height: 340px; border-radius: 26px; background: #fff; box-shadow: 0 18px 40px rgba(120,80,0,.18); display: flex; flex-direction: column; overflow: hidden; user-select: none; transition: transform .25s ease, opacity .25s ease; }
.card .pic { flex-grow: 1; background: #FFD9A8; display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', var(--body); font-weight: 700; font-size: 72px; color: #C2410C; }
.card .name { padding: 18px 20px; font-family: 'Fredoka', var(--body); font-weight: 700; font-size: 34px; }
.card .stamp { position: absolute; top: 20px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font-family: 'Fredoka', var(--body); font-weight: 700; font-size: 22px; background: #fff; opacity: 0; }
.card .stamp.yes { left: 18px; color: #15803D; transform: rotate(-12deg); }
.card .stamp.no { right: 18px; color: #B91C1C; transform: rotate(12deg); }
.roundbtns { display: flex; justify-content: center; gap: 36px; }
.round { width: 76px; height: 76px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(120,80,0,.15); }
.round.no { background: #fff; color: #B91C1C; }
.round.yes { background: #15803D; color: #fff; }
.confetti span { position: fixed; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: drop linear forwards; z-index: 5; pointer-events: none; }
@keyframes drop { to { transform: translateY(110vh) rotate(720deg); } }
.medal { width: 250px; height: 250px; border-radius: 50%; background: #fff; box-shadow: 0 20px 50px rgba(120,80,0,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 20px; text-align: center; margin: 0 auto; }

/* ---------- Theme: The Council (jungle, torches) ---------- */
body.t-council { background: #0D1710; color: #F3EBD8; }
body.t-council .field, body.t-council .item { background: #15241A; border-color: #2F4A3A; }
body.t-council .btn { background: #FF8A1E; color: #0D1710; }
body.t-council .btn.ghost { background: transparent; color: #F3EBD8; }
body.t-council a { color: #FFA94D; }
.torches { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 6px 0; }
.torch { width: 34px; height: 70px; position: relative; }
.torch .stick { position: absolute; left: 13px; bottom: 0; width: 8px; height: 40px; border-radius: 2px; background: #6B4A2B; }
.torch .flame { position: absolute; left: 3px; top: 0; width: 28px; height: 34px; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 50% 70%, #FFD166 0 30%, #FF8A1E 60%, rgba(255,138,30,0) 72%); animation: flicker .18s infinite alternate; }
.torch.out .flame { animation: none; background: none; }
.torch.out .stick { background: #3F3326; }
@keyframes flicker { from { transform: scale(1) translateY(0); } to { transform: scale(1.06, .95) translateY(1px); } }
.vote { min-height: 60px; padding: 0 16px; border-radius: 14px; border: 1.5px solid #2F4A3A; background: #15241A; color: #F3EBD8; display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 700; }
.vote.on { border: 2.5px solid #FF8A1E; background: #2A1E10; }
.vote.gone { opacity: .45; text-decoration: line-through; cursor: default; }
.glow { box-shadow: 0 0 60px rgba(255,138,30,.35); }

/* ---------- Theme: Wheel of Fate (black, skulls) ---------- */
body.t-wheel { background: #050505; color: #ECE6DA; }
body.t-wheel .field, body.t-wheel .item { background: #111; border-color: #2A2A2A; }
body.t-wheel .btn { background: #E5383B; color: #050505; }
body.t-wheel .btn.ghost { background: transparent; color: #ECE6DA; border-color: #444; }
body.t-wheel a { color: #E5383B; }
.reel { position: relative; height: 300px; border-radius: 18px; background: #111; border: 2px solid #2A2A2A; overflow: hidden; }
.reel-track { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.reel-item { height: 60px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 40px; color: #6E675C; }
.reel-window { position: absolute; left: 0; right: 0; top: 120px; height: 60px; border-top: 2px solid #E5383B; border-bottom: 2px solid #E5383B; background: rgba(229,56,59,.08); pointer-events: none; }
.reel-fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#111 0, rgba(17,17,17,0) 35%, rgba(17,17,17,0) 65%, #111 100%); }
.skull { display: block; margin: 0 auto; }
.shake { animation: shake .5s ease; }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ---------- Homepage ---------- */
.home { max-width: 1180px; margin: 0 auto; padding: 0 24px 60px; }
.home header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 0; }
.home nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 500; }
.home nav a { color: #D9D6CF; text-decoration: none; }
.hero { padding: 28px 0 44px; display: flex; flex-wrap: wrap; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(56px, 9vw, 84px); line-height: .92; }
.hero p { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 540px; margin: 0; }
.rooms { display: flex; flex-wrap: wrap; gap: 22px; }
.room { flex: 1 1 340px; border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.room h3 { font-family: var(--display); font-weight: 400; font-size: 52px; line-height: .95; margin: 0; }
.room p { margin: 0; font-size: 16px; line-height: 1.55; }
.room .cta { align-self: flex-start; min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 700; display: inline-flex; align-items: center; text-decoration: none; }
.badge { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; }
.soon { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding: 20px 24px; border: 1.5px dashed var(--line); border-radius: 18px; margin-top: 22px; color: var(--muted); }
footer.site { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 36px 0 10px; color: #A8A59E; font-size: 14px; }
footer.site a { color: #A8A59E; text-decoration: none; }
.flash { animation: flash .45s ease; }
@keyframes flash { 0%,100% { box-shadow: none; border-color: #2A2A2A; } 30% { box-shadow: 0 0 40px rgba(229,56,59,.8); border-color: #E5383B; } }
#wheelnote { min-height: 22px; font-weight: 700; letter-spacing: .5px; }
