/* Friendly theme layer v2 (2026-11-19). Loaded after ui.css. Base colour tokens live in ui.css. */
:root {
  --head: "Bricolage Grotesque", "Noto Sans Devanagari", "Geist", ui-sans-serif, system-ui, sans-serif;
  --ok: #2f7d4f; --mid: #b7791f; --bad: #b42318; --dk: #7a5bc0; --skip: #7c6f62;
  --blob: var(--pa);
  --dur: 200ms;
}
@media (prefers-color-scheme: dark) {
  :root { --ok: #5fd19a; --mid: #f0b24a; --bad: #ff8a80; --dk: #b9a4f0; --skip: #968877; }
}
html { scroll-behavior: auto; }
body { background: var(--bg); position: relative; min-height: 100vh; overflow-x: hidden; }
h1, h2, h3, .brand, .drop-title, .state-label, .pnote-line, .score-label { font-family: var(--head); }
h1 { font-size: clamp(28px, 6vw, 38px); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-weight: 700; letter-spacing: -0.02em; }

/* warm paper + soft blobs tinted by the persona accent */
.blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; background: var(--blob); opacity: .16; filter: blur(70px); transition: background .4s; }
.blobs i:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -100px; animation: drift 22s ease-in-out infinite alternate; }
.blobs i:nth-child(2) { width: 360px; height: 360px; right: -100px; top: 30%; opacity: .12; animation: drift 28s ease-in-out infinite alternate-reverse; }
.blobs i:nth-child(3) { width: 300px; height: 300px; left: 25%; bottom: -140px; opacity: .1; animation: drift 25s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.08); } }
.wrap { position: relative; z-index: 1; max-width: 1080px; }
.wrap.narrow { max-width: 760px; }
#preparing, #live { max-width: 620px; margin-inline: auto; }

