/* The player's phone: one column, full screen, thumb-sized controls. */
.app{max-width:520px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;
  padding-left:max(16px, env(safe-area-inset-left, 0px));padding-right:max(16px, env(safe-area-inset-right, 0px));
  padding-top:env(safe-area-inset-top, 0px);padding-bottom:env(safe-area-inset-bottom, 0px)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:14px 6px}
.view{flex:1;display:flex;flex-direction:column;gap:16px;padding-block:10px 24px}
.push{margin-top:auto}

.game-title{font-size:40px;line-height:1.1;font-weight:700;margin:2px 0 0}
.lead{margin:0;color:var(--muted)}
.example{background:var(--surface-2);border:1px solid var(--line);border-radius:22px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.example .chart{height:170px;width:auto;flex:none}
.example-tag{display:flex;flex-direction:column;gap:8px;min-width:0;color:var(--muted);font-size:12px;line-height:1.3}
.ex-forms{display:flex;flex-direction:column;align-items:flex-start;gap:6px;color:var(--azure-text)}
.ex-forms .num{font-size:28px;font-weight:700;line-height:1.05}
.ex-name{display:flex;flex-direction:column}
.ex-name b{font-size:15px;color:var(--ink);font-weight:600}
.ex-name small{font-size:12px;color:var(--muted)}
.rules{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:14px}
.rules li{display:flex;align-items:flex-start;gap:8px}
.dot{width:10px;height:10px;border-radius:50%;flex:none;margin-top:.45em}
.dot.good{background:var(--good)} .dot.bad{background:var(--bad)} .dot.lvl{background:var(--azure)}

/* the try */
.play{gap:12px;user-select:none;-webkit-user-select:none}
.hud{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:8px}
.hud-item{display:flex;flex-direction:column;gap:4px}
.hud-item.end{align-items:flex-end}
.hud-label{font-size:12px;color:var(--muted)}
.hud-item b{font-size:28px;font-weight:600;line-height:1}
.hud-item.end.low b{color:var(--bad);animation:lastSeconds 1s ease-in-out infinite}
@keyframes lastSeconds{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
.target{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.target > span{font-size:13px;color:var(--muted);white-space:nowrap}
.target-box{height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--azure-text)}
.target-box.pop{animation:pop .22s ease-out}
@keyframes pop{from{transform:scale(.82);opacity:.4}to{transform:scale(1);opacity:1}}
.countdown.tick{animation:countdownPop .4s ease-out}
@keyframes countdownPop{from{transform:scale(1.5);opacity:.2}to{transform:scale(1);opacity:1}}
.tnum{font-size:68px;line-height:.95;font-weight:700}
.tname{font-size:22px;line-height:1.15;font-weight:700}
.tpos{font-size:15px;font-weight:500;color:var(--ink)}
.tname,.tpos,.ex-name{direction:ltr;unicode-bidi:isolate}
/* Palmer: the tooth's number inside the corner of the quadrant cross, as you face the patient */
.palmer{display:inline-block;direction:ltr;unicode-bidi:isolate;line-height:1;padding:.03em .16em}
.tnum.palmer{font-size:56px}
.palmer.q1{border-right:.07em solid;border-bottom:.07em solid}
.palmer.q2{border-left:.07em solid;border-bottom:.07em solid}
.palmer.q3{border-left:.07em solid;border-top:.07em solid}
.palmer.q4{border-right:.07em solid;border-top:.07em solid}
.bar-time{height:8px;border-radius:99px;background:var(--line);overflow:hidden}
.bar-time i{display:block;height:100%;width:100%;background:var(--azure);border-radius:99px}
.bar-time.low i{background:var(--bad)}
.chart-wrap{position:relative;touch-action:manipulation}
.chart{display:block;width:100%;height:auto;-webkit-tap-highlight-color:transparent;user-select:none;touch-action:manipulation}
.countdown{position:absolute;inset:0;display:grid;place-items:center;background:var(--veil);border-radius:20px;font-weight:800;font-size:110px;color:var(--azure-text)}
.floats{position:absolute;inset:0;pointer-events:none}
.float{position:absolute;transform:translate(-50%,-50%);font:700 19px var(--font-num);animation:floatUp .75s ease-out forwards;white-space:nowrap;direction:ltr;unicode-bidi:isolate}
.float.good{color:var(--good)} .float.bad{color:var(--bad)}
@keyframes floatUp{from{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,-170%)}}
.levelup{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max-content;max-width:90%;padding:10px 18px;border-radius:999px;background:var(--btn);color:var(--btn-ink);font-weight:600;font-size:15px;text-align:center;animation:lvl 1.4s ease-out forwards}
@keyframes lvl{0%{opacity:0;transform:translate(-50%,-30%)}15%{opacity:1;transform:translate(-50%,-50%)}75%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-50%,-50%)}}
.fdi-note{margin:0;text-align:center;font-size:12px;color:var(--muted)}

