/* AmaniQuest. Colors and type of kayanou.ca: cream #fdf3e9, ink #15222e, teal #0b7a6b, gold #a65f00, sand. No outside fonts. */
@font-face { font-family: 'Public Sans'; src: url('assets/public-sans-normal-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --bg:#fdf3e9; --paper:#fffaf4; --white:#fff; --ink:#15222e; --mute:#566474; --line:#ecdfd0; --band:#f4dcc6; --teal:#0b7a6b; --teal-d:#075d51; --gold:#a65f00; --sand:#ecd9a8;
  --a:#0b7a6b; --b:#a65f00; --c:#15222e; --r:28px; --r-sm:18px; --sans:'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.5; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); }
.brand img { display: block; height: 40px; width: auto; }
.crumb { font-weight: 600; color: var(--mute); font-size: .95rem; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 40px; display: flex; flex-direction: column; }
h1, h2, h3 { margin: 0; font-weight: 300; line-height: 1.12; }
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
p { margin: 0; }
.lede { font-size: 1.2rem; color: var(--mute); max-width: 36ch; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.center { align-items: center; text-align: center; }
.grow { flex: 1; }
.btn { appearance: none; border: 2px solid var(--ink); background: var(--ink); color: #fff; font: 500 1.1rem var(--sans); padding: 14px 28px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 52px; }
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--band); }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.teal:hover { background: var(--teal-d); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.big { font-size: 1.35rem; padding: 18px 40px; min-height: 64px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.card { background: var(--white); border-radius: var(--r); padding: clamp(20px, 3vw, 36px); box-shadow: 0 1px 0 var(--line); }
.chip { display: inline-block; background: var(--band); color: var(--ink); font-weight: 600; font-size: .9rem; padding: 4px 14px; border-radius: 999px; }
.chip.gold { background: var(--gold); color: #fff; }
.chip.teal { background: var(--teal); color: #fff; }
label { font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=number] { width: 100%; font: 500 1.4rem var(--sans); padding: 14px 18px; border: 2px solid #7d8791; border-radius: 16px; background: var(--white); color: var(--ink); }
.pin-in { letter-spacing: .3em; text-align: center; font-size: 2rem !important; }
.note { color: var(--mute); font-size: .95rem; }
.err { color: #9b2c1f; font-weight: 600; min-height: 1.5em; }
.home { padding-top: clamp(24px, 8vh, 80px); gap: 28px; }
.modes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.mode { text-align: left; background: var(--white); border: 2px solid var(--line); border-radius: var(--r); padding: 22px; cursor: pointer; font: inherit; color: inherit; }
.mode:hover, .mode:focus-visible { border-color: var(--teal); }
.mode b { display: block; font-size: 1.25rem; font-weight: 600; margin-bottom: 4px; }

/* host lobby */
.pin { font-size: clamp(4rem, 14vw, 9rem); font-weight: 600; letter-spacing: .08em; line-height: 1; color: var(--ink); }
.join-url { font-size: clamp(1.2rem, 2.6vw, 2rem); font-weight: 500; }
.join-url b { color: var(--teal); font-weight: 600; }
.teams { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); width: 100%; }
.team { background: var(--white); border-radius: var(--r); padding: 20px 22px; min-height: 150px; border-top: 8px solid var(--tc, var(--sand)); }
.team h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: 8px; }
.team ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.team li { background: var(--bg); border-radius: 999px; padding: 4px 14px; font-weight: 500; }
.team li.sp::before { content: '★ '; color: var(--gold); }
.t-davies { --tc: var(--teal); } .t-angelique { --tc: var(--gold); } .t-desmond { --tc: var(--ink); }

/* question */
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.qhead .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-weight: 600; color: var(--mute); }
.timer { width: 76px; height: 76px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 600; flex: none; }
.timer.done { background: var(--teal); font-size: .95rem; text-align: center; line-height: 1.1; }
.qtext { font-size: clamp(1.5rem, 3.6vw, 2.8rem); font-weight: 500; line-height: 1.2; text-align: center; background: var(--white); border-radius: var(--r); padding: clamp(20px, 3.5vw, 44px); margin-bottom: 18px; }
.answers { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.ans { position: relative; display: flex; align-items: center; gap: 16px; min-height: 120px; padding: 18px 20px; border-radius: var(--r-sm); border: 0; color: #fff; font: 500 clamp(1.1rem, 2.1vw, 1.6rem) var(--sans); text-align: left; line-height: 1.2; box-shadow: 0 5px 0 rgba(0,0,0,.22); width: 100%; }
button.ans { cursor: pointer; }
button.ans:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.22); }
.ans.a { background: var(--a); } .ans.b { background: var(--b); } .ans.c { background: var(--c); }
.ans .shape { flex: none; width: 34px; height: 34px; background: #fff; opacity: .95; }
.shape.tri { clip-path: polygon(50% 6%, 96% 92%, 4% 92%); }
.shape.dia { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.shape.cir { border-radius: 50%; }
.ans .txt { flex: 1; }
.ans.dim { opacity: .28; box-shadow: none; }
.ans.right { outline: 6px solid var(--sand); outline-offset: 3px; }
.ans .tick { flex: none; font-size: 2rem; font-weight: 700; }
.ans.picked { outline: 6px solid var(--sand); outline-offset: 3px; }
.ans[disabled] { cursor: default; }
.statusbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.pill { background: var(--white); border-radius: 999px; padding: 6px 16px; font-weight: 600; border: 2px solid var(--line); }
.pill.ok { border-color: var(--teal); color: var(--teal-d); }
.fact { background: var(--sand); border-radius: var(--r); padding: 20px 26px; margin-top: 16px; font-size: clamp(1.05rem, 1.8vw, 1.4rem); }
.fact b { display: block; margin-bottom: 4px; }
.results { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.res { background: var(--white); border-radius: 999px; padding: 8px 18px; font-weight: 600; border: 2px solid var(--line); }
.res.good { border-color: var(--teal); color: var(--teal-d); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; align-items: center; }
.hint { color: var(--mute); font-size: .95rem; }

/* scoreboard */
.board { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 900px; margin: 18px auto; }
.row { display: grid; grid-template-columns: 2.2rem 1fr; gap: 12px; align-items: center; }
.rank { font-size: 1.8rem; font-weight: 600; text-align: center; }
.bar { background: var(--white); border-radius: 999px; position: relative; height: 64px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--tc, var(--teal)); border-radius: 999px; min-width: 64px; transition: width .8s ease; }
.bar span { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; height: 100%; padding: 0 24px; font-weight: 600; font-size: 1.25rem; color: #fff; mix-blend-mode: normal; }
.bar span em { font-style: normal; }
.win { font-size: clamp(2rem, 6vw, 4rem); font-weight: 300; }

/* phone */
.player { max-width: 560px; margin: 0 auto; width: 100%; }
.teampick { display: grid; gap: 10px; }
.teampick label { margin: 0; font-weight: 600; }
.teampick input { position: absolute; opacity: 0; }
.teampick span { display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--line); background: var(--white); border-radius: 18px; padding: 16px 18px; border-left: 10px solid var(--tc); cursor: pointer; }
.teampick input:checked + span { border-color: var(--ink); background: var(--sand); }
.teampick input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.phone-answers { display: grid; gap: 12px; }
.phone-answers .ans { min-height: 96px; }
.waiting { text-align: center; padding: 36px 0; }
.bigmsg { font-size: clamp(2rem, 8vw, 3rem); font-weight: 500; }
.bigmsg.good { color: var(--teal-d); }

@media (max-width: 800px) { .answers { grid-template-columns: 1fr; } .ans { min-height: 88px; } .timer { width: 60px; height: 60px; font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .bar i { transition: none; } }