/* header, logo, mock pill */
.top { gap: 12px; border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
.top { flex-wrap: wrap; height: auto; min-height: 56px; padding-block: 8px; }
.brandmark { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; }
.brandmark .brand { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.logo { width: 28px; height: 28px; flex: none; }
.top-title { margin-left: auto; font-size: 14px; }
.pill { font-size: 12px; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--pa-soft); color: var(--fg); border: 1px solid var(--line-strong); white-space: nowrap; }
@media (max-width: 480px) { .top-title { display: none; } .pill { margin-left: auto; } }

.card, .stat, .item { background: var(--card); }
.stat, .item { box-shadow: var(--shadow); border-color: transparent; }
input, select, textarea { background: var(--card); height: 44px; }
textarea { height: auto; }
.btn { background: var(--pa); border-color: var(--pa); color: var(--on-pa); border-radius: 999px; height: 44px; font-weight: 600; gap: 8px; transition: transform 150ms ease, opacity 150ms, box-shadow 150ms; text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.ghost { background: var(--card); color: var(--fg); border-color: var(--line-strong); }
.btn.lg { height: 52px; font-size: 17px; padding: 0 26px; }
.btn.sm { height: auto; }
:focus-visible { outline-color: var(--pa); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--pa); }
.bar > i { background: var(--pa); }
.bar { height: 6px; border-radius: 6px; max-width: 360px; }
.banner { background: var(--bg-sub); }
.banner.warn { border-left-color: var(--pa); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.lab { font-size: 13px; color: var(--fg-2); margin-bottom: 8px; }
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ico { flex: none; }

/* motion */
.card, .stat, .fix, .how-steps li, .ready, .ctas { animation: fadeUp var(--dur) ease-out both; }
.stat:nth-child(2), .fix:nth-child(2), .how-steps li:nth-child(2) { animation-delay: 60ms; }
.stat:nth-child(3), .fix:nth-child(3), .how-steps li:nth-child(3) { animation-delay: 120ms; }
.stat:nth-child(4) { animation-delay: 180ms; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }

/* speech bubble */
.bubble { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; box-shadow: var(--shadow); text-align: left; }
.bubble p { font-size: 17px; line-height: 1.45; }
.bubble::before { content: ""; position: absolute; width: 16px; height: 16px; background: var(--card); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); left: -9px; top: 26px; }
.bubble .link { padding: 6px 0 0; font-size: 14px; }

/* start screen */
.hello { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
.hello-side { display: flex; align-items: center; gap: 14px; }
.hello-side .bubble { flex: 1; min-width: 0; }
.hello-face .avatar { --sz: 72px !important; animation: bob 4.5s ease-in-out infinite; }
.hello-face .avatar .eyes { animation-duration: 4.8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (min-width: 900px) {
  /* Examiner is a compact strip on top; the setup below uses the full page width. */
  .hello { gap: 28px; padding-top: 8px; }
  .hello-side { gap: 18px; }
  .hello-face .avatar { --sz: 84px !important; }
  .hello-side .bubble { max-width: 640px; }
  #start-face { display: none; }
}
@media (max-width: 899px) { .hero { text-align: left; } }
.hero { text-align: left; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 30px 20px 26px; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); color: var(--pa); transition: border-color var(--dur), background var(--dur), transform var(--dur); }
.drop:hover, .drop:focus-visible { border-color: var(--pa); background: var(--pa-soft); }
.drop strong, .drop span { color: var(--fg); }
.drop .muted { color: var(--fg-2); }
.drop .faint { color: var(--fg-3); }
.drop-title { font-size: 21px; letter-spacing: -0.02em; }
.doodle { width: 128px; height: auto; margin-bottom: 4px; overflow: visible; }
.doodle .sheet { transform-box: fill-box; transform-origin: center bottom; transition: transform var(--dur) ease; }
.drop:hover .s1, .drop:focus-visible .s1 { transform: translateY(-7px); }
.drop:hover .s2, .drop:focus-visible .s2 { transform: translate(5px, -3px) rotate(4deg); }
.drop:hover .s3, .drop:focus-visible .s3 { transform: translate(-5px, -2px) rotate(-4deg); }
.links { display: flex; justify-content: flex-start; gap: 8px 20px; flex-wrap: wrap; }
.link { background: none; border: 0; padding: 6px 4px; font: inherit; color: var(--pa); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 36px; }
.veil { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--pa) 18%, color-mix(in srgb, var(--bg) 82%, transparent)); backdrop-filter: blur(3px); pointer-events: none; animation: fadeIn var(--dur) ease-out both; }
@keyframes fadeIn { from { opacity: 0; } }
.veil-box { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 3px dashed var(--pa); border-radius: 28px; padding: 44px 40px; font-family: var(--head); font-size: 26px; font-weight: 700; background: var(--card); box-shadow: var(--shadow); max-width: 90vw; text-align: center; color: var(--fg); }
.veil-ico { width: 56px; height: 56px; color: var(--pa); animation: bob 1.2s ease-in-out infinite; }

/* how it works */
.how { margin-top: 36px; text-align: center; }
.how h2 { font-size: 22px; margin-bottom: 18px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: st; }
@media (min-width: 640px) { .how-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.how-steps li { counter-increment: st; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; border-radius: 18px; background: color-mix(in srgb, var(--card) 80%, transparent); border: 1px solid var(--line); color: var(--fg); }
.how-steps svg { width: 64px; height: 64px; color: var(--fg-2); }
.how-steps b { font-family: var(--head); font-size: 17px; }
.how-steps b::before { content: counter(st) ". "; color: var(--pa); }
.how-steps span { font-size: 14px; }
.private { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: var(--fg-2); font-size: 14px; }
.private svg { width: 18px; height: 18px; flex: none; }

/* staged checklist with ticks */
.stages { list-style: none; margin: 0; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-start; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.stages li { display: flex; align-items: center; gap: 8px; color: var(--fg-3); font-size: 14px; transition: color var(--dur); }
.stages li i { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-block; flex: none; transition: background var(--dur), border-color var(--dur); }
.stages li.active { color: var(--fg); font-weight: 500; }
.stages li.active i { border-color: var(--pa); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.stages li.done { color: var(--fg-2); }
.stages li.done i { background: var(--pa); border-color: var(--pa); animation: pop var(--dur) ease-out; }
.stages li.done i::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid var(--on-pa); border-width: 0 2px 2px 0; transform: rotate(45deg); }

.chips.pick .chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; color: var(--fg-2); background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; min-height: 36px; cursor: pointer; transition: background 150ms, border-color 150ms, transform 150ms; animation: pop var(--dur) ease-out both; }
.chips.pick.scroll { max-height: 264px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 2px; }
.chips.pick.scroll .chip { animation: none; }
.chips.pick .chip { max-width: 100%; }
.chips.pick .chip > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chips.pick .chip-all { font-weight: 600; }
.sec-more { align-self: flex-start; }
#sec-search { width: 100%; }
.chips.pick .chip:hover { border-color: var(--pa); }
.chips.pick .chip:active { transform: scale(.96); }
.chips.pick .chip .ico { color: var(--pa); }
.chips.pick .chip[aria-pressed="true"], .chips.pick .chip[aria-checked="true"] { background: var(--pa-soft); border-color: var(--pa); color: var(--fg); font-weight: 500; }

.adjust { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0; margin-top: 0; }
.adjust summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; color: var(--fg); font-size: 15px; }
.adjust summary::-webkit-details-marker { display: none; }
.adj-t { font-weight: 600; }
.adj-t::after { content: " \25BE"; color: var(--fg-3); }
.adjust[open] .adj-t::after { content: " \25B4"; }
.adj-sum { display: none; }
.adj-body { padding: 4px 18px 18px; }
.personas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .personas { grid-template-columns: repeat(4, 1fr); } }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 8px; font: inherit; color: var(--fg); background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: transform 150ms, border-color 150ms; }
.pcard:active { transform: scale(.97); }
.pcard:hover { border-color: var(--line-strong); }
.pcard[aria-checked="true"] { border-color: var(--pa); background: var(--pa-soft); }
.startcard { display: flex; align-items: center; gap: 16px; padding: 18px; }
.startcard .stack-sm > * + * { margin-top: 10px; }

