:root {
  --green: #1d3b26;
  --green-2: #2c5a3a;
  --cream: #f6f1e4;
  --leather: #a8683a;
  --ink: #1b1b1b;
  --muted: #6b6b6b;
  --gold: #e3b448;
  --r1: #e3b448; --r2: #c9ccd3; --r3: #c98a5a;
  --danger: #b3261e;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--cream); color: var(--ink); }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
.hidden { display: none !important; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.muted { color: var(--muted); }

.btn { border: 0; border-radius: 12px; padding: .8rem 1.2rem; font-weight: 700; background: #e7e1d2; color: var(--ink); }
.btn.primary { background: var(--green); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 1rem 1.6rem; width: 100%; }
.btn.ghost { background: transparent; border: 2px solid #cfc7b4; }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- picker (phone + admin) ---------------- */
.picker.tiles { width: 100%; height: 100%; }
.picker .tile { position: relative; padding: 0; border-radius: 10px; border: 3px solid transparent; background: #fff; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .1s, opacity .15s; -webkit-tap-highlight-color: transparent; }
.picker.tiles .tile img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; background: #eee; }
.picker .tile:active { transform: scale(.96); }
.picker .tile.picked { border-color: var(--green); box-shadow: 0 0 0 2px var(--green); }
.picker .tile.dim { opacity: .4; }
.picker .num { position: absolute; left: 4px; bottom: 4px; background: rgba(29,59,38,.88); color: #fff; font-weight: 800; font-size: .8rem;
  min-width: 1.5rem; padding: .1rem .35rem; border-radius: 6px; text-align: center; max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .badge:empty { display: none; }
.picker .badge { position: absolute; top: 4px; right: 4px; background: var(--green); color: #fff; font-weight: 900; font-size: .95rem;
  padding: .15rem .45rem; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.picker .badge[data-rank="1"] { background: var(--r1); color: #2a2000; }
.picker .badge[data-rank="2"] { background: var(--r2); color: #222; }
.picker .badge[data-rank="3"] { background: var(--r3); color: #2a1300; }
/* list mode: options with text (final vote) */
.picker.list { display: flex; flex-direction: column; gap: .6rem; height: 100%; justify-content: center; }
.picker.list .tile { display: flex; align-items: center; gap: .8rem; text-align: left; padding: .4rem; flex: 1; max-height: 9.5rem; min-height: 0; }
.picker.list .tile img, .picker.list .icon-card { height: 100%; width: auto; aspect-ratio: 1; object-fit: contain; border-radius: 8px; flex: none; background: #f3f0e8; }
.picker.list .icon-card { font-size: 0; padding: 0; } .picker.list .icon-card .icon { font-size: 2.4rem; }
.picker.list .label { font-weight: 800; font-size: 1.05rem; }
.picker.list .badge { top: 50%; transform: translateY(-50%); right: .6rem; }
.icon-card { width: 100%; aspect-ratio: 3 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; background: #efe9da; border-radius: 8px; padding: .5rem; text-align: center; font-weight: 700; }
.icon-card .icon { font-size: 2.6rem; }
/* admin modal */
.picker.admin-grid.tiles { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 6px; height: auto; }
.picker.admin-grid.tiles .tile { width: auto !important; height: auto !important; }
.picker.admin-grid.tiles .tile img { aspect-ratio: 0.68; height: auto; }
.picker.admin-grid.list .tile { max-height: 6rem; flex: none; height: 6rem; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: #fff; border-radius: 18px; padding: 1.2rem; width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.modal h3 { margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: #222; color: #fff; padding: .8rem 1.1rem;
  border-radius: 12px; z-index: 60; max-width: 92vw; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--green); }

/* ---------------- phone ---------------- */
body.phone { background: var(--cream); }
.phone .top { background: var(--green); color: #fff; padding: .7rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  position: sticky; top: 0; z-index: 10; }
.phone .top .brand { font-weight: 900; letter-spacing: .02em; }
.phone .top .who { font-size: .85rem; opacity: .9; text-align: right; flex: none; }
.phone main { padding: 1rem; max-width: 640px; margin: 0 auto; }
.phone h1 { font-size: 1.5rem; margin: .4rem 0 .6rem; }
.phone h2 { font-size: 1.25rem; margin: .2rem 0 .4rem; }
.phone .field { display: block; margin: .8rem 0; }
.phone .field span { display: block; font-weight: 700; margin-bottom: .3rem; }
.phone .field input { width: 100%; padding: .9rem; border-radius: 12px; border: 2px solid #d5cdb9; font-size: 1.1rem; background: #fff; }
.phone .center { text-align: center; padding: 2.5rem 0; }
.phone .huge { font-size: 6rem; font-weight: 900; color: var(--green); line-height: 1; }
.phone .howto ol { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .6rem; }
.phone .howto li { background: #fff; border-radius: 12px; padding: .8rem; display: flex; align-items: center; gap: .8rem; font-weight: 700; }
.phone .howto li b { min-width: 2.6rem; text-align: center; padding: .25rem .4rem; border-radius: 8px; background: var(--green); color: #fff; }
.phone .howto li b.r1 { background: var(--r1); color: #2a2000; } .phone .howto li b.r2 { background: var(--r2); color: #222; } .phone .howto li b.r3 { background: var(--r3); color: #2a1300; }
/* voting: everything on one screen, no scrolling */
body.phone.voting { overflow: hidden; }
body.phone.voting #app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
body.phone.voting .top { padding: .5rem .9rem; position: static; }
body.phone.voting .top .brand { font-size: .95rem; letter-spacing: 0; }
.phone main.vote { flex: 1; min-height: 0; width: 100%; padding: .5rem .5rem .3rem; display: flex; flex-direction: column; gap: .35rem; }
.phone .pickwrap { flex: 1; min-height: 0; }
.phone .hint { font-size: .8rem; color: var(--muted); text-align: center; line-height: 1.3; padding: 0 .3rem; }
.phone .submitbar { background: #fff; padding: .55rem .9rem calc(.55rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,.1); }
.phone .submitbar .btn.big { padding: .8rem; }
.phone .summary { font-size: .85rem; margin-bottom: .4rem; text-align: center; font-weight: 700; }
.offline { position: fixed; top: 0; left: 0; right: 0; background: var(--danger); color: #fff; text-align: center; padding: .4rem; z-index: 70; font-size: .9rem; }
.check { font-size: 5rem; }

/* ---------------- big screen ---------------- */
body.screen { background: radial-gradient(circle at 30% 0%, #2f6340, var(--green) 60%); color: #fff; overflow: hidden; }
.screen #app { height: 100vh; display: flex; flex-direction: column; padding: 2.5vh 3vw; }
.screen header { display: flex; justify-content: space-between; align-items: baseline; }
.screen header .brand { font-weight: 900; font-size: 2.2vh; letter-spacing: .25em; opacity: .85; text-transform: uppercase; }
.screen header .progress { display: flex; gap: .6vw; }
.screen header .progress span { padding: .5vh 1vw; border-radius: 99px; background: rgba(255,255,255,.12); font-size: 1.8vh; }
.screen header .progress span.done { background: var(--gold); color: #2a2000; font-weight: 700; }
.screen header .progress span.now { background: #fff; color: var(--green); font-weight: 700; }
.screen .stage { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.screen h1 { font-size: 5.5vh; margin: 1.5vh 0; }
.screen .lobby { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; min-height: 0; }
.screen .qr { background: #fff; padding: 2vh; border-radius: 3vh; }
.screen .qr img { width: 52vh; height: 52vh; display: block; }
.screen .url { font-size: 2.6vh; margin-top: 1.5vh; text-align: center; font-weight: 700; }
.screen .lobby h1 { font-size: 7vh; line-height: 1.05; }
.screen .count { font-size: 4vh; margin: 2vh 0; }
.screen .count b { font-size: 9vh; color: var(--gold); }
.screen .names { display: flex; flex-wrap: wrap; gap: .8vh; max-height: 32vh; overflow: hidden; }
.screen .names span { background: rgba(255,255,255,.14); padding: .7vh 1.2vw; border-radius: 99px; font-size: 2.2vh; animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.screen .countdown { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.screen .countdown .n { font-size: 38vh; font-weight: 900; line-height: 1; animation: beat 1s infinite; }
.screen .countdown .t { font-size: 5vh; opacity: .9; }
@keyframes beat { 0% { transform: scale(1.25); opacity: .4; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.95); opacity: 1; } }
.screen .voting { flex: 1; display: grid; grid-template-columns: 1fr 26vw; gap: 2.5vw; min-height: 0; }
.screen .sheet { min-height: 0; display: flex; align-items: center; justify-content: center; }
.screen .sheet img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1.5vh; background: #fff; }
.screen .tiles { display: grid; gap: 2vw; grid-auto-flow: column; grid-auto-columns: 1fr; height: 100%; align-items: center; }
.screen .tiles figure { margin: 0; background: rgba(255,255,255,.08); border-radius: 2vh; padding: 1.5vh; text-align: center; height: 100%; display: flex; flex-direction: column; }
.screen .tiles figure img, .screen .tiles .icon-card { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.screen .tiles .icon-card { color: var(--ink); aspect-ratio: auto; font-size: 3vh; }
.screen .tiles .icon-card .icon { font-size: 12vh; }
.screen .tiles figcaption { font-size: 3vh; font-weight: 800; margin-top: 1vh; }
.screen .side { display: flex; flex-direction: column; justify-content: center; gap: 3vh; }
.screen .side .card { background: rgba(255,255,255,.1); border-radius: 2vh; padding: 2.5vh; }
.screen .side .card h3 { margin: 0 0 1vh; font-size: 2.6vh; opacity: .85; }
.screen .ring { font-size: 10vh; font-weight: 900; line-height: 1; }
.screen .ring small { font-size: 4vh; opacity: .7; }
.screen .bar-bg { height: 1.4vh; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; margin-top: 1.5vh; }
.screen .bar-bg i { display: block; height: 100%; background: var(--gold); transition: width .5s; }
.screen .rules { font-size: 2.4vh; line-height: 1.6; }
.screen .rules b { display: inline-block; min-width: 4vw; padding: .1vh .6vw; border-radius: .8vh; text-align: center; margin-right: .6vw; color: #222; }
.screen .results { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1vh; min-height: 0; overflow: hidden; }
.screen .res { display: grid; grid-template-columns: 9vh 18vw 1fr 14vw; align-items: center; gap: 1.5vw; height: 9vh; flex: none; }
.screen .res img, .screen .res .icon-card { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center 30%; border-radius: 1vh; background: #fff; }
.screen .res .icon-card { font-size: 0; padding: 0; } .screen .res .icon-card .icon { font-size: 4vh; }
.screen .res .name { font-size: 3vh; font-weight: 700; }
.screen .res .track { height: 70%; background: rgba(255,255,255,.1); border-radius: 1vh; overflow: hidden; }
.screen .res .fill { height: 100%; width: 0; background: rgba(255,255,255,.55); border-radius: 1vh; transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.screen .res.win .fill { background: var(--gold); }
.screen .res.tie .fill { background: #f08a5d; }
.screen .res .pts { font-size: 3.4vh; font-weight: 800; text-align: right; white-space: nowrap; }
.screen .res .pts small { font-size: 1.8vh; font-weight: 400; opacity: .75; display: block; }
.screen .results.compact { gap: .5vh; }
.screen .results.compact .res { height: 5vh; grid-template-columns: 5vh 16vw 1fr 16vw; }
.screen .results.compact .res .name, .screen .results.compact .res .pts { font-size: 2.3vh; }
.screen .results.compact .res .pts small { display: inline; font-size: 1.6vh; margin-left: .5vw; }
.screen .banner { margin-top: 1vh; flex: none; font-size: 4vh; font-weight: 800; text-align: center; padding: 1.5vh; border-radius: 2vh; background: var(--gold); color: #2a2000; }
.screen .banner.tie { background: #f08a5d; color: #2a0f00; }
.screen .finished { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; min-height: 0; }
.screen .finished img, .screen .finished .icon-card { max-height: 70vh; max-width: 40vw; border-radius: 2vh; background: #fff; }
.screen .finished .icon-card { width: 40vh; color: var(--ink); font-size: 3vh; }
.screen .finished .icon-card .icon { font-size: 16vh; }
.screen .finished h1 { font-size: 8vh; }
.screen .finished .path { font-size: 3vh; opacity: .9; line-height: 1.6; }
.screen .confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.screen .confetti i { position: absolute; top: -5vh; width: 1.2vh; height: 2.4vh; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(720deg); } }

.screen .lobbylogo { height: 26vh; width: auto; display: block; margin-bottom: 2vh; filter: drop-shadow(0 1vh 2vh rgba(0,0,0,.45)); }
.phone .reglogo { display: block; height: 110px; width: auto; margin: .2rem auto .4rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.phone .reglogo + h1 { text-align: center; }
/* ---- big screen v2: full-screen tiles, demo, podium ---- */
.screen #app { padding: 1.6vh 2vw; }
.screen header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; min-height: 4.5vh; }
.screen header .brand { font-size: 1.6vh; }
.screen header .htitle { font-size: 3.6vh; font-weight: 800; text-align: center; white-space: nowrap; }
.screen header .progress { justify-self: end; }
.screen header .progress span { font-size: 1.5vh; padding: .4vh .8vw; }
.screen .stage { padding-top: 1vh; }
.screen .bigtiles { flex: 1; min-height: 0; width: 100%; }
.screen .bigtiles figure { margin: 0; display: flex; flex-direction: column; }
.screen .bigtiles figure img, .screen .bigtiles .icon-card { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 1vh; }
.screen .bigtiles .icon-card { color: #fff; aspect-ratio: auto; font-size: 3vh; background: rgba(255,255,255,.08); border: .4vh dashed rgba(255,255,255,.35); }
.screen .bigtiles .icon-card span:not(.icon) { display: none; }
.screen .bigtiles .icon-card .icon { font-size: 12vh; }
.screen .bigtiles figcaption { font-size: 2.6vh; font-weight: 800; text-align: center; display: flex; align-items: center; justify-content: center; }
.screen footer { display: flex; justify-content: space-between; align-items: center; height: 4vh; font-size: 1.8vh; opacity: .9; }
.screen footer .legend { display: flex; gap: .6vw; align-items: center; }
.screen footer .legend b { padding: .2vh .6vw; border-radius: .6vh; color: #222; margin-left: .8vw; }
.screen b.r1 { background: var(--r1); } .screen b.r2 { background: var(--r2); } .screen b.r3 { background: var(--r3); }
.screen .votedpill { background: rgba(0,0,0,.25); border-radius: 99px; padding: .5vh 1.2vw; display: flex; align-items: center; gap: .6vw; }
.screen .votedpill b { font-size: 2.2vh; }
.screen .votedpill .mini { display: inline-block; width: 7vw; height: .8vh; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; }
.screen .votedpill .mini i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .5s; }
.screen .ballots { text-align: center; font-size: 2vh; opacity: .7; }

/* demonstration */
.screen .tutorial { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 6vw; align-items: center; padding: 0 4vw; }
.screen .mock { position: relative; height: 84vh; aspect-ratio: 9 / 19; background: var(--cream); border-radius: 5vh; border: 1.4vh solid #111;
  box-shadow: 0 2vh 6vh rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }
.screen .mtop { background: var(--green); color: #fff; font-weight: 800; font-size: 1.8vh; padding: 3.2vh 1.4vh 1.2vh; }
.screen .mgrid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .7vh; padding: 1vh; align-content: center; }
.screen .mtile { position: relative; border-radius: .9vh; overflow: hidden; border: .4vh solid transparent; background: #fff; transition: opacity .3s, transform .2s; }
.screen .mtile img { width: 100%; aspect-ratio: .68; object-fit: cover; object-position: top; display: block; }
.screen .mtile .mnum { position: absolute; left: .4vh; bottom: .4vh; background: rgba(29,59,38,.88); color: #fff; font-size: 1.2vh; font-weight: 800; padding: .1vh .5vh; border-radius: .5vh; }
.screen .mtile .mbadge:empty { display: none; }
.screen .mtile .mbadge { position: absolute; top: .4vh; right: .4vh; font-size: 1.5vh; font-weight: 900; padding: .1vh .6vh; border-radius: .6vh; color: #222; animation: pop .3s; }
.screen .mtile.picked { border-color: var(--green); transform: scale(1.04); }
.screen .mtile.rk1 .mbadge { background: var(--r1); } .screen .mtile.rk2 .mbadge { background: var(--r2); } .screen .mtile.rk3 .mbadge { background: var(--r3); }
.screen .mtile.dim { opacity: .35; }
.screen .mhint { font-size: 1.2vh; color: var(--muted); text-align: center; padding: 0 1.5vh .6vh; }
.screen .mbar { background: #fff; padding: 1.2vh 1.4vh 2.4vh; box-shadow: 0 -.3vh 1vh rgba(0,0,0,.1); }
.screen .msum { font-size: 1.3vh; font-weight: 700; text-align: center; margin-bottom: .8vh; }
.screen .mbtn { background: var(--green); color: #fff; font-weight: 800; text-align: center; padding: 1.4vh; border-radius: 1.2vh; font-size: 1.7vh; opacity: .45; transition: transform .15s, opacity .2s; }
.screen .mbtn.ready { opacity: 1; }
.screen .mbtn.press { transform: scale(.94); background: #10251a; }
.screen .mthanks { position: absolute; inset: 0; background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 2.6vh; font-weight: 800; opacity: 0; pointer-events: none; transition: opacity .3s; }
.screen .mthanks.on { opacity: 1; }
.screen .finger { position: absolute; width: 5vh; height: 5vh; margin: -2.5vh 0 0 -2.5vh; border-radius: 50%; background: rgba(227,180,72,.55);
  border: .4vh solid #fff; box-shadow: 0 0 2vh rgba(0,0,0,.4); transition: left .7s ease-in-out, top .7s ease-in-out, opacity .3s; opacity: 0; left: 50%; top: 50%; z-index: 5; }
.screen .tsteps h1 { font-size: 8vh; margin: 0 0 2vh; }
.screen .tsteps ol { list-style: none; padding: 0; margin: 3vh 0; display: flex; flex-direction: column; gap: 1.6vh; }
.screen .tsteps li { display: flex; align-items: center; gap: 1.5vw; font-size: 4vh; font-weight: 700; padding: 1.4vh 1.5vw; border-radius: 2vh; background: rgba(255,255,255,.08); transition: background .3s, transform .3s; }
.screen .tsteps li.on { background: rgba(255,255,255,.22); transform: translateX(1vw); }
.screen .tsteps li b { min-width: 6vw; text-align: center; padding: .6vh .8vw; border-radius: 1vh; color: #222; background: #fff; }
.screen .tsub { font-size: 2.8vh; opacity: .9; margin: 1vh 0; }
.screen .tsub.dim { opacity: .65; font-size: 2.4vh; }

/* podium */
.screen .podium { justify-content: center; }
.screen .pwin { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; padding: 0 3vw; }
.screen .pwin > img, .screen .pwin > .icon-card { height: 84vh; max-width: 45vw; object-fit: contain; border-radius: 2vh; animation: grow .8s cubic-bezier(.2,.9,.3,1.3); }
.screen .pwin > .icon-card { width: 40vw; color: var(--ink); font-size: 4vh; } .screen .pwin > .icon-card .icon { font-size: 18vh; }
@keyframes grow { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.screen .plabel { font-size: 3vh; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
.screen .pname { font-size: 9vh; font-weight: 900; line-height: 1.05; margin: 1vh 0; }
.screen .ppts { font-size: 3.4vh; opacity: .9; }
.screen .prest { display: flex; gap: 2.5vw; margin-top: 6vh; }
.screen .pother { display: flex; gap: 1.2vw; align-items: center; background: rgba(255,255,255,.08); padding: 1.2vh; border-radius: 1.6vh; }
.screen .pother img, .screen .pother .icon-card { height: 20vh; width: auto; max-width: 12vw; object-fit: contain; border-radius: 1vh; }
.screen .pother .icon-card { width: 14vh; color: var(--ink); font-size: 0; } .screen .pother .icon-card .icon { font-size: 6vh; }
.screen .pplace { font-size: 2vh; opacity: .75; text-transform: uppercase; letter-spacing: .15em; }
.screen .poname { font-size: 3vh; font-weight: 800; }
.screen .popts { font-size: 2.2vh; opacity: .85; }

/* ---------------- admin ---------------- */
body.admin { background: #f4f2ec; }
.admin header { background: var(--green); color: #fff; padding: .8rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin header a { color: #fff; }
.admin main { padding: 1.2rem; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.3fr); gap: 1.2rem; max-width: 1500px; margin: 0 auto; }
@media (max-width: 1000px) { .admin main { grid-template-columns: 1fr; } }
.admin .panel { background: #fff; border-radius: 14px; padding: 1rem 1.2rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 1.2rem; }
.admin .panel h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.admin .phase { display: inline-block; padding: .25rem .7rem; border-radius: 99px; background: var(--gold); font-weight: 800; }
.admin .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .8rem 0; }
.admin .stats div { background: #f4f2ec; border-radius: 10px; padding: .6rem; text-align: center; }
.admin .stats b { display: block; font-size: 1.6rem; }
.admin table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin th, .admin td { text-align: left; padding: .4rem .35rem; border-bottom: 1px solid #eee; vertical-align: middle; }
.admin th { font-size: .78rem; text-transform: uppercase; color: var(--muted); }
.admin td .btn { padding: .3rem .55rem; font-size: .8rem; border-radius: 8px; }
.admin .pill { font-size: .75rem; padding: .1rem .45rem; border-radius: 99px; background: #eee; white-space: nowrap; }
.admin .pill.ok { background: #d8ecd9; color: #1d5c26; }
.admin .pill.warn { background: #fbe7c3; color: #6b4300; }
.admin textarea { width: 100%; min-height: 110px; border-radius: 10px; border: 1px solid #ccc; padding: .6rem; }
.admin input[type=text], .admin input[type=password], .admin input[type=search] { padding: .55rem .7rem; border-radius: 10px; border: 1px solid #ccc; }
.admin .restable { margin-top: .5rem; }
.admin .restable td:last-child { text-align: right; font-weight: 700; }
.admin .restable tr.win td { background: #fff4d6; }
.admin .login { max-width: 360px; margin: 15vh auto; background: #fff; padding: 1.5rem; border-radius: 16px; }
.admin .login input { width: 100%; margin: .6rem 0; }
.admin .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin .scroll { max-height: 60vh; overflow: auto; }
.admin .picker { grid-template-columns: repeat(4, 1fr); }
.admin .picker.n3 { grid-template-columns: repeat(3, 1fr); }
.admin .picker.n3 .tile { flex-direction: column; }
.admin .picker.n3 .tile img, .admin .picker.n3 .icon-card { width: 100%; }

/* ---- Scout shirt colour behind all logos (same as the designer's sheets) ---- */
:root { --shirt: #c0c2c1; }
.screen .bigtiles figure img,
.screen .res img,
.screen .pwin > img,
.screen .pother img,
.screen .finished img,
.picker .tile img,
.picker.list .tile img,
.screen .mtile img { background: var(--shirt) !important; }
/* Transparent logos get some space around them, like a patch on the shirt */
.screen .bigtiles figure img, .screen .pwin > img, .screen .finished img { padding: 2.5%; box-sizing: border-box; border-radius: 1.5vh; }
.screen .pother img { padding: 3%; box-sizing: border-box; }
.picker.list .tile img { padding: 4%; box-sizing: border-box; }
.picker .tile { background: var(--shirt); }
.screen .lobbylogo { background: var(--shirt); padding: 2vh; border-radius: 2vh; filter: none; box-shadow: 0 1vh 3vh rgba(0,0,0,.35); box-sizing: content-box; }
.phone .reglogo { background: var(--shirt); padding: 10px; border-radius: 14px; filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.picker.list .icon-card { background: var(--shirt); }

/* Final vote: logos side by side with the same height */
.screen .samerow { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: center; }
.screen .samerow figure { margin: 0; display: flex; flex-direction: column; align-items: center; flex: none; }
.screen .samerow img { object-fit: fill; background: var(--shirt); padding: 0; border-radius: 1.5vh; display: block; }
.screen .samerow .icon-card { aspect-ratio: auto; color: #fff; background: rgba(255,255,255,.08); border: .4vh dashed rgba(255,255,255,.35); border-radius: 1.5vh; box-sizing: border-box; }
.screen .samerow .icon-card .icon { font-size: 12vh; }
.screen .samerow .icon-card span:not(.icon) { display: none; }
.screen .samerow figcaption { font-size: 2.6vh; font-weight: 800; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
/* Phone final vote: logos with the same height, width follows the logo */
.picker.list .tile img { height: 100%; width: auto; aspect-ratio: auto; max-width: 48%; object-fit: contain; }
.picker.list .tile .icon-card { height: 100%; width: auto; aspect-ratio: .77; }

/* Closing page: votes for each option */
.screen .fvotes { display: flex; flex-direction: column; gap: 1.6vh; margin-top: 4vh; }
.screen .fvote { display: grid; grid-template-columns: 9vh 1fr auto; align-items: center; gap: 1.5vw; background: rgba(255,255,255,.08); border-radius: 1.6vh; padding: 1vh 1.5vw; font-size: 3vh; }
.screen .fvote.win { background: rgba(227,180,72,.25); outline: .3vh solid var(--gold); }
.screen .fvote img, .screen .fvote .icon-card { height: 9vh; width: 9vh; max-width: none; max-height: none; object-fit: contain; border-radius: 1vh; padding: 4%; box-sizing: border-box; background: var(--shirt); }
.screen .fvote .icon-card { font-size: 0; color: var(--ink); } .screen .fvote .icon-card .icon { font-size: 5vh; }
.screen .fvlabel { font-weight: 700; }
.screen .fvcount { font-weight: 900; font-size: 3.6vh; white-space: nowrap; }
.screen .fnote { font-size: 3vh; opacity: .9; margin: -1vh 0 1vh; }
