/* Getekende stijl: dikke zwarte lijnen, egale vlakken, donkergrijze achtergrond. */
:root {
  --bg: #35353b;
  --bg2: #2b2b30;
  --panel: #45454d;
  --panel2: #55555e;
  --ink: #111114;
  --paper: #f5ecd8;
  --text: #f2efe6;
  --muted: #b9b6ad;
  --blue: #74a9ee;
  --pink: #f08fb3;
  --yellow: #f6d55c;
  --green: #8fd694;
  --red: #e8534a;
  --purple: #b69cf0;
  --orange: #f5a25d;
  --wobble: 255px 14px 225px 14px / 14px 225px 14px 255px;
  --font: 'Patrick Hand', 'Segoe Print', 'Comic Sans MS', 'Chalkboard SE', cursive;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.25;
  background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,.04) 0, transparent 40%), radial-gradient(circle at 80% 90%, rgba(255,255,255,.03) 0, transparent 35%);
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0 0 .4em; font-weight: 700; letter-spacing: .5px; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }
.hidden { display: none !important; }

/* ---------- Knoppen en velden ---------- */
.btn {
  border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); padding: 8px 18px; cursor: pointer;
  border-radius: var(--wobble); box-shadow: 0 4px 0 var(--ink); font-weight: 700; font-size: 1.05em;
  transition: transform .06s, box-shadow .06s, filter .15s; user-select: none;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.blue { background: var(--blue); } .btn.pink { background: var(--pink); } .btn.green { background: var(--green); }
.btn.red { background: var(--red); color: #fff; } .btn.gray { background: #cfcbc0; } .btn.purple { background: var(--purple); }
.btn.small { padding: 3px 11px; font-size: .9em; box-shadow: 0 3px 0 var(--ink); }
.btn.big { padding: 12px 26px; font-size: 1.3em; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.field, input[type=text], input[type=number], select {
  background: #f9f3e3; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 7px 11px; outline: none; min-width: 0;
}
input:focus, select:focus { box-shadow: 0 0 0 3px var(--blue); }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); vertical-align: middle; cursor: pointer; }
label { cursor: pointer; }

