/* École.piton.buzz — « cahier et surligneur ».
   The world of a classroom: lined notebook paper (the blue lines of a cahier Canada), blue ink, highlighter strokes,
   and the camera's viewfinder. The one bold device is the viewfinder + highlighter: it frames the brand, the code,
   the photo questions and, above all, the place in the page where each answer comes from.
   Light on purpose: projectors in lit classrooms wash out dark screens. */
@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&display=swap");

:root {
  --paper: #f6f8fc; --rule: #dfe6f3; --margin: #f4a7b4;
  --ink: #1b2559; --ink2: #4a5478; --mute: #838ba6; --line: #dde3ef; --card: #ffffff; --wash: #eef2fa;
  --blue: #3346e8; --blue-d: #2433c4; --hl: #ffe45c; --hl-soft: rgba(255, 228, 92, .42); --pink: #ff5fa2;
  --ok: #12a37a; --ko: #e5484d; --warn: #f2a516;
  --c0: #f0525a; --c1: #3a55f0; --c2: #ffc21a; --c3: #17b286;
  --r-s: 10px; --r: 16px; --r-l: 26px;
  --sh: 0 1px 0 rgba(27, 37, 89, .05), 0 12px 32px -14px rgba(27, 37, 89, .28);
  --sh-s: 0 1px 0 rgba(27, 37, 89, .06), 0 4px 12px -6px rgba(27, 37, 89, .22);
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 17px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background: var(--paper) linear-gradient(transparent 31px, var(--rule) 31px) 0 0 / 100% 32px; background-attachment: local; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0 0 .45em; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: 2.3rem; font-weight: 800; } h2 { font-size: 1.5rem; } h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.muted { color: var(--mute); } .small { font-size: .88rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 24px; }
::selection { background: var(--hl); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* a stroke of highlighter behind a few words (used once or twice per screen, never on every heading) */
.hl { background: linear-gradient(104deg, transparent .2em, var(--hl) .25em, var(--hl) calc(100% - .3em), transparent calc(100% - .2em)) 0 72% / 100% .55em no-repeat; padding: 0 .08em; }

/* ---------------- brand: a viewfinder with the « click » dot; « .piton.buzz » set smaller ---------------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.4rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.brand .tld { font-weight: 600; font-size: .62em; color: var(--blue); letter-spacing: -.01em; margin-left: -9px; align-self: flex-end; padding-bottom: .2em; }
.lens { --c: var(--ink); display: inline-block; width: 32px; height: 32px; position: relative; flex: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 11px 3.5px, linear-gradient(var(--c), var(--c)) 0 0 / 3.5px 11px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 11px 3.5px, linear-gradient(var(--c), var(--c)) 100% 0 / 3.5px 11px,
    linear-gradient(var(--c), var(--c)) 0 100% / 11px 3.5px, linear-gradient(var(--c), var(--c)) 0 100% / 3.5px 11px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 11px 3.5px, linear-gradient(var(--c), var(--c)) 100% 100% / 3.5px 11px;
  background-repeat: no-repeat; border-radius: 3px; }
.lens::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--hl); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: rgba(246, 248, 252, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }

/* ---------------- controls ---------------- */
button, .btn { font: 700 1rem/1.1 var(--font); border: 0; border-radius: 14px; padding: 12px 18px; cursor: pointer; background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line), 0 1px 0 rgba(27, 37, 89, .04); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; transition: transform .12s var(--ease), box-shadow .15s, background .15s, color .15s; -webkit-tap-highlight-color: transparent; }
button:hover, .btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink2), 0 1px 0 rgba(27, 37, 89, .04); }
button:active, .btn:active { transform: translateY(1px) scale(.99); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary { background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 6px 16px -8px rgba(51, 70, 232, .7); }
.primary:hover { background: var(--blue-d); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 20px -8px rgba(51, 70, 232, .8); }
.dark { background: var(--ink); color: #fff; box-shadow: none; }
.dark:hover { background: #26317a; box-shadow: none; }
.ghost { background: transparent; box-shadow: none; color: var(--ink2); }
.ghost:hover { background: rgba(27, 37, 89, .06); box-shadow: none; }
.big { font-size: 1.12rem; padding: 16px 24px; min-height: 58px; border-radius: 16px; }
.icon { padding: 10px; min-width: 46px; }
label { display: block; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=number], input:not([type]), select, textarea {
  width: 100%; font: 1rem var(--font); color: var(--ink); padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #c5cde0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(51, 70, 232, .14); }
textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }
.field { margin-bottom: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 8px 14px; min-height: 40px; border-radius: 999px; font-weight: 700; font-size: .95rem; }
.pill[aria-pressed=true] { background: var(--ink); color: #fff; box-shadow: none; }
.card { background: var(--card); border-radius: var(--r-l); box-shadow: var(--sh); padding: 22px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--wash); font-size: .82rem; font-weight: 700; color: var(--ink2); white-space: nowrap; }
.tag.hl-tag { background: var(--hl); color: var(--ink); }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; opacity: 0; pointer-events: none;
  transition: .3s var(--ease); z-index: 100; max-width: 90vw; text-align: center; box-shadow: var(--sh); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- the photo with the answer's place: viewfinder corners + highlighter, the rest of the page faded ---------------- */
.spot { position: relative; overflow: hidden; border-radius: var(--r); background: var(--wash); line-height: 0; box-shadow: var(--sh-s); }
.spot img { width: 100%; height: auto; display: block; }
.spot-box { --c: var(--blue); --k: 18px; --t: 4px; position: absolute; border-radius: 4px; mix-blend-mode: multiply;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--k) var(--t), linear-gradient(var(--c), var(--c)) 0 0 / var(--t) var(--k),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--k) var(--t), linear-gradient(var(--c), var(--c)) 100% 0 / var(--t) var(--k),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--k) var(--t), linear-gradient(var(--c), var(--c)) 0 100% / var(--t) var(--k),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--k) var(--t), linear-gradient(var(--c), var(--c)) 100% 100% / var(--t) var(--k),
    var(--hl-soft);
  background-repeat: no-repeat; box-shadow: 0 0 0 9999px rgba(246, 248, 252, .66); animation: frameIn .7s var(--ease) both; }
