/* Teken & Raai on a phone: big buttons, one hand, modern browsers only. Paper #fbf4e6, ink #2b211c, tomato #e5533d,
   sun #ffc23c, teal #1f9e8f. */
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url('/tv/fonts/manrope-700.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-display: swap; src: url('/tv/fonts/manrope-800.woff2') format('woff2'); }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: #fbf4e6; color: #2b211c; font: 700 17px/1.35 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-user-select: none; user-select: none; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body.drawing { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
#app { min-height: 100%; display: flex; flex-direction: column; }
button { font: inherit; color: inherit; border: 0; background: #fff; border-radius: 18px; box-shadow: 0 4px 0 rgba(43,33,28,.14); cursor: pointer; touch-action: manipulation; padding: 12px 16px; }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43,33,28,.14); }
button.big { background: #e5533d; color: #fff; font-size: 22px; font-weight: 800; padding: 16px 24px; width: 100%; border-radius: 20px; }
button.link { background: none; box-shadow: none; text-decoration: underline; opacity: .7; margin-top: 18px; }
.av { display: block; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; }
.pic { display: block; width: 100%; height: 100%; pointer-events: none; }
.note { font-size: 14px; opacity: .65; text-align: center; }
section { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; margin: 0 auto; }
header { display: flex; align-items: center; width: 100%; gap: 10px; min-height: 48px; }
header h2 { font-size: 22px; flex: 1; }
.secs { font-size: 22px; font-weight: 800; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.secs.low { color: #e5533d; }
.barbox { width: 100%; height: 8px; background: #efe4cf; border-radius: 4px; overflow: hidden; margin: 6px 0 10px; }
.barbox i { display: block; height: 100%; background: #1f9e8f; transform-origin: 0 50%; transition: transform .25s linear; }

/* setup */
.setup { gap: 10px; }
.setup h1 { font-size: 28px; display: flex; align-items: center; gap: 10px; align-self: flex-start; }
.setup h1 svg { width: 52px; height: 52px; }
.lbl { align-self: stretch; display: flex; flex-direction: column; gap: 6px; font-size: 15px; margin-top: 4px; }
.setup input { font: inherit; font-size: 22px; padding: 12px 14px; border-radius: 14px; border: 3px solid #efe4cf; background: #fff; -webkit-user-select: text; user-select: text; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; }
.avatars button { padding: 3px; border-radius: 50%; aspect-ratio: 1; border: 3px solid transparent; }
.avatars button.on { border-color: #e5533d; transform: scale(1.08); }
.seg { display: flex; gap: 10px; width: 100%; }
.seg button { flex: 1; border: 3px solid transparent; }
.seg button.on { border-color: #e5533d; }
.toggle { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; margin: 6px 0 8px; }
.toggle .box { flex: 0 0 34px; height: 34px; border-radius: 10px; border: 3px solid #2b211c; display: block; }
.toggle.on .box { background: #1f9e8f; border-color: #1f9e8f; }
.toggle .box svg { width: 100%; height: 100%; display: block; }
.toggle small { display: block; font-size: 13px; opacity: .65; font-weight: 700; }

/* waiting, lobby */
.wait, .lobby, .end { justify-content: center; text-align: center; gap: 12px; }
.me { width: 120px; height: 120px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 6px 0 rgba(43,33,28,.12); animation: bob 2s ease-in-out infinite; }
.me.big { width: 160px; height: 160px; }
.me.pen { padding: 18px; }
.wait h2, .lobby h2, .end h2 { font-size: 30px; }
.lobby .name { font-size: 20px; opacity: .8; }
.lobby .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 6px 0 14px; }
.mini { width: 46px; height: 46px; display: block; }
#ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.tk { position: relative; width: 50px; height: 50px; opacity: .4; }
.tk.on { opacity: 1; }
.tk i { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: #1f9e8f; }
.tk i svg { display: block; width: 100%; height: 100%; }
.spin { width: 80px; height: 80px; border-radius: 50%; background: #2b211c; padding: 16px; animation: spin 1.6s linear infinite; }

/* pick */
.pick { gap: 14px; }
.card { position: relative; width: 100%; min-height: 220px; background: #ffc23c; border-radius: 26px; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: 0 6px 0 rgba(43,33,28,.14); }
.card .txt { font-size: 34px; font-weight: 800; line-height: 1.12; }
.card .pic { width: 160px; height: 160px; margin-bottom: 8px; }
.card.kid .txt { font-size: 28px; }
.card.own { background: #fff; }
.card.own input { font: inherit; font-size: 26px; width: 100%; padding: 12px; border: 3px solid #efe4cf; border-radius: 14px; text-align: center; -webkit-user-select: text; user-select: text; }
.lvl { position: absolute; top: 12px; right: 14px; font-size: 13px; background: #fff; border-radius: 10px; padding: 2px 10px; }
.lvl.hard { background: #2b211c; color: #fff; }
.speaker { position: absolute; top: 10px; left: 10px; width: 56px; height: 56px; border-radius: 50%; padding: 10px; }
.row2 { display: flex; gap: 10px; width: 100%; }
.row2 button { flex: 1; }

/* draw */
.draw { padding-top: 10px; gap: 0; }
.draw header { min-height: 56px; }
.what { flex: 1; font-size: 18px; line-height: 1.2; }
.what b { font-size: 24px; font-weight: 800; }
.kidprompt { flex: 1; display: flex; align-items: center; gap: 10px; height: 76px; }
.kidprompt .pic { width: 76px; height: 76px; }
.kidprompt .speaker { position: static; }
.paper { width: 100%; aspect-ratio: 1; background: #fff; border-radius: 18px; box-shadow: 0 5px 0 rgba(43,33,28,.14); overflow: hidden; position: relative; }
.paper canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.tools { width: 100%; margin: 12px 0; }
.sws { display: flex; justify-content: space-between; }
.sw { width: 38px; height: 38px; border-radius: 50%; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(43,33,28,.15); }
.sw.on { box-shadow: 0 0 0 3px #2b211c; transform: scale(1.12); }
.row3 { display: flex; gap: 8px; margin-top: 12px; }
.row3 button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 4px; font-size: 13px; white-space: nowrap; border: 3px solid transparent; }
.row3 .wd { flex: 0 0 52px; }
.row3 button svg { width: 26px; height: 26px; }
.wd.on { border-color: #2b211c; }
.wd i { display: block; border-radius: 50%; background: #2b211c; }
.wd i.thin { width: 8px; height: 8px; }
.wd i.thick { width: 22px; height: 22px; }

/* guess */
.guess { gap: 0; }
.guessrow { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 14px; }
.guessrow input { font: inherit; font-size: 24px; padding: 14px; border-radius: 16px; border: 3px solid #efe4cf; background: #fff; -webkit-user-select: text; user-select: text; }
.inkout { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; color: #8a7f78; }
.inkout svg { width: 120px; height: 120px; }
.guess .what { flex: none; margin: 12px 0 8px; display: flex; align-items: center; gap: 10px; font-size: 20px; width: 100%; }
.guess .what .speaker { position: static; }
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.picbtn { aspect-ratio: 1; padding: 10px; border-radius: 22px; }
.guess.kids .paper { width: 64%; }
.guess.kids .pics { width: 82%; }

/* show */
.show { gap: 8px; }
.favs { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.favs li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px 10px; box-shadow: 0 3px 0 rgba(43,33,28,.1); }
.favs li.now { box-shadow: 0 0 0 3px #ffc23c; }
.favs li > .av { width: 42px; height: 42px; flex: 0 0 42px; }
.favs .it { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.favs .it b { font-size: 13px; opacity: .65; }
.favs q { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.favs .dr { display: flex; align-items: center; gap: 6px; font-size: 16px; }
.favs .dr svg { width: 22px; height: 22px; background: #2b211c; border-radius: 50%; padding: 3px; }
.fv { width: 50px; height: 50px; padding: 6px; border-radius: 50%; border: 3px solid transparent; flex: 0 0 50px; opacity: .55; }
.fv.on { border-color: #2b211c; opacity: 1; transform: scale(1.1); }
.fv svg { display: block; width: 100%; height: 100%; }
.favs li.none { justify-content: center; opacity: .6; }

/* end */
.award { background: #fff; border-radius: 20px; padding: 14px 18px; width: 100%; box-shadow: 0 4px 0 rgba(43,33,28,.12); }
.award h3 { font-size: 16px; opacity: .7; }
.award q { display: block; font-size: 24px; font-weight: 800; margin: 4px 0; }
.award p { display: flex; align-items: center; justify-content: center; gap: 8px; }
.award p .av { width: 34px; height: 34px; }

#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #2b211c; color: #fff; padding: 10px 18px; border-radius: 14px; z-index: 5; }
#banner { position: fixed; left: 0; right: 0; top: 0; background: #e5533d; color: #fff; text-align: center; font-size: 14px; padding: 6px; z-index: 4; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