/* avatar */
.avatar { position: relative; width: var(--sz, 120px); height: var(--sz, 120px); flex: none; --lvl: 0; }
.avatar svg, .avatar .pimg { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 3px var(--card), var(--shadow); }
.avatar .pimg { object-fit: cover; background: var(--pa-soft); }
.avatar .ring { position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--pa); opacity: 0; pointer-events: none; }
.avatar .mouth-open { opacity: 0; transform-box: fill-box; transform-origin: 50% 30%; transform: scaleY(.3); }
.avatar .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.avatar[data-state="listening"] .ring { animation: pulse 2.4s ease-out infinite; }
.avatar[data-state="speaking"] .ring { opacity: .55; transform: scale(calc(1 + var(--lvl) * .1)); }
.avatar[data-state="speaking"] .smile { opacity: 0; }
.avatar[data-state="speaking"] .mouth-open { opacity: 1; transform: scaleY(calc(.25 + var(--lvl) * .95)); }
.avatar[data-state="thinking"] .ring { border-style: dotted; opacity: .7; animation: spin 8s linear infinite; }
.avatar[data-state="listening"] svg, .avatar[data-state="thinking"] svg, .avatar[data-state="listening"] .pimg, .avatar[data-state="thinking"] .pimg { animation: breathe 4s ease-in-out infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.face { display: grid; place-items: center; }
.face.big .avatar { --sz: 120px; }
/* preparing / live: un-cropped 3D character; the torso fades out instead of ending in a hard edge (still and canvas share the mask) */
.stage-avatar .pimg, .stage-avatar .p3d { border-radius: 0; box-shadow: none; background: none; -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 97%); mask-image: linear-gradient(to bottom, #000 68%, transparent 97%); }
.stage-avatar .ring { display: none; }
.stage-avatar[data-state] .pimg { animation: none; }
.stage-avatar .p3d { position: absolute; inset: 0; opacity: 0; transition: opacity 180ms ease-out; pointer-events: none; }
.stage-avatar .p3d canvas { width: 100% !important; height: 100% !important; aspect-ratio: 1 / 1 !important; display: block; }
.stage-avatar.is3d .p3d { opacity: 1; }
.stage-avatar.is3d .pimg { visibility: hidden; }
.face.big .stage-avatar { --sz: 180px; }
.face.huge .avatar { --sz: min(190px, 48vw); }
.face.huge .stage-avatar { --sz: min(360px, 72vw); }
.pcard .avatar { --sz: 64px; }
.hero-card .avatar { --sz: 88px; }

/* preparing */
.prep { padding: 28px 20px 30px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.prep-art { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.flip { flex: none; width: 120px; height: 90px; overflow: visible; }
.flip .leaf { transform-box: fill-box; transform-origin: left center; animation: flipleaf 2.4s ease-in-out infinite; }
.flip .l2 { animation-delay: .8s; }
.flip .l3 { animation-delay: 1.6s; }
@keyframes flipleaf { 0% { transform: scaleX(1); opacity: 1; } 45% { transform: scaleX(-1); opacity: 1; } 60%, 100% { transform: scaleX(-1); opacity: 0; } }
.prep-steps { flex-direction: column; align-items: flex-start; gap: 12px; width: min(100%, 300px); padding: 16px 20px; box-shadow: none; background: var(--bg-sub); }
.tip { min-height: 3em; max-width: 420px; color: var(--fg-2); font-size: 16px; padding: 10px 16px; border-radius: 14px; background: var(--pa-soft); color: var(--fg); animation: fadeIn var(--dur) ease-out; }

/* live */
.stage { position: relative; padding-top: 12px; gap: 12px; isolation: isolate; }
.stage::before { content: ""; position: absolute; inset: -10px -16px; z-index: -1; border-radius: 32px; background: radial-gradient(60% 55% at 50% 22%, var(--pa-soft), transparent 72%); }
.stage[data-state="listening"]::before { background: radial-gradient(60% 55% at 50% 22%, color-mix(in srgb, var(--pa) 22%, transparent), transparent 72%); }
.face-wrap { position: relative; display: grid; place-items: center; padding: 26px; }
.rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rings i { grid-area: 1 / 1; width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--pa); opacity: 0; transition: opacity var(--dur); }
.stage[data-state="speaking"] .rings i { opacity: .5; }
.stage[data-state="speaking"] .rings i:nth-child(1) { transform: scale(calc(.8 + var(--lvl, 0) * .12)); }
.stage[data-state="speaking"] .rings i:nth-child(2) { transform: scale(calc(.9 + var(--lvl, 0) * .18)); opacity: .32; }
.stage[data-state="speaking"] .rings i:nth-child(3) { transform: scale(calc(1 + var(--lvl, 0) * .24)); opacity: .18; }
.state-label { font-size: 21px; font-weight: 700; }
.cue { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 18px; border-radius: 999px; background: var(--pa); color: var(--on-pa); font-weight: 600; opacity: 0; transform: scale(.92); transition: opacity var(--dur), transform var(--dur); visibility: hidden; }
.stage[data-state="listening"] .cue { opacity: 1; transform: none; visibility: visible; }
.mic-ring { display: flex; align-items: center; gap: 3px; height: 30px; --mic: 0; }
.mic-ring i { width: 4px; border-radius: 3px; background: var(--on-pa); height: calc(6px + var(--mic) * 22px * var(--f, 1)); transition: height 90ms linear; }
.mic-ring i:nth-child(1), .mic-ring i:nth-child(5) { --f: .55; }
.mic-ring i:nth-child(2), .mic-ring i:nth-child(4) { --f: .85; }
.cue-t { font-size: 15px; }
.timer { font-size: 28px; }
.dots-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 12px; }
.dots-row i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent; transition: background var(--dur); }
.dots-row i.done { background: var(--pa); border-color: var(--pa); }
.dots-row i.now { border-color: var(--pa); box-shadow: 0 0 0 3px var(--pa-soft); }
.meta .chip { background: var(--card); border-color: var(--line); }
.big-bubble { min-height: 96px; margin-top: 18px; border-top: 1px solid var(--line); }
.big-bubble::before { left: 50%; top: -9px; margin-left: -8px; }
.cap-role { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }
.cap-text { font-size: 17px; margin-top: 2px; }
.hints { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hints li { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-strong); color: var(--fg-2); }

/* ===== Report (compact redesign) ===== */
.rp-head { margin-bottom: 22px; }
.rp-head-row { display: flex; align-items: center; gap: 12px; }
.rp-head .face .avatar { --sz: 36px !important; }
.rp-head-txt { flex: 1; min-width: 0; }
.rp-title { font-size: 22px; line-height: 1.2; margin: 0; }
.rp-sub { margin: 2px 0 0; font-size: 14px; color: var(--fg-2); overflow-wrap: anywhere; }
.rp-score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.rp-pct { font-family: var(--head); font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--pa); }
.rp-pct-l { font-size: 13px; color: var(--fg-2); max-width: 130px; }
.rp-note { margin: 12px 0 0; font-size: 14px; color: var(--fg-2); }
.rp-from { color: var(--fg-3); }
.rp-stats { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--fg); }
.rp-stats .sep { color: var(--fg-3); }
.rp-sec { margin-top: 26px; }
.rp-sec .sec-h h2 { font-size: 18px; }
.rp-fix { list-style: none; counter-reset: fx; margin: 0; padding: 0; display: grid; gap: 12px; }
.rp-fix li { counter-increment: fx; position: relative; padding-left: 32px; display: flex; flex-direction: column; gap: 3px; }
.rp-fix li::before { content: counter(fx); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--pa-soft); color: var(--fg); border: 1px solid var(--pa); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.rp-fix-pt { font-weight: 600; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.rp-tag { font-size: 12px; color: var(--fg-2); overflow-wrap: anywhere; }
.rp-item-top .rp-tag { padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; }
.rp-items { display: grid; gap: 8px; }
.rp-item { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm, 10px); background: var(--card); }
.rp-item.v-correct { border-left-color: var(--ok); }
.rp-item.v-partial { border-left-color: var(--mid); }
.rp-item.v-wrong { border-left-color: var(--bad); }
.rp-item.v-dont_know { border-left-color: var(--bad); }
.rp-item.v-skipped { border-left-color: var(--skip); }
.rp-item-head { list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: start; padding: 12px 14px; cursor: pointer; font-size: 15px; }
.rp-item-head::-webkit-details-marker { display: none; }
.rp-item-head:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; border-radius: 8px; }
.rp-item-head > .ico { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--fg-3); transition: transform var(--dur); }
.rp-item[open] > .rp-item-head > .ico { transform: rotate(180deg); }
.rp-item-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.rp-item-no { color: var(--fg-2); font-weight: 600; }
.rp-item-q { font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.rp-item-body { padding: 0 14px 14px; font-size: 14px; }
.rp-item-body .row { margin-top: 10px; }
.rp-item-body .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-2); margin-bottom: 3px; }
.rp-item-body .quote, .rp-item-body ul.pts { overflow-wrap: anywhere; }
.rp-item-body ul.pts li.ok::before { content: "+"; color: var(--ok); }
.rp-item-body ul.pts li.no::before { content: "\2212"; color: var(--bad); }
.rp-item-body ul.pts li:not(.ok):not(.no)::before { content: "\00b7"; color: var(--fg-3); }
.rp-item-body .tags { margin-top: 12px; color: var(--fg-2); }
.tr-d { margin-top: 10px; }
.tr-d > summary { cursor: pointer; color: var(--fg-2); }
.tr-d > summary:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; }
.vpill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 14%, var(--card)); white-space: nowrap; }
.vpill .vmark { font-weight: 700; }
.vpill.correct { color: var(--ok); }
.vpill.partial { color: var(--mid); }
.vpill.wrong { color: var(--bad); }
.vpill.skipped, .vpill.unmarked { color: var(--fg-2); border-style: dashed; }
.ready-list { display: grid; gap: 10px; }
.ready-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; font-size: 14px; }
.ready-name { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.hbar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .7s ease-out; }
.ready.shaky .hbar i { background: var(--mid); }
.ready.weak .hbar i { background: var(--bad); }
.stack-bar { display: flex; gap: 3px; height: 10px; }
.stack-bar .seg { display: block; flex-basis: 0; min-width: 8px; border-radius: 4px; }
.seg.correct, .sw.correct { background: var(--ok); }
.seg.partial, .sw.partial { background: var(--mid); }
.seg.wrong, .sw.wrong { background: var(--bad); }
.seg.dont_know, .sw.dont_know { background: var(--dk); }
.seg.skipped, .sw.skipped { background: var(--skip); }
.seg.unmarked, .sw.unmarked { background: var(--line-strong); }
.legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.badge { background: var(--card); }
.badge.correct::before, .badge.strong::before { background: var(--ok); border-color: var(--ok); }
.badge.partial::before, .badge.shaky::before { background: var(--mid); border-color: var(--mid); }
.badge.wrong::before, .badge.weak::before { background: var(--bad); border-color: var(--bad); }
.badge.wrong, .badge.weak { border-color: var(--bad); }
.rp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.rp-ctas .err { flex: 0 0 100%; margin: 0; }
.rp-ai { margin: 22px 0 0; font-size: 12px; color: var(--fg-2); line-height: 1.5; }
@media (max-width: 480px) { .rp-ctas .btn { flex: 1 1 100%; } .rp-pct-l { max-width: 100px; } }
@media (max-width: 420px) { .startcard { flex-direction: column; text-align: center; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .avatar .eyes, .avatar svg, .avatar .pimg, .avatar .ring { animation: none !important; }
  .avatar[data-state="speaking"] .mouth-open { transform: scaleY(.6); }
  .avatar[data-state="speaking"] .ring { transform: none; }
  .rings i { transform: none !important; }
  .mic-ring i { height: 14px; }
  .blobs i { transform: none; }
}

/* ---- account menu and sign-in card ---- */
.acct { position: relative; margin-left: 8px; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--fg); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.acct-btn:focus-visible, .acct-item:focus-visible, .gbtn:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; }
.acct-pic { width: 32px; height: 32px; border-radius: 50%; background: var(--pa-soft); color: var(--pa); display: inline-grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.acct-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: 8px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 20; display: grid; gap: 4px; }
.acct-menu[hidden] { display: none; }
.acct-mail { padding: 6px 10px; overflow-wrap: anywhere; }
.acct-item { text-align: left; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--fg); font: inherit; cursor: pointer; }
.acct-item:hover { background: var(--pa-soft); }
.signin { padding: 24px; }
.signin[hidden] { display: none; }
.gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font: inherit; font-weight: 500; font-size: 16px; cursor: pointer; width: 100%; max-width: 320px; }
.gbtn svg { width: 20px; height: 20px; flex: none; }
.gbtn:hover { background: #f8f9fa; }
.gbtn:disabled { opacity: .6; cursor: progress; }
@media (max-width: 480px) { .top .pill { margin-left: 0; } .top .acct { margin-left: auto; } .acct-name { max-width: 9ch; } }


/* ---- redesign 2026-11-20 ---- */
:lang(hi), :lang(hi) body { line-height: 1.8; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(hi) .brand, :lang(hi) .drop-title, :lang(hi) .state-label, :lang(hi) .score-label { line-height: 1.45; letter-spacing: 0; }
:lang(hi) .btn, :lang(hi) .chip, :lang(hi) .gbtn, :lang(hi) .hints li { line-height: 1.6; }
.err { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-bottom: 120px; }
.lead { font-size: 17px; color: var(--fg); }
.signin { max-width: 520px; padding: 24px 20px; }
.signin .private { justify-content: flex-start; margin-top: 4px; }
.strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.strip li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 12px; background: var(--bg-sub); }
.strip b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pa); color: var(--on-pa); font-size: 14px; }
.gbtn { min-height: 52px; max-width: none; font-size: 17px; }
.step-h { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.step-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--pa-soft); color: var(--fg); border: 1px solid var(--pa); font-size: 14px; }
.chips.pick .chip { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.chips.pick .chip[aria-pressed="true"]::before, .chips.pick .chip[aria-checked="true"]::before { content: "\2713"; color: var(--pa); font-weight: 700; }
.links .link { min-height: 44px; display: inline-flex; align-items: center; }
.drop { padding: 36px 20px 30px; border-radius: var(--radius); }
.card, .bubble, .adjust, .how-steps li { border-radius: var(--radius); }
.top-title { display: none; }
.start-sum { font-size: 15px; color: var(--fg-2); }
.startcard { box-shadow: var(--shadow); }
@media (max-width: 899px) {
  .startcard { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 30; }
  .startcard #start-face { display: none; }
  .startcard .stack-sm > * + * { margin-top: 6px; }
}
@media (max-width: 420px) { .startcard { flex-direction: row; text-align: left; } }
/* live: focus layout */
#live { min-height: calc(100vh - 120px); display: flex; flex-direction: column; justify-content: center; }
.hints { margin-top: 10px; }
.hints li { min-height: 32px; display: inline-flex; align-items: center; }
.actions { margin-top: 16px; }
#end { min-width: 200px; height: 56px; font-size: 17px; border-color: var(--bad); color: var(--bad); }
#end::before { content: "\25A0"; font-size: 12px; margin-right: 8px; }
/* ===== end Report ===== */
#live { min-height: calc(100vh - 120px); display: flex; flex-direction: column; justify-content: center; }
.hints { margin-top: 10px; }
.hints li { min-height: 32px; display: inline-flex; align-items: center; }
.actions { margin-top: 16px; }
#end { min-width: 200px; height: 56px; font-size: 17px; border-color: var(--bad); color: var(--bad); }
#end::before { content: "\25A0"; font-size: 12px; margin-right: 8px; }
@media (max-width: 480px) { .btn.lg { width: 100%; } .ctas .btn { width: 100%; } }
.signin .lead + .strip { margin-top: 16px; }
.signin .strip + .gbtn { margin-top: 16px; }
.signin > .private { margin-top: 14px; }
@media (max-width: 899px) {
  .face.huge .avatar { --sz: min(150px, 40vw); }
  .face.huge .stage-avatar { --sz: min(270px, 70vw); }
  #live { justify-content: flex-start; padding-bottom: 90px; }
  #live .actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); z-index: 30; }
  #live .actions .btn { width: 100%; }
}

@media (max-width: 640px) { .wrap { padding-bottom: 200px; } }

/* Empty / busy phase: only step 1 (drop zone), centred below the header. */
#setup[data-phase="empty"], #setup[data-phase="busy"] { min-height: calc(100vh - 180px); min-height: calc(100dvh - 180px); display: flex; flex-direction: column; justify-content: center; }
#setup[data-phase="empty"] .hello, #setup[data-phase="busy"] .hello { grid-template-columns: 1fr; width: 100%; max-width: 720px; margin: 0 auto; }
#setup[data-phase="empty"] .hello-side, #setup[data-phase="busy"] .hello-side,
#setup[data-phase="empty"] .hero, #setup[data-phase="busy"] .hero,
#setup[data-phase="empty"] .links, #setup[data-phase="busy"] .links,
#setup[data-phase="empty"] #paste, #setup[data-phase="busy"] #paste,
#setup[data-phase="empty"] #material, #setup[data-phase="empty"] #after,
#setup[data-phase="busy"] #material, #setup[data-phase="busy"] #after,
#setup[data-phase="empty"] #how, #setup[data-phase="empty"] #setup-err:empty { display: none !important; }
#setup[data-phase="empty"] #stages { display: none; }
#setup[data-phase="empty"] .step-h, #setup[data-phase="busy"] .step-h { justify-content: center; }
#setup[data-phase="empty"] .drop, #setup[data-phase="busy"] .drop { padding-block: clamp(36px, 8vh, 72px); }

/* Examiner picker under the drop zone: empty phase only. */
.epick { display: none; }
#setup[data-phase="empty"] .epick { display: block; width: 100%; margin-top: 10px; }
.epick .lab { text-align: center; font-size: 13px; color: var(--fg-3, var(--muted)); margin-bottom: 8px; }
.epersonas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .epersonas { grid-template-columns: repeat(4, 1fr); } }
.ecard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 10px 8px 12px; font: inherit; color: var(--fg); background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: transform 150ms, border-color 150ms, background 150ms; }
.ecard:active { transform: scale(.97); }
.ecard:hover { border-color: var(--line-strong); }
.ecard .avatar { --sz: 56px; margin-bottom: 4px; }
.ecard .small { font-size: 12px; line-height: 1.3; }
.ecard[aria-pressed="true"] { border-color: var(--pa); background: var(--pa-soft); box-shadow: 0 0 0 2px var(--pa); }
.ecard .echeck { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; line-height: 1; background: var(--pa); color: var(--on-pa, #fff); }
@media (max-width: 640px) {
  #setup[data-phase="empty"] { justify-content: flex-start; padding-top: 4px; min-height: 0; }
  #setup[data-phase="empty"] .drop { padding-block: 16px 14px; }
  #setup[data-phase="empty"] .drop .doodle { width: 84px; }
  #setup[data-phase="empty"] .drop-title { font-size: 19px; }
  .ecard { padding: 8px 6px 10px; }
  .ecard .avatar { --sz: 46px !important; margin-bottom: 2px; }
  .ecard .small { font-size: 11.5px; }
}

/* Sign-in modal and header button */
.dlg { border: 1px solid var(--line-strong); border-radius: 20px; padding: 26px 22px; background: var(--card); color: var(--fg); width: min(440px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.dlg::backdrop { background: rgba(20,16,30,.5); }
.dlg .signin { max-width: none; padding: 0; text-align: center; }
.dlg .signin h1 { font-size: 24px; margin: 0; }
.dlg .private { justify-content: center; margin-top: 0; }
.dlg .gbtn { width: 100%; min-height: 56px; font-size: 18px; }
.dlg .link { align-self: center; min-height: 44px; }
.pending { margin: 0; padding: 8px 14px; border-radius: 12px; background: var(--pa-soft); font-weight: 600; overflow-wrap: anywhere; }
.pending[hidden] { display: none; }
.signin-top { min-height: 40px; }

/* ===== Library (library.html) ===== */
.lib-link { margin-left: auto; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.lib-link + .acct { margin-left: 8px; }
.back-lib { margin: 0 0 12px; }
.back-lib .btn { text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.lib-h1 { margin: 8px 0 0; }
.lib h2 { margin: 0 0 12px; font-size: 18px; }
.lib-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lib-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.lib-body { flex: 1 1 220px; min-width: 0; }
.lib-title { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }
.lib-meta { margin: 2px 0 0; }
.lib-score { margin: 4px 0 0; font-weight: 600; color: var(--pa); }
.lib-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.lib-acts .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.lib-card > .small { flex-basis: 100%; margin: 0; }
.lib-empty { display: grid; gap: 12px; justify-items: start; }
.lib-empty .btn { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.lib-card .btn:focus-visible, .lib-link:focus-visible, .back-lib .btn:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; }
@media (max-width: 480px) { .lib-link { padding-inline: 10px; } .lib-acts { width: 100%; } .lib-acts .btn { flex: 1 1 auto; justify-content: center; } }

/* Mastery map */
:root { --m-none: #2A221D; --m-none-fg: #E4D8CC; --m-weak: #C9612F; --m-weak-fg: #1A0E07; --m-mid: #8A6A4F; --m-mid-fg: #FFF6EE; --m-good: #5E9FD0; --m-good-fg: #0D1A24; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line-strong); }
.suggest { background: var(--bg-sub); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.suggest .lab { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-2); }
.suggest .sg-title { font-family: var(--head); font-weight: 700; font-size: 17px; color: var(--fg); }
.suggest .srow { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest .srow [aria-pressed="true"] { border-color: var(--pa); }
.mmap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 900px) { .mmap { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mmap.scroll { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding: 3px; }
@media (max-width: 480px) { .mmap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { text-align: left; font: inherit; border: 1px solid transparent; border-radius: 12px; padding: 9px 9px 8px; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; gap: 3px; cursor: pointer; outline: 0 solid transparent; transition: outline-width 80ms; }
.tile:focus-visible { outline: 3px solid #F4EDE6; outline-offset: 2px; }
.tile[aria-pressed="true"] { outline: 3px solid #F4EDE6; outline-offset: 1px; }
.t-range { font-family: var(--head); font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.t-sub { font-size: 11px; line-height: 1.3; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-note { font-size: 11px; font-weight: 600; }
.tile.m-none { background: var(--m-none); color: var(--m-none-fg); border-color: #3F342C; }
.tile.m-weak { background: var(--m-weak); color: var(--m-weak-fg); }
.tile.m-mid { background: var(--m-mid); color: var(--m-mid-fg); }
.tile.m-good { background: var(--m-good); color: var(--m-good-fg); }
.sw.m-none, .pbar .m-none { background: var(--m-none); } .sw.m-weak, .pbar .m-weak { background: var(--m-weak); }
.sw.m-mid, .pbar .m-mid { background: var(--m-mid); } .sw.m-good, .pbar .m-good { background: var(--m-good); }
.mfoot { display: flex; flex-direction: column; gap: 6px; }
.pbar { height: 8px; border-radius: 4px; background: var(--m-none); overflow: hidden; display: flex; }