@keyframes frameIn { from { box-shadow: 0 0 0 9999px rgba(246, 248, 252, 0); transform: scale(1.12); opacity: 0; } }
.spot.small .spot-box { --k: 9px; --t: 2.5px; }
.crop { position: relative; overflow: hidden; border-radius: var(--r); background: var(--wash); width: 100%; aspect-ratio: 4/3; }
.crop img { position: absolute; height: auto; max-width: none; }

/* ---------------- landing ---------------- */
body.home { background-image: linear-gradient(90deg, transparent 63px, var(--margin) 63px, var(--margin) 65px, transparent 65px), linear-gradient(transparent 31px, var(--rule) 31px); background-size: 100% 100%, 100% 32px; }
.hero { display: grid; gap: 48px; grid-template-columns: 1.05fr .95fr; align-items: center; padding: 56px 0 40px; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1; letter-spacing: -.035em; margin-bottom: .35em; }
.hero .lead { font-size: 1.2rem; color: var(--ink2); max-width: 34em; }
.hero .cta { margin: 26px 0 30px; }
.scene { position: relative; padding: 18px 10px 40px 30px; }
.scene .page { position: relative; transform: rotate(-2.2deg); border-radius: 8px; box-shadow: 0 30px 60px -28px rgba(27, 37, 89, .55), 0 2px 0 rgba(27, 37, 89, .06); }
.scene .page .spot { border-radius: 8px; box-shadow: none; }
.scene .qcard { position: absolute; right: -6px; bottom: 0; width: min(330px, 78%); transform: rotate(1.6deg); background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--sh); }
.scene .qcard .q { font: 700 1.08rem/1.25 var(--display); margin-bottom: 10px; }
.scene .qcard .mini { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scene .qcard .mini span { border-radius: 10px; padding: 8px 10px; color: #fff; font-weight: 700; font-size: .9rem; display: flex; gap: 6px; align-items: center; }
.scene .qcard .mini span.c2 { color: #3b2c00; }
.scene .qcard .mini span.right { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ok); }
.join-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.join-card h2 { margin: 0; font-size: 1.25rem; }
.join-box { display: flex; gap: 10px; flex: 1; min-width: 260px; }
.join-box input { font: 800 1.45rem var(--display); letter-spacing: .32em; text-transform: uppercase; text-align: center; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 44px 0 30px; border-top: 2px solid var(--ink); }
.steps3 > div { padding: 18px 22px 8px 0; }
.steps3 > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.steps3 b { display: flex; align-items: baseline; gap: 10px; font: 700 1.2rem var(--display); margin-bottom: 6px; }
.steps3 b i { font-style: normal; font: 800 1.9rem/1 var(--display); color: var(--blue); }
.steps3 p { color: var(--ink2); }
.foot { padding: 28px 0 40px; color: var(--mute); font-size: .9rem; }
@media (max-width: 560px) { .top .ghost { display: none; } .top { padding: 12px 16px; } .wrap { padding: 16px; } }
@media (max-width: 860px) { .hero, .steps3 { grid-template-columns: 1fr; } .steps3 > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } body.home { background-image: linear-gradient(transparent 31px, var(--rule) 31px); background-size: 100% 32px; } .scene { padding-left: 6px; } }

/* ---------------- atelier ---------------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 10px 0 24px; }
.page-head h1 { margin: 0; flex: 1; }
.qz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.qz { display: flex; flex-direction: column; gap: 6px; padding: 14px; transition: transform .2s var(--ease), box-shadow .2s; }
.qz:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(27, 37, 89, .05), 0 18px 40px -16px rgba(27, 37, 89, .32); }
.qz .thumbs { display: flex; gap: 4px; height: 118px; overflow: hidden; border-radius: 14px; background: var(--wash); margin-bottom: 8px; }
.qz .thumbs img { height: 100%; flex: 1; min-width: 0; object-fit: cover; object-position: top; }
.qz h3 { margin: 2px 4px 0; font-size: 1.2rem; }
.qz .small { margin: 0 4px 8px; }
.qz .row { margin-top: auto; padding: 0 2px 2px; }
.qz.demo { background: var(--ink); color: #fff; }
.qz.demo h3 { color: #fff; } .qz.demo .small { color: #b7bee0; }
.qz.demo .thumbs { background: rgba(255, 255, 255, .08); }
.drop { border: 2px dashed #c7d0e4; border-radius: var(--r-l); padding: 34px 20px; text-align: center; background: rgba(255, 255, 255, .7); transition: border-color .2s, background .2s; }
.drop.over { border-color: var(--blue); background: #eef1ff; }
.drop .lens { --c: var(--blue); display: block; width: 54px; height: 54px; margin: 0 auto 12px; }
.drop .lens::after { inset: 18px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin-top: 16px; }
.shot { position: relative; border-radius: 14px; overflow: hidden; background: var(--wash); aspect-ratio: 3/4; box-shadow: var(--sh-s); animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot .x { position: absolute; top: 6px; right: 6px; min-height: 32px; min-width: 32px; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, .94); }
.shot .st { position: absolute; left: 6px; bottom: 6px; background: rgba(27, 37, 89, .82); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; line-height: 1.4; max-width: calc(100% - 12px); }
.gen-wait { text-align: center; padding: 48px 20px; }
.gen-wait .scan { width: 120px; height: 150px; margin: 0 auto 26px; position: relative; border-radius: 8px; background: #fff linear-gradient(transparent 13px, var(--rule) 13px) 0 6px / 100% 14px; box-shadow: var(--sh); overflow: hidden; }
.gen-wait .scan::after { content: ""; position: absolute; left: 0; right: 0; height: 26px; background: linear-gradient(transparent, var(--hl-soft), transparent); animation: scan 1.8s ease-in-out infinite alternate; }
@keyframes scan { from { top: -26px; } to { top: 150px; } }
.round-h { display: flex; align-items: center; gap: 10px; margin: 34px 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.round-h h3 { margin: 0; font-size: 1.3rem; }
.round-h .n { font: 800 1.3rem var(--display); color: var(--blue); }
.qc { display: grid; grid-template-columns: 116px 1fr auto; gap: 18px; align-items: start; padding: 16px; margin-bottom: 12px; border-radius: 20px; }
.qc .src { cursor: pointer; border-radius: 12px; transition: transform .15s var(--ease); }
.qc .src:hover { transform: scale(1.02); }
.qc .src .none { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--wash); border: 1.5px dashed #c7d0e4; border-radius: 12px; color: var(--mute); font-size: .85rem; text-align: center; padding: 10px; line-height: 1.25; }
.qc .qt { font: 700 1.12rem/1.3 var(--display); margin: 8px 0 8px; letter-spacing: -.01em; }
.qc .ans { color: var(--ok); font-weight: 700; }
.qc .ch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .94rem; color: var(--ink2); margin: 4px 0 6px; }
.qc .ch .good { color: var(--ok); font-weight: 700; }
.qc .why { font-size: .92rem; color: var(--ink2); margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--hl); }
.qc .acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.qc .acts button { min-height: 40px; padding: 8px 14px; font-size: .95rem; }
.qc .acts .row { justify-content: center; gap: 2px; }
.qc .acts .row button { min-width: 38px; padding: 6px; }
.qc.busy { opacity: .5; pointer-events: none; }
.qc form { display: grid; gap: 12px; }
.qc form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .qc { grid-template-columns: 1fr; } .qc .acts { flex-direction: row; flex-wrap: wrap; } .new-grid { grid-template-columns: 1fr !important; } }
.sticky-bar { position: sticky; bottom: 0; background: rgba(246, 248, 252, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 12px 24px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; z-index: 15; }
dialog { border: 0; border-radius: var(--r-l); padding: 24px; max-width: min(900px, 94vw); box-shadow: 0 40px 90px -20px rgba(27, 37, 89, .5); color: var(--ink); }
dialog::backdrop { background: rgba(27, 37, 89, .45); backdrop-filter: blur(3px); }
.boxer { position: relative; user-select: none; touch-action: none; cursor: crosshair; line-height: 0; max-height: 66vh; overflow: auto; border-radius: 12px; }
.boxer img { max-width: 100%; display: block; }
.boxer .bx { position: absolute; border: 3px solid var(--blue); background: var(--hl-soft); mix-blend-mode: multiply; pointer-events: none; border-radius: 4px; }

/* ---------------- the projected screen ---------------- */
body.stage { overflow-x: hidden; }
.stage-top { display: flex; align-items: center; gap: 18px; padding: 16px 28px; }
.stage-top .brand { gap: 0; }
.stage-top .prog { flex: 1; height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.stage-top .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #6a7bff); border-radius: 99px; transition: width .6s var(--ease); }
.stage-top .qn { font: 700 1.2rem var(--display); white-space: nowrap; letter-spacing: -.01em; }
.stage-top #codeTop { font: 800 1.2rem var(--display); letter-spacing: .14em; background: #fff; padding: 6px 12px; border-radius: 10px; box-shadow: var(--sh-s); }
.stage-top #codeTop:empty { display: none; }
.screen { min-height: calc(100vh - 150px); padding: 0 3.2vw 130px; display: flex; flex-direction: column; }
.screen.center { justify-content: center; padding-bottom: 110px; }
.screen.center > * { flex: none; }
.q-round { display: flex; justify-content: center; gap: 8px; margin-top: .6vh; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 700 1rem var(--font); padding: 5px 14px; border-radius: 999px; background: #fff; color: var(--ink2); box-shadow: var(--sh-s); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip.x2 { background: var(--pink); color: #fff; box-shadow: none; }
.q-title { font: 700 clamp(1.8rem, 3.5vw, 3.3rem)/1.12 var(--display); letter-spacing: -.025em; text-align: center; margin: 2.2vh auto 3vh; max-width: 1250px; text-wrap: balance; }
.q-media { display: flex; justify-content: center; margin-bottom: 3vh; }
.q-media .crop { width: min(62vw, 900px); box-shadow: var(--sh); outline: 6px solid #fff; }
.q-media .crop.fx-blur img { animation: fxBlur var(--dur, 30s) linear forwards; }
@keyframes fxBlur { from { filter: blur(28px) saturate(.4); } to { filter: blur(0); } }
.q-media .crop.fx-zoom img { animation: fxZoom var(--dur, 30s) cubic-bezier(.2, .6, .3, 1) forwards; transform-origin: var(--ox, 50%) var(--oy, 50%); }
@keyframes fxZoom { from { transform: scale(3.5); } to { transform: scale(1); } }
.tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(4, 1fr); }
.tiles i { background: var(--ink); border: 1px solid #2a3678; transition: opacity .6s, transform .6s var(--ease); }
.tiles i.off { opacity: 0; transform: scale(.6); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8vh 1.4vw; max-width: 1480px; width: 100%; margin: 0 auto; }
.choice { position: relative; display: flex; align-items: center; gap: 1.2vw; padding: 2vh 1.6vw 2vh 1.2vw; border-radius: 22px; color: #fff; font: 700 clamp(1.25rem, 2.2vw, 2.05rem)/1.18 var(--font);
  min-height: 11.5vh; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .14), 0 10px 24px -14px rgba(27, 37, 89, .6); transition: opacity .35s, transform .35s var(--ease), filter .35s; animation: rise .45s var(--ease) both; }
.choice:nth-child(2) { animation-delay: .06s; } .choice:nth-child(3) { animation-delay: .12s; } .choice:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.choice .sh { width: 2.1em; height: 2.1em; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; flex: none; font-size: .9em; }
.choice .ct { flex: 1; }
.choice .n { font: 800 .9em var(--display); background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 2px 14px; min-width: 2em; text-align: center; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); color: #3b2c00; } .c3 { background: var(--c3); }
.c2 .sh { background: rgba(59, 44, 0, .12); }
.choices.revealed .choice:not(.right) { opacity: .3; transform: scale(.97); filter: saturate(.4); }
.choices.revealed .choice.right { box-shadow: 0 0 0 6px var(--paper), 0 0 0 11px var(--ok), 0 18px 40px -16px rgba(18, 163, 122, .7); }
.choices.revealed .choice.right .sh { background: #fff; color: var(--ok); }
.choices.tf .choice { justify-content: center; font-size: clamp(1.7rem, 3.2vw, 2.8rem); min-height: 17vh; }
.order-list { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 1.4vh; width: min(920px, 100%); counter-reset: o; }
.order-list li { background: #fff; border-radius: 18px; padding: 2.1vh 24px; font: 700 clamp(1.15rem, 2vw, 1.75rem) var(--font); box-shadow: var(--sh-s); display: flex; gap: 18px; align-items: center; animation: rise .45s var(--ease) both; }
.order-list li:nth-child(2) { animation-delay: .06s; } .order-list li:nth-child(3) { animation-delay: .12s; } .order-list li:nth-child(4) { animation-delay: .18s; }
.order-list.answer li::before { counter-increment: o; content: counter(o); background: var(--ok); color: #fff; border-radius: 50%; width: 1.7em; height: 1.7em; display: grid; place-items: center; flex: none; font-family: var(--display); }
.big-answer { margin: 0 auto 2.6vh; text-align: center; background: #fff; border-radius: 26px; padding: 2.2vh 3.4vw 2.6vh; box-shadow: var(--sh); position: relative; animation: rise .5s var(--ease) both; }
.big-answer .lbl { font-weight: 700; color: var(--ok); font-size: 1.05rem; }
.big-answer .val { font: 800 clamp(1.9rem, 3.8vw, 3.4rem)/1.1 var(--display); letter-spacing: -.025em; }
.reveal-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.8vw; align-items: start; max-width: 1480px; margin: 1vh auto 0; width: 100%; }
.reveal-grid.nosrc { grid-template-columns: 1fr; max-width: 1000px; }
.why-card { background: #fff; border-radius: 26px; padding: 2.6vh 2.2vw; box-shadow: var(--sh); position: relative; overflow: hidden; }
.why-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--hl); }
.why-card .lbl { font: 700 1.05rem var(--display); color: var(--ink2); margin-bottom: 6px; }
.why-card .txt { font-size: clamp(1.15rem, 1.75vw, 1.6rem); line-height: 1.4; }
.src-card { text-align: center; }
.src-card .spot { display: inline-block; width: fit-content; max-width: 100%; vertical-align: top; }
.src-card .spot img { max-height: 52vh; width: auto; max-width: 100%; }
.src-card .lbl { font: 700 1rem var(--display); color: var(--ink2); margin: 0 0 8px; text-align: left; display: flex; align-items: center; gap: 8px; }
.src-card .lbl .lens { width: 20px; height: 20px; } .src-card .lbl .lens::after { inset: 6px; box-shadow: 0 0 0 2px var(--hl); }
.timer { position: fixed; right: 28px; top: 70px; width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; font: 800 2.3rem var(--display); z-index: 25; --p: 100;
  background: radial-gradient(circle, #fff 0 62%, transparent 63%), conic-gradient(var(--blue) calc(var(--p) * 1%), var(--rule) 0); box-shadow: var(--sh); }
.timer.low { color: var(--ko); background: radial-gradient(circle, #fff 0 62%, transparent 63%), conic-gradient(var(--ko) calc(var(--p) * 1%), var(--rule) 0); animation: tick 1s ease-in-out infinite; }
@keyframes tick { 50% { transform: scale(1.06); } }
.counter { text-align: center; font: 700 1.35rem var(--display); color: var(--ink2); margin-top: 2.4vh; }
.counter.prompt { font-size: 1.6rem; color: var(--ink); }
.buzz-state { text-align: center; margin: 2vh auto; }
.buzz-state .who { display: inline-flex; align-items: center; gap: 16px; background: #fff; padding: 2.2vh 3vw; border-radius: 26px; box-shadow: 0 0 0 6px var(--hl), var(--sh); font: 800 clamp(1.7rem, 3.2vw, 2.8rem) var(--display); animation: rise .4s var(--ease) both; }
.buzz-state .bell { font-size: 6rem; animation: ring 1.1s ease-in-out infinite; display: inline-block; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(13deg); } 75% { transform: rotate(-13deg); } }
.judge { display: flex; justify-content: center; gap: 16px; margin-top: 3vh; }
.judge .yes { background: var(--ok); color: #fff; box-shadow: none; } .judge .no { background: var(--ko); color: #fff; box-shadow: none; }
.typed { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1300px; margin: 0 auto 3vh; }
.typed .tw { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 7px 7px 7px 16px; font-weight: 700; font-size: 1.15rem; box-shadow: inset 0 0 0 2px var(--line); }
.typed .tw.ok { box-shadow: inset 0 0 0 2.5px var(--ok); color: #0b7a5a; }
.typed .tw.maybe { box-shadow: inset 0 0 0 2.5px var(--warn); background: #fff8e6; }
.typed .tw.no { color: var(--mute); }
.typed .tw button { min-height: 34px; min-width: 34px; padding: 4px 8px; font-size: .95rem; border-radius: 10px; }
.typed .tw .cnt { font-size: .85rem; background: var(--wash); color: var(--ink2); border-radius: 99px; padding: 1px 8px; }
.board { max-width: 980px; margin: 0 auto; width: 100%; display: grid; gap: 10px; }
.board .ln { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 1.4vh 24px; box-shadow: var(--sh-s);
  font: 700 clamp(1.15rem, 2vw, 1.75rem) var(--font); animation: rise .45s var(--ease) backwards; }
.board .ln .rk { font: 800 1.35em var(--display); color: var(--mute); text-align: center; }
.board .ln:nth-child(1) { box-shadow: 0 0 0 3px var(--hl), var(--sh-s); }
.board .ln:nth-child(1) .rk { color: var(--ink); }
.board .ln .sc { font: 800 1.05em var(--display); color: var(--blue); }
.board .ln .dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: 12px; vertical-align: middle; }
.headline { text-align: center; margin: 2vh auto 3.4vh; }
.headline .nm { font: 800 clamp(2.3rem, 5vw, 4.2rem)/1 var(--display); letter-spacing: -.035em; }
.headline .sub { font-size: 1.35rem; color: var(--ink2); margin-top: 1vh; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1.6vw; margin: 3vh auto 4vh; }
.podium .step { text-align: center; width: min(25vw, 290px); }
.podium .step .nm { font: 800 clamp(1.2rem, 2.3vw, 2.1rem)/1.1 var(--display); margin-bottom: 10px; }
.podium .step .blk { border-radius: 22px 22px 6px 6px; display: grid; place-items: center; color: #fff; font: 800 4.4rem var(--display); animation: grow .8s var(--ease) both; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.podium .p1 .blk { height: 34vh; background: var(--blue); animation-delay: .5s; box-shadow: 0 0 0 6px var(--hl); }
.podium .p2 .blk { height: 24vh; background: #6a7bff; animation-delay: .25s; }
.podium .p3 .blk { height: 17vh; background: #9aa6ff; }
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 4.5vw; align-items: center; max-width: 1400px; margin: 2vh auto; width: 100%; }
.lobby .codebox { text-align: center; background: #fff; padding: 3.4vh 3vw; border-radius: 30px; box-shadow: var(--sh); }
.lobby .url { font: 700 clamp(1.1rem, 1.7vw, 1.5rem) var(--font); color: var(--ink2); }
.lobby .code { --c: var(--blue); font: 800 clamp(4rem, 9.5vw, 8rem)/1 var(--display); letter-spacing: .1em; color: var(--ink); margin: 2vh 0 1vh; padding: 2.2vh 2.4vw 2.2vh 3.2vw;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 34px 6px, linear-gradient(var(--c), var(--c)) 0 0 / 6px 34px,
    linear-gradient(var(--c), var(--c)) 100% 0 / 34px 6px, linear-gradient(var(--c), var(--c)) 100% 0 / 6px 34px,
    linear-gradient(var(--c), var(--c)) 0 100% / 34px 6px, linear-gradient(var(--c), var(--c)) 0 100% / 6px 34px,
    linear-gradient(var(--c), var(--c)) 100% 100% / 34px 6px, linear-gradient(var(--c), var(--c)) 100% 100% / 6px 34px;
  background-repeat: no-repeat; }
.lobby #qr { display: flex; justify-content: center; margin-top: 1.6vh; } .lobby #qr img, .lobby #qr canvas { width: 200px; height: 200px; }
.lobby .side h2 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.people { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.people .pp { background: #fff; border-radius: 999px; padding: 10px 20px 10px 14px; font: 700 1.35rem var(--font); box-shadow: var(--sh-s); animation: pop .35s var(--ease) backwards; }
.people .pp:hover { text-decoration: line-through; text-decoration-color: var(--ko); }
.round-card { margin: auto; text-align: center; }
.round-card .num { font: 700 1.35rem var(--display); color: var(--blue); }
.round-card .nm { font: 800 clamp(3.4rem, 9vw, 8rem)/.95 var(--display); letter-spacing: -.045em; margin: 1.4vh 0 2.2vh; animation: rise .6s var(--ease) both; }
.round-card .nm span { background: linear-gradient(104deg, transparent .1em, var(--hl) .15em, var(--hl) calc(100% - .2em), transparent calc(100% - .1em)) 0 78% / 100% .42em no-repeat; }
.round-card .sub { font-size: 1.5rem; color: var(--ink2); }
.ctrl { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 12px 22px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); z-index: 30; transition: opacity .3s; flex-wrap: wrap; }
.ctrl.dim { opacity: .16; } .ctrl.dim:hover, .ctrl.dim:focus-within { opacity: 1; }
.ctrl .keys { color: var(--mute); font-size: .85rem; margin-left: auto; }
.ctrl kbd { background: var(--wash); border-radius: 6px; padding: 2px 7px; font: 700 .8rem var(--font); color: var(--ink2); box-shadow: inset 0 -1px 0 var(--line); }
#peek { background: var(--hl); color: var(--ink); }
.teams-mark { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 1vh auto 3vh; max-width: 1300px; }
.teams-mark button { font-size: 1.25rem; min-height: 64px; padding: 12px 26px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 3px var(--tc), var(--sh-s); color: var(--ink); }
.teams-mark button[aria-pressed=true] { background: var(--tc); color: #fff; box-shadow: 0 10px 22px -12px var(--tc); }
.teams-mark button[aria-pressed=true]::before { content: "✓"; }
.teams-mark .hint { width: 100%; text-align: center; font: 700 1.3rem var(--display); color: var(--ink2); }
.paused-badge { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 99px; font-weight: 700; z-index: 40; box-shadow: var(--sh); }
.setup { max-width: 920px; margin: 0 auto; padding: 24px; }
.setup h2 { margin-top: 30px; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-cards button { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; padding: 22px; min-height: 160px; gap: 8px; border-radius: 22px; }
.mode-cards button .ic { font-size: 2rem; line-height: 1; }
.mode-cards button b { font: 700 1.3rem var(--display); }
.mode-cards button span { font-weight: 400; color: var(--ink2); line-height: 1.4; }
.mode-cards button[aria-pressed=true] { box-shadow: inset 0 0 0 3px var(--blue), 0 12px 28px -16px rgba(51, 70, 232, .7); background: #f2f4ff; }
.team-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.team-edit .te { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 6px 6px 6px 12px; box-shadow: var(--sh-s); }
.team-edit .te i { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.team-edit .te input { border: 0; padding: 8px; box-shadow: none; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 400; background: #fff; padding: 14px 16px; border-radius: 14px; box-shadow: var(--sh-s); cursor: pointer; }
.check input { width: 22px; height: 22px; }
@media (max-width: 820px) { .lobby, .reveal-grid, .mode-cards { grid-template-columns: 1fr; } }

/* ---------------- the student's device ---------------- */
body.player { min-height: 100vh; }
#game:not([hidden]) { display: flex; flex-direction: column; flex: 1; }
#view { flex: 1; display: flex; flex-direction: column; }
.pl { max-width: 540px; margin: 0 auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; }
.pl-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 14px; gap: 10px; }
.pl-head .me { display: inline-flex; gap: 8px; align-items: center; background: #fff; padding: 7px 16px 7px 10px; border-radius: 99px; box-shadow: var(--sh-s); }
.pl-head #myScore { font: 800 1.1rem var(--display); color: var(--blue); }
.pl-center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; }
.pl-center .big-emoji { font-size: 4.5rem; line-height: 1; animation: pop .4s var(--ease); }
.join-head { text-align: center; margin: 4vh 0 2vh; }
.join-head h1 { font-size: 2rem; margin: 14px 0 4px; }
.pl-q { font: 700 1.3rem/1.25 var(--display); text-align: center; margin: 4px 0 16px; letter-spacing: -.015em; }
.pl-time { height: 6px; background: var(--rule); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.pl-time i { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .5s linear; }
.pl-choices { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; flex: 1; max-height: 64vh; margin-bottom: 8px; }
.pl-choices button { color: #fff; font-size: 1.08rem; line-height: 1.2; border-radius: 22px; min-height: 120px; padding: 14px; flex-direction: column; gap: 8px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }
.pl-choices button .sh { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .22); font-size: 1.2rem; }
.pl-choices button:active { transform: scale(.97); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.pl-choices.tf button { min-height: 210px; font-size: 1.6rem; }
.pl-choices button.c2 { color: #3b2c00; }
.av-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.av-grid button { font-size: 1.45rem; padding: 4px; min-height: 46px; border-radius: 12px; box-shadow: none; background: var(--wash); }
.av-grid button[aria-pressed=true] { background: #fff; box-shadow: inset 0 0 0 3px var(--blue); transform: scale(1.06); }
.buzzer { width: min(74vw, 320px); aspect-ratio: 1; border-radius: 50%; margin: 16px auto; font: 800 2.4rem var(--display); letter-spacing: .04em; color: #fff;
  background: radial-gradient(circle at 34% 28%, #ff9cc6, var(--pink) 50%, #d63a82); box-shadow: 0 0 0 10px #fff, 0 0 0 13px #f6c9dc, 0 14px 0 6px #b02a68, 0 30px 40px rgba(27, 37, 89, .3); }
.buzzer:active { transform: translateY(10px); box-shadow: 0 0 0 10px #fff, 0 0 0 13px #f6c9dc, 0 4px 0 6px #b02a68; }
.buzzer:disabled { background: radial-gradient(circle at 34% 28%, #eef1f8, #cdd4e4 60%); color: var(--ink2); box-shadow: 0 0 0 10px #fff, 0 0 0 13px var(--line), 0 14px 0 6px #aeb6c9; opacity: 1; }
.order-pick { display: grid; gap: 10px; }
.order-pick button { justify-content: flex-start; text-align: left; font-size: 1.05rem; min-height: 60px; border-radius: 16px; }
.order-pick button .o { width: 34px; height: 34px; border-radius: 50%; background: var(--wash); display: grid; place-items: center; flex: none; font-family: var(--display); }
.order-pick button.on { box-shadow: inset 0 0 0 2px var(--blue); }
.order-pick button.on .o { background: var(--blue); color: #fff; }
.result { border-radius: 28px; padding: 30px 22px; color: #fff; width: 100%; animation: pop .4s var(--ease); }
.result.ok { background: var(--ok); } .result.ko { background: var(--ko); } .result.neutral { background: var(--ink2); }
.result .t { font: 800 2.1rem/1.1 var(--display); letter-spacing: -.02em; } .result .p { font: 700 1.3rem var(--font); opacity: .95; margin-top: 6px; }
.rank-big { font: 800 5rem/1 var(--display); color: var(--blue); letter-spacing: -.04em; }
.rank-big sup { font-size: .4em; }
