:root{--ink:#192e55;--muted:#526582;--paper:#f7fbff;--orange:#ff8243;--orange-dark:#be451c;--line:#d8e5f5;--sage:#e5f7f0;--blue:#e9f3ff;--focus:#2355d6;--primary:#2355d6;--violet:#713bd0;--teal:#00845e;--coral:#eb3e72;--sun:#ffd146;--radius:24px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:4px solid var(--focus);outline-offset:5px}button{border:0;background:none}button,select,input[type=text],input[type=number]{min-height:46px}button{border-radius:12px}.wrap{max-width:1320px;margin:auto;padding:0 48px}.topbar{height:112px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:24px}.brands{display:flex;align-items:center;gap:23px;text-decoration:none;flex-shrink:0}.brands img{object-fit:contain;display:block}.utac-logo{width:90px;height:57px}.brand-divider{width:1px;height:34px;background:#cad4d4}.pim-logo{width:160px;height:82px}.nav{display:flex;gap:8px;align-items:center}.nav button{padding:12px 18px;font-size:14px;font-weight:650}.nav button.active{background:#e9f0ff}.icon{width:20px;height:20px;stroke:currentColor;stroke-width:1.8;fill:none;vertical-align:middle;flex-shrink:0}.nav .settings-button{border:1px solid #c8d8ef;display:flex;gap:9px;align-items:center;margin-left:14px}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.16em;font-weight:750;display:flex;align-items:center;gap:9px}.dot{width:6px;height:6px;background:#ff7058;border-radius:50%;display:inline-block}.hero{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center;padding:46px 0 38px}.hero h1{font-size:clamp(38px,4.2vw,59px);line-height:1.1;letter-spacing:-.052em;font-weight:680;margin:20px 0}.hero h1 em{font-style:normal;color:#713bd0}.hero p{font-size:16px;line-height:1.65;color:var(--muted);max-width:430px;margin:0 0 25px}.btn{padding:12px 19px;display:inline-flex;gap:10px;align-items:center;justify-content:center;font-weight:650;font-size:14px;border:1px solid #c8d8ef;background:#fff;min-height:48px}.btn.primary{background:var(--ink);color:white;border-color:var(--ink)}.btn.orange{background:var(--orange);color:#192e55;border-color:var(--orange)}.btn.small{min-height:38px;padding:8px 14px;font-size:12px}.btn:hover{filter:brightness(.96)}.hero-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap}.mini-note{font-size:12px;color:var(--muted)}.hero-art{position:relative;aspect-ratio:1.64;border-radius:120px 24px 24px 24px;overflow:hidden;background:#0b1f30;box-shadow:0 20px 50px -35px #102d42}.hero-art canvas{width:100%;height:100%;display:block}.hero-art .art-caption{position:absolute;bottom:20px;left:27px;color:#d6e5e4;display:flex;gap:12px;align-items:center;font-size:12px}.art-caption span{width:26px;height:26px;border:1px solid #ffffff40;border-radius:50%;display:flex;align-items:center;justify-content:center}.session-strip{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:17px 0;display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:12px}.session-strip strong{font-weight:650}.session-strip .connection{display:flex;gap:9px;align-items:center}.connection .dot{background:#00835d}.session-strip button{min-height:25px;font-size:12px;text-decoration:underline;text-underline-offset:4px}.library-head{padding:36px 0 21px;display:flex;justify-content:space-between;gap:20px;align-items:center}.library-head h2{font-size:25px;letter-spacing:-.035em;margin:0 0 6px;font-weight:650}.library-head p{margin:0;font-size:13px;color:var(--muted)}.filters{display:flex;border:1px solid var(--line);border-radius:12px;padding:4px;background:#fff}.filters button{font-size:12px;padding:9px 14px;min-height:35px;border-radius:8px}.filters button.active{background:var(--ink);color:white}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:23px}.card{background:white;border:1px solid #d8e5f5;border-radius:20px;overflow:hidden;position:relative;transition:transform .18s,box-shadow .18s}.card:hover{transform:translateY(-3px);box-shadow:0 13px 24px -20px #192e5555}.card.scan-target{outline:3px solid #2355d6;outline-offset:4px}.card-visual{height:206px;background:#e5f3ff;position:relative;overflow:hidden}.card canvas{display:block;width:100%;height:100%}.card-open{width:100%;text-align:left;padding:0;border-radius:0;display:block}.card-content{padding:20px 21px 21px}.card-meta{font-size:10px;font-weight:750;letter-spacing:.085em;text-transform:uppercase;color:#526582;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}.card h3{font-size:18px;font-weight:650;letter-spacing:-.025em;margin:0 0 8px}.card p{font-size:12px;line-height:1.65;color:var(--muted);margin:0;min-height:40px}.card-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:20px;font-size:11px;color:var(--muted)}.round-arrow{width:30px;height:30px;border-radius:50%;background:#e9f0ff;display:flex;align-items:center;justify-content:center;color:var(--ink)}.favorite{position:absolute;right:12px;top:12px;background:#ffffffef;width:36px;min-height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;z-index:2}.favorite .icon{width:17px;height:17px}.favorite.on svg{fill:#eb3e72;stroke:#bd2052}.quiet-card{background:#e8f8f4;border-radius:20px;padding:30px;display:flex;flex-direction:column;justify-content:center;min-height:350px}.quiet-card .kicker{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#00745b}.quiet-card h3{font-size:29px;font-weight:550;letter-spacing:-.04em;line-height:1.2;margin:19px 0}.quiet-card p{font-size:13px;line-height:1.7;color:#46647c;max-width:240px;margin:0 0 20px}.quiet-card button{align-self:flex-start}.footer{margin-top:50px;padding:22px 0 28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:11px;gap:20px}.footer button{font-size:11px;padding:0;min-height:20px;text-decoration:underline}.empty{grid-column:1/-1;padding:60px;text-align:center;color:var(--muted)}
.game-wrap{max-width:1500px;margin:auto;padding:0 28px}.game-wrap .topbar{height:86px}.game-wrap .utac-logo{width:70px;height:45px}.game-wrap .pim-logo{width:108px;height:53px}.game-title{font-size:14px;font-weight:650}.game-top-actions{display:flex;gap:8px;align-items:center}.icon-button{border:1px solid var(--line);width:42px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;background:white}.back-button{font-size:12px;display:flex;align-items:center;gap:6px;padding:8px}.game-bar{display:flex;justify-content:space-between;align-items:center;padding:15px 0;gap:12px;font-size:12px}.game-bar .meta{color:var(--muted);display:flex;gap:12px;align-items:center}.game-stage{position:relative;background:#000;border-radius:22px;overflow:hidden;height:calc(100dvh - 255px);min-height:300px;max-height:850px}.game-stage canvas{width:100%;height:100%;display:block;touch-action:none}.game-stage:fullscreen{border-radius:0;height:100vh;max-height:none;background:#000}.stage-exit{display:none}.game-stage:fullscreen .stage-exit{display:block;position:absolute;top:16px;right:16px;background:white;padding:12px}.pause-cover{position:absolute;inset:0;background:#152953ed;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;color:white;backdrop-filter:blur(8px);z-index:8}.pause-cover h2{font-size:32px;font-weight:550;margin:0}.pause-cover p{font-size:14px;color:#d4e7ff;max-width:420px;text-align:center;padding:0 25px;line-height:1.6}.game-controls{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;padding:17px 0}.game-help{font-size:12px;color:var(--muted);line-height:1.7}.game-help strong{color:var(--ink);font-weight:650}.switch-buttons{display:flex;gap:12px}.switch-button{user-select:none;-webkit-user-select:none;touch-action:none;background:var(--ink);color:#fff;font-size:13px;font-weight:650;display:flex;gap:16px;justify-content:space-between;align-items:center;padding:13px 21px;min-width:195px;box-shadow:0 4px 0 #153aa0}.switch-button.secondary{background:#e8f7ff;color:var(--ink);box-shadow:0 4px 0 #a9cce7}.switch-button:active{transform:translateY(2px);box-shadow:0 2px 0 #153aa0}.keycap{font-size:10px;font-weight:500;padding:4px 7px;border:1px solid currentColor;opacity:.7;border-radius:5px}.game-progress{text-align:right;color:var(--muted);font-size:11px}.game-progress span{display:inline-block;width:7px;height:7px;border-radius:50%;margin-left:6px;background:#cfdef2}.game-progress span.done{background:#2355d6}.choices{position:absolute;bottom:5%;left:7%;right:7%;display:flex;justify-content:center;gap:20px}.choice{background:#ffffff;border:3px solid transparent;box-shadow:0 9px 20px #193b4922;border-radius:20px;min-width:130px;min-height:70px;padding:16px 25px;font-size:16px;font-weight:650;position:relative}.choice.scanned{border-color:#2355d6;outline:4px solid white;box-shadow:0 0 0 7px #2355d6}.choice.selected{background:#e2f5ff}.scan-time{position:absolute;height:4px;left:10px;bottom:6px;width:calc(100% - 20px);background:#2355d6;transform-origin:left;border-radius:5px}.stage-prompt{position:absolute;top:24px;left:0;right:0;text-align:center;color:#192e55;font-size:17px;font-weight:600;pointer-events:none}.choice-announcement{position:absolute;left:25%;right:25%;bottom:26px;text-align:center;background:#ffffffe8;border-radius:20px;padding:14px;font-size:16px;pointer-events:none}.dialog{border:0;padding:0;background:var(--paper);color:var(--ink);border-radius:24px;box-shadow:0 40px 120px #0d2b3955;width:min(860px,calc(100vw - 32px));max-height:calc(100dvh - 40px)}.dialog::backdrop{background:#102c3ab3;backdrop-filter:blur(4px)}.dialog-head{position:sticky;top:0;background:var(--paper);z-index:3;padding:24px 30px 0;border-bottom:1px solid var(--line)}.dialog-title{display:flex;justify-content:space-between;align-items:center;gap:15px}.dialog h2{font-size:24px;letter-spacing:-.035em;font-weight:650;margin:0}.dialog-head p{font-size:12px;color:var(--muted);margin:8px 0 20px}.dialog-tabs{display:flex;gap:18px}.dialog-tabs button{font-size:13px;padding:14px 3px;border-radius:0;border-bottom:3px solid transparent}.dialog-tabs button.active{border-color:#713bd0;font-weight:700}.dialog-body{padding:26px 30px 30px}.dialog-body h3{font-size:15px;margin:0 0 7px}.dialog-body p{font-size:12px;line-height:1.7;color:var(--muted)}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}.field label,.field-label{font-size:12px;font-weight:650}.field input[type=text],.field input[type=number],.field select{border:1px solid #c8d8ef;border-radius:10px;padding:10px 12px;background:white;width:100%;color:var(--ink)}.field .hint{font-size:11px;color:var(--muted);line-height:1.5}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.segmented{display:flex;gap:8px}.segmented button{border:1px solid #c8d8ef;flex:1;padding:12px;font-size:12px;min-height:48px;background:white}.segmented button.active{border-color:var(--ink);background:var(--ink);color:white}.check-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 0;border-bottom:1px solid var(--line);font-size:13px}.check-row span{display:flex;flex-direction:column;gap:5px}.check-row small{color:var(--muted);font-size:11px;line-height:1.6;max-width:520px}.check-row input{width:20px;height:20px;accent-color:var(--ink)}input[type=range]{width:100%;accent-color:var(--ink);min-height:28px}.note{padding:16px 18px;background:#e5f7f0;border-radius:12px;font-size:12px;line-height:1.7;margin:20px 0;color:#12624e}.switch-panel{padding:18px;border:1px solid var(--line);border-radius:16px;background:#fff}.switch-panel h3{display:flex;align-items:center;gap:8px}.switch-number{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-size:12px;background:#e5f7f0}.switch-panel .field{margin-top:18px;margin-bottom:0}.learn-button{border:1px solid #b9cac5;background:#f0f6ff;padding:12px;font-size:13px;text-align:left}.learn-button.learning{background:#fff0af}.test-zone{padding:20px;background:#163f9c;color:white;border-radius:16px;margin-top:24px}.test-zone h3{color:#fff}.test-zone p{color:#d3e5ff}.test-lights{display:flex;gap:12px}.test-light{padding:13px;border:1px solid #93b2b3;border-radius:10px;flex:1;font-size:12px;color:#e2efff}.test-light.hit{background:#bdf4df;color:#0a563d}.test-log{font-size:11px;color:#d3e5ff;min-height:36px;margin-top:12px;line-height:1.6}.dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:25px;flex-wrap:wrap}.profile-actions{display:flex;gap:8px;flex-wrap:wrap}.error{color:#b3244a;font-size:12px;margin:10px 0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%) translateY(120px);transition:transform .2s;background:#192e55;color:white;border-radius:12px;padding:15px 24px;font-size:13px;box-shadow:0 10px 30px #192e5530;z-index:50;max-width:calc(100vw - 32px)}#toast.show{transform:translateX(-50%) translateY(0)}.roadmap{padding:30px 0}.roadmap h1{font-size:38px;letter-spacing:-.04em}.roadmap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin:35px 0}.roadmap-step{border-top:2px solid #94b2ed;padding:20px 10px 20px 0}.roadmap-step .step-no{font-size:12px;color:#713bd0}.roadmap-step h2{font-size:18px}.roadmap-step p{font-size:13px;line-height:1.7;color:var(--muted)}.roadmap-step button{text-align:left;font-size:12px;text-decoration:underline;display:block;padding:5px 0;min-height:35px}.version-label{background:#e5f7f0;color:#12624e;font-size:10px;padding:5px 9px;border-radius:20px;white-space:nowrap}.hidden{display:none!important}
@media(min-width:1500px){.wrap{max-width:1400px}.hero h1{font-size:65px}.card-visual{height:230px}}
@media(max-width:950px){.wrap{padding:0 28px}.hero{gap:25px}.hero h1{font-size:42px}.hero-art{aspect-ratio:1.2}.nav button{padding:10px}.nav .settings-button{margin-left:0}.cards{grid-template-columns:repeat(2,1fr)}.quiet-card{min-height:330px}.game-title{max-width:250px;font-size:12px}.game-controls{grid-template-columns:1fr auto;gap:15px}.game-progress{display:none}.switch-button{min-width:155px}.game-stage{height:calc(100dvh - 245px)}.roadmap-grid{grid-template-columns:1fr 1fr}.hero-actions .mini-note{display:none}}
@media(max-width:650px){.wrap{padding:0 20px}.topbar{height:auto;min-height:90px;flex-wrap:wrap;gap:6px;padding:14px 0}.brands{gap:14px}.utac-logo{width:64px;height:40px}.pim-logo{width:126px;height:64px}.nav{gap:2px}.nav button{font-size:11px;padding:8px;min-height:36px}.nav button:nth-child(2){display:none}.nav .settings-button{width:36px;padding:8px}.settings-button span{display:none}.hero{grid-template-columns:1fr;padding:30px 0 25px;gap:24px}.hero h1{font-size:43px;margin:15px 0}.hero p{font-size:14px;max-width:350px}.hero-art{aspect-ratio:1.85;border-radius:70px 20px 20px 20px}.hero-actions{gap:10px}.session-strip{align-items:flex-start;flex-direction:column;gap:10px;padding:15px 0}.library-head{align-items:flex-start;flex-direction:column;padding-top:28px}.library-head h2{font-size:24px}.filters{width:100%}.filters button{flex:1;font-size:11px}.cards{gap:17px;grid-template-columns:1fr}.card-visual{height:230px}.quiet-card{min-height:240px}.quiet-card h3{max-width:230px}.footer{line-height:1.6;flex-direction:column;gap:8px;margin-top:30px}.game-wrap{padding:0 12px}.game-wrap .topbar{height:auto;min-height:76px;flex-wrap:nowrap}.game-wrap .brands{gap:9px}.game-wrap .utac-logo{width:45px;height:33px}.game-wrap .pim-logo{width:77px;height:40px}.game-wrap .brand-divider{height:23px}.game-title{display:none}.game-top-actions{gap:5px}.game-top-actions .icon-button{width:35px;min-height:35px}.game-top-actions .fullscreen-button{display:none}.game-bar{font-size:10px;padding:10px 0}.game-bar .meta .activity-id{display:none}.game-stage{height:calc(100dvh - 245px);min-height:320px;border-radius:16px}.game-controls{grid-template-columns:1fr;padding:15px 0;gap:12px}.game-help{order:2;text-align:center;font-size:10px}.switch-buttons{justify-content:center;gap:9px}.switch-button{min-width:140px;font-size:12px;padding:13px 15px}.keycap{display:none}.choices{left:4%;right:4%;bottom:5%;gap:10px}.choice{min-width:0;flex:1;font-size:12px;padding:12px 8px;min-height:60px;border-radius:13px}.stage-prompt{font-size:14px;padding:0 15px}.choice-announcement{left:10%;right:10%;font-size:13px}.dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:17px}.dialog-head{padding:20px 18px 0}.dialog-body{padding:22px 18px}.dialog-tabs{gap:15px}.dialog-tabs button{font-size:12px}.form-grid{gap:15px;grid-template-columns:1fr}.dialog h2{font-size:21px}.dialog-head p{line-height:1.6}.dialog-actions{gap:16px}.roadmap-grid{grid-template-columns:1fr}.roadmap h1{font-size:30px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card-visual{height:260px}.quiet-card{grid-column:1/-1;min-height:170px;padding:28px 32px;display:grid;grid-template-columns:1fr 1fr;gap:0 28px}.quiet-card .kicker{grid-column:1/-1}.quiet-card h3{margin:12px 0}.quiet-card p{max-width:100%}.quiet-card button{grid-column:2;justify-self:start}.hero-art{background:#1d393e;border-radius:90px 24px 24px 24px}.stage-tools{display:none}.game-stage .choice canvas{width:100%;height:95px;display:block}.choice{padding:8px 20px 18px;width:160px;min-width:140px}.choices{gap:28px;bottom:4%}.stage-prompt{left:50%;right:auto;transform:translateX(-50%);white-space:nowrap;background:#ffffffe8;border-radius:30px;padding:10px 24px;font-size:16px}.choice-announcement{background:#ffffffed}:is(.game-wrap:fullscreen,.game-wrap.immersive){max-width:none;width:100%;height:100%;padding:0;background:#000}:is(.game-wrap:fullscreen,.game-wrap.immersive) .topbar,:is(.game-wrap:fullscreen,.game-wrap.immersive) .game-bar,:is(.game-wrap:fullscreen,.game-wrap.immersive) .game-controls{display:none}:is(.game-wrap:fullscreen,.game-wrap.immersive) .game-stage{height:100dvh;max-height:none;min-height:0;border-radius:0}:is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools{position:absolute;top:12px;right:12px;z-index:12;display:flex;gap:8px}.stage-tools button{width:44px;min-height:44px;background:#ffffffdd;color:#192e55;border:1px solid #fff6;font-size:20px;backdrop-filter:blur(6px)}:is(.game-wrap:fullscreen,.game-wrap.immersive) .pause-cover{z-index:13}
/* 0.40 · The loading cover: over the whole stage (under its tools, so the adult can still leave), in the dark of the stage; the activity
   behind it is drawn but not seen. A ring fills with the progress (--load-p) in the colour of the highlight, and a short light turns round
   it (an HTML element turned by the compositor, which keeps turning even while the page waits for a shader). Both appear only after 0.4 s,
   so an activity that is ready at once just fades in from the dark. */
.load-cover{position:absolute;inset:0;z-index:11;display:grid;place-items:center;background:radial-gradient(circle at 50% 46%,#1a2a46 0%,#0a1322 72%);transition:opacity .45s ease;--load-c:var(--ring-c,#ffa21f)}
.load-cover.gone{opacity:0;pointer-events:none}
.load-ring{position:relative;width:min(20vmin,140px);aspect-ratio:1;opacity:0;animation:load-in .5s ease .4s forwards}
.load-ring svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.load-ring circle{fill:none;stroke-width:7}
.load-ring .track{stroke:#ffffff1c}
.load-ring .bar{stroke:var(--load-c);stroke-linecap:round;stroke-dasharray:100 100;stroke-dashoffset:calc(100 - var(--load-p,0));transform:rotate(-90deg);transform-origin:50px 50px;transition:stroke-dashoffset .35s ease}
.load-spin{position:absolute;inset:-14%;animation:load-turn 1.8s linear infinite;will-change:transform}
/* 0.40.1: an activity known to be slow to open shows its ring at once */
.load-now .load-ring{animation:load-in .25s ease forwards}
.load-spin circle{stroke:#ffffffb3;stroke-width:3;stroke-linecap:round;stroke-dasharray:7 93}
@keyframes load-in{to{opacity:1}}
@keyframes load-turn{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.load-spin{animation-duration:6s}}.game-stage[data-activity=ice] .game-canvas{padding-bottom:80px}.choice:focus-visible{outline:4px solid #2355d6;outline-offset:8px}
@media(max-width:950px){.card-visual{height:240px}.choice{width:145px}.game-stage .choice canvas{height:80px}}
@media(max-width:650px){.cards{grid-template-columns:1fr}.quiet-card{display:flex}.choice{width:auto;min-width:0;max-width:160px;padding:6px 10px 15px}.game-stage .choice canvas{height:65px}.choices{gap:14px}.stage-prompt{font-size:13px;max-width:95%;white-space:normal;width:max-content}:is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools{top:8px;right:8px}.stage-tools button{width:38px;min-height:38px}:is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-prompt{top:65px}}
@media(prefers-reduced-motion:reduce){.card,.btn{transition:none}}

.game-wrap.immersive{position:fixed;inset:0;z-index:20;max-width:none;overflow:hidden}.game-wrap.immersive .game-stage{height:100dvh} :is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools{opacity:.65} :is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools:hover,:is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools:focus-within{opacity:1}

.pause-cover .btn:not(.orange){color:#192e55}

.game-stage[data-phase="paused"] .stage-tools{visibility:hidden}

.filters{flex-wrap:wrap;max-width:100%}.library-head{flex-wrap:wrap}.roadmap-grid{grid-template-columns:repeat(3,minmax(0,1fr))}select{font:inherit}.card-meta{gap:8px}@media(min-width:1100px){.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.card-visual{height:218px}}@media(max-width:950px){.roadmap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filters button{padding:8px 11px}}@media(max-width:650px){.roadmap-grid{grid-template-columns:1fr}.filters{justify-content:center}.filters button{flex:0 1 auto}}
.scan-panel{position:absolute;left:4%;right:4%;bottom:16px;display:flex;flex-direction:column;gap:16px}.choices.scan-grid{position:static;display:flex;justify-content:center;align-items:stretch;gap:22px}.scan-grid .choice{width:180px;min-width:0;max-width:200px;flex:1;padding:8px 12px 18px;font-size:14px}.scan-grid .choice canvas{height:112px!important;width:100%;display:block}.scan-bottom{display:flex;justify-content:center;align-items:center;gap:20px;flex-wrap:wrap}.scan-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.scan-action{position:relative;min-height:46px;max-width:220px;padding:12px 20px;background:#ffffff;color:#192e55;border:3px solid transparent;box-shadow:0 5px 14px #34524512;font-size:13px;font-weight:650}.scan-action.scanned{border-color:#2355d6;outline:3px solid #fff;box-shadow:0 0 0 6px #2355d6}.scan-marker{display:none;position:absolute;left:10px;top:7px;font-size:13px;color:#2355d6}.scanned .scan-marker{display:block}.scan-action .scan-marker{left:3px;top:3px;font-size:9px}.scan-virtual{display:flex;gap:10px}.scan-virtual .switch-button{min-width:100px;box-shadow:none;min-height:42px;padding:10px 14px;font-size:12px}.scan-virtual .keycap{font-size:9px}.game-stage[data-scan-state=done] .scan-panel{bottom:24px}.game-stage[data-scan-task] .choice-announcement{bottom:32px}.game-stage[data-scan-task] .stage-prompt{max-width:70%;white-space:normal;width:max-content;text-wrap:balance}.game-stage[data-scan-task] .choices:empty{display:none}.dialog-tabs{flex-wrap:wrap}
@media(max-width:950px){.choices.scan-grid{gap:15px}.scan-grid .choice{max-width:160px}.scan-grid .choice canvas{height:91px!important}.scan-panel{gap:12px;bottom:14px}.scan-actions{gap:10px}.scan-action{padding:11px 15px}.scan-virtual .switch-button{min-width:88px}.scan-bottom{gap:12px}}
@media(max-width:650px){.scan-panel{left:4%;right:4%;bottom:12px;gap:12px}.choices.scan-grid{gap:10px}.scan-grid .choice{padding:5px 7px 14px;font-size:11px}.scan-grid .choice canvas{height:66px!important}.scan-action{padding:9px 12px;min-height:42px;font-size:11px}.scan-actions{gap:8px}.scan-virtual .switch-button{padding:7px 10px;font-size:11px;min-width:76px;min-height:36px}.game-stage[data-scan-task] .stage-prompt{max-width:95%;font-size:12px}.dialog-tabs{gap:12px}}
@media(max-height:650px) and (min-width:651px){.scan-grid .choice canvas{height:58px!important}.scan-grid .choice{max-width:144px;padding:5px 10px 14px}.scan-panel{gap:10px;bottom:10px}.scan-action{min-height:40px;padding:8px 15px}.scan-virtual .switch-button{min-height:37px}.stage-prompt{top:12px}}

/* 0.6: clear surfaces, vivid accents and predictable focus, without a colour filter. */
.btn.primary,.segmented button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.btn.orange{background:var(--sun);border-color:var(--sun);color:var(--ink)}
.nav button.active{color:var(--primary)}.hero h1 em{color:var(--violet)}
.hero-art{background:#112e75;box-shadow:0 18px 45px -26px #2355d680;border:1px solid #d3e1ff}
.hero-art .art-caption{color:#fff;background:#10275fc9;padding:8px 12px;border-radius:30px;left:20px;bottom:16px}
.card{--card-accent:var(--primary);border-color:#d8e5f5;box-shadow:0 4px 18px #23487908}
.card[data-kind=ce]{--card-accent:#713bd0}.card[data-kind=scan]{--card-accent:#007e69}
.card[data-task=guided]{--card-accent:#2355d6}.card[data-task=groups]{--card-accent:#9c337e}
.card-content{border-top:4px solid var(--card-accent)}.card-meta{color:var(--card-accent)}
.card .round-arrow{color:var(--card-accent);background:#eef4ff}.card h3{color:#192e55}
.card-visual{background:#e7f3ff}.card:hover{box-shadow:0 12px 26px -16px #2355d655}
.quiet-card{background:linear-gradient(115deg,#e5f9f1,#e6f3ff);border:1px solid #b9e8d8}
.quiet-card .kicker{color:#00745b}.quiet-card h3{color:#12624e}.quiet-card p{color:#425e78}
.session-strip{background:#f0f6ff;border-color:#d1e1f9;padding-left:18px;padding-right:18px;border-radius:14px}
.filters button.active{background:var(--primary)}.dialog-tabs button.active{color:var(--violet)}
.switch-button{background:var(--primary);box-shadow:0 4px 0 #153aa0}
.switch-button.secondary{background:#e3f8f1;color:#125d4b;box-shadow:0 4px 0 #afe0d0}
.choice.scanned,.scan-action.scanned{border-color:var(--primary);outline:4px solid #fff;box-shadow:0 0 0 7px var(--primary)}
.choice.selected{background:#dff5ff}.scan-time,.game-progress span.done{background:var(--primary)}
.scan-marker{color:var(--primary)}.stage-tools button{opacity:1;background:#fffffff0;color:#192e55}
:is(.game-wrap:fullscreen,.game-wrap.immersive) .stage-tools{opacity:.9}
.stage-prompt,.choice-announcement{background:#fffffff2;color:#192e55}
:root{accent-color:var(--primary)}.note{background:#e5f8f0;color:#12624e}
/* 0.16: scanning boards (On anem?, Detectius de sons). The scene is drawn on the canvas; the zones keep a transparent button each. */
.board-zones{position:absolute;inset:0;pointer-events:none}
.board-zone{position:absolute;margin:0;padding:0;min-height:0;background:transparent;border:0;border-radius:20px;box-shadow:none;pointer-events:auto;cursor:pointer}
.board-zone:focus-visible{outline:3px dashed #fff6dc;outline-offset:8px}
.board-strip{position:absolute;left:0;right:0;bottom:0;height:66px;display:flex;align-items:center;justify-content:center;gap:18px;padding:0 12px;z-index:4}
.board-strip .scan-actions{gap:10px;flex-wrap:nowrap}
.board-strip .scan-action{min-height:44px;padding:8px 18px;background:#fffffff0;color:#192e55;border:3px solid transparent;font-size:13px;white-space:nowrap}
.board-strip .scan-action.scanned{border-color:#ffa21f;outline:3px solid #fff6dc;box-shadow:0 0 0 7px #10101cde}
.board-strip .scan-action.scanned .scan-marker{color:#c46a00}
.board-labels{position:absolute;top:10px;left:12px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;pointer-events:none;z-index:5;max-width:40%}
.board-labels span{background:#141220a0;color:#fffffff0;border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;line-height:1.3}
.board-labels .board-focus:empty{display:none}
@media(max-width:650px){.board-strip{gap:8px;padding:0 6px}.board-strip .scan-action{padding:6px 10px;font-size:11px;min-height:38px}.board-strip .scan-virtual{display:none}.board-labels span{font-size:11px}}
/* 0.17 · The highlight of the scanning focus: a frame over the option in the colour and thickness of the profile (ringStyle sets them
   on the stage); it draws itself as the time of the option runs out (--ring-p, 0 to 100) or is whole from the start (.ring-whole). */
#stage,.ring-sample{--ring-c:#ffa21f;--ring-edge:#100c1ce6;--ring-track:#fff6dc;--ring-w:10px}
#stage .choice.scanned,#stage .scan-action.scanned,#stage .board-strip .scan-action.scanned{outline:none;border-color:transparent;box-shadow:0 9px 20px #193b4922}
#stage .scan-time{display:none}
#stage .choices.scan-grid{gap:calc(22px + var(--ring-w))}
.scan-ring{position:absolute;left:calc(-4px - var(--ring-w));top:calc(-4px - var(--ring-w));width:calc(100% + 8px + 2*var(--ring-w));height:calc(100% + 8px + 2*var(--ring-w));overflow:visible;pointer-events:none;display:none;z-index:3}
.scanned>.scan-ring{display:block}
.scan-ring rect{x:calc(var(--ring-w)/2 + 2px);y:calc(var(--ring-w)/2 + 2px);width:calc(100% - var(--ring-w) - 4px);height:calc(100% - var(--ring-w) - 4px);rx:calc(16px + var(--ring-w)/2);fill:none;stroke-linecap:round;stroke-linejoin:round}
.scan-ring .ring-edge{stroke:var(--ring-edge);stroke-width:calc(var(--ring-w) + 8px)}
.scan-ring .ring-track{stroke:var(--ring-track);stroke-width:var(--ring-w)}
.scan-ring .ring-on{stroke:var(--ring-c);stroke-width:var(--ring-w);stroke-dasharray:var(--ring-p,0) 100}
.scan-ring .ring-dark,.scan-ring .ring-light{display:none;stroke-width:calc(var(--ring-w)*.3);stroke-dasharray:var(--ring-p,0) 100}
.ring-relief .scan-ring{filter:drop-shadow(3px 5px 4px #0009)}
.ring-relief .scan-ring .ring-dark{display:block;stroke:#00000047;transform:translate(calc(var(--ring-w)*.17),calc(var(--ring-w)*.17))}
.ring-relief .scan-ring .ring-light{display:block;stroke:#ffffff99;transform:translate(calc(var(--ring-w)*-.17),calc(var(--ring-w)*-.17))}
.ring-whole .scan-ring .ring-track{display:none}
.ring-whole .scan-ring .ring-on,.ring-whole .scan-ring .ring-dark,.ring-whole .scan-ring .ring-light{stroke-dasharray:none}
#stage .scan-marker{color:var(--ring-c)}
/* 0.40 · The colour layer of the focus: the inside of the frame covered by the colour of the highlight, semi-transparent (--fill-a), whole
   or growing from left to right with the time of the option (--ring-p) over a pale track; with or without the frame (.ring-none). The
   layer matches the inner edge of the frame (2 px out of the card, radius 16 px). */
.ring-fill{position:absolute;inset:-2px;border-radius:16px;pointer-events:none;display:none;z-index:2;opacity:var(--fill-a,.4)}
.ring-fill::before,.ring-fill::after{content:'';position:absolute;inset:0;border-radius:inherit;background:var(--ring-c)}
.ring-fill::before{display:none}
.fill-on .scanned>.ring-fill{display:block}
.fill-grow .ring-fill::before{display:block;opacity:.3}
.fill-grow .ring-fill::after{clip-path:inset(0 calc(100% - var(--ring-p,0)*1%) 0 0)}
.ring-none .scanned>.scan-ring{display:none}
/* the menu: its own blue frame, and the same layer in that blue */
.menu-ring-none .card.scan-target,.menu-ring-none .nav [data-settings].scan-target{outline:none}
.nav [data-settings].scan-target{outline:3px solid #2355d6;position:relative}
.menu-fill-on .card.scan-target::before,.menu-fill-on .card.scan-target::after,.menu-fill-on .nav [data-settings].scan-target::before,.menu-fill-on .nav [data-settings].scan-target::after{content:'';position:absolute;inset:0;border-radius:inherit;background:#2355d6;pointer-events:none;z-index:6;opacity:var(--fill-a,.4)}
.menu-fill-on .card.scan-target::before,.menu-fill-on .nav [data-settings].scan-target::before{display:none}
.menu-fill-grow .card.scan-target::before,.menu-fill-grow .nav [data-settings].scan-target::before{display:block;opacity:calc(var(--fill-a,.4)*.3)}
.menu-fill-grow .card.scan-target::after,.menu-fill-grow .nav [data-settings].scan-target::after{clip-path:inset(0 calc(100% - var(--ring-p,0)*1%) 0 0)}
.scan-action svg:not(.scan-ring){width:18px;height:18px;vertical-align:-4px;margin-right:6px}
#stage .board-labels{z-index:6}
/* the settings: colour swatches and a sample of the frame */
.segmented.swatches{flex-wrap:wrap}.segmented.swatches button{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;padding:8px 12px;min-height:40px}
.swatch{width:18px;height:18px;border-radius:50%;border:2px solid #10101c55;display:inline-block}
.ring-sample{display:flex;justify-content:center;padding:34px 0 26px}
.ring-sample .choice{position:relative;display:inline-flex;align-items:center;justify-content:center;width:150px;min-height:80px;font-weight:650;color:#192e55}
/* 0.19: nothing written during a scanning activity. The cards are pictures alone, the commands a picture alone, and a switch hint
   blinks softly at the bottom centre after a lap with no press (about 0.55 blinks a second; a small area: far from any flash limit). */
#stage .scan-grid .choice{padding:10px 12px}
#stage .scan-grid .choice canvas{height:136px!important}
#stage .scan-bottom{min-height:70px}
#stage .scan-action.icon-only{width:56px;height:56px;min-height:56px;max-width:none;padding:0;border-radius:16px;display:inline-flex;align-items:center;justify-content:center}
#stage .scan-action.icon-only svg.icon{width:30px;height:30px;margin:0;vertical-align:0}
#stage .board-strip{justify-content:flex-start;padding-left:max(16px,3vw)}
.switch-hint{position:absolute;left:50%;bottom:2px;transform:translateX(-50%);display:flex;align-items:flex-end;gap:20px;z-index:5;opacity:0;pointer-events:none;transition:opacity .6s ease}
.switch-hint.on{opacity:1;pointer-events:auto}
.switch-hint-button{width:108px;height:75px;padding:0;margin:0;border:0;background:none;cursor:pointer;filter:drop-shadow(0 0 1.5px #ffffffd0) drop-shadow(0 3px 6px #00000070)}
.switch-hint-button.advance{width:86px;height:60px}
.switch-hint-button svg{width:100%;height:100%;display:block;overflow:visible}
.sw-shadow{fill:#00000038}
.sw-base{fill:#262a33;stroke:var(--ring-edge,#10101c);stroke-width:2.5}
.sw-base-top{fill:#424857;stroke:var(--ring-edge,#10101c);stroke-width:2.5}
.sw-cap-side,.sw-cap-top{fill:var(--ring-c,#ffa21f);stroke:var(--ring-edge,#10101c);stroke-width:2.5}
.sw-cap-dark{fill:#00000055}
.sw-shine{fill:#ffffff80}
.advance .sw-cap-side,.advance .sw-cap-top{fill:#eef1f6}
.switch-hint.on svg{animation:sw-blink 1.8s ease-in-out infinite}
.switch-hint.on .sw-cap{animation:sw-press 1.8s ease-in-out infinite}
.switch-hint.still.on .sw-cap{animation:none}
@keyframes sw-blink{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes sw-press{0%,100%{transform:translateY(0)}50%{transform:translateY(5px)}}
@media(max-width:950px){#stage .scan-grid .choice canvas{height:110px!important}}
@media(max-width:650px){#stage .scan-grid .choice canvas{height:80px!important}#stage .scan-grid .choice{padding:6px 7px}#stage .scan-bottom{min-height:50px}.switch-hint-button{width:72px;height:50px}.switch-hint-button.advance{width:58px;height:41px}#stage .scan-action.icon-only{width:46px;height:46px;min-height:46px}}
@media(max-height:650px) and (min-width:651px){#stage .scan-grid .choice canvas{height:72px!important}#stage .scan-bottom{min-height:50px}.switch-hint-button{width:72px;height:50px}}
.info-dialog{width:min(1180px,calc(100vw - 32px))}.info-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.info-head h2{margin:0;font-size:22px}.info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:18px}.info-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}.info-card img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#0d2b39}.info-card h3{font-size:15px;margin:12px 14px 6px;display:flex;gap:8px;align-items:baseline}.info-card h3 span{color:var(--muted);font-size:12px;font-weight:600}.info-card p{font-size:13px;line-height:1.5;margin:0 14px 6px;color:var(--ink)}.info-card p:last-child{margin-bottom:14px}.stage-tools button .icon{width:22px;height:22px}
.favorite.card-info{right:56px}.favorite.card-info .icon{width:19px;height:19px}
/* 0.37 La fàbrica dels disbarats: on a landscape screen the three pictures stand in a column at the right, on the empty wall, so that
   they never hide the window of the machine, where the thing chosen first waits. */
@media(min-aspect-ratio:4/3){.game-stage[data-activity=inventions] .scan-panel{left:auto;right:3%;top:50%;bottom:auto;transform:translateY(-50%)}.game-stage[data-activity=inventions] .choices.scan-grid{flex-direction:column;gap:clamp(8px,2vh,16px)}.game-stage[data-activity=inventions] .scan-grid .choice{width:clamp(130px,15vw,190px);flex:none;padding:6px 10px 12px}.game-stage[data-activity=inventions] .scan-grid .choice canvas{height:clamp(70px,17vh,120px)!important}}
/* 0.42 · carpetes del menú */
.folder-card{--card-accent:var(--primary)}
.folder-card .card-content{border-top-color:var(--card-accent)}
.folder-visual{display:grid;gap:3px;padding:0;background:var(--card-accent)}
.folder-visual canvas{width:100%;height:100%;display:block;min-height:0}
.folder-visual.n2,.folder-visual.n4{grid-template-columns:1fr 1fr}
.folder-visual.n4{grid-template-rows:1fr 1fr}
.folder-visual.n3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.folder-visual.n3 canvas:first-child{grid-row:1/3}
.folder-card .card-bottom span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.folder-head{align-items:flex-end;gap:16px}.folder-head h2{color:var(--card-accent)}
.folder-back{display:inline-flex;align-items:center;gap:8px;padding:8px 14px 8px 10px;margin-bottom:10px;border-radius:999px;background:#eef4ff;color:#2355d6;font-weight:700}
.folder-back .icon,.back-mark .icon{transform:scaleX(-1)}
.folder-count{font-weight:700;color:var(--card-accent);white-space:nowrap}
.back-card .card-open{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;width:100%;height:100%;min-height:220px;color:#2355d6;font-weight:800;font-size:20px}
.back-mark{display:grid;place-items:center;width:84px;height:84px;border-radius:50%;background:#eef4ff}.back-mark .icon{width:38px;height:38px}
/* 0.44 · activitats personalitzades */
.ps-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.ps-storage{font-size:13px;color:#5b6475;margin-top:8px;min-height:1em}
.favorite.ps-export{right:56px}.favorite.ps-edit{right:100px}.favorite.ps-delete .icon{width:15px;height:15px}
.ps-new-card .card-open{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;height:100%;min-height:240px;color:#b4530a;font-weight:800;font-size:20px}
.ps-new-card .back-mark{font-size:44px;line-height:1;width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff1e3;border:3px dashed #b4530a}
.ps-new-card small{font-weight:600;font-size:14px;color:#6b4a2a}
.ps-empty{grid-column:1/-1}
.ps-editor{max-width:860px}
.ps-editor h3{margin:22px 0 8px;font-size:17px}.ps-editor h3 small{font-weight:600;color:#5b6475;font-size:13px;margin-left:6px}
.pe-tpls{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.pe-tpl{display:flex;flex-direction:column;gap:4px;text-align:left;padding:12px 14px;border-radius:14px;border:2px solid #d9dee8;background:#fff}
.pe-tpl span{font-size:13px;color:#5b6475}.pe-tpl.active{border-color:#b4530a;background:#fff4e8;box-shadow:0 0 0 3px #b4530a33}
.pe-tpl-desc{display:block;margin-top:8px}
.pe-items{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.pe-item{display:flex;align-items:center;gap:12px;padding:8px;border:1px solid #e2e6ee;border-radius:12px;background:#fbfcfe}
.pe-item img,.pe-noimg{width:96px;height:64px;object-fit:cover;border-radius:8px;background:#dde2ea;flex:none}
.pe-no{font-weight:800;color:#b4530a;min-width:22px;text-align:center}
.pe-meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.pe-meta small{color:#5b6475;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-sound{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:4px 0}.pe-chip{background:#eef3ff;color:#2355d6;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pe-move{display:flex;gap:4px}.pe-move .icon-button{width:34px;height:34px;min-height:34px}
.pe-empty{color:#5b6475;padding:10px}
.pe-add{display:flex;flex-direction:column;gap:6px;margin-top:10px;align-items:flex-start}
.pe-problems{margin:12px 0 0;padding-left:20px;color:#9a3412;font-weight:600}
.pe-danger{color:#b91c1c}
@media (max-width:640px){.pe-item{flex-wrap:wrap}.pe-item img,.pe-noimg{width:72px;height:48px}}
/* 0.45.6 Fem castells: the shirt colours are shown only as large swatches */
.segmented.swatches.shirts button{padding:6px;min-height:48px;min-width:48px;justify-content:center}.swatch.shirt{width:34px;height:34px;border:2px solid #10101c66}
/* 0.46 · Usuaris: the chip of who plays, the users dialog, the record and the pauses of «Vídeo a poc a poc» */
.user-chip{display:flex;align-items:center;gap:8px;border:1px solid #c8d8ef;border-radius:999px;padding:4px 14px 4px 4px;margin-left:14px;font-weight:700;color:var(--ink);background:#fff;max-width:220px}
.user-chip span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-badge{--u:#64748b;flex:none;width:30px;height:30px;border-radius:50%;display:inline-grid;place-items:center;background:var(--u);color:#fff;font-weight:800;font-size:14px;line-height:1}
.user-badge.guest{background:#e8edf5;color:#526582}
.user-badge svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.user-line{display:flex;align-items:center;gap:10px;min-height:40px}
.user-list{list-style:none;padding:0;margin:0 0 22px;display:flex;flex-direction:column;gap:8px}
.user-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e2e6ee;border-radius:14px;background:#fbfcfe}
.user-row.current{border-color:var(--primary);box-shadow:0 0 0 2px #2355d633;background:#f3f7ff}
.user-row .user-badge{width:40px;height:40px;font-size:18px}
.user-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.user-info strong{font-size:15px;overflow:hidden;text-overflow:ellipsis}
.user-info small{color:var(--muted);font-size:12px;line-height:1.5}
.user-now{align-self:flex-start;font-size:11px;font-weight:800;color:#fff;background:var(--primary);border-radius:999px;padding:2px 9px}
.user-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.user-new{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.user-new .field{flex:1;min-width:200px;margin:0}
.users-files{margin:16px 0 8px}
.hint.shared{display:block;color:#7a4b00;background:#fff6dc;border-radius:8px;padding:6px 10px;margin:6px 0 10px}
.log-dialog{width:min(980px,calc(100vw - 32px))}
.log-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 22px}
.log-tiles div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:2px}
.log-tiles strong{font-size:22px;color:var(--ink);font-variant-numeric:tabular-nums}
.log-tiles span{font-size:12px;color:var(--muted)}
.log-table-wrap{overflow-x:auto;margin:0 0 22px}
.log-table{width:100%;border-collapse:collapse;font-size:13px}
.log-table th{text-align:left;font-size:11px;color:var(--muted);font-weight:700;border-bottom:1px solid var(--line);padding:6px 8px}
.log-table td{padding:7px 8px;border-bottom:1px solid #edf1f7;font-variant-numeric:tabular-nums}
.log-code{display:inline-block;font-size:10px;font-weight:800;color:var(--muted);background:#eef2f8;border-radius:6px;padding:1px 6px;margin-right:7px}
.log-days h4{font-size:13px;margin:16px 0 6px;text-transform:none}
.log-days h4::first-letter{text-transform:uppercase}
.log-days h4 small{color:var(--muted);font-weight:500}
.log-days ul{list-style:none;padding:0;margin:0}
.log-days li{display:grid;grid-template-columns:52px 1fr auto auto;gap:12px;padding:6px 4px;border-bottom:1px solid #edf1f7;font-size:13px;font-variant-numeric:tabular-nums}
.log-time,.log-d,.log-n{color:var(--muted)}
.pe-marks{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.pe-marks label{font-size:12px;font-weight:700}
.pe-marks input{max-width:420px}
.pe-stops{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.pe-stops.pe-bad{color:#b3261e}
.pe-preview{display:flex;flex-direction:column;gap:8px;max-width:560px}
.pe-preview video{width:100%;max-height:320px;background:#000;border-radius:10px}
.pe-preview-actions{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:760px){.user-chip{margin-left:0;padding:3px;}.user-chip span:last-child{display:none}.user-row{flex-wrap:wrap}.user-actions{justify-content:flex-start;width:100%}.log-tiles{grid-template-columns:repeat(2,1fr)}.log-days li{grid-template-columns:44px 1fr;}.log-d,.log-n{grid-column:2}}
/* 0.46.1 · the small buttons in the corner of an activity say what they do when the cursor is over them (or they have the focus) */
.stage-tools button{position:relative}
.stage-tools button[data-tip]::after{content:attr(data-tip);position:absolute;top:calc(100% + 8px);right:0;padding:6px 11px;border-radius:9px;background:#14213d;color:#fff;font:700 14px/1.2 system-ui,sans-serif;white-space:nowrap;box-shadow:0 6px 18px #0006;pointer-events:none;opacity:0;transform:translateY(-3px);transition:opacity .12s,transform .12s;z-index:20}
.stage-tools button[data-tip]:hover::after,.stage-tools button[data-tip]:focus-visible::after{opacity:1;transform:none}

/* 0.50.3 · «Versió WebGL 2» at the bottom of the cards of the five dives: the original live WebGL 2 drawing instead of the videos */
.card.has-hq{padding-bottom:58px}.card-hq{position:absolute;left:21px;bottom:16px;z-index:2;min-height:34px;padding:0 14px;border-radius:17px;border:1px solid #c8d8ef;background:#f4f8ff;color:var(--ink);font-size:12px;font-weight:700}.card-hq:hover{background:#e9f0ff}.card-hq[data-tip]::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 8px);left:0;padding:6px 11px;border-radius:9px;background:#14213d;color:#fff;font:700 13px/1.2 system-ui,sans-serif;white-space:nowrap;box-shadow:0 6px 18px #0006;pointer-events:none;opacity:0;transform:translateY(3px);transition:opacity .12s,transform .12s;z-index:20}.card-hq[data-tip]:hover::after,.card-hq[data-tip]:focus-visible::after{opacity:1;transform:none}

/* 0.50.5 · the version next to the Pim Pam logo on the home page */
.app-version{align-self:flex-end;margin:0 0 12px -14px;font-size:11px;font-weight:650;letter-spacing:.02em;color:#5d6f87}
/* 0.50.6 · the UTAC logo lowered so that its letters are centred on the letters of «Pim Pam» (the swoosh and the button of the Pim Pam logo
   take its upper part); the sizes stay as they are (Marc, 7 November 2026) */
.brands .utac-logo{transform:translateY(21%)}

/* 0.62 · Informació (dist/sobre.js) */
.sobre-dialog{width:min(900px,calc(100vw - 32px))}
.sobre-head{padding-bottom:16px}
.sobre-head .dialog-title{display:flex;align-items:center;justify-content:space-between;gap:16px}
.sobre-head h2{margin:0}
.sobre-body{line-height:1.55}
.sobre-body section{margin-top:6px}
.sobre-body h3{font-size:19px;margin:24px 0 8px;color:var(--primary)}
.sobre-body p{margin:0 0 10px;font-size:15.5px}
.sobre-body a{color:var(--primary)}
.sobre-brands{display:flex;align-items:center;gap:16px;margin-bottom:6px}
.sobre-brands .utac-logo{height:44px;width:auto}
.sobre-brands .pim-logo{height:58px;width:auto}
.sobre-brands .brand-divider{width:1px;height:40px;background:var(--line)}
.sobre-institucions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:22px 26px;margin-top:18px}
.sobre-institucions figure{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.sobre-institucions a{display:flex;align-items:center;justify-content:center;height:80px;width:100%;border-radius:10px;background:#fff}
.sobre-institucions img{max-height:100%;max-width:100%;object-fit:contain}
.sobre-institucions figcaption{font-size:13.5px;color:var(--muted);line-height:1.4}
.sobre-eines{list-style:none;margin:0;padding:0}
.sobre-eines li{display:grid;grid-template-columns:13rem 1fr;gap:0 16px;padding:9px 0;border-bottom:1px solid var(--line)}
.sobre-eines .use{grid-row:span 3;color:var(--muted);font-size:14px}
.sobre-eines strong{font-size:15px}
.sobre-eines li>span:not(.use){font-size:14px}
.sobre-eines a{font-size:13.5px;overflow-wrap:anywhere}
.sobre-versio{color:var(--muted);font-size:13.5px!important;margin-top:18px!important}
.sobre-novetats{font:inherit;color:var(--primary);background:none;border:0;padding:0;min-height:0;text-decoration:underline;cursor:pointer}
@media (max-width:650px){.nav button.sobre-button:nth-child(n){display:flex}}
@media (max-width:620px){.sobre-eines li{grid-template-columns:1fr}.sobre-eines .use{grid-row:auto}}
/* 0.71 · Idiomes: the language menu of the header (globe + code, list with code badges, native names and a check) */
.lang{position:relative}.nav .lang-button{gap:8px;font-weight:750;letter-spacing:.02em;background:#fff}.lang-button .lang-chev{width:16px;height:16px;transform:rotate(180deg);transition:transform .15s}.lang.open .lang-button{background:var(--blue);border-color:var(--primary)}.lang.open .lang-chev{transform:none}
.lang-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:40;min-width:236px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 40px -18px #192e5566;display:flex;flex-direction:column;gap:2px}.lang-menu[hidden]{display:none}
.nav .lang-menu .lang-item{display:flex;align-items:center;gap:14px;width:100%;padding:8px 10px;border-radius:12px;font-size:16px;font-weight:550;text-align:left;color:var(--ink);min-height:48px}.lang-item:hover,.lang-item:focus-visible{background:var(--paper)}
.lang-code{display:inline-flex;align-items:center;justify-content:center;width:40px;height:30px;border-radius:9px;background:var(--blue);color:var(--primary);font-size:12px;font-weight:800;letter-spacing:.04em;flex-shrink:0}.lang-name{flex:1}.lang-item.on .lang-code{background:var(--primary);color:#fff}.lang-item.on .lang-name{color:var(--primary);font-weight:650}.lang-item .icon{color:var(--primary);stroke-width:2.2}
.nav .lang-menu button.lang-item:nth-child(n){display:flex}@media(max-width:650px){.lang-menu{right:auto;left:0}}
/* 0.75 · portada: il·lustracions de les activitats que es fonen l'una en l'altra */
.hero-art .hero-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 2.5s ease-in-out;animation:hero-drift 26s ease-in-out infinite alternate;pointer-events:none;user-select:none}.hero-art .hero-slide:nth-of-type(even){animation-direction:alternate-reverse}.hero-art .hero-slide.on{opacity:1}
@keyframes hero-drift{from{transform:scale(1.02) translate(0,0)}to{transform:scale(1.08) translate(-1.2%,-.8%)}}
@media(prefers-reduced-motion:reduce){.hero-art .hero-slide{animation:none;transform:none}.hero-art .hero-slide{transition:opacity 2.5s ease-in-out!important}}
/* 0.76 · Instal·la (PWA): button at the right end of the header, and its window */
.nav .instal-button{background:var(--ink);color:#fff;border-color:var(--ink)}.nav .instal-button:hover{filter:brightness(1.12)}
.pwa-no .instal-button,.pwa-app.pwa-complet .instal-button{display:none!important}
.pwa-instal-lada:not(.pwa-app) .nav .instal-button{background:#fff;color:var(--ink);border-color:#c8d8ef}
@media (max-width:650px){.nav button.instal-button:nth-child(n){display:flex}}
.instal-dialog{width:min(620px,calc(100vw - 32px))}.instal-body p{font-size:15px;line-height:1.6;margin:0 0 14px}
.instal-total{display:flex;justify-content:space-between;align-items:baseline;gap:16px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px;margin:18px 0 10px}
.instal-total span{font-size:15px;font-weight:650}.instal-total strong{font-size:32px;letter-spacing:-.03em;color:var(--ink)}
.instal-parts{list-style:none;margin:0 0 16px;padding:0 20px;display:grid;gap:6px}.instal-parts li{display:flex;justify-content:space-between;font-size:13px;color:var(--muted)}.instal-parts strong{color:var(--ink);font-weight:650}
.instal-barra{height:14px;border-radius:7px;background:#e3ecf8;overflow:hidden;margin:18px 0 8px}.instal-barra span{display:block;height:100%;background:var(--primary);transition:width .3s}
.instal-xifres{display:flex;justify-content:space-between;font-size:14px;font-weight:650}
.instal-error{color:#b3261e;font-weight:650}.instal-ok{font-weight:650}
.instal-body .hint{font-size:12px}
/* 0.77 (audit): from 651 to 1240 px wide (tablets) the header buttons kept their words and went past the right edge (Configuració and
   Instal·la could not be reached without scrolling sideways). There they show only their icon, as on phones; the name stays in aria-label. */
@media (min-width:651px) and (max-width:1240px){.topbar .nav .settings-button>span{display:none}.topbar .nav .settings-button{padding:10px}.topbar{gap:12px}.topbar .nav{flex-wrap:wrap;justify-content:flex-end;min-width:0}}
@media (min-width:651px) and (max-width:950px){.topbar .user-chip span:last-child{display:none}.topbar .user-chip{padding:3px}}

/* 0.77.1: «Requereix WebGL2» on the cards of the activities that need it */
.card-req{display:inline-block;margin:-2px 0 8px;padding:3px 10px;border-radius:12px;border:1px solid #c8d8ef;background:#f4f8ff;color:#192e55;font-size:12px;font-weight:700}

/* 0.78: the six Mira i Juga 2 activities. The scene is an iframe at the bottom of the stage; the canvas with the scanning focus goes over it */
.mj-stage #game-canvas{position:relative;z-index:2;background:transparent}
.mj-stage .mj-frame{z-index:0}
