/* Not Telestrations on the phones: the word card and the die, the drawing page with its
   marker and tools, the guessing page, and the reveal controls. Dark rules first (the
   chalkboard), then the light theme (kraft paper). */
.ntlp { --gold: #ffb800; --ok: #1fa35b; --no: #e8402f; display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
.ntlp .avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.ntlp-note { text-align: center; font-size: 14px; color: var(--label-2); line-height: 1.35; }
.ntlp-center { flex: 1; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 20px 6px; }
.ntlp-big { font-size: 40px; line-height: 1.05; }
.ntlp-p { font-size: 16px; color: var(--label-2); line-height: 1.4; max-width: 340px; }
.ntlp-p b { color: var(--text); font-size: 20px; }
.ntlp-rank { font-size: 72px; font-weight: 900; line-height: 1; color: var(--gold); letter-spacing: -.03em; }
.ntlp-logo { display: inline-flex; align-items: center; gap: 10px; }
.ntlp-not { font-weight: 900; font-size: 14px; letter-spacing: .18em; background: var(--ntl-red); color: #fff; padding: 3px 6px 3px 9px; border-radius: 6px; transform: rotate(-7deg); }
.ntlp-lword { font-size: 34px; line-height: 1; }

/* ---- the bar on top: yours (gold) or someone else's (calm) ---- */
.ntlp-bar { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 10px 12px 10px 16px; min-height: 64px; }
.ntlp-bar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ntlp-bar b { font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: -.01em; line-height: 1.05; }
.ntlp-bar span { font-size: 14px; font-weight: 700; line-height: 1.25; }
.ntlp-bar.me { background: linear-gradient(120deg, #ffd60a, #ffb000); color: #1b1b1b; box-shadow: 0 10px 30px rgba(255,190,0,.4); animation: ntlp-pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.ntlp-bar.idle { background: rgba(0,0,0,.3); color: var(--label-2); }
.ntlp-bar.idle b { font-size: 20px; color: var(--text); font-style: normal; }
.ntlp-bar .tclock { width: 54px; height: 54px; }
.ntlp-bar .tclock b { font-size: 22px; font-style: normal; }
.ntlp-bar.me .tclock .fg { stroke: #1b1b1b; }
.ntlp-bar.idle .tclock .fg { stroke: var(--gold); }
@keyframes ntlp-pop { from { transform: scale(.88); opacity: 0; } }
body.ntlp-myturn::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 15; box-shadow: inset 0 0 0 5px #ffc400, inset 0 0 40px rgba(255,196,0,.35); animation: ntlp-frame 1.6s ease-in-out infinite; }
body.ntlp-myturn.ntlp-hurry::after { box-shadow: inset 0 0 0 6px #ff3b30, inset 0 0 50px rgba(255,59,48,.45); animation-name: ntlp-frame-red; animation-duration: .6s; }
@keyframes ntlp-frame-red { 50% { box-shadow: inset 0 0 0 9px #ff3b30, inset 0 0 80px rgba(255,59,48,.6); } }
@keyframes ntlp-frame { 50% { box-shadow: inset 0 0 0 7px #ffc400, inset 0 0 70px rgba(255,196,0,.5); } }

/* ---- the card and the die ---- */
.ntlp-cardscreen { gap: 14px; }
.ntlp-card { width: 100%; }
.ntlp-card .ntl-crow { min-height: 48px; }
.ntlp-card .ntl-cw { font-size: 23px; }
.ntlp-rollbtn { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 96px; border: none; border-radius: 22px; padding: 14px 20px; background: linear-gradient(120deg, #ffd60a, #ffb000); color: #1b1b1b; text-align: left; box-shadow: 0 12px 30px rgba(255,190,0,.45), inset 0 -4px 0 rgba(0,0,0,.12); cursor: pointer; animation: ntlp-throb 1.6s ease-in-out infinite; }
.ntlp-rollbtn:active { transform: scale(.98); }
.ntlp-rollbtn .ntl-die { --s: 64px; flex: none; }
.ntlp-rollbtn b { display: block; font-size: 26px; font-weight: 900; font-style: italic; }
.ntlp-rollbtn small { display: block; font-size: 14px; font-weight: 700; opacity: .75; }
@keyframes ntlp-throb { 50% { box-shadow: 0 12px 44px rgba(255,190,0,.7), inset 0 -4px 0 rgba(0,0,0,.12); transform: scale(1.01); } }
.ntlp-secret { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: var(--ntl-paper); color: var(--ntl-ink); border-radius: 20px; padding: 16px 18px 18px; box-shadow: 0 3px 0 #e3ddd0, 0 12px 28px rgba(0,0,0,.25); animation: ntlp-pop .4s .6s cubic-bezier(.2,1.4,.4,1) both; }
.ntlp-secret small { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: rgba(22,23,26,.5); }
.ntlp-secret b { font-size: 40px; line-height: 1.05; }
.ntlp-secret span { font-size: 14px; font-weight: 700; color: var(--ntl-red); }
.ntlp-secret em { font-style: normal; font-size: 14px; color: rgba(22,23,26,.6); line-height: 1.35; }
.ntlp-make { display: flex; gap: 8px; }
.ntlp-make input { flex: 1; min-width: 0; font-family: var(--ntl-hand); font-size: 22px; background: var(--ntl-paper); color: var(--ntl-ink); }
.ntlp-go { flex: none; min-width: 74px; min-height: 52px; border: none; border-radius: 14px; background: var(--ntl-ink); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; }
.ntlp-go.wide { width: 100%; font-family: var(--ntl-hand); font-size: 22px; background: #19c3b1; color: #06312c; }

/* ---- drawing and guessing ---- */
.ntlp-draw, .ntlp-guess { gap: 9px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ntlp-draw.arrive, .ntlp-guess.arrive { animation: ntlp-arrive .5s cubic-bezier(.2,1.1,.35,1) both; }
@keyframes ntlp-arrive { from { transform: translateX(-60px) rotate(-3deg); opacity: 0; } }
.ntlp-head { display: flex; align-items: center; gap: 10px; min-height: 58px; }
.ntlp-kind { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.ntlp-kind b { font-size: 36px; line-height: 1; transform: rotate(-2deg); }
.ntlp-kind span { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--label-2); }
.ntlp-clock .tclock:not(.bar) { width: 58px; height: 58px; }
.ntlp-clock .tclock b { font-size: 24px; }
.ntlp-clock .tclock .fg { stroke: var(--gold); }
.ntlp-clock .tclock.urgent .fg { stroke: #ff3b30; }
.ntlp-clock .tclock.urgent b { color: #ff3b30; animation: nd-urgent .5s ease-in-out infinite alternate; }
.ntlp-pens { display: flex; align-items: center; gap: 8px; }
.ntlp-pens > b { font-size: 14px; font-weight: 900; letter-spacing: .08em; color: #fff; background: var(--no); padding: 5px 9px; border-radius: 8px; animation: nd-urgent .4s ease-in-out infinite alternate; }
.ntlp-pens .tclock .fg { stroke: var(--no) !important; }
.ntlp-notimer { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--label-3); text-align: center; line-height: 1.1; }
.ntlp-prompt { display: flex; flex-direction: column; align-items: center; background: var(--ntl-ink); color: #fff; border-radius: 16px; padding: 7px 14px 9px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.ntlp-prompt small { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.ntlp-prompt b { font-size: min(34px, calc(560px / var(--len))); line-height: 1.1; text-align: center; }
.ntlp-sheet { width: min(100%, max(250px, calc(100dvh - 360px))); margin: 0 auto; --coil-h: 22px; --ring-w: 7px; }
.ntlp-sheet.small { width: min(100%, max(230px, calc(100dvh - 380px))); }
.ntlp-paper { aspect-ratio: 1; }
.ntlp-paper .ntl-pnum { font-size: 52px; }
.ntlp-canvas { touch-action: none; cursor: crosshair; }
.ntlp-full { position: absolute; z-index: 3; left: 50%; top: 10px; transform: translateX(-50%); background: var(--no); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.ntlp-blank { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; font-size: 24px; color: rgba(22,23,26,.3); }
.ntlp-draw.sent .ntlp-paper { opacity: .7; }
.ntlp-draw.grace .ntlp-paper { box-shadow: 0 0 0 4px var(--no), 0 14px 30px rgba(40,30,10,.28); }
.ntlp-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ntlp-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; border: none; border-radius: 14px; background: rgba(0,0,0,.3); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.ntlp-tool svg { width: 30px; height: 30px; }
.ntlp-tool .line { fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.ntlp-tool .ink { fill: #ffd23f; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.ntlp-tool .tip { fill: var(--ntl-ink); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.ntlp-tool .pad { fill: #ff8fa3; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.ntlp-tool.on { background: #fff; color: var(--ntl-ink); box-shadow: 0 0 0 3px #19c3b1, 0 6px 16px rgba(0,0,0,.25); }
.ntlp-tool:active { transform: scale(.96); }
.ntlp-done { width: 100%; min-height: 58px; border: none; border-radius: 16px; background: #19c3b1; color: #04302b; font-size: 22px; font-weight: 900; letter-spacing: .1em; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 10px 24px rgba(25,195,177,.35); }
.ntlp-done:active { transform: scale(.98); }
.ntlp-draw.sent .ntlp-done { opacity: .5; }
.ntlp-from { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--label-2); }
.ntlp-gform { display: flex; gap: 8px; }
.ntlp-gform input { flex: 1; min-width: 0; min-height: 58px; font-family: var(--ntl-hand); font-size: 24px; background: var(--ntl-paper); color: var(--ntl-ink); border-radius: 14px; }
.ntlp-gform input::placeholder { color: rgba(22,23,26,.35); }
.ntlp-gform .ntlp-done { width: auto; padding: 0 20px; font-size: 18px; }
.ntlp-guess.grace .ntlp-gform input { box-shadow: inset 0 0 0 3px var(--no); }

/* ---- waiting for the others ---- */
.ntlp-wait { flex: 1; align-items: center; text-align: center; gap: 14px; padding-top: 10px; }
.ntlp-mine { position: relative; width: min(64%, 240px); aspect-ratio: 1; background: var(--ntl-paper); border-radius: 14px; box-shadow: 0 2px 0 #e3ddd0, 0 4px 0 #d9d2c3, 0 14px 30px rgba(0,0,0,.28); display: flex; align-items: center; justify-content: center; transform: rotate(-3deg); animation: ntlp-sendoff .6s cubic-bezier(.2,1.2,.4,1) both; container-type: inline-size; }
@keyframes ntlp-sendoff { from { transform: rotate(-10deg) scale(.6); opacity: 0; } }
.ntlp-mine canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ntlp-mine span { color: var(--ntl-ink); padding: 0 10%; font-size: clamp(10cqw, calc(290cqw / var(--len)), 20cqw); line-height: 1.05; }
.ntlp-mine-n { position: absolute; right: 8%; bottom: 4%; font-family: var(--ntl-hand); font-size: 34px; color: transparent; -webkit-text-stroke: 1.5px rgba(22,23,26,.3); }
.ntlp-left { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ntlp-lh { font-size: 16px; font-weight: 800; }
.ntlp-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ntlp-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.3); border-radius: 999px; padding: 3px 12px 3px 3px; font-size: 14px; font-weight: 700; }
.ntlp-wait .ntlp-clock { width: 80%; }
.ntlp-wait .tclock.bar u { background: #19c3b1; }
.ntlp-wait .tclock.bar b { font-size: 20px; }
.ntlp-next { font-size: 14px; color: var(--label-2); max-width: 300px; line-height: 1.35; }

/* ---- the reveal ---- */
.ntlp-reveal { gap: 12px; }
.ntlp-rbody { display: flex; flex-direction: column; gap: 12px; }
.ntlp-rsheet { width: min(86%, 330px); margin: 0 auto; --coil-h: 20px; --ring-w: 6px; animation: ntlp-arrive .45s cubic-bezier(.2,1.1,.35,1) both; }
.ntlp-rpaper { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; container-type: inline-size; }
.ntlp-rpaper .ntl-ptag { font-size: 13px; }
.ntlp-rpaper .ntl-pnum { font-size: 44px; }
.ntlp-ptext { position: relative; z-index: 1; color: var(--ntl-ink); text-align: center; padding: 0 10%; line-height: 1.05; font-size: clamp(9cqw, calc(260cqw / var(--len)), 17cqw); transform: rotate(-3deg); }
.ntlp-ptext.word { border: 4px solid var(--ntl-ink); border-radius: 50%; padding: 8% 10%; transform: rotate(-2deg); }
.ntlp-by { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--label-2); }
.ntlp-by b { color: var(--text); }
.ntlp-by em { font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--ok); color: #fff; }
.ntlp-judge { display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,.28); border-radius: 16px; padding: 10px 12px; }
.ntlp-judge > span { font-size: 14px; font-weight: 700; text-align: center; }
.ntlp-judge > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ntlp-yn { min-height: 46px; border: none; border-radius: 12px; background: rgba(255,255,255,.1); color: var(--text); font-size: 15px; font-weight: 800; cursor: pointer; }
.ntlp-yn.on { background: #fff; color: var(--ntl-ink); box-shadow: 0 0 0 3px #19c3b1; }
.ntlp-flip { width: 100%; min-height: 60px; border: none; border-radius: 16px; background: linear-gradient(120deg, #ffd60a, #ffb000); color: #1b1b1b; font-size: 20px; font-weight: 900; cursor: pointer; box-shadow: 0 10px 26px rgba(255,190,0,.4), inset 0 -4px 0 rgba(0,0,0,.12); }
.ntlp-flip:active { transform: scale(.98); }
.ntlp-ends { position: relative; display: flex; flex-direction: column; gap: 10px; }
.ntlp-end { background: var(--ntl-paper); color: var(--ntl-ink); border-radius: 16px; padding: 10px 16px 14px; box-shadow: 0 3px 0 #e3ddd0, 0 10px 24px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 4px; }
.ntlp-end small { font-size: 11px; font-weight: 900; letter-spacing: .2em; color: rgba(22,23,26,.5); }
.ntlp-end b { font-size: min(36px, calc(600px / var(--len))); line-height: 1.05; }
.ntlp-end.last { transform: rotate(1deg); }
.ntlp-endstamp { position: relative; align-self: center; margin-top: 2px; transform: rotate(-4deg); border: 4px solid currentColor; border-radius: 10px; padding: 3px 10px; font-size: 22px; font-weight: 900; letter-spacing: .04em; background: rgba(255,255,255,.9); animation: ntlp-stamp .4s .4s cubic-bezier(.2,1.5,.4,1) both; }
.ntlp-endstamp.ok { color: var(--ok); } .ntlp-endstamp.no { color: var(--no); }
@keyframes ntlp-stamp { from { transform: rotate(-4deg) scale(2.2); opacity: 0; } }
.ntlp-pickh { font-size: 14px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--label-2); margin-top: 4px; }
.ntlp-pickgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ntlp-pickgrid.guesses { grid-template-columns: repeat(2, 1fr); }
.ntlp-pickpg { position: relative; aspect-ratio: 1; border: none; border-radius: 14px; background: var(--ntl-paper); color: var(--ntl-ink); box-shadow: 0 3px 0 #e3ddd0, 0 8px 18px rgba(0,0,0,.25); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 6px; container-type: inline-size; }
.ntlp-pickgrid.guesses .ntlp-pickpg { aspect-ratio: 2.2; }
.ntlp-pickpg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ntlp-pickpg span { font-size: clamp(9cqw, calc(240cqw / var(--len)), 16cqw); line-height: 1.05; }
.ntlp-pickgrid.guesses .ntlp-pickpg span { font-size: clamp(7cqw, calc(200cqw / var(--len)), 11cqw); }
.ntlp-pickpg i { position: absolute; right: -6px; bottom: -6px; }
.ntlp-pickpg.on { box-shadow: 0 0 0 4px var(--gold), 0 0 20px rgba(255,184,0,.6); }
.ntlp-pickpg.on::after { content: '★'; position: absolute; left: 6px; top: 2px; font-size: 22px; color: var(--gold); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ntlp-gain { align-self: center; font-size: 80px; color: var(--ok); animation: ntlp-pop .5s cubic-bezier(.2,1.5,.4,1) both; }

/* ---- the big moments ---- */
.ntlp-moment { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: radial-gradient(circle, rgba(25,195,177,.4), rgba(0,0,0,.6) 75%); animation: nup-moment 2.4s ease both; }
.ntlp-moment .big { font-size: 54px; line-height: 1; text-align: center; color: #fff; text-shadow: 3px 3px 0 var(--ntl-red), 6px 6px 0 rgba(0,0,0,.3); transform: rotate(-4deg); animation: nup-slam .5s cubic-bezier(.2,1.5,.4,1) both; }
.ntlp-moment .who { font-size: 17px; font-weight: 800; color: #fff; background: rgba(0,0,0,.5); padding: 8px 18px; border-radius: 999px; }

/* ---- light theme: kraft paper ---- */
[data-theme="light"] .ntlp-bar.idle, [data-theme="light"] .ntlp-tool, [data-theme="light"] .ntlp-chip, [data-theme="light"] .ntlp-judge { background: rgba(255,253,247,.85); box-shadow: 0 4px 14px rgba(80,55,15,.1); }
[data-theme="light"] .ntlp-tool.on { background: var(--ntl-ink); color: #fff; box-shadow: 0 0 0 3px #19c3b1, 0 6px 16px rgba(80,55,15,.2); }
[data-theme="light"] .ntlp-yn { background: rgba(80,60,20,.08); }
[data-theme="light"] .ntlp-yn.on { background: var(--ntl-ink); color: #fff; }
[data-theme="light"] .ntlp-bar.idle .tclock .fg { stroke: #b7791f; }
[data-theme="light"] .ntlp-clock .tclock .fg { stroke: #1b1b1b; }
[data-theme="light"] .ntlp-clock .tclock.urgent .fg { stroke: #ff3b30; }
[data-theme="light"] .ntlp-clock .tclock .bg { stroke: rgba(80,60,20,.14); }
[data-theme="light"] .ntlp-rank { color: #b7791f; }