.panel {
  background: var(--panel); border: 3px solid var(--ink); border-radius: var(--wobble); padding: 16px 18px;
  box-shadow: 0 6px 0 rgba(0,0,0,.45);
}
.panel.paper { background: var(--paper); color: var(--ink); }
.panel h2, .panel h3 { margin-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.tag { display: inline-block; border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; background: var(--panel2); font-size: .85em; }
.coin { display: inline-flex; align-items: center; gap: 4px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; padding: 1px 10px; font-weight: 700; }
.coin::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #f0a920; border: 2px solid var(--ink); display: inline-block; }

/* ---------- Avatars ---------- */
.avatar {
  --frame: #8b5a2b; position: relative; border-radius: 50%; border: 4px solid var(--frame);
  box-shadow: 0 0 0 3px var(--ink); background: #3a3a40 center/cover no-repeat; flex: none; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.f-vlam { animation: glowOrange 1.4s ease-in-out infinite alternate; }
.avatar.f-bloed { animation: glowRed 1.8s ease-in-out infinite alternate; }
.avatar.f-maan { animation: glowBlue 2s ease-in-out infinite alternate; }
@keyframes glowOrange { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #ff9d2e; } }
@keyframes glowRed { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #e0182b; } }
@keyframes glowBlue { to { box-shadow: 0 0 0 3px var(--ink), 0 0 14px 4px #9bc6ff; } }

/* ---------- Login ---------- */
.hero {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(rgba(20,20,26,.35), rgba(20,20,26,.7)), url('../assets/bg/titel.webp') center/cover no-repeat, var(--bg2);
}
.hero .card { width: min(480px, 100%); text-align: center; }
.logo { font-size: clamp(44px, 9vw, 78px); margin: 0 0 6px; color: var(--paper); text-shadow: 4px 4px 0 var(--ink), -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink); transform: rotate(-2deg); font-family: 'Gaegu', var(--font); }
.logo .w { color: var(--yellow); }

/* ---------- Menu ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: var(--bg2); border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 5; }
.topbar .brand { font-family: 'Gaegu', var(--font); font-weight: 700; font-size: 1.9em; color: var(--paper); text-shadow: 2px 2px 0 var(--ink); }
.page { max-width: 1100px; margin: 0 auto; padding: 22px 18px 50px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 800px) { .cols { grid-template-columns: 1fr; } }
.game-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; background: var(--panel2); margin-bottom: 8px; }
.code-input { text-transform: uppercase; letter-spacing: 4px; text-align: center; width: 150px; font-weight: 700; }
.menu-bg { background: linear-gradient(rgba(35,35,41,.82), rgba(35,35,41,.9)), url('../assets/bg/lobby.webp') center/cover fixed no-repeat; min-height: 100vh; }

/* ---------- Winkel ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 3px solid var(--ink); background: var(--panel2); border-radius: 12px 12px 4px 4px; padding: 5px 14px; cursor: pointer; font-weight: 700; }
.tab.active { background: var(--yellow); color: var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.item { border: 3px solid var(--ink); border-radius: var(--wobble); background: var(--panel2); padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.item.equipped { background: #4b6a50; }
.preview { width: 84px; height: 84px; display: grid; place-items: center; }
.swatch { width: 70px; height: 70px; border-radius: 50%; border: 4px solid var(--ink); }
.roofprev { width: 80px; height: 66px; position: relative; }
.roofprev i { position: absolute; left: 6px; right: 6px; top: 0; height: 36px; clip-path: polygon(50% 0, 100% 100%, 0 100%); background: var(--c); }
.roofprev b { position: absolute; left: 14px; right: 14px; bottom: 0; height: 30px; background: #efe3c2; border: 3px solid var(--ink); }

/* ---------- Lobby ---------- */
.lobby-code { font-size: 3em; letter-spacing: 8px; font-weight: 700; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 0 20px; display: inline-block; transform: rotate(-1.5deg); box-shadow: 0 5px 0 var(--ink); cursor: pointer; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 3px solid var(--ink); background: var(--panel2); border-radius: 14px; }
.pcard .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
.rolechips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 3px solid var(--ink); border-radius: 12px; padding: 3px 10px; background: var(--panel2); cursor: pointer; user-select: none; }
.chip.on { background: var(--green); color: var(--ink); }
.chip.off { opacity: .7; text-decoration: line-through; }
.chip.ro { cursor: default; }

/* ---------- Spelscherm ---------- */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr; gap: 12px; padding: 10px; height: 100vh; }
.game .hud { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hud .phase { font-size: 1.5em; font-weight: 700; font-family: 'Gaegu', var(--font); }
.hud .timer { font-size: 1.5em; font-weight: 700; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 0 12px; min-width: 76px; text-align: center; }
.hud .timer.urgent { background: var(--red); color: #fff; animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.07); } }
.rolechip { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.rolechip .tag { font-size: 1em; padding: 1px 10px; }
.stage { position: relative; min-height: 0; display: flex; flex-direction: column; }
.canvaswrap { position: relative; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; background: #2a2a30; box-shadow: 0 6px 0 rgba(0,0,0,.45); flex: 1; min-height: 0; display: grid; place-items: center; }
canvas#village { display: block; touch-action: manipulation; }
.side { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.side .tabs { margin: 0; }
.sidebody { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px; }
.badge { background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 0 6px; margin-left: 4px; font-size: .8em; }
.chatlist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.msg { background: var(--panel2); border: 2px solid var(--ink); border-radius: 12px; padding: 4px 10px; word-wrap: break-word; max-width: 100%; }
.msg b { margin-right: 6px; }
.msg.wolf { background: #5b3a3f; } .msg.dead { background: #3d4458; font-style: italic; } .msg.mine { background: #55705a; }
.msg.sys { background: transparent; border-style: dashed; color: var(--muted); }
.chatform { display: flex; gap: 8px; margin-top: 8px; }
.chatform input { flex: 1; }
.chanlabel { font-weight: 700; margin-bottom: 4px; }
.chanlabel.wolf { color: var(--red); } .chanlabel.dead { color: var(--blue); }
.tlist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.trow { display: flex; align-items: center; gap: 9px; padding: 5px 9px; border: 3px solid var(--ink); border-radius: 12px; background: var(--panel2); cursor: pointer; text-align: left; width: 100%; }
.trow:hover { background: #666672; }
.trow.sel { background: var(--yellow); color: var(--ink); }
.trow.disabled { opacity: .45; pointer-events: none; }
.trow .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .votes { background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; font-weight: 700; }
.logentry { padding: 4px 8px; border-left: 5px solid var(--muted); margin: 5px 0; background: rgba(0,0,0,.18); border-radius: 0 10px 10px 0; }
.logentry.dawn { border-color: var(--yellow); } .logentry.vote { border-color: var(--pink); } .logentry.role { border-color: var(--purple); }
.logentry.wolf { border-color: var(--red); } .logentry.move { border-color: var(--orange); } .logentry.end { border-color: var(--green); }
.logentry.system { border-color: var(--blue); }
.infobox { border: 3px dashed var(--muted); border-radius: 14px; padding: 8px 12px; margin: 8px 0; color: var(--text); background: rgba(0,0,0,.15); }
.cue { font-weight: 700; padding: 4px 10px; border: 3px solid var(--ink); border-radius: 12px; display: inline-block; }
.cue.bad { background: var(--red); color: #fff; animation: pulse .4s infinite alternate; }
.cue.ok { background: var(--green); color: var(--ink); }
.rolemini { display: flex; gap: 10px; align-items: center; }
.rolemini img { width: 54px; height: 72px; object-fit: cover; border: 3px solid var(--ink); border-radius: 10px; background: #333; }

@media (max-width: 1000px) {
  .game { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(380px, 1fr); height: auto; min-height: 100vh; }
  .canvaswrap { flex: none; }
  .side { min-height: 460px; }
}

/* ---------- Overlay / modaal ---------- */
#overlay { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(10,10,14,.72); padding: 18px; overflow-y: auto; }
#overlay.show { display: grid; }
.modal { width: min(620px, 100%); animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } }
.rolecard { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.rolecard img { width: 210px; height: 280px; object-fit: cover; border: 4px solid var(--ink); border-radius: 16px; background: #333; box-shadow: 0 6px 0 rgba(0,0,0,.5); transform: rotate(-2deg); }
.rolecard .txt { flex: 1; min-width: 220px; }
.team { display: inline-block; font-weight: 700; border: 3px solid var(--ink); border-radius: 10px; padding: 0 10px; }
.team.wolf { background: var(--red); color: #fff; } .team.dorp { background: var(--green); color: var(--ink); }
.restable { width: 100%; border-collapse: collapse; }
.restable td { padding: 5px 6px; border-bottom: 2px dashed rgba(0,0,0,.25); }
.restable tr.dead td { opacity: .6; }

#toasts { position: fixed; top: 14px; right: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 14px; box-shadow: 0 4px 0 var(--ink); max-width: 340px; animation: slidein .25s ease-out; }
.toast.err { background: var(--red); color: #fff; }
.toast.move { background: var(--orange); }
@keyframes slidein { from { transform: translateX(60px); opacity: 0; } }
#banner { position: fixed; left: 0; right: 0; top: 28%; z-index: 70; text-align: center; pointer-events: none; }
#banner span {
  display: inline-block; font-family: 'Gaegu', var(--font); font-weight: 700; font-size: clamp(40px, 8vw, 90px); color: var(--paper);
  text-shadow: 5px 5px 0 var(--ink), -3px -3px 0 var(--ink), 3px -3px 0 var(--ink), -3px 3px 0 var(--ink);
  animation: banner 2.4s ease-in-out forwards;
}
@keyframes banner { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 15% { transform: scale(1.05) rotate(-2deg); opacity: 1; } 80% { opacity: 1; } 100% { transform: scale(1) translateY(-30px) rotate(-2deg); opacity: 0; } }

.housepic { width: 112px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.housepic.big { width: 150px; height: 128px; }
.item .preview { width: 112px; height: 96px; }

/* ---------- Hoofdmenu als game ---------- */
.menu-scene { position: relative; min-height: 100vh; overflow: hidden; background: #0e1228; isolation: isolate; }
.menu-scene .bgwrap { position: absolute; inset: -4%; transition: transform .35s ease-out; z-index: -5; }
.menu-scene .bgimg { position: absolute; inset: 0; background: url('../assets/bg/titel.webp') center bottom / cover no-repeat; animation: kenburns 45s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.08) translate(-1.5%, -1%); } }
.menu-scene .shade { position: absolute; inset: 0; z-index: -4; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,9,26,.82) 0%, rgba(7,9,26,.45) 34%, rgba(7,9,26,0) 62%),
              linear-gradient(0deg, rgba(7,9,26,.6) 0%, rgba(7,9,26,0) 38%),
              linear-gradient(180deg, rgba(7,9,26,.55) 0%, rgba(7,9,26,0) 30%); }
.fog { position: absolute; left: -50%; width: 200%; height: 40%; z-index: -3; pointer-events: none; opacity: .5;
  background: radial-gradient(ellipse at 20% 50%, rgba(190,205,255,.30), transparent 55%), radial-gradient(ellipse at 70% 40%, rgba(190,205,255,.22), transparent 50%); }
.fog.f1 { bottom: 0; animation: fogmove 60s linear infinite; }
.fog.f2 { bottom: 10%; opacity: .35; animation: fogmove 90s linear infinite reverse; }
@keyframes fogmove { from { transform: translateX(0); } to { transform: translateX(25%); } }
.fly { position: absolute; z-index: -2; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; background: #fff6a8; box-shadow: 0 0 10px 4px rgba(255,236,120,.7); animation: flyfloat ease-in-out infinite; opacity: 0; }
@keyframes flyfloat { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 50% { transform: translate(40px, -50px); opacity: .6; } 85% { opacity: 1; } 100% { transform: translate(-20px, -110px); opacity: 0; } }

.menu-ui { min-height: 100vh; display: flex; flex-direction: column; padding: 22px 5vw 18px; }
.menu-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.logo.big { font-size: clamp(54px, 9vw, 110px); line-height: .95; margin: 0; }
.tagline { font-size: 1.3em; color: #e9dfc2; text-shadow: 2px 2px 0 var(--ink); margin: 6px 0 0 8px; letter-spacing: 1px; }
.profilecard { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 10px; cursor: pointer; background: rgba(36,36,44,.82); border: 3px solid var(--ink); border-radius: var(--wobble); box-shadow: 0 5px 0 rgba(0,0,0,.5); backdrop-filter: blur(3px); transition: transform .12s; }
.profilecard:hover { transform: translateY(-2px) rotate(.5deg); }
.profilecard .pname { font-weight: 700; font-size: 1.25em; }
.profilecard .pedit { opacity: .6; font-size: .8em; }

.menu-buttons { margin: auto 0; padding: 22px 0; width: min(430px, 100%); display: flex; flex-direction: column; gap: 15px; }
.gbtn {
  --c1: #ffe27a; --c2: #f2b436; --ink2: #3b2406;
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 11px 20px 11px 12px; color: var(--ink2); cursor: pointer;
  background: linear-gradient(180deg, var(--c1), var(--c2)); border: 4px solid var(--ink); border-radius: 20px 36px 20px 36px / 36px 20px 36px 20px;
  box-shadow: 0 7px 0 var(--ink), 0 12px 22px rgba(0,0,0,.45); transform: rotate(-1.2deg);
  transition: transform .14s cubic-bezier(.3,1.6,.5,1), box-shadow .14s, filter .14s;
  animation: gin .55s cubic-bezier(.2,1.4,.4,1) backwards;
}
.gbtn:nth-child(1) { animation-delay: .05s; } .gbtn:nth-child(2) { animation-delay: .12s; } .gbtn:nth-child(3) { animation-delay: .19s; }
.gbtn:nth-child(4) { animation-delay: .26s; } .gbtn:nth-child(5) { animation-delay: .33s; } .gbtn:nth-child(6) { animation-delay: .4s; }
.gbtn:nth-child(even) { transform: rotate(.9deg); }
@keyframes gin { from { opacity: 0; transform: translateX(-80px) rotate(-6deg); } }
.gbtn:hover { transform: translateX(14px) rotate(0deg) scale(1.03); filter: brightness(1.08); box-shadow: 0 7px 0 var(--ink), 0 0 26px rgba(255,226,122,.55), 0 12px 22px rgba(0,0,0,.45); }
.gbtn:active { transform: translateX(14px) translateY(5px) scale(1.01); box-shadow: 0 2px 0 var(--ink), 0 6px 12px rgba(0,0,0,.4); }
.gbtn.green { --c1: #b4f09b; --c2: #4fba52; --ink2: #0f3411; }
.gbtn.blue { --c1: #a6d4ff; --c2: #4b86df; --ink2: #0b2349; }
.gbtn.pink { --c1: #ffc1da; --c2: #e4609a; --ink2: #4a0f2c; }
.gbtn.wood { --c1: #d9a46a; --c2: #8f5a2c; --ink2: #2e1706; }
.gicon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; font-size: 30px; background: rgba(255,255,255,.55); border: 3px solid var(--ink); border-radius: 50%; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.gtext { display: flex; flex-direction: column; min-width: 0; }
.glabel { font-size: 1.6em; font-weight: 700; line-height: 1.05; text-shadow: 1px 1px 0 rgba(255,255,255,.35); }
.gsub { font-size: .95em; opacity: .8; }
.gbadge { margin-left: auto; min-width: 34px; text-align: center; background: var(--red); color: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 0 9px; font-weight: 700; font-size: 1.15em; }
.wood .glabel, .wood .gsub { color: #fbe9cf; text-shadow: 2px 2px 0 var(--ink); }
.menu-foot { margin-top: auto; color: #cfc8b0; text-shadow: 2px 2px 0 var(--ink); font-size: .95em; }

@media (max-width: 700px) {
  .menu-ui { padding: 14px 4vw; }
  .menu-top { justify-content: center; text-align: center; }
  .menu-buttons { margin: 10px auto; }
  .gbtn:hover { transform: rotate(0deg) scale(1.02); }
  .shade { background: linear-gradient(0deg, rgba(7,9,26,.8), rgba(7,9,26,.25) 70%); }
  .gicon { width: 46px; height: 46px; font-size: 24px; }
  .glabel { font-size: 1.35em; }
}
@media (prefers-reduced-motion: reduce) { .menu-scene .bgimg, .fog, .fly, .gbtn { animation: none; } .fly { display: none; } }

/* ---------- Spookachtig hoofdmenu ---------- */
.menu-scene { background: #070b1a; }
.menu-scene .shade {
  background: linear-gradient(90deg, rgba(4,8,18,.88) 0%, rgba(4,8,18,.5) 32%, rgba(4,8,18,0) 62%),
              linear-gradient(0deg, rgba(4,8,18,.7) 0%, rgba(4,8,18,0) 40%),
              radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%);
}
.menu-scene .flicker { position: absolute; inset: 0; z-index: -3; pointer-events: none; background: radial-gradient(circle at 18% 78%, rgba(255,150,40,.20), transparent 38%), radial-gradient(circle at 82% 82%, rgba(255,150,40,.18), transparent 36%); animation: flick 3.4s infinite; mix-blend-mode: screen; }
@keyframes flick { 0%,100% { opacity: .85; } 12% { opacity: .5; } 18% { opacity: 1; } 40% { opacity: .7; } 55% { opacity: 1; } 70% { opacity: .55; } 85% { opacity: .95; } }
.fog { opacity: .55; background: radial-gradient(ellipse at 20% 50%, rgba(120,255,190,.22), transparent 55%), radial-gradient(ellipse at 70% 40%, rgba(150,120,255,.20), transparent 50%); }
.fly { background: #c8ff9a; box-shadow: 0 0 10px 4px rgba(150,255,120,.65); }

.bat { position: absolute; z-index: -1; top: 12%; left: -10%; font-size: 34px; filter: drop-shadow(0 0 4px #000); opacity: .9; animation: batfly 16s linear infinite; pointer-events: none; }
.bat.b1 { top: 24%; font-size: 24px; animation-duration: 22s; animation-delay: -7s; }
.bat.b2 { top: 8%; font-size: 28px; animation-duration: 19s; animation-delay: -13s; }
@keyframes batfly { 0% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(30vw, 40px) rotate(8deg) scaleX(-1); } 50% { transform: translate(60vw, -20px) rotate(-8deg); } 75% { transform: translate(85vw, 50px) rotate(6deg) scaleX(-1); } 100% { transform: translate(115vw, 0) rotate(-4deg); } }
.eyes { position: absolute; z-index: -2; display: flex; gap: 12px; pointer-events: none; animation: blink 6s infinite; }
.eyes i { width: 9px; height: 5px; border-radius: 50%; background: #ffe45a; box-shadow: 0 0 10px 4px rgba(255,220,60,.7); }
.eyes.e0 { left: 7%; top: 62%; } .eyes.e1 { right: 12%; top: 55%; animation-delay: -2s; } .eyes.e2 { left: 42%; top: 70%; animation-delay: -4s; }
@keyframes blink { 0%, 44%, 50%, 100% { opacity: 1; } 47% { opacity: 0; } 70% { opacity: 0; } 72% { opacity: 1; } 90% { opacity: .2; } }
.ghost { position: absolute; z-index: -2; right: 18%; top: 38%; font-size: 64px; opacity: .22; filter: blur(.6px) drop-shadow(0 0 14px rgba(160,255,220,.8)); animation: ghostfloat 11s ease-in-out infinite; pointer-events: none; }
@keyframes ghostfloat { 0%,100% { transform: translate(0,0) rotate(-4deg); } 50% { transform: translate(-60px,-40px) rotate(6deg); } }
.web { position: absolute; z-index: -1; top: -10px; right: -6px; font-size: 130px; opacity: .3; pointer-events: none; transform: scaleX(-1); }

.logo.big { font-family: 'Creepster', 'Gaegu', var(--font); font-weight: 400; letter-spacing: 6px; color: #f6edcc;
  text-shadow: 0 0 22px rgba(120,255,170,.55), 0 0 4px rgba(120,255,170,.9), 5px 5px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; transform: rotate(-2deg); animation: logoglow 4s ease-in-out infinite; }
.logo.big .w { color: #ff8a2a; text-shadow: 0 0 22px rgba(255,120,30,.7), 5px 5px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; }
@keyframes logoglow { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
.tagline { color: #b8f5cf; font-style: italic; text-shadow: 0 0 10px rgba(120,255,170,.6), 2px 2px 0 #000; }
.profilecard { background: rgba(18,22,36,.86); border-color: #000; box-shadow: 0 5px 0 rgba(0,0,0,.6), 0 0 18px rgba(120,255,170,.15); }

.gbtn { color: #fdf3d8; box-shadow: 0 7px 0 #000, 0 12px 22px rgba(0,0,0,.6), inset 0 0 0 2px rgba(255,255,255,.08); border-color: #000; }
.gbtn .glabel { text-shadow: 2px 2px 0 rgba(0,0,0,.7); }
.gbtn .gsub { opacity: .85; }
.gbtn.gold { --c1: #ffae3d; --c2: #c9540a; }
.gbtn.orange { --c1: #ff9a3d; --c2: #b8480a; }
.gbtn.green { --c1: #7fe05b; --c2: #1f7a3a; }
.gbtn.blue { --c1: #6fd8d0; --c2: #1d6f86; }
.gbtn.pink { --c1: #e0566f; --c2: #7a1230; }
.gbtn.wood { --c1: #8a5a33; --c2: #3c2410; }
.gbtn:hover { box-shadow: 0 7px 0 #000, 0 0 30px rgba(255,170,60,.55), 0 12px 22px rgba(0,0,0,.6); }
.gicon { background: rgba(0,0,0,.35); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 10px rgba(255,255,255,.12); }
.menu-foot { color: #9fd6b4; font-style: italic; }

.spinner { width: 46px; height: 46px; margin: 14px auto 0; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--yellow); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bat, .eyes, .ghost, .flicker, .logo.big { animation: none; } }

/* ---------- Spelscherm zonder zijbalk: popups ---------- */
.game2 { display: flex; flex-direction: column; height: 100vh; padding: 10px; gap: 10px; }
.game2 .stage { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hudbtn { position: relative; border: 3px solid var(--ink); background: var(--panel2); color: var(--text); border-radius: 12px; padding: 4px 12px; cursor: pointer; font-weight: 700; box-shadow: 0 3px 0 var(--ink); transition: transform .08s, background .15s; }
.hudbtn:hover { background: #6a6a76; transform: translateY(-1px); }
.hudbtn.on { background: var(--yellow); color: var(--ink); }
.hudbtn .dot { position: absolute; top: -9px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--red); color: #fff; border: 2px solid var(--ink); font-size: .75em; line-height: 18px; text-align: center; }
.hudbtn .dot.hidden { display: none; }

.popup { position: fixed; z-index: 40; background: var(--panel); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 8px 0 rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; animation: popin .2s ease-out; overflow: hidden; }
@keyframes popin { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.popup.right { right: 12px; top: 62px; bottom: 12px; width: 390px; }
.popup.mid { left: 12px; top: 62px; bottom: 12px; width: 390px; }
.popup.left { left: 12px; bottom: 12px; width: 380px; height: min(420px, 55vh); }
.popup.wolfpop { border-color: #2a0a10; box-shadow: 0 8px 0 rgba(0,0,0,.45), 0 0 26px rgba(224,40,60,.4); }
.popup.wolfpop .pop-head { background: #4a1420; }
.pop-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 3px solid var(--ink); background: var(--bg2); font-size: 1.1em; }
.pop-x { border: 2px solid var(--ink); background: var(--red); color: #fff; width: 28px; height: 28px; border-radius: 9px; cursor: pointer; font-weight: 700; line-height: 1; }
.pop-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.popup.left .pop-body { display: flex; flex-direction: column; padding: 8px 10px; overflow: hidden; }
.chatbox { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chatbox .chatlist { flex: 1; min-height: 0; }
.logentry.priv { background: rgba(182,156,240,.14); }
.logbody { display: flex; flex-direction: column; }

/* ---------- Actie: popup midden in beeld ---------- */
.popup.center { left: 50%; top: 50%; right: auto; bottom: auto; width: min(470px, calc(100vw - 24px)); max-height: min(86vh, 680px); transform: translate(-50%, -50%); animation: popcenter .25s cubic-bezier(.2,1.3,.4,1); z-index: 45; }
@keyframes popcenter { from { transform: translate(-50%, -46%) scale(.9); opacity: 0; } }
.popup.actpop { box-shadow: 0 10px 0 rgba(0,0,0,.45), 0 0 0 100vmax rgba(8,8,12,.38), 0 20px 50px rgba(0,0,0,.6); }
.act-body { padding: 0; }
.actpill { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; border: 3px solid var(--ink); border-radius: 999px; padding: 6px 18px; font-weight: 700; font-size: 1.1em; cursor: pointer; background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.actpill.hidden { display: none; }
.actpill.todo { background: var(--yellow); animation: dockglow 1.1s ease-in-out infinite alternate; }
.actpill.optional { background: #bcd7ff; }
.actpill.done { background: var(--green); }
.dstatus { border: 3px solid var(--ink); border-radius: 16px; padding: 10px 12px; margin-bottom: 12px; background: var(--panel2); }
.dstatus-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.dstatus-badge { font-size: .78em; font-weight: 700; letter-spacing: .06em; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; background: var(--muted); color: var(--ink); }
.dock-timer { font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 0 8px; }
.dstatus-title { font-size: 1.35em; font-weight: 700; line-height: 1.15; font-family: 'Gaegu', var(--font); }
.dstatus-text { margin-top: 4px; font-size: 1.02em; opacity: .95; }
.dstatus.todo { background: var(--yellow); color: var(--ink); animation: dockglow 1.3s ease-in-out infinite alternate; }
.dstatus.todo .dstatus-badge { background: var(--red); color: #fff; }
.dstatus.optional { background: #bcd7ff; color: var(--ink); }
.dstatus.optional .dstatus-badge { background: var(--blue); }
.dstatus.done { background: var(--green); color: var(--ink); }
.dstatus.done .dstatus-badge { background: #fff; }
.dstatus.wait, .dstatus.dead { background: var(--panel2); color: var(--text); }
@keyframes dockglow { from { box-shadow: 0 0 0 rgba(255,210,74,0); } to { box-shadow: 0 0 22px rgba(255,210,74,.9); } }
.news { border: 3px solid var(--purple); border-radius: 14px; padding: 6px 10px; margin-bottom: 12px; background: rgba(182,156,240,.14); }
.news-title { font-weight: 700; margin-bottom: 2px; }
.news-item { padding: 3px 0; border-top: 2px dashed rgba(255,255,255,.18); }
.news-item:first-of-type { border-top: 0; }
@media (prefers-reduced-motion: reduce) { .dstatus.todo { animation: none; } }

@media (max-width: 1000px) {
  .game2 { height: auto; min-height: 100vh; }
  .game2 .canvaswrap { flex: none; }
  .popup.right, .popup.left, .popup.mid { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; height: auto; max-height: 62vh; }
  .popup.right .pop-body, .popup.mid .pop-body { max-height: 52vh; }
}

/* ---------- Cutscenes ---------- */
#cutscene { position: fixed; inset: 0; z-index: 90; display: none; cursor: pointer; }
#cutscene.show { display: block; }
.cut { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; animation: cutin .5s ease-out; color: #fff; text-align: center; }
@keyframes cutin { from { opacity: 0; } }
.cut.dawn { background: linear-gradient(180deg, #151a3d 0%, #5a3a68 45%, #e0824f 100%); }
.cut.sunrise { background: linear-gradient(180deg, #3a63a8 0%, #f1b869 100%); }
.cut.dusk { background: radial-gradient(circle at 12% 88%, rgba(255,150,40,.45), transparent 36%), radial-gradient(circle at 88% 88%, rgba(255,150,40,.45), transparent 36%), linear-gradient(180deg, #0c0718 0%, #3a1030 55%, #a8381f 100%); animation: cutin .5s ease-out, torch 2.2s infinite; }
.cut.hunt { background: linear-gradient(180deg, #08160f 0%, #1d4a2c 70%, #2e6a3a 100%); }
@keyframes torch { 0%, 100% { filter: brightness(1); } 30% { filter: brightness(.88); } 60% { filter: brightness(1.08); } }
.cut-sky .sun { position: absolute; left: 50%; bottom: -120px; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; background: radial-gradient(circle, #fff6c8 0, #ffd36a 55%, rgba(255,160,60,0) 72%); animation: sunrise 5s ease-out forwards; }
.cut.dusk .sun, .cut.hunt .sun { display: none; }
@keyframes sunrise { to { bottom: 24%; } }
.cut-title { position: relative; font-family: 'Creepster', 'Gaegu', var(--font); font-size: clamp(34px, 6vw, 72px); letter-spacing: 3px; text-shadow: 0 0 20px rgba(0,0,0,.6), 4px 4px 0 #000; min-height: 1.2em; }
.cut-title.pop { animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes titlepop { from { transform: scale(.6); opacity: 0; } }
.cut-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 280px; justify-content: center; }
.cut-sub { font-size: 1.5em; text-shadow: 2px 2px 0 #000; max-width: 640px; }
.cut-big { font-size: 110px; animation: titlepop .6s cubic-bezier(.2,1.5,.4,1); }
.cut-hint { position: absolute; bottom: 14px; font-size: .9em; opacity: .55; }
.cut.flash::after { content: ''; position: absolute; inset: 0; background: rgba(220,20,40,.45); animation: redflash .6s ease-out forwards; pointer-events: none; }
@keyframes redflash { to { opacity: 0; } }

.victim { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; flex-direction: column; animation: cutin .4s ease-out; }
.victim.reveal { flex-direction: row; }
.victim .vname { font-size: 2em; font-weight: 700; text-shadow: 2px 2px 0 #000; }
.victim .vcap { font-size: 1.3em; text-shadow: 2px 2px 0 #000; opacity: .95; }
.victim.reveal .vcap { display: none; }
.victim.reveal .portrait { transform: scale(.7); }
.portrait { position: relative; width: 200px; height: 200px; transition: transform .6s ease; animation: portraitin .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes portraitin { from { transform: scale(.2) rotate(-14deg); opacity: 0; } }
.portrait .avatar { width: 200px !important; height: 200px !important; border-width: 8px; }
.portrait.gray .avatar { filter: grayscale(1) brightness(.5); transition: filter .8s; }
.portrait .skull { position: absolute; inset: 0; display: grid; place-items: center; font-size: 100px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); text-shadow: 0 0 20px #000; }
.slash { position: absolute; inset: -30px; pointer-events: none; }
.slash i { position: absolute; left: -10%; width: 120%; height: 12px; border-radius: 6px; background: linear-gradient(90deg, transparent, #ff2b3b, #fff, #ff2b3b, transparent); transform: rotate(-38deg) scaleX(0); animation: slash .3s ease-out forwards; box-shadow: 0 0 14px #ff2b3b; }
.slash i:nth-child(1) { top: 30%; } .slash i:nth-child(2) { top: 48%; animation-delay: .12s; } .slash i:nth-child(3) { top: 66%; animation-delay: .24s; }
@keyframes slash { to { transform: rotate(-38deg) scaleX(1); } }
.stamp { position: absolute; left: 50%; top: 50%; padding: 0 14px; border: 8px solid #e0243a; color: #e0243a; font-family: 'Creepster', var(--font); font-size: 64px; letter-spacing: 4px; background: rgba(0,0,0,.35); transform: translate(-50%, -50%) rotate(-14deg); animation: stampin .35s cubic-bezier(.2,1.6,.4,1); text-shadow: 0 0 12px rgba(224,36,58,.7); white-space: nowrap; }
.stamp.stamped { animation: none; z-index: 3; }
@keyframes stampin { from { transform: translate(-50%, -50%) rotate(-14deg) scale(3.2); opacity: 0; } }
.portrait .half { position: absolute; left: 0; top: 0; }
.portrait .half.hl { animation: fallL 1.3s ease-in forwards; transform-origin: 20% 100%; }
.portrait .half.hr { animation: fallR 1.3s ease-in forwards; transform-origin: 80% 100%; }
@keyframes fallL { 0% { transform: none; } 20% { transform: translate(-6px, -4px) rotate(-3deg); } 100% { transform: translate(-90px, 340px) rotate(-38deg); opacity: 0; } }
@keyframes fallR { 0% { transform: none; } 20% { transform: translate(6px, -4px) rotate(3deg); } 100% { transform: translate(90px, 360px) rotate(34deg); opacity: 0; } }
.hunterby { display: flex; align-items: center; gap: 14px; font-size: 1.4em; }
.hunterby .arrow { font-size: 1.6em; animation: arrowfly 1s ease-out infinite; }
@keyframes arrowfly { from { transform: translateX(-24px); opacity: 0; } 40% { opacity: 1; } }

.rcard { width: 210px; padding: 8px; border: 5px solid #000; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 40px rgba(255,255,255,.2); animation: flipin .9s cubic-bezier(.2,1.2,.4,1) both; }
.rcard.wolf { background: #f5c9c9; box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 50px rgba(255,40,60,.7); }
.rcard.dorp { background: #d4f0cf; box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 0 50px rgba(120,255,140,.5); }
.rcard img { width: 100%; height: 252px; object-fit: cover; border: 3px solid #000; border-radius: 10px; background: #333; display: block; }
.rcard .rname { font-size: 1.5em; font-weight: 700; margin-top: 6px; }
.rcard .rteam { font-size: 1em; }
.rcard.unknown { background: #2a2a33; color: #fff; }
.rcard .rq { font-size: 130px; line-height: 1.3; font-family: 'Creepster', var(--font); }
@keyframes flipin { from { transform: perspective(700px) rotateY(95deg) scale(.8); opacity: 0; } }
.tally { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; justify-content: center; }
.tcol { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1) both; }
.tcol .tbar { width: 62px; background: linear-gradient(180deg, #ff8a4a, #c0301a); border: 3px solid #000; border-radius: 10px 10px 0 0; display: flex; align-items: center; justify-content: center; font-size: 1.6em; text-shadow: 2px 2px 0 #000; }
.tcol.win .tbar { background: linear-gradient(180deg, #ff5a6a, #8a0a1c); box-shadow: 0 0 24px rgba(255,60,80,.8); }
.tcol .tvoters { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 110px; }
.tcol .tname { font-weight: 700; text-shadow: 2px 2px 0 #000; }
@media (max-width: 700px) { .victim.reveal { flex-direction: column; } .victim.reveal .portrait { transform: scale(.5); margin: -30px 0; } }

.game2 .hud { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vleft { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.victim.reveal .hunterby { display: none; }
.portrait .ghostmark { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; animation: titlepop .5s cubic-bezier(.2,1.5,.4,1); filter: drop-shadow(0 0 16px rgba(0,0,0,.7)); }

/* Videoclips in de cutscenes */
.cut-clip { position: absolute; inset: 0; z-index: 5; background: #000; display: flex; align-items: center; justify-content: center; animation: cutin .35s ease-out; transition: opacity .4s; }
.cut-clip.out { opacity: 0; }
.cut-video { width: 100%; height: 100%; object-fit: cover; }
.cut-clipbar { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; background: rgba(10,10,16,.72); border: 3px solid #000; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.5); max-width: calc(100% - 48px); }
.cut-clipbar .tname { font-size: 1.5em; font-weight: 700; text-shadow: 2px 2px 0 #000; }
.cut-clipcap { font-size: 1.15em; color: #f2efe6; text-shadow: 2px 2px 0 #000; }

.clawstrike { position: absolute; inset: 0; z-index: 6; background: rgba(150,0,16,.55); animation: redflash .9s ease-out forwards; pointer-events: none; }
.clawstrike .slash { inset: 8% 12%; }
.clawstrike .slash i { height: 26px; border-radius: 13px; }

/* Moordscène: een canvas dat het hele scherm vult (js/kill-scene.js); aan het eind komt de tekst "Jij bent vermoord" / "<naam> is vermoord" in beeld */
.cut-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cut-end { position: absolute; left: 50%; bottom: 3.5%; z-index: 2; box-sizing: border-box; width: max-content; max-width: min(92%, 1100px); padding: .3em .85em .38em; text-align: center; font-family: 'Patrick Hand', var(--font); font-size: clamp(20px, 3.3vw, 42px); line-height: 1.2; color: #fff; background: rgba(10,10,16,.78); border: 3px solid #000; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.5); text-shadow: 2px 2px 0 #000; text-wrap: balance; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .4s cubic-bezier(.2,1.4,.4,1); }
.cut-end b, .cut-end em { font-weight: inherit; font-style: normal; }
.cut-end em { color: #ff6b7a; }
.cut-end.aan { opacity: 1; transform: translate(-50%, 0); }
.cut-clip.klaar .cut-end { opacity: 0; transition: opacity .2s; }
.cut-clip.vlak { background: radial-gradient(ellipse 90vw 90vw at 50% 40%, #3b3a52 0%, #1d1c2b 60%, #0b0a12 100%); }
.cut-clip.vlak > :not(.cut-end) { margin-bottom: 8vh; }
/* Uitslag na een nacht: per slachtoffer een rolkaart met "<naam> was een <rol>" en daaronder het plaatje van de rol, boven de rode achtergrond van het canvas.
   Een slachtoffer staat in het midden, meer slachtoffers staan naast elkaar (--n = aantal). */
.cut-uitslag { position: absolute; inset: 0; z-index: 7; overflow: hidden; animation: uitin .45s ease-out both; transition: opacity .35s; }
.cut-uitslag.uit-vlak { background: radial-gradient(ellipse 80vw 80vw at 50% 26%, #5a1018 0%, #26070e 55%, #05020a 100%); }
@keyframes uitin { from { opacity: 0; } }
.cut-uitslag.weg { opacity: 0; }
.uit-rij { --cw: min(280px, 38vh, calc((100vw - 32px - (var(--n) - 1) * 18px) / var(--n))); position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 18px; padding: 16px; }
.uit-rij .rcard { width: var(--cw); padding: calc(var(--cw) * .038); border-width: max(3px, calc(var(--cw) * .024)); border-radius: calc(var(--cw) * .086); font-size: calc(var(--cw) / 11.7); }
.uit-rij .rcard img { height: calc(var(--cw) * 1.2); border-width: max(2px, calc(var(--cw) * .014)); border-radius: calc(var(--cw) * .048); }
.uit-rij .rcard .rq { font-size: calc(var(--cw) * .62); }
.uit-rij .rcard.unknown { display: flex; flex-direction: column; min-height: calc(var(--cw) * 1.58); }
.uit-rij .rcard.unknown .rq { flex: 1; display: grid; place-items: center; line-height: 1; }
.rwas { font-size: 1.45em; font-weight: 700; line-height: 1.1; text-align: center; text-wrap: balance; padding: .15em .1em .45em; min-height: 3em; display: flex; align-items: center; justify-content: center; }

/* Lange lijsten in de actie-popup in twee kolommen, zodat de knoppen eronder in beeld blijven */
.actpop .tlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.actpop .trow { min-width: 0; }
@media (max-width: 480px) { .actpop .tlist { grid-template-columns: 1fr; } }

/* ---------- Hoofdmenu: het dorp als achtergrond met houten knoppen ---------- */
.lobby2 { position: relative; height: 100vh; min-height: 100vh; overflow: hidden; background: #070b1a; isolation: isolate; }
.l2-stage { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(100vh, 56.25vw); transform: translate(-50%, -50%); }
.l2-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.l2-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 62%, rgba(0,0,0,.28), transparent 62%), linear-gradient(rgba(0,0,0,.18), transparent 22%, transparent 78%, rgba(0,0,0,.35)); }
.l2-hot { position: absolute; cursor: pointer; border: 0; background: transparent; border-radius: 10px; padding: 0; transition: box-shadow .15s, background .15s; }
.l2-shop { left: 88.2%; top: 57.6%; width: 9.4%; height: 10.4%; }
.l2-shop:hover, .l2-shop:focus-visible { outline: 0; background: rgba(255,200,100,.14); box-shadow: 0 0 0 3px rgba(255,214,120,.95), 0 0 34px rgba(255,190,80,.95); }
.l2-glow { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,190,80,.55), rgba(255,150,40,.18) 45%, transparent 68%); animation: l2flick 3.2s ease-in-out infinite; }
@keyframes l2flick { 0%, 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); } 40% { opacity: .55; transform: translate(-50%, -50%) scale(.93); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
.l2-fly { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #f9f08a; box-shadow: 0 0 10px 3px rgba(249,240,138,.7); pointer-events: none; animation: l2fly 9s ease-in-out infinite; }
@keyframes l2fly { 0%, 100% { transform: translate(0, 0); opacity: .2; } 25% { transform: translate(24px, -18px); opacity: 1; } 50% { transform: translate(-10px, -34px); opacity: .35; } 75% { transform: translate(-28px, -12px); opacity: 1; } }

.l2-ui { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 18px 3vw; pointer-events: none; }
.l2-ui > * { pointer-events: auto; }
.l2-top { display: flex; align-items: flex-start; gap: 14px; }
.l2-profile { display: flex; align-items: center; gap: 10px; padding: 7px 16px 7px 9px; cursor: pointer; color: #fff2d0; border-radius: 12px; border: 3px solid #3a210d;
  background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(0,0,0,.14) 7px 8px), linear-gradient(180deg, #9b6a38, #6e4422);
  box-shadow: inset 0 2px 0 rgba(255,225,170,.3), 0 4px 0 #24140a, 0 8px 16px rgba(0,0,0,.5); }
.l2-profile .pname { font-weight: 700; font-size: 1.15em; text-shadow: 1px 1px 0 #24140a; }
.l2-ui .l2-logo { position: absolute; left: 0; width: 80%; text-align: center; animation: none; transform: none; top: 2.5vh; margin: 0; white-space: nowrap; text-shadow: 0 4px 0 #000, 0 0 24px rgba(0,0,0,.7); font-size: clamp(2rem, 5vw, 4rem); pointer-events: none; }
.l2-buttons { position: absolute; left: 50%; top: 61%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 1.8vh, 18px); }

.wbtn { position: relative; border: 4px solid #3a210d; border-radius: 12px; cursor: pointer; font-family: 'Gaegu', 'Patrick Hand', cursive; font-weight: 700; color: #fff2d0; letter-spacing: .5px;
  text-shadow: 0 2px 0 #3a210d, 0 0 10px rgba(0,0,0,.5); display: inline-flex; align-items: center; justify-content: center; gap: .5em; line-height: 1.1;
  background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(0,0,0,.15) 8px 9px), linear-gradient(180deg, #bd8548 0%, #8f5c2e 50%, #6a4020 100%);
  box-shadow: inset 0 3px 0 rgba(255,228,175,.38), inset 0 -5px 0 rgba(0,0,0,.28), 0 7px 0 #24140a, 0 14px 24px rgba(0,0,0,.55);
  transition: transform .12s, filter .12s, box-shadow .12s; }
.wbtn::before, .wbtn::after { content: ''; position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #e1dccf, #6b655b 72%); box-shadow: 0 1px 0 #000; }
.wbtn::before { left: 12px; } .wbtn::after { right: 12px; }
.wbtn:hover, .wbtn:focus-visible { outline: 0; transform: translateY(-3px) scale(1.03); filter: brightness(1.12); box-shadow: inset 0 3px 0 rgba(255,228,175,.45), inset 0 -5px 0 rgba(0,0,0,.28), 0 9px 0 #24140a, 0 0 30px rgba(255,190,80,.55), 0 16px 26px rgba(0,0,0,.55); }
.wbtn:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,228,175,.3), inset 0 -3px 0 rgba(0,0,0,.28), 0 2px 0 #24140a, 0 5px 10px rgba(0,0,0,.5); }
.wbtn.xl { font-size: clamp(1.7rem, 3.6vw, 2.8rem); padding: .3em 1.7em; min-width: clamp(250px, 27vw, 400px); }
.wbtn.md { font-size: clamp(1.15rem, 2vw, 1.7rem); padding: .26em 1.4em; min-width: clamp(170px, 16vw, 250px); }
.wbtn.xs { font-size: clamp(.85rem, 1.1vw, 1.05rem); padding: .12em .9em; min-width: 0; border-width: 3px; border-radius: 9px; box-shadow: inset 0 2px 0 rgba(255,228,175,.3), 0 4px 0 #24140a, 0 8px 14px rgba(0,0,0,.5); opacity: .92; }
.wbtn.xs::before, .wbtn.xs::after { display: none; }
.l2-badge { margin-left: .2em; }
.l2-shopbtn { display: none; }

.l2-skin { position: absolute; left: clamp(14px, 4vw, 70px); bottom: clamp(60px, 15vh, 190px); width: clamp(120px, 14vw, 230px); display: flex; flex-direction: column; align-items: center; cursor: pointer; border: 0; background: none; padding: 0; color: #fff2d0; transform-origin: 50% -30px; animation: l2swing 6s ease-in-out infinite; }
@keyframes l2swing { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.l2-skin:hover { filter: brightness(1.12); }
.l2-rope { position: absolute; top: -60px; width: 3px; height: 62px; background: repeating-linear-gradient(180deg, #c9a56b 0 4px, #8a6a3a 4px 8px); }
.l2-rope.r1 { left: 18%; transform: rotate(5deg); } .l2-rope.r2 { right: 18%; transform: rotate(-5deg); }
.l2-frame { display: block; width: 100%; aspect-ratio: 1; padding: 9%; border: 5px solid #3a210d; border-radius: 12px;
  background: repeating-linear-gradient(0deg, transparent 0 8px, rgba(0,0,0,.16) 8px 9px), linear-gradient(180deg, #a8733c, #6e4422);
  box-shadow: inset 0 3px 0 rgba(255,228,175,.35), 0 7px 0 #24140a, 0 14px 22px rgba(0,0,0,.55); }
.l2-frame img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; border: 3px solid #24140a; background: #2a1a0e; }
.l2-plaque { margin-top: 12px; padding: .15em 1em; font-family: 'Gaegu', 'Patrick Hand', cursive; font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.35rem); border: 3px solid #3a210d; border-radius: 8px;
  background: linear-gradient(180deg, #8f5c2e, #6a4020); text-shadow: 0 2px 0 #3a210d; box-shadow: 0 4px 0 #24140a, 0 8px 14px rgba(0,0,0,.5); }

.l2-ui .l2-logo { font-size: clamp(2rem, 5vw, 4rem); }
@media (max-aspect-ratio: 5/4), (max-width: 700px) {
  .l2-shopbtn { display: inline-flex; }
  .l2-ui .l2-logo { top: 15vh; width: 100%; font-size: clamp(1.6rem, 9vw, 2.6rem); }
  .l2-skin { left: 50%; bottom: 3vh; transform: translateX(-50%); width: clamp(90px, 22vw, 150px); animation: none; }
  .l2-buttons { top: 52%; }
}
@media (prefers-reduced-motion: reduce) { .l2-glow, .l2-fly, .l2-skin { animation: none; } }

/* ---------- Hoofdmenu v2: houten planken, levendige lichtjes ---------- */
.pbtn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; display: block; transition: transform .12s, filter .12s; filter: drop-shadow(0 8px 9px rgba(0,0,0,.55)); }
.pbtn img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }
.pbtn:hover, .pbtn:focus-visible { outline: 0; transform: translateY(-3px) scale(1.04); filter: brightness(1.13) drop-shadow(0 0 20px rgba(255,190,80,.65)) drop-shadow(0 8px 9px rgba(0,0,0,.5)); }
.pbtn:active { transform: translateY(3px) scale(.99); filter: brightness(.96) drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.pbtn.xl { width: clamp(260px, 30vw, 460px); }
.pbtn.md { width: clamp(190px, 21vw, 320px); }
.pbtn.xs { width: clamp(92px, 9vw, 150px); }
.pbtn .l2-badge { position: absolute; top: -6px; right: -6px; }
.l2-buttons { gap: clamp(8px, 1.4vh, 16px); }
.l2-lamp { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,214,120,.6), rgba(255,160,50,.2) 36%, transparent 66%); animation: l2lamp var(--d, 2.6s) linear infinite; animation-delay: var(--dl, 0s); }
@keyframes l2lamp { 0% { opacity: .85; scale: 1; } 8% { opacity: .55; scale: .93; } 15% { opacity: 1; scale: 1.06; } 31% { opacity: .7; scale: .97; } 44% { opacity: .95; scale: 1.04; } 57% { opacity: .5; scale: .92; } 73% { opacity: 1; scale: 1.07; } 88% { opacity: .72; scale: .98; } 100% { opacity: .85; scale: 1; } }
.l2-winglow { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255,200,100,.36), rgba(255,150,50,.1) 45%, transparent 68%); animation: l2win var(--d, 6s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes l2win { 0%, 100% { opacity: .55; } 30% { opacity: 1; } 55% { opacity: .7; } 80% { opacity: .95; } }
.l2-shut { position: absolute; transform: translate(-50%, -50%); background: rgba(16,20,50,.88); border-radius: 3px; pointer-events: none; opacity: 0; box-shadow: 0 0 6px 2px rgba(16,20,50,.7); animation: l2shut var(--d, 24s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes l2shut { 0%, 58% { opacity: 0; } 61%, 70% { opacity: 1; } 73%, 100% { opacity: 0; } }
@media (max-aspect-ratio: 5/4), (max-width: 700px) { .l2-buttons { top: 54%; } }
@media (prefers-reduced-motion: reduce) { .l2-lamp, .l2-winglow { animation: none; } }

/* ---------- Naamkaart en winkel in dezelfde houten stijl als de knoppen ---------- */
:root { --serif: 'Goudy Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif; --cream: #f6dcb0; }
.l2-profile { border: 0; border-image: url('../assets/ui/plank.webp') 95 fill / 22px stretch; padding: 14px 26px 14px 20px; background: none; box-shadow: none; filter: drop-shadow(0 7px 8px rgba(0,0,0,.55)); font-family: var(--serif); color: var(--cream); }
.l2-profile .pname { font-family: var(--serif); font-size: 1.2em; text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a, -1px 1px 0 #24140a; }
.l2-profile:hover { filter: brightness(1.1) drop-shadow(0 7px 8px rgba(0,0,0,.55)); }

.sh-scene { position: relative; min-height: 100vh; background: #070b1a; isolation: isolate; font-family: var(--serif); }
.sh-bg { position: fixed; inset: 0; z-index: -1; background: linear-gradient(rgba(10,6,20,.12), rgba(10,6,20,.5)), url('../assets/bg/winkel.webp') center / cover no-repeat; }
.sh-ui { max-width: 1120px; margin: 0 auto; padding: 18px 18px 60px; }
.sh-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sh-plank { border: 0; border-image: url('../assets/ui/plank.webp') 95 fill / 20px stretch; background: none; color: var(--cream); font-family: var(--serif); font-weight: 700; letter-spacing: .5px;
  text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a, -1px 1px 0 #24140a; filter: drop-shadow(0 6px 7px rgba(0,0,0,.55)); }
.sh-back { composes: sh-plank; border: 0; border-image: url('../assets/ui/plank.webp') 95 fill / 20px stretch; background: none; color: var(--cream); font-family: var(--serif); font-weight: 700; font-size: 1.15em; padding: 12px 24px; cursor: pointer;
  text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a; filter: drop-shadow(0 6px 7px rgba(0,0,0,.55)); justify-self: start; transition: transform .12s, filter .12s; }
.sh-back:hover { transform: translateY(-2px); filter: brightness(1.12) drop-shadow(0 0 16px rgba(255,190,80,.55)) drop-shadow(0 6px 7px rgba(0,0,0,.5)); }
.sh-title { border-image: url('../assets/ui/plank.webp') 95 fill / 24px stretch; border-style: solid; border-width: 0; padding: 12px clamp(40px, 8vw, 110px); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: var(--cream); letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 3px 0 #24140a, 2px 2px 0 #24140a, -2px 2px 0 #24140a; filter: drop-shadow(0 8px 9px rgba(0,0,0,.6)); }
.sh-coins { justify-self: end; border-image: url('../assets/ui/plank.webp') 95 fill / 20px stretch; border-style: solid; border-width: 0; padding: 10px 22px; filter: drop-shadow(0 6px 7px rgba(0,0,0,.55)); color: var(--cream); }
.sh-tabs { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 26px 0 6px; }
.sh-tab { border: 0; border-image: url('../assets/ui/plank.webp') 95 fill / 18px stretch; background: none; cursor: pointer; padding: 10px 30px; font-family: var(--serif); font-weight: 700; font-size: 1.2em; color: #d8b88a; text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a;
  filter: brightness(.72) drop-shadow(0 5px 6px rgba(0,0,0,.55)); transition: transform .12s, filter .12s; }
.sh-tab:hover { filter: brightness(.9) drop-shadow(0 5px 6px rgba(0,0,0,.5)); }
.sh-tab.active { color: var(--cream); filter: brightness(1.12) drop-shadow(0 0 18px rgba(255,190,80,.55)) drop-shadow(0 5px 6px rgba(0,0,0,.5)); transform: translateY(-2px); }
.sh-sub { text-align: center; margin: 4px 0 22px; color: #e9d6b4; font-size: 1.05em; text-shadow: 0 2px 4px rgba(0,0,0,.9); }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 26px 22px; }
.sh-card { border: 0; border-image: url('../assets/ui/plank.webp') 95 fill / 26px stretch; border-style: solid; border-width: 0; padding: 4px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  filter: drop-shadow(0 8px 9px rgba(0,0,0,.55)); transition: transform .14s, filter .14s; min-height: 250px; justify-content: center; }
.sh-card:hover { transform: translateY(-3px); }
.sh-card.equipped { filter: brightness(1.1) drop-shadow(0 0 20px rgba(255,205,100,.7)) drop-shadow(0 8px 9px rgba(0,0,0,.5)); }
.sh-preview { min-height: 112px; display: grid; place-items: center; }
.sh-namechip { font-family: var(--serif); font-weight: 700; font-size: 1.7em; text-shadow: 0 3px 0 #1a0f06, 2px 2px 0 #1a0f06, -2px 2px 0 #1a0f06; padding: 10px 14px; background: rgba(20,12,6,.55); border-radius: 10px; border: 2px solid #24140a; word-break: break-word; }
.sh-name { font-weight: 700; font-size: 1.2em; color: var(--cream); text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a, -1px 1px 0 #24140a; }
.sh-btn { cursor: pointer; border: 3px solid #24140a; border-radius: 10px; padding: 5px 18px; font-family: var(--serif); font-weight: 700; font-size: 1.05em; color: #2a1608;
  background: linear-gradient(180deg, #f6dcb0, #d6a062); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 4px 0 #24140a; transition: transform .1s, filter .1s; }
.sh-btn:hover:not([disabled]) { filter: brightness(1.08); transform: translateY(-1px); }
.sh-btn:active:not([disabled]) { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 1px 0 #24140a; }
.sh-btn.buy { background: linear-gradient(180deg, #ffe58a, #e0a73a); }
.sh-btn[disabled] { opacity: .5; cursor: not-allowed; filter: grayscale(.5); }
.sh-price { font-variant-numeric: tabular-nums; }
.sh-state { font-weight: 700; color: #ffe9a8; text-shadow: 0 2px 0 #24140a, 1px 1px 0 #24140a; padding: 5px 0; }
@media (max-width: 700px) { .sh-top { grid-template-columns: auto 1fr auto; } .sh-title { padding: 10px 24px; font-size: 1.5rem; } .sh-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 12px; } .sh-card { min-height: 220px; } }

/* ---------- Logo (BLOODMOON) ---------- */
.logo-img { display: block; width: min(86%, 520px); height: auto; margin: 0 auto 10px; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(255,60,60,.25)); }
.logo-img.small { width: auto; height: 30px; margin: 0; filter: drop-shadow(0 2px 0 rgba(0,0,0,.5)); }
.brand .logo-img.small { display: block; }
.l2-ui .l2-logo-img { position: absolute; left: 50%; top: 2.2vh; transform: translateX(-50%); width: min(44vw, 480px); margin: 0; pointer-events: none; }
@media (max-width: 700px) { .l2-ui .l2-logo-img { top: 11vh; width: min(88vw, 420px); } }

/* ---------- Instellingen in een popup (alleen de spelleider) ---------- */
.set-modal { width: min(720px, 94vw); max-height: 90vh; overflow-y: auto; }
.set-modal > .panel { margin: 0; }
.set-summary { margin: 6px 0 14px; opacity: .9; line-height: 1.5; }

/* ---------- Beurten: popups in papierstijl, aftelling en fade ---------- */
#turn { position: fixed; inset: 0; z-index: 44; display: none; place-items: center; background: rgba(8,8,18,.5); padding: 16px; overflow-y: auto; }
#turn.show { display: grid; }
.ppop { width: min(580px, 100%); max-height: 92vh; overflow-y: auto; margin: 0; animation: ppin .25s cubic-bezier(.2,1.3,.4,1); box-shadow: 0 10px 0 rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.6); }
@keyframes ppin { from { transform: scale(.92) translateY(12px); opacity: 0; } }
.ppop.pp-intro { width: min(780px, 100%); }
.ppop .pp-head { display: flex; align-items: center; gap: 10px; }
.ppop h2 { font-size: 1.7em; line-height: 1.1; margin: 0 0 .25em; }
.ppop .pp-sub { margin: 0 0 12px; color: #5d4d35; }
.ppop .pp-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ppop .pp-foot .pp-sub { margin: 0; }
.pp-timer { margin-left: auto; font-weight: 700; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 0 12px; color: var(--ink); }
.pp-timer.urgent { background: var(--red); color: #fff; animation: pulse 1s infinite; }
.pp-wait { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 0 2px; color: #5d4d35; font-weight: 700; }
.pp-result { font-size: 1.3em; font-weight: 700; text-align: center; }
.pp-yn { display: flex; gap: 28px; justify-content: center; margin: 18px 0 8px; }
.pp-yn button { width: 104px; height: 104px; border-radius: 50%; border: 5px solid var(--ink); font-size: 3.4em; line-height: 1; cursor: pointer; box-shadow: 0 7px 0 var(--ink); color: var(--ink); transition: transform .08s, box-shadow .08s, filter .15s; font-family: inherit; }
.pp-yn button:hover:not([disabled]) { transform: translateY(-3px); filter: brightness(1.08); }
.pp-yn button:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.pp-yn .pp-yes { background: #52c76f; } .pp-yn .pp-no { background: #e8534a; color: #fff; }
.pp-yn button[disabled] { opacity: .35; cursor: default; } .pp-yn button.chosen { opacity: 1; outline: 5px solid var(--yellow); }
.pp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.pp-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #fffaf0; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; text-align: left; box-shadow: 0 3px 0 rgba(0,0,0,.35); min-width: 0; }
.pp-item:hover:not([disabled]) { background: #fff1c2; }
.pp-item.sel { background: var(--yellow); box-shadow: 0 0 0 3px #fff inset, 0 3px 0 rgba(0,0,0,.35); }
.pp-item[disabled] { cursor: default; opacity: .8; }
.pp-item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink) !important; }
.pp-item .votes { margin-left: auto; display: flex; flex-direction: row-reverse; }
.pp-item .votes > * { margin-left: -8px; }
.pp-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-potions { display: flex; gap: 12px; margin: 10px 0 4px; flex-wrap: wrap; }
.pp-potion { flex: 1; min-width: 120px; border: 4px solid var(--ink); border-radius: 18px; padding: 10px 8px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .08s, box-shadow .08s; }
.pp-potion .bottle { font-size: 2.8em; line-height: 1.1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.pp-potion b { font-size: 1.15em; } .pp-potion small { opacity: .75; }
.pp-potion.green { background: #7fd98f; } .pp-potion.red { background: #ef7b72; } .pp-potion.none { background: #d9d4c6; }
.pp-potion.red .bottle { filter: hue-rotate(-100deg) saturate(2.4) drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.pp-potion:hover:not([disabled]) { transform: translateY(-3px); } .pp-potion:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.pp-potion[disabled] { opacity: .35; cursor: default; }
.pp-chat { height: 240px; display: flex; flex-direction: column; margin: 6px 0; background: #fffaf0; border: 3px solid var(--ink); border-radius: 14px; padding: 8px; color: var(--ink); }
.pp-chat.small { height: 130px; }
.pp-chat .chatlist { flex: 1; overflow-y: auto; }
.pp-chat .msg { color: var(--ink); } .pp-chat .msg b { color: inherit; }

#countdown { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; background: rgba(5,5,12,.55); backdrop-filter: blur(2px); pointer-events: all; }
#countdown.show { display: grid; }
.cd-box { text-align: center; color: #fff; text-shadow: 0 4px 0 #000; }
.cd-num { font-size: clamp(120px, 28vw, 260px); font-weight: 700; line-height: 1; animation: cdpop 1s ease-out infinite; color: #ffe08a; -webkit-text-stroke: 6px #000; paint-order: stroke fill; }
.cd-txt { font-size: 1.8em; margin-top: 6px; }
@keyframes cdpop { 0% { transform: scale(1.25); opacity: .4; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.92); opacity: .95; } }
#fade { position: fixed; inset: 0; z-index: 95; background: #000; opacity: 0; pointer-events: none; transition: opacity .9s ease-in-out; }
#fade.on { opacity: 1; pointer-events: all; }

/* Stalker-minigame */
.sg { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0; }
.sg-scene { position: relative; width: min(500px, 100%); aspect-ratio: 2 / 1; overflow: hidden; border: 4px solid var(--ink); border-radius: 16px; background: #1a2040; }
.sg-sky { position: absolute; inset: 0; background: radial-gradient(circle at 78% 22%, #fff7c8 0 7%, transparent 8%), linear-gradient(#1a2348, #3a3f78 70%); }
.sg-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 28%; background: #3a2a1d; border-top: 4px solid var(--ink); }
.sg-house { position: absolute; left: 16%; bottom: 20%; width: 34%; height: 58%; }
.sg-wall { position: absolute; inset: 34% 0 0 0; background: #cdb88a; border: 4px solid var(--ink); border-radius: 4px; }
.sg-roof { position: absolute; left: -6%; right: -6%; top: 6%; height: 34%; background: #a8452d; border: 4px solid var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sg-door { position: absolute; left: 62%; bottom: 0; width: 22%; height: 34%; background: #6b4423; border: 4px solid var(--ink); border-bottom: 0; }
.sg-win { position: absolute; left: 14%; top: 52%; width: 22%; height: 22%; background: #ffd97a; border: 4px solid var(--ink); box-shadow: 0 0 14px #ffd97a; }
.sg-me { position: absolute; left: 49%; bottom: 17%; transition: transform .12s, opacity .12s; z-index: 2; }
.sg-me.hid { transform: translateX(-70px); opacity: 0; }
.sg-me .avatar { filter: drop-shadow(0 3px 0 rgba(0,0,0,.5)); }
.sg-wolf { position: absolute; right: 5%; bottom: 17%; width: 22%; text-align: center; font-size: clamp(40px, 9vw, 72px); line-height: 1; }
.sg-wolfbody { display: inline-block; transform: scaleX(-1); transition: transform .12s; filter: drop-shadow(0 3px 0 rgba(0,0,0,.5)); }
.sg-alert { position: absolute; left: 50%; top: -34%; transform: translateX(-50%); font-size: .7em; opacity: 0; }
.sg-eyes { position: absolute; left: 50%; top: -8%; transform: translateX(-50%); font-size: .45em; opacity: 0; filter: drop-shadow(0 0 6px #f33); }
.sg-wolf[data-phase="cue"] .sg-alert { opacity: 1; animation: pulse .35s infinite; }
.sg-wolf[data-phase="look"] .sg-wolfbody { transform: scaleX(1); }
.sg-wolf[data-phase="look"] .sg-eyes { opacity: 1; }
.sg-flash { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); font-weight: 700; font-size: 1.6em; padding: 0 14px; border: 3px solid var(--ink); border-radius: 12px; opacity: 0; transition: opacity .2s; }
.sg-flash.show { opacity: 1; } .sg-flash.ok { background: #7fd98f; color: var(--ink); } .sg-flash.bad { background: #e8534a; color: #fff; }
.sg-dots { display: flex; gap: 10px; } .sg-dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ink); background: #d9d4c6; }
.sg-dot.ok { background: #52c76f; } .sg-dot.bad { background: #e8534a; }
.sg-info { font-weight: 700; color: #5d4d35; min-height: 1.4em; text-align: center; }
.sg-btn { min-width: 220px; }
