:root {
  --green: #178b4f;
  --red: #cf2e2e;
  --cream: #fff3d6;
  --ink: #24160d;
  --panel: rgba(255, 248, 226, .92);
  --shadow: 0 20px 60px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.65), transparent 30%),
    linear-gradient(135deg, #137547 0 33%, #fff1d0 33% 66%, #bb1f2f 66% 100%);
}
.flagbar { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 12px; }
.flagbar span:nth-child(1) { background: #138a4c; }
.flagbar span:nth-child(2) { background: #fff; }
.flagbar span:nth-child(3) { background: #ce2b37; }
.app { width: min(1500px, 96vw); margin: 0 auto; padding: 26px 0 40px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.kicker { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .18em; font-weight: 900; font-size: 14px; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 92px); line-height: .9; text-shadow: 0 5px 0 rgba(255,255,255,.25); }
.subtitle { font-size: clamp(17px, 1.8vw, 24px); margin: 14px 0 0; max-width: 850px; font-weight: 650; }
.roundbox { background: var(--panel); box-shadow: var(--shadow); border: 4px solid rgba(255,255,255,.7); border-radius: 28px; padding: 18px 28px; text-align: center; min-width: 150px; }
.roundbox span { display: block; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.roundbox strong { display: block; font-size: 70px; line-height: .9; }
.grid { display: grid; grid-template-columns: 300px 1fr 340px; gap: 18px; align-items: stretch; }
.panel { background: var(--panel); border: 4px solid rgba(255,255,255,.72); border-radius: 30px; padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.panel h2 { margin: 0 0 10px; font-size: 28px; }
.warning { margin-bottom: 18px; }
textarea { width: 100%; height: 250px; border-radius: 18px; border: 3px solid #e1c98d; padding: 14px; font-size: 18px; resize: vertical; background: #fffaf0; color: var(--ink); font-weight: 700; }
button { border: 0; cursor: pointer; border-radius: 999px; font-weight: 950; transition: transform .08s ease, filter .15s ease; }
button:hover { filter: brightness(1.05); transform: translateY(-1px); }
button:active { transform: translateY(1px) scale(.99); }
button:disabled { cursor: wait; filter: saturate(.8); opacity: .8; }
.primary { width: 100%; padding: 24px; margin-top: 20px; font-size: clamp(22px, 3vw, 42px); background: var(--red); color: white; box-shadow: 0 12px 0 #8e1721; }
.secondary, .ghost { width: 100%; margin-top: 12px; padding: 15px; font-size: 17px; }
.secondary { background: var(--green); color: white; }
.ghost { background: #f0ddb0; color: var(--ink); }
.wheelLaunch { font-size: clamp(19px, 2vw, 28px); padding: 18px; }
.stage { display: flex; flex-direction: column; justify-content: space-between; min-height: 650px; }
.card { flex: 1; border-radius: 28px; background: #fffaf0; border: 4px dashed #d7b86d; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(24px, 5vw, 70px); position: relative; overflow: hidden; }
.card:before { content: ""; position: absolute; inset: -50%; background: repeating-linear-gradient(45deg, rgba(19,138,76,.08) 0 18px, rgba(206,43,55,.08) 18px 36px); animation: drift 12s linear infinite; }
.card > * { position: relative; z-index: 1; }
.bossCard { background: #24160d; color: #fff3d6; border-color: #cf2e2e; box-shadow: 0 0 0 8px rgba(255,255,255,.55), 0 28px 90px rgba(0,0,0,.45); }
.bossCard:before { background: repeating-conic-gradient(from 0deg, rgba(207,46,46,.5) 0 10deg, rgba(255,243,214,.28) 10deg 20deg, rgba(23,139,79,.45) 20deg 30deg); animation: bossSpin 10s linear infinite; }
.bossCard .typeLine { color: #fff3d6; }
.bossCard .badge { background: #cf2e2e; }
.emoji { font-size: clamp(72px, 10vw, 160px); line-height: 1; filter: drop-shadow(0 8px 0 rgba(0,0,0,.08)); }
.pop { animation: pop .35s ease; }
.card h2 { font-size: clamp(38px, 5.5vw, 80px); margin: 8px 0 18px; }
.card p { font-size: clamp(24px, 3vw, 48px); line-height: 1.12; margin: 0 auto 24px; max-width: 980px; font-weight: 850; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: var(--green); color: white; padding: 12px 22px; font-size: clamp(16px, 1.6vw, 22px); font-weight: 950; }
.quickRules { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-weight: 900; }
.quickRules span { background: rgba(255,255,255,.55); border-radius: 999px; padding: 10px 14px; }
.player { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 2px solid rgba(36,22,13,.12); }
.player strong { display: block; font-size: 19px; }
.player span { display: block; font-size: 13px; opacity: .78; font-weight: 800; }
.drinkBtns { display: flex; gap: 5px; }
.drinkBtns button { padding: 8px 10px; background: var(--red); color: #fff; }
.tiny, .muted { opacity: .78; font-weight: 700; }
code { background: rgba(255,255,255,.7); padding: 2px 6px; border-radius: 7px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(80px); } }
@keyframes bossSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.2) rotate(-12deg); opacity: .1; } 70% { transform: scale(1.16) rotate(5deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@media (max-width: 1100px) { .grid { grid-template-columns: 1fr; } .stage { min-height: 560px; } .hero { align-items: flex-start; } .roundbox { min-width: 120px; } }

.typeLine { margin: 0 0 8px !important; font-size: clamp(14px, 1.3vw, 20px) !important; letter-spacing: .16em; text-transform: uppercase; color: #8e1721; font-weight: 1000; }
.people { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin: -6px 0 22px; }
.people strong { background: #24160d; color: #fff3d6; padding: 12px 22px; border-radius: 999px; font-size: clamp(20px, 2.4vw, 34px); box-shadow: 0 8px 0 rgba(0,0,0,.12); }
.people span { font-weight: 1000; opacity: .72; text-transform: uppercase; }
.people.order { gap: 8px; max-width: 980px; }
.people.order strong { font-size: clamp(15px, 1.5vw, 23px); padding: 8px 13px; }
.people.order span { font-size: 16px; }
.badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.badge.starter { background: #24160d; }
.badge.danger { background: var(--red); }
.player.nextish { background: rgba(23,139,79,.12); border-radius: 16px; padding-left: 10px; padding-right: 10px; }
.turnBubble { min-width: 42px; height: 42px; border-radius: 999px; background: var(--green); color: white; display: grid; place-items: center; font-size: 22px; font-weight: 1000; box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.timerOverlay { position: fixed; right: clamp(14px, 3vw, 42px); top: clamp(14px, 3vw, 42px); z-index: 999; pointer-events: none; }
.timerBox { width: min(260px, 42vw); border-radius: 24px; background: #fff3d6; color: var(--ink); border: 5px solid white; box-shadow: 0 18px 48px rgba(0,0,0,.32); text-align: center; padding: 16px 18px 18px; animation: timerPop .25s ease; }
.timerBox span { display: block; font-size: clamp(18px, 2.1vw, 30px); font-weight: 1000; line-height: .95; text-transform: uppercase; }
.timerBox strong { display: block; font-size: clamp(58px, 8vw, 112px); line-height: .85; margin: 6px 0; text-shadow: 0 6px 0 rgba(0,0,0,.10); }
.timerBox em { display: block; font-size: clamp(14px, 1.5vw, 22px); font-style: normal; font-weight: 950; }
.timerBox.start { background: #dfffcd; }
.timerBox.done { background: #ffd5d5; }
.timerBox.boss { width: min(420px, 76vw); background: #24160d; color: #fff3d6; border-color: #cf2e2e; box-shadow: 0 0 0 8px rgba(255,255,255,.55), 0 24px 80px rgba(0,0,0,.45); }
.timerBox.boss strong { font-size: clamp(54px, 8vw, 98px); }
@keyframes timerPop { from { transform: scale(.75) rotate(-2deg); opacity: .2; } to { transform: scale(1) rotate(0); opacity: 1; } }
@media (max-width: 700px) {
  .timerOverlay { left: 12px; right: 12px; top: auto; bottom: 12px; }
  .timerBox { width: 100%; max-width: none; border-radius: 18px; padding: 10px 14px; }
  .timerBox strong { font-size: clamp(44px, 15vw, 76px); margin: 3px 0; }
}

.wheelOverlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(36,22,13,.78); backdrop-filter: blur(5px); padding: 18px; }
.wheelOverlay[hidden] { display: none; }
.wheelModal { width: min(680px, 94vw); max-height: calc(100vh - 28px); border-radius: 28px; border: 6px solid white; background: #fff3d6; color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.48); text-align: center; padding: clamp(16px, 2.4vw, 28px); position: relative; }
.wheelModal h2 { margin: 0 0 12px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1; }
.wheelClose { position: absolute; right: 16px; top: 14px; width: 48px; height: 48px; border-radius: 999px; background: #24160d; color: #fff3d6; font-size: 32px; line-height: 1; }
.wheelWrap { width: min(360px, 54vh, 74vw); aspect-ratio: 1; margin: 0 auto 14px; position: relative; display: grid; place-items: center; }
.wheel { width: 100%; height: 100%; border-radius: 50%; border: 10px solid #fff; box-shadow: inset 0 0 0 8px rgba(36,22,13,.12), 0 18px 45px rgba(0,0,0,.28); transition: transform 3.4s cubic-bezier(.12,.72,.08,1); position: relative; overflow: hidden; }
.wheel:after { content: ""; position: absolute; inset: 10%; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.2) 0 8deg, transparent 8deg 16deg); pointer-events: none; }
.wheelPointer { position: absolute; top: -4px; z-index: 2; width: 0; height: 0; border-left: 24px solid transparent; border-right: 24px solid transparent; border-top: 46px solid #cf2e2e; filter: drop-shadow(0 5px 0 rgba(0,0,0,.18)); }
.wheelCenter { position: absolute; z-index: 3; width: min(230px, 42vw); min-height: 76px; border-radius: 999px; display: grid; place-items: center; background: #24160d; color: #fff3d6; border: 6px solid #fff; padding: 10px 18px; font-size: clamp(20px, 2.7vw, 34px); font-weight: 1000; line-height: .95; box-shadow: 0 10px 0 rgba(0,0,0,.16); overflow-wrap: normal; word-break: normal; hyphens: none; }
.wheelSpin { width: min(400px, 100%); margin: 0 auto 8px; display: block; font-size: clamp(22px, 3vw, 34px); padding: 18px; }
@media (max-width: 700px) {
  .wheelWrap { width: min(320px, 82vw); }
  .wheelCenter { min-height: 70px; }
}