/* tooth chart */
.gum{fill:none;stroke:var(--gum);stroke-linecap:round;stroke-linejoin:round}
.tooth{cursor:pointer;outline:none}
.tooth .body{transform-box:fill-box;transform-origin:center}
.tooth rect{fill:var(--tooth);stroke:var(--tooth-line);stroke-width:1.2;transition:fill .12s ease, stroke .12s ease}
.tooth .groove{fill:none;stroke:var(--groove);stroke-width:1.2;stroke-linecap:round}
.tooth .cusp{fill:var(--groove)}
#chartIntro .tooth{cursor:default}
@media (hover:hover){#chartPlay .tooth:hover rect{fill:var(--azure-soft);stroke:var(--azure)}}
.tooth:focus-visible rect{stroke:var(--azure);stroke-width:3}
.tooth.is-hint rect{fill:var(--btn);stroke:var(--btn)}
.tooth.is-hint .groove{stroke:var(--btn-ink)} .tooth.is-hint .cusp{fill:var(--btn-ink)}
#chartPlay .tooth.is-good rect{fill:var(--good-soft);stroke:var(--good);stroke-width:2.4}
#chartPlay .tooth.is-bad rect{fill:var(--bad-soft);stroke:var(--bad);stroke-width:2.4}
#chartPlay .tooth.is-bad .body{animation:shake .32s ease-in-out}
#chartPlay .tooth.is-reveal rect{fill:var(--good-soft);stroke:var(--good);stroke-width:2.6;stroke-dasharray:4 3}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}

/* form */
.stack{display:flex;flex-direction:column;gap:14px}
.stack.tight{gap:4px}
.form-title{font-size:22px;margin:0;line-height:1.35}
/* new to Naab, or already have an account */
.seg{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line)}
.seg button{border:0;background:none;color:var(--muted);font-size:15px;font-weight:600;min-height:46px;padding:6px 10px;border-radius:999px;line-height:1.25}
.seg button[aria-selected="true"]{background:var(--btn);color:var(--btn-ink)}
.field{display:flex;flex-direction:column;gap:6px;border:0;padding:0;margin:0;min-width:0}
.field label,.field legend{font-size:13px;font-weight:500;color:var(--muted);padding:0}
.field legend{margin-bottom:6px}
input,select{height:50px;border-radius:14px;border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:0 14px;font:inherit;font-size:16px;width:100%}
input:focus,select:focus{outline:none;border-color:var(--azure);box-shadow:0 0 0 3px var(--azure-soft)}
[dir="rtl"] input[dir="ltr"]{text-align:right}
.role-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.role-opt{position:relative}
.role-opt input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.role-opt span{display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:14px;border:1px solid var(--line);background:var(--surface);font-size:15px;cursor:pointer;text-align:center;padding:6px 8px;line-height:1.3}
.role-opt input:checked + span{border-color:var(--azure);background:var(--azure-soft);color:var(--azure-text);font-weight:600}
.role-opt input:focus-visible + span{outline:3px solid var(--azure);outline-offset:2px}
.err{margin:0;padding:10px 12px;border-radius:12px;background:var(--bad-soft);color:var(--bad-ink);font-size:14px}
.fine{margin:0;font-size:12px;color:var(--muted)}
.muted{color:var(--muted);margin:0}

/* result */
.eyebrow{margin:0;font-size:14px;font-weight:600;color:var(--azure-text)}
.state-title{margin:0;font-size:26px;line-height:1.25}
.result{display:flex;align-items:center;gap:18px;padding:16px 18px;border-radius:20px;background:var(--surface);border:1px solid var(--line)}
.result .big{font-size:48px;font-weight:700;line-height:1;color:var(--azure-text)}
.result-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.result-meta .lbl{font-size:13px;color:var(--muted)}
.result-meta .acc{font-size:14px;color:var(--muted)}
/* the thank-you card: thanks for playing, and the reward goes on the Naab account */
.ticket{border-radius:24px;padding:24px 22px;display:flex;flex-direction:column;gap:8px;color:var(--on-sky);background:linear-gradient(155deg,var(--sky-2),var(--sky-1))}
.ticket-head{margin:0;font-size:24px;line-height:1.3;font-weight:700}
.ticket-for{margin:0;font-size:16px}
