
:root{--ink:#1f2b36;--blue:#0055bb;--deep:#173f73;--line:#d4e3f0;--pale:#f5f9fe;--paper:#fbfdff;--secondary:#62788d;--cyan:#3c9fbe}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{font-family:Arial,Helvetica,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#eaf2fa;-webkit-tap-highlight-color:transparent}button,a{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #49a7ce;outline-offset:3px}a{color:var(--blue)}.app{position:relative;width:100%;height:100vh;height:100dvh;max-width:960px;margin:0 auto;overflow:hidden;background:var(--paper);box-shadow:0 0 38px #1b3d6420}
.scene{display:none;position:absolute;inset:0;min-height:0;overflow:hidden}.scene.active{display:flex;flex-direction:column}.paper{background:repeating-linear-gradient(153deg,transparent 0px,transparent 16px,rgba(39,104,160,.028) 17px,transparent 19px),#fbfdff}.section-top{flex:0 0 auto;min-height:51px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 17px;border-bottom:1px solid var(--line);background:#fff}.identity{display:flex;flex-direction:column;gap:1px;min-width:0}.identity .mark{color:#173f73;font-weight:800;letter-spacing:.035em;font-size:16px}.identity .meta{color:#63788c;font-size:10px;letter-spacing:.035em}.top-actions{display:flex;align-items:center;gap:7px}.step{color:#56768f;font-size:11px;font-weight:700;white-space:nowrap}.iconbutton{border:1px solid #d2e2f0;border-radius:9px;background:#f4f9fe;color:var(--deep);font-size:16px;width:39px;height:35px;display:grid;place-items:center}.btn{background:var(--blue);border:1px solid var(--blue);color:#fff;border-radius:11px;font-weight:700;min-height:46px;padding:10px 18px}.btn.secondary{background:#fff;color:var(--blue)}.btn:active,.iconbutton:active{filter:brightness(.92)}.eyebrow{color:#557796;font-size:11px;text-transform:uppercase;letter-spacing:.13em;font-weight:750}.intro-body,.end-body{flex:1;min-height:0;padding:clamp(12px,3.1vh,34px) clamp(18px,5vw,40px) 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(9px,2vh,20px);text-align:center}.intro-title{font-size:clamp(27px,6.8vw,46px);line-height:1.07;letter-spacing:-.035em;margin:0;color:#1c3f64}.intro-copy{font-size:clamp(13px,3.5vw,16px);line-height:1.48;max-width:460px;margin:0}.scetch{width:min(100%,470px);height:clamp(100px,22vh,205px);flex:0 0 auto}.intro-notes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:min(100%,540px);text-align:left}.intro-note{background:#f2f8fd;border:1px solid #d9e7f1;border-radius:10px;padding:10px 9px;font-size:12px;line-height:1.3;color:#3a566d}.intro-note b{display:block;color:#0055bb;font-size:11px;margin-bottom:4px}.intro-bottom{display:flex;gap:9px;justify-content:center;width:100%}.about-link{font-size:11px;color:#456b8b;text-decoration:underline;text-underline-offset:2px}
/* Game: every component participates in a single screen-size flex layout. */
#game{background:linear-gradient(167deg,#ffffff,#f5faff)}.game-meta{flex:0 0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line);height:44px;background:#fbfdff}.game-meta .metric{min-width:0;text-align:center;padding:4px 2px;border-right:1px solid #e0ebf3}.metric:last-child{border-right:0}.metric small{font-size:10px;display:block;color:#718496;line-height:1.2}.metric b{font-size:17px;color:#1b5186;font-variant-numeric:tabular-nums;line-height:1.25}.game-body{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center;gap:16px;padding:5px 8px 3px;position:relative}.board-frame{height:min(100%,calc((100vw - 85px)*1.5));max-height:100%;aspect-ratio:12/18;max-width:min(100%,360px);min-width:0;flex-shrink:0;position:relative;border:1px solid #adc8dc;border-radius:7px;overflow:hidden;background:#ebf5fd;box-shadow:0 4px 16px #173f7315;touch-action:none;user-select:none;-webkit-user-select:none}.board-frame canvas{display:block;width:100%;height:100%;touch-action:none}.board-info{display:flex;flex-direction:column;gap:10px;align-self:stretch;justify-content:center;max-width:135px}.info-label{font-size:10px;font-weight:700;color:#688098;text-transform:uppercase;letter-spacing:.06em}.mini-cell{background:#f0f7fd;border:1px solid #d5e6f4;border-radius:8px;padding:8px 9px}.mini-cell strong{font-size:17px;color:#1a528c}.mini-cell p{font-size:11px;margin:4px 0 0;line-height:1.33;color:#587184}.board-note{font-size:11px;color:#66829b;line-height:1.38}
.measurements{flex:0 0 auto;height:clamp(91px,17dvh,143px);min-height:82px;margin:1px 10px 0;border:1px solid #c5dded;border-radius:11px;background:linear-gradient(155deg,#112b47,#163a5c);color:#f2fbff;display:flex;flex-direction:column;padding:6px 9px;overflow:hidden}.scope-header{flex:0 0 auto;display:flex;align-items:baseline;justify-content:space-between;gap:7px;white-space:nowrap;font-size:10px;color:#acd3ec}.scope-header b{font-size:11px;color:#c7f1ed}.scope-header .live{color:#a9e2d7}.scope-svg{flex:1;min-height:0;width:100%;display:block}.measure-caption{height:17px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:9px;color:#a8c2d6}.control-strip{flex:0 0 auto;display:flex;gap:9px;padding:8px max(12px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom));min-height:69px;align-items:stretch;justify-content:center}.control-strip button{display:flex;align-items:center;justify-content:center;min-width:0;min-height:49px;border-radius:12px;background:#e6f1fa;border:1px solid #c2d9ed;color:#154778;font-size:23px;font-weight:700;touch-action:none;user-select:none;-webkit-user-select:none}.control-strip button:active{background:#cce4f5}.control-strip #rotateBtn{flex:1}.control-strip #softBtn{flex:1}.control-strip #hardBtn{flex:1.3;background:#0055bb;color:white;border-color:#0055bb}.control-strip .btnword{font-size:10px;font-weight:700;margin-left:7px}.game-footnote{flex:0 0 auto;text-align:center;color:#668095;font-size:10px;height:17px;line-height:13px}.pause-screen{display:none;position:absolute;inset:0;z-index:20;background:#eef7fce9;align-items:center;justify-content:center;padding:20px}.pause-screen.show{display:flex}.pause-box{border-radius:16px;background:white;border:1px solid #c3d9ea;padding:22px;text-align:center;box-shadow:0 9px 40px #133f661f;max-width:300px}.pause-box h2{margin:0 0 8px;font-size:23px}.pause-box p{font-size:13px;color:#647c91;line-height:1.5}
.end-body{justify-content:space-evenly;padding:10px 14px 9px;gap:7px}.end-title{font-size:clamp(22px,6vw,32px);margin:0;color:#194b7d}.end-text{max-width:540px;font-size:12px;line-height:1.4;margin:0}.end-stats{width:min(100%,510px);display:grid;grid-template-columns:1fr 1fr;gap:7px}.end-stat{background:#f1f7fc;border:1px solid #d4e5f2;border-radius:12px;padding:8px}.end-stat small{display:block;color:#60788b;font-size:11px}.end-stat strong{font-size:clamp(22px,6vw,31px);color:#0055bb}.scan-frame{width:min(100%,540px);height:clamp(128px,28vh,230px);background:#f6faff;border:1px solid #c9deec;border-radius:12px;padding:6px;min-height:105px}.scan-frame canvas{display:block;width:100%;height:100%}.final-note{font-size:11px;line-height:1.4;color:#4d6982;max-width:530px}.end-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
@media(max-width:600px){.section-top{padding:7px 12px;min-height:45px}.identity .mark{font-size:14px}.intro-note{font-size:11px;padding:8px 7px}.intro-body{padding:10px 12px;gap:11px}.intro-title{font-size:clamp(26px,7.2vw,37px)}.game-body{gap:6px;padding:4px 4px 1px}.board-info{width:65px;max-width:65px;gap:7px}.mini-cell{padding:5px 4px}.mini-cell strong{font-size:15px}.board-note{display:none}.mini-cell p{font-size:10px}.game-meta{height:41px}.metric b{font-size:15px}.measurements{margin:1px 7px 0;padding:5px 7px}.control-strip{gap:7px;padding-top:6px;min-height:64px}.control-strip button{min-height:45px}.game-footnote{font-size:9px;height:15px}}
@media(max-height:650px){.intro-note{padding:6px}.intro-copy{font-size:12px}.intro-body{gap:7px}.scetch{height:clamp(80px,18vh,125px)}.measurements{height:95px;min-height:75px}.control-strip{min-height:55px;padding-top:4px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}.control-strip button{min-height:40px}.game-footnote{height:13px}.game-meta{height:36px}.metric b{font-size:14px}.end-body{gap:4px}.scan-frame{height:23vh}}
@media(min-width:750px){.game-body{justify-content:center}.board-frame{height:100%}.board-info{max-width:195px}.measurements{max-width:690px;width:calc(100% - 40px);margin-inline:auto}.control-strip{max-width:550px;width:100%;margin-inline:auto}.game-meta{max-width:700px;width:100%;margin-inline:auto}}

/* v4: five immersive scenes, small drawn instrument, pencil scientific style. */
.info-scene,.people-body{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:clamp(7px,1.6dvh,16px);padding:12px 13px calc(14px + env(safe-area-inset-bottom));overflow:hidden}
.info-scene .intro-title{font-size:clamp(27px,6.7vw,45px);line-height:1.08}
.scene-copy{max-width:565px;font-size:clamp(12px,3.1vw,16px);line-height:1.45;margin:0;color:#304a62}
.sub-title{margin:0;color:#204d79;font-size:clamp(23px,5.9vw,36px);line-height:1.12}
.hero-drawing{width:min(100%,430px);height:clamp(115px,24dvh,185px);flex:0 1 auto}
.pencil-note{width:min(100%,520px);text-align:left;padding:11px 13px;border-left:3px solid #7daacf;background:repeating-linear-gradient(145deg,#f3f8fd,#f3f8fd 11px,#ecf4fa 12px,#f3f8fd 13px);font-size:clamp(11px,2.8vw,14px);line-height:1.38;color:#3b5b75}
.pencil-note b{display:block;font-size:12px;letter-spacing:.015em;color:#1e5e96;margin-bottom:4px}.pencil-note span{display:block}
.scene-cta{width:100%;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;flex-shrink:0}.scene-cta .btn{font-size:clamp(12px,3vw,15px)}
.text-btn{border:0;background:none;color:#416b8e;text-decoration:underline;text-underline-offset:3px;padding:8px;cursor:pointer}
.chain-drawing{display:flex;align-items:center;justify-content:center;width:100%;max-width:550px;gap:5px;margin:clamp(6px,2vh,18px) 0}
.chain-part{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;gap:7px;padding:8px 3px 11px;border:1px solid #c5dfeb;border-radius:9px;background:repeating-linear-gradient(35deg,#f2f8fc,#f2f8fc 12px,#eaf3fa 12.5px,#f2f8fc 13.5px)}
.chain-symbol{font-family:Georgia,serif;font-size:clamp(27px,7vw,46px);line-height:1;color:#397cad}.chain-part b{font-size:clamp(11px,2.65vw,15px);color:#24547e}.chain-part small{font-size:clamp(9px,2.2vw,12px);line-height:1.3;color:#5b768d}.chain-arrow{color:#4b83a9;font-size:22px}
.measurements{height:clamp(77px,12dvh,102px);min-height:72px;flex-direction:row;align-items:center;gap:10px;padding:4px 10px;margin:2px 9px 0;background:repeating-linear-gradient(151deg,#f6fafd,#f6fafd 12px,#edf6fc 12.6px,#f6fafd 14px);border:1px solid #a9c9df;color:#234f79;box-shadow:0 3px 11px #164a7610}
.scope-instrument{height:100%;width:clamp(142px,48vw,225px);flex:0 0 auto;position:relative;padding:6px 8px 5px;background:#e4eff7;border:2px solid #6c9abd;border-radius:9px;transform:rotate(-.35deg);box-shadow:inset 0 0 0 2px #f8fcff,1px 2px 0 #b8d3e5}
.scope-instrument:before,.scope-instrument:after{content:'';position:absolute;border:1px solid #8db2cc;border-radius:2px;width:3px;height:3px;top:6px}.scope-instrument:before{left:5px}.scope-instrument:after{right:5px}
.instrument-label{font-size:8px;font-weight:800;letter-spacing:.1em;color:#215e91;height:11px;text-align:left;padding-left:2px}
.instrument-housing{height:calc(100% - 12px);display:flex;gap:5px}
.instrument-screen{height:100%;flex:1;min-width:0;border:3px solid #4c7a9d;border-radius:4px;background:#112d46;overflow:hidden;box-shadow:inset 0 0 6px #001b35}
.scope-svg{height:100%;width:100%;display:block}
.instrument-knobs{width:25px;flex:0 0 25px;display:flex;flex-direction:column;align-items:center;justify-content:space-around;gap:1px}
.instrument-knobs i{width:15px;height:15px;border:2px solid #7397b5;background:radial-gradient(circle at 40% 42%,#fafcff 0 3px,#d0e2ee 4px 100%);border-radius:50%;position:relative}
.instrument-knobs i:before{content:'';height:6px;width:1px;background:#356e99;position:absolute;left:5px;top:1px;transform:rotate(26deg)}
.instrument-knobs span{font-size:8px;color:#315d83;font-weight:700}
.reading-info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:5px;text-align:left;color:#42647c}
.reading-info strong{color:#16548a;font-size:clamp(10px,2.7vw,13px)}.reading-info span{font-size:clamp(11px,2.9vw,15px);font-weight:800;color:#226ba1}
.reading-info small{font-size:clamp(9px,2.2vw,11px);line-height:1.25;color:#5b7890;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.end-body{gap:clamp(5px,1vh,12px);justify-content:center}
.scan-frame{background:repeating-linear-gradient(146deg,#f7fbfe,#f7fbfe 13px,#ecf4fa 14px,#f7fbfe 15px);border:1px solid #8fb7d4;box-shadow:2px 3px 0 #dbeaf5;position:relative;overflow:hidden;padding:7px 8px}
.scan-pencil-caption{position:absolute;left:11px;top:6px;color:#497497;font-size:9px;letter-spacing:.08em;font-weight:700;pointer-events:none}
.scan-frame canvas{height:calc(100% - 9px);margin-top:9px}
.final-note{border-left:2px solid #6ba0c6;padding:4px 9px;text-align:left;background:#f2f8fc;font-size:clamp(10px,2.65vw,13px)}
.end-actions .btn{font-size:clamp(11px,2.8vw,14px);min-height:43px}
.people-body{gap:clamp(7px,1.4dvh,15px);padding:10px 14px calc(12px + env(safe-area-inset-bottom))}
.people-title{margin:0;color:#24537e;font-size:clamp(21px,5.6vw,34px);line-height:1.12}
.portrait-row{display:grid;grid-template-columns:minmax(80px,33%) 1fr;gap:12px;align-items:center;width:min(100%,565px);text-align:left}
.portrait-frame{width:100%;aspect-ratio:300/332;border:1px solid #c6e0ec;overflow:hidden;background:repeating-linear-gradient(145deg,#f3faff,#f3faff 8px,#c3ddef 9px,#f3faff 10px);box-shadow:3px 3px 0 #dcebf5;position:relative}
.portrait-frame img{width:100%;height:100%;object-fit:cover;display:block;position:relative;z-index:1;filter:saturate(.95)}.portrait-placeholder{display:block;position:absolute;inset:12%;color:#276895}.portrait-fallback .portrait-placeholder{display:block}
.portrait-details{display:flex;flex-direction:column;gap:5px;min-width:0}.portrait-details b{font-size:clamp(12px,3.3vw,17px);color:#1d4f7b}.portrait-details small{font-size:clamp(10px,2.6vw,12px);line-height:1.3;color:#637e94}.portrait-details p{font-size:clamp(11px,2.85vw,14px);line-height:1.34;color:#2e5778;font-style:italic;margin:4px 0}.portrait-details a{font-size:11px;color:#0055bb}
.science-facts,.student-note{width:min(100%,565px);text-align:left;font-size:clamp(10.5px,2.8vw,13px);line-height:1.37;color:#406078;padding:10px 12px}
.science-facts{border-top:1px solid #bed6e7;border-bottom:1px solid #bed6e7;background:#f7fbff}.science-facts b,.student-note strong{font-size:clamp(11px,3vw,14px);color:#245a88;display:block;margin-bottom:4px}.science-facts p{margin:4px 0}.student-note{background:repeating-linear-gradient(145deg,#edf6fd,#edf6fd 8px,#f9fcff 9px);border-left:3px solid #8cb6d0}.student-note span{display:block}
.people-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.people-actions .btn{font-size:clamp(11px,2.7vw,14px);min-height:42px}.cta-link{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.foot-source{font-size:clamp(8.5px,2.15vw,10.5px);line-height:1.3;color:#8296a6;margin:0;max-width:590px}
@media(max-width:370px){.reading-info small{-webkit-line-clamp:2}.measurements{gap:6px;padding:4px 6px}.scope-instrument{width:149px}.instrument-knobs{width:20px;flex-basis:20px}.scene-cta{gap:7px}.people-body{gap:7px}.portrait-row{grid-template-columns:31% 1fr;gap:9px}}
@media(max-height:680px){.hero-drawing{height:clamp(95px,19dvh,125px)}.info-scene{gap:6px;padding:6px 10px}.scene-copy{font-size:12px}.pencil-note{padding:6px 9px;font-size:11px}.chain-drawing{margin:4px 0}.measurements{height:77px;min-height:69px}.end-body{gap:4px}.end-text{font-size:11px}.end-stats .end-stat{padding:5px}.scan-frame{height:clamp(108px,23dvh,170px)}.people-body{gap:5px}.portrait-frame{max-height:clamp(120px,27dvh,180px)}.portrait-details p{font-size:11px}.science-facts,.student-note{padding:6px 9px}.science-facts p{line-height:1.26}.foot-source{font-size:9px}}
@media(max-height:580px){.hero-drawing{height:95px}.info-scene{gap:4px}.info-scene .intro-title{font-size:26px}.pencil-note{line-height:1.27}.chain-part{padding:4px 2px;gap:3px}.chain-symbol{font-size:27px}.people-title{font-size:21px}.portrait-frame{max-height:107px}.portrait-details p{margin:1px 0}.people-actions .btn{min-height:37px;padding:7px 9px}.student-note{display:none}}

/* v5: short skippable brand intro, science-guide portrait, explicit five-row blocks */
.splash-scene{align-items:center;justify-content:center;cursor:pointer;user-select:none;-webkit-user-select:none;background:repeating-linear-gradient(145deg,transparent 0,transparent 19px,#bfdaf015 20px,transparent 22px),#fbfdff}
.splash-content{height:100%;width:100%;max-width:620px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(20px,5dvh,48px);padding:30px 20px 56px;text-align:center}
.splash-brand{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}
.splash-art{width:min(71vw,250px);height:clamp(178px,37dvh,260px);display:block;filter:drop-shadow(2px 4px 0 #d6e9f6)}
.splash-wordmark{color:#0055bb;font-weight:850;font-size:clamp(28px,7vw,45px);letter-spacing:.01em}
.splash-phrase{display:flex;flex-direction:column;gap:7px;align-items:center;justify-content:center;color:#1f4c7b;font-size:clamp(22px,5.7vw,36px);font-weight:750;line-height:1.18;max-width:590px;letter-spacing:-.03em}
.splash-phrase span{display:block;opacity:0;transform:translateY(11px);animation:revealPencil .6s .25s forwards}
.splash-phrase span.line-two{animation-delay:.78s}
.splash-phrase.institute-phrase{color:#1f2b36;font-size:clamp(20px,5.3vw,34px)}
.splash-skip{position:absolute;right:18px;bottom:calc(18px + env(safe-area-inset-bottom));font-size:12px;color:#567a9c;border:0;background:transparent;padding:13px 7px;z-index:3;cursor:pointer}
.splash-minimal{gap:24px}.splash-present{font-size:clamp(15px,4vw,20px);letter-spacing:.09em;color:#597e9d;font-weight:600;animation:fadePencil .7s both}
.splash-present span{color:#7fadd0}.splash-presents{font-size:clamp(32px,8.8vw,58px);color:#1e5b94;font-weight:800;letter-spacing:-.04em;animation:revealPencil .8s .3s both}
.splash-pencil-line{width:0;max-width:260px;height:2px;background:#7daad0;animation:drawPencil 1.1s .5s forwards}
.splash-series{font-size:clamp(11px,3vw,14px);color:#4f85ab;letter-spacing:.15em;font-weight:800;animation:fadePencil .5s both}
.splash-last{font-size:clamp(31px,8.5vw,61px);font-weight:850;letter-spacing:-.04em;color:#1d568b;line-height:1.12;animation:revealPencil .7s .25s both}
.splash-last em{font-style:normal;color:#0055bb}.splash-small{font-size:13px;font-weight:700;color:#5981a2;animation:fadePencil .8s 1s both}
@keyframes revealPencil{to{opacity:1;transform:translateY(0)}}@keyframes fadePencil{from{opacity:0}to{opacity:1}}@keyframes drawPencil{to{width:62vw}}
@media(prefers-reduced-motion:reduce){.splash-scene *{animation-duration:.01ms!important;animation-delay:0s!important}.splash-pencil-line{width:62vw}}
/* Scientist portrait does not change the measurement panel dimensions. */
.reading-info{position:relative;align-items:stretch;justify-content:center;gap:1px;overflow:hidden}
.guide-top{display:flex;align-items:center;gap:5px;min-height:31px}
.guide-photo{width:31px;height:32px;border:1px solid #90b6d2;border-radius:50%;overflow:hidden;background:#deedf7;flex:0 0 auto;box-shadow:1px 2px 0 #bfd8e7}
.guide-photo{position:relative;display:grid;place-items:center}
.guide-placeholder{position:absolute;font-size:18px;color:#638eaf;font-family:Georgia,serif}
.guide-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 12%;z-index:1}
.guide-name{font-weight:800;color:#1a5688;font-size:11px;line-height:1.1}.guide-name span{display:block;color:#7b97ac;font-size:8px;font-weight:600}
.guide-message{font-size:clamp(9px,2.5vw,11px);color:#335d7f;line-height:1.18;font-weight:600;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-height:33px}
.guide-signal,.guide-count{display:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.game-footnote,.foot-source{display:none!important}
.hero-drawing{width:min(100%,450px);height:clamp(125px,23dvh,190px)}
@media(max-height:650px){.splash-art{height:clamp(130px,30dvh,200px)}.splash-content{gap:14px}.hero-drawing{height:clamp(100px,18dvh,140px)}.guide-top{min-height:24px}.guide-photo{width:25px;height:25px}.guide-message{-webkit-line-clamp:2;font-size:9px}}


/* v6 — типографика и палитра сохраненных HTML-страниц inphe.mephi.ru */

:root{--ink:#24303a;--blue:#0055bb;--deep:#24303a;--line:#d9e1e9;--pale:#f7f9fb;--paper:#fff;--secondary:#56616b;--cyan:#438ba9}
html,body,.app{font-family:Roboto,Arial,Helvetica,sans-serif;color:var(--ink);background:#fff}
button,a{font-family:inherit}
.scene.paper{background:repeating-linear-gradient(153deg,transparent 0px,transparent 20px,rgba(50,111,166,.020) 21px,transparent 23px),#fff}
.section-top.clean-top{height:43px;min-height:43px;padding:6px 15px;background:#fff;border-bottom:1px solid #e3e9ef;box-shadow:none}
.clean-top .mark{font-size:16px;font-weight:700;letter-spacing:0;text-transform:none;color:#24303a}
.iconbutton{width:34px;height:32px;border-radius:6px;background:#f7f9fb;border-color:#d9e1e9;color:#0055bb}
.info-scene,.end-body,.people-body{color:#24303a}
.intro-title,.sub-title,.end-title,.people-title{color:#24303a!important;font-weight:700;letter-spacing:-.012em;line-height:1.25}
.scene-copy,.end-text,.end-stat small,.science-facts p,.student-note span,.portrait-details small{color:#56616b}
.eyebrow{color:#0055bb;font-size:11px;font-weight:700;letter-spacing:.04em}
.pencil-note{border-left:3px solid #0055bb;background:#f7f9fb;color:#56616b}
.pencil-note b{color:#24303a}
.chain-part,.mini-cell,.end-stat,.science-facts,.student-note{background:#fff;border-color:#d9e1e9;border-radius:8px;box-shadow:none}
.chain-part{background:repeating-linear-gradient(45deg,#fff 0,#fff 8px,#f7f9fb 9px,#fff 11px)}
#game{background:#fff}
.game-meta{background:#fff;border-color:#d9e1e9}
.metric small,.board-note,.mini-cell p{color:#56616b}
.metric b,.mini-cell strong{color:#0055bb}
.board-frame{border-color:#9bbce1;box-shadow:0 2px 8px #1b3d6412}
.measurements{background:#f7f9fb;border-color:#d9e1e9;box-shadow:none}
.scope-instrument{border-color:#6d97b8}
.control-strip button{border-radius:7px;color:#0055bb;background:#f7f9fb;border-color:#d9e1e9}
.control-strip #hardBtn{background:#0055bb;border-color:#0055bb}
.game-intro-title{font-family:inherit}
.info-scene{gap:clamp(5px,1.35dvh,13px);padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.scene-bottom{width:min(100%,565px);margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:8px 0 1px;flex:0 0 auto}
.scene-bottom .lowkey-next{margin-left:auto}
.lowkey-next,.lowkey-back{background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;font-size:clamp(12px,3.1vw,15px);line-height:1.5;min-height:36px;padding:4px 1px;color:#0055bb;cursor:pointer;text-decoration:none;font-weight:500}
.lowkey-next span{font-size:18px;vertical-align:-1px;padding-left:4px}
.lowkey-next:hover,.lowkey-back:hover{text-decoration:underline}
.lowkey-back{color:#56616b}
.end-body{justify-content:center;gap:clamp(5px,1dvh,10px)}
.end-body .scene-bottom{width:min(100%,540px);padding-bottom:2px}
#final{background:repeating-linear-gradient(153deg,transparent 0px,transparent 20px,rgba(50,111,166,.018) 21px,transparent 23px),#fff}
#people{background:#fff}
.people-actions .cta-link{background:#0055bb!important;border-radius:7px!important;min-height:43px;font-weight:500}
.people-actions .btn.secondary{background:#fff;color:#0055bb;border-color:#d9e1e9;font-weight:500;border-radius:7px}
/* Сдержанные титры. Только обработанные оригинальные логотипы и текст. */
.splash-scene.paper{background:#fff!important}
.splash-scene{cursor:pointer}
.splash-content{height:100%;width:100%;max-width:690px;margin:0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(36px,7dvh,74px);padding:50px 24px 58px;text-align:center}
.official-logo{display:block;max-width:min(83vw,410px);width:auto;height:auto;object-fit:contain;flex-shrink:0;filter:none}
.official-logo.mephi-logo{max-height:min(27dvh,245px)}
.official-logo.inphe-logo{max-height:min(22dvh,185px)}
.splash-phrase{display:block!important;width:min(100%,640px);font-family:Roboto,Arial,sans-serif;max-width:640px;color:#24303a;font-size:clamp(25px,5.4vw,38px);font-weight:700;letter-spacing:-.015em;line-height:1.35;text-align:center}
.splash-phrase .splash-word{display:inline-block!important;opacity:0;transform:translateY(4px)}
.splash-scene.active .splash-word{animation:revealWord .42s ease-out both;animation-delay:calc(var(--i)*.28s)}
@keyframes revealWord{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.splash-skip{position:absolute;right:17px;bottom:calc(14px + env(safe-area-inset-bottom));background:transparent!important;border:0!important;color:#64717d!important;font-weight:400;font-size:12px;line-height:1.4;padding:8px}
.splash-content-title{gap:20px}
.splash-series{font-size:clamp(12px,3vw,15px);color:#0055bb;font-weight:700;letter-spacing:.06em}
.game-intro-title{margin:0;font-size:clamp(43px,10.5vw,70px);line-height:1.12;color:#24303a;font-weight:700;letter-spacing:-.035em}
.splash-tagline{font-size:clamp(18px,4.7vw,27px);font-weight:500;color:#0055bb}
.splash-edition{font-size:12px;font-weight:400;color:#56616b;max-width:340px;line-height:1.45}
@media(max-height:650px){.splash-content{gap:clamp(16px,5dvh,35px)}.official-logo.mephi-logo{max-height:25dvh}.official-logo.inphe-logo{max-height:19dvh}.splash-phrase{font-size:clamp(20px,5vw,32px)}.info-scene{gap:5px}.scene-bottom{padding:3px 0 0}}
@media(max-width:360px){.splash-phrase{font-size:clamp(22px,6.7vw,27px)}.official-logo{max-width:90vw}.scene-bottom .lowkey-next{font-size:12px}}


/* v7: responsive space distribution and consistent Roboto typography */
.info-scene,.end-body,.people-body{min-height:0;overflow:hidden}
#intro .info-scene,#science .info-scene{justify-content:space-between;gap:clamp(6px,1.65dvh,16px);padding:clamp(12px,2.8dvh,25px) clamp(13px,3.5vw,30px) calc(12px + env(safe-area-inset-bottom))}
#intro .hero-drawing{width:min(100%,520px);height:auto;flex:1 1 150px;max-height:min(34dvh,290px);min-height:95px;display:block}
#science .chain-drawing{flex:1 1 110px;min-height:112px;max-height:min(32dvh,280px);align-items:stretch;margin:0}
#science .chain-part{justify-content:center;gap:clamp(4px,1.3dvh,13px)}
#intro .pencil-note,#science .pencil-note{flex:0 0 auto}
#intro .scene-bottom,#science .scene-bottom,#final .scene-bottom{margin-top:0;min-height:42px;width:min(100%,565px);border-top:1px solid #e3e9ef;padding-top:5px;justify-content:flex-end;align-items:center}
#science .scene-bottom{justify-content:space-between}
.scene-bottom .lowkey-next,.scene-bottom .lowkey-back{display:inline-flex;align-items:center;gap:4px;min-height:39px;min-width:80px;font-size:clamp(13px,3.1vw,15px)}
.scene-bottom .lowkey-next{margin-left:auto}
#final .end-body{justify-content:space-between;padding:clamp(11px,2.4dvh,22px) clamp(13px,3vw,30px) calc(12px + env(safe-area-inset-bottom));gap:clamp(7px,1.45dvh,14px)}
#final .scan-frame{flex:1 1 190px;max-height:min(40dvh,360px);min-height:120px;height:auto;width:min(100%,565px)}
#final .scan-frame canvas{width:100%;height:100%;object-fit:fill}
#final .final-note{max-width:565px;width:100%;font-size:clamp(11px,2.8vw,14px);line-height:1.4}
#people .people-body{justify-content:space-evenly;gap:clamp(5px,1.25dvh,13px);padding:clamp(9px,1.8dvh,18px) clamp(13px,3vw,25px) calc(12px + env(safe-area-inset-bottom))}
#people .people-actions{width:min(100%,565px);align-items:stretch;justify-content:center;margin-top:auto;gap:7px}
#people .people-actions .btn{font-size:clamp(11px,2.7vw,14px)}
#people .people-actions .cta-link,#people .portrait-details a{font-family:Roboto,Arial,sans-serif}
#people .people-actions .cta-link span{font-weight:400;font-size:17px;margin-left:4px}
#people .portrait-details a span{margin-left:3px}
#people .people-actions #shareBtn{font-weight:400;font-size:12px;color:#0055bb}
#final .scan-pencil-caption{font-family:Roboto,Arial,sans-serif;font-weight:700}
@media(max-height:720px){
 #intro .info-scene,#science .info-scene,#final .end-body,#people .people-body{gap:5px;padding-top:6px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}
 #intro .hero-drawing{max-height:24dvh;min-height:75px}
 #science .chain-drawing{max-height:23dvh;min-height:82px}
 #science .chain-part{gap:4px;padding:5px 2px}
 #final .scan-frame{max-height:32dvh;min-height:100px}
 #people .portrait-frame{max-height:clamp(100px,24dvh,160px)}
}
@media(max-height:590px){
 #intro .scene-copy,#science .scene-copy{font-size:11px;line-height:1.3}
 #intro .pencil-note,#science .pencil-note{font-size:10px;line-height:1.28;padding:5px 7px}
 #intro .info-scene .intro-title,#science .sub-title{font-size:clamp(20px,5.6vw,27px)}
 #science .chain-part small{font-size:9px}
 #people .people-body{gap:3px}
 #people .student-note{display:none}
 #people .portrait-frame{max-height:98px}
 #people .science-facts{padding:5px 8px}
 #final .end-text{font-size:10px}
}

/* More even visual use of the viewport on the people page */
#people .people-body{justify-content:space-evenly}
#people .people-actions{margin-top:0}
#intro .hero-drawing{max-height:min(29dvh,235px)}
#science .chain-drawing{max-height:min(25dvh,210px);flex-basis:100px}
#intro .scene-copy,#science .scene-copy{font-size:clamp(12px,3.3vw,16px)}
@media(max-height:650px){#intro .hero-drawing{max-height:22dvh}#science .chain-drawing{max-height:21dvh}}


/* v9: единая фирменная синяя типографика заставок */
#splash1 .splash-phrase,#splash2 .splash-phrase{color:#0055bb!important;font-family:Roboto,Arial,sans-serif;font-weight:700;line-height:1.32}
#splash4 .splash-series,#splash4 .game-intro-title,#splash4 .splash-tagline{color:#0055bb!important}
#splash4 .game-intro-title{font-weight:700;letter-spacing:-.025em;font-size:clamp(41px,10.3vw,69px)}
#splash4 .splash-edition{color:#56616b}
#splash4 .splash-content{gap:clamp(20px,5vh,44px);padding-inline:24px}
#splash4 .game-intro-title span{text-decoration:underline;text-decoration-color:#9ac7e4;text-decoration-thickness:2px;text-underline-offset:9px}
.splash-scene .splash-content{filter:none}
#game .board-frame{background:#f2f9fe}
#final .scan-frame{background:repeating-linear-gradient(145deg,#f9fcff 0,#f9fcff 13px,#eff6fc 14px,#f9fcff 15px)}
#final .scan-frame canvas{image-rendering:auto}
.scan-summary{margin:0;color:#53718a;font-size:clamp(10px,2.7vw,12px);font-family:Roboto,Arial,sans-serif;line-height:1.3}
@media(max-height:660px){#final .scan-summary{font-size:10px}}



/* v10: карандашные логотипы и более рисованные схемы */
.official-logo{image-rendering:auto}
#splash1 .official-logo.mephi-logo{max-height:min(28dvh,250px)}
#splash2 .official-logo.inphe-logo{max-height:min(24dvh,200px)}
#splash4 .splash-content{gap:clamp(26px,6.2vh,58px)!important}
#splash4 .splash-topline{font-family:Roboto,Arial,sans-serif;font-size:clamp(30px,7vw,46px);font-weight:700;letter-spacing:-.016em;line-height:1.1;color:#0055bb}
#splash4 .pencil-title{margin:0;font-size:clamp(51px,12.2vw,82px)!important;font-weight:800!important;letter-spacing:-.035em;line-height:1.02;color:#0c5fcb!important;text-shadow:.6px 0 #88b5de,-.6px 0 #88b5de,0 .6px #88b5de;position:relative}
#splash4 .pencil-title:after{content:'';display:block;width:min(46vw,250px);height:4px;margin:14px auto 0;background:repeating-linear-gradient(90deg,#a9cde8 0,#a9cde8 18px,#dbeaf5 18px,#dbeaf5 28px);border-radius:3px}
#splash4 .splash-content-title{justify-content:center}
#intro .hero-drawing{filter:drop-shadow(1px 1px 0 #ddebf5)}
#intro .hero-drawing text{letter-spacing:.01em}
#science .chain-drawing{gap:8px;align-items:stretch}
#science .chain-part{padding:10px 5px 12px;border:1px solid #bed3e2;border-radius:14px;background:repeating-linear-gradient(145deg,#fbfdff 0,#fbfdff 9px,#eff6fb 10px,#fbfdff 12px);box-shadow:2px 2px 0 #e5eff7}
#science .chain-part b{font-size:clamp(11px,2.8vw,15px);line-height:1.2}
#science .chain-part small{max-width:130px;color:#5e788d}
#science .chain-icon{display:block;width:42px;height:42px;margin:0 auto 2px;overflow:visible}
#science .chain-arrow{align-self:center;font-size:28px;color:#4b83a9;transform:translateY(-2px)}
#science .scene-copy b,#intro .scene-copy b{color:#3f5368}


/* v11: exactly the approved blue-pencil generated logos and title image. */
#splash1 .mephi-logo{width:min(82vw,410px);height:auto;max-height:min(31dvh,265px);object-fit:contain}
#splash2 .inphe-logo{width:min(83vw,440px);height:auto;max-height:min(25dvh,210px);object-fit:contain}
#splash4 .game-intro-title{font-size:inherit!important;width:min(90vw,520px);margin:0 auto!important;line-height:0!important}
#splash4 .pencil-game-logo{display:block;width:100%;height:auto;object-fit:contain;filter:none;}
#splash4 .pencil-title:after{content:none!important}
#splash4 .splash-content-title{gap:clamp(21px,4.5dvh,48px)!important}
@media(max-height:600px){#splash1 .mephi-logo{max-height:28dvh}#splash2 .inphe-logo{max-height:22dvh}}

/* v12: unified hand-pencil schematic accents without changing the apparatus layout */
#intro .hero-drawing {filter:drop-shadow(1px 1px 0 rgba(123,173,207,.18));}
#intro .hero-drawing rect, #intro .hero-drawing path, #intro .hero-drawing circle {stroke-linecap:round;stroke-linejoin:round}
#science .chain-part {background:repeating-linear-gradient(143deg,#fbfdff 0px,#fbfdff 5px,#eaf4fb 6px,#fbfdff 7px);border-color:#accbe0;box-shadow:1px 2px 0 #dcebf6}
#science .chain-icon {filter:drop-shadow(1px 1px 0 rgba(105,156,194,.32))}
#science .chain-icon rect, #science .chain-icon path {stroke-linecap:round;stroke-linejoin:round}
#science .chain-part small {color:#566f83}

/* v12: every game component stays in the *actual visible viewport*.
   The field yields height to the real oscilloscope, Arina's commentary and controls. */
:root { --real-app-height:100dvh }
.app { height:var(--real-app-height)!important; max-height:var(--real-app-height)!important; }
#game.active {display:grid!important;grid-template-columns:minmax(0,1fr);grid-template-rows:46px 43px minmax(0,1fr) clamp(94px,14dvh,111px) calc(55px + env(safe-area-inset-bottom));}
#game .section-top {height:46px;min-height:0;padding:5px 12px}
#game .game-meta {height:43px;min-height:0}
#game .game-body {height:100%;min-height:0;min-width:0;max-height:100%;gap:5px;padding:3px 6px 2px;overflow:hidden;align-items:center;justify-content:center}
#game .board-frame {height:min(100%,calc((100vw - 92px)*1.5))!important;width:auto!important;max-width:none!important;max-height:100%!important;min-height:0;min-width:0;aspect-ratio:2 / 3;flex:0 1 auto}
#game .board-frame canvas {width:100%;height:100%;object-fit:fill}
#game .board-info {width:clamp(58px,17vw,77px)!important;max-width:77px!important;min-width:0;flex:0 0 auto;align-self:center;gap:5px}
#game .board-info .mini-cell {padding:6px 4px}
#game .board-info .info-label {font-size:10px;letter-spacing:0}
#game .board-info .mini-cell p{font-size:10px;line-height:1.2}
#game .board-info .board-note {display:none}
#game #nextCanvas {max-height:45px!important}
#game .measurements {box-sizing:border-box;width:calc(100% - 14px)!important;max-width:690px;margin:0 auto;height:100%!important;min-height:0!important;display:flex;flex-direction:row;align-items:center;gap:8px;padding:5px 7px;overflow:hidden}
#game .scope-instrument {height:100%;width:clamp(129px,43vw,205px);max-width:50%;min-width:0;flex-shrink:0}
#game .reading-info {min-height:0;gap:2px;overflow:hidden}
#game .guide-top {flex-shrink:0}
#game .reading-info .guide-message {font-size:clamp(10px,2.85vw,13px);line-height:1.18;max-height:2.6em;overflow:hidden}
#game .reading-info .guide-signal,#game .reading-info .guide-count{font-size:9px}
#game .control-strip {height:100%;min-height:0!important;margin:0 auto;padding:4px 10px calc(5px + env(safe-area-inset-bottom));gap:8px}
#game .control-strip button {height:100%;min-height:0;padding:2px 4px}
@media (max-height:660px){
  #game.active {grid-template-rows:40px 39px minmax(0,1fr) 94px calc(51px + env(safe-area-inset-bottom));}
  #game .section-top {height:40px;min-height:0}
  #game .game-meta{height:39px;min-height:0}
  #game .metric small{font-size:9px}
  #game .metric b{font-size:14px}
  #game .measurements{gap:5px}
  #game .guide-photo{width:32px;height:32px}
  #game .scope-instrument{width:clamp(119px,41vw,180px)}
}
@media (max-width:350px) {
  #game .board-info{width:58px!important;max-width:58px!important}
  #game .board-info .mini-cell p{font-size:9px}
  #game .scope-instrument{width:125px}
  #game .reading-info .guide-message{font-size:10px}
}


/* v13: мягкая ручная штриховка пиктограмм, без геометрического узора на карточках */
#science .chain-part{background:#fcfeff!important;box-shadow:2px 2px 0 #eaf2f8}
#intro .hero-drawing{max-height:min(28dvh,225px)}

/* v14: sections and figures preserve their geometry; pencil texture has nonuniform strokes. */
#science .chain-part{background:#fcfeff!important;background-image:none!important}
#intro .hero-drawing{max-height:min(28dvh,225px)}

/* v16 tweaks: hand-drawn intro/science visuals + section mini-map */
#game .game-body{align-items:flex-start!important}
#game .board-frame{align-self:flex-start}
#game .board-info{align-self:flex-start!important;justify-content:flex-start!important;padding-top:0;gap:6px!important}
#game .board-info .mini-cell{padding:6px 4px}
#game .board-info .mini-cell.section-mini{padding:6px 4px 5px}
#game .board-info .mini-cell.section-mini canvas{display:block;width:100%;height:82px}
#game .board-info .mini-cell.section-mini .info-label{margin-bottom:3px}
#game .board-info .mini-cell strong{display:block;line-height:1.05}
#game .board-note{display:block!important;font-size:10px;line-height:1.28;margin-top:1px}
@media(max-width:600px){
  #game .board-info{gap:5px!important}
  #game .board-info .mini-cell.section-mini canvas{height:72px}
  #game .board-note{font-size:9px;line-height:1.22}
}
#science .chain-part{background:#fcfeff!important;background-image:none!important;border:1px solid #bed3e2!important;border-radius:15px!important;box-shadow:1px 2px 0 #e4eff7!important;padding:10px 7px 11px!important}
#science .chain-icon{display:block;width:54px!important;height:54px!important;margin:0 auto 3px;overflow:visible!important;filter:none!important}
#science .chain-arrow{font-size:25px;color:#4c82a8;margin:0 2px;align-self:center}
#science .chain-part b{font-size:clamp(11px,2.7vw,15px)}
#science .chain-part small{max-width:132px;color:#5d7488}
@media(max-width:370px){
  #science .chain-icon{width:48px!important;height:48px!important}
  #science .chain-part{padding:9px 5px 10px!important}
}
#intro .hero-drawing,#science .chain-icon{shape-rendering:geometricPrecision}


/* v17: compact sidebar and original schematic, with full-width drawing visible */
#intro .hero-drawing{overflow:visible}
#game .board-info{margin-top:0!important}
#game .board-info .mini-cell.section-mini{border-color:#d9e1e9!important;background:#fff!important}
#game .board-info .mini-cell.section-mini .info-label{color:#56616b}
@media(max-width:370px){#game .board-note{display:none!important}}

/* v18: восстановлены только визуальные схемы по утвержденным скриншотам. */
#science .chain-part{
  background:repeating-linear-gradient(143deg,#fbfdff 0px,#fbfdff 5px,#eaf4fb 6px,#fbfdff 7px)!important;
  background-image:repeating-linear-gradient(143deg,#fbfdff 0px,#fbfdff 5px,#eaf4fb 6px,#fbfdff 7px)!important;
  border-color:#accbe0!important;
  border-radius:14px!important;
  box-shadow:1px 2px 0 #dcebf6!important;
  padding:10px 5px 12px!important;
}
#science .chain-icon{
  width:42px!important;
  height:42px!important;
  margin:0 auto 2px!important;
  filter:drop-shadow(1px 1px 0 rgba(105,156,194,.32))!important;
}
#science .chain-part b{font-size:clamp(11px,2.8vw,15px);line-height:1.2}
#science .chain-part small{color:#566f83}
@media(max-width:370px){
  #science .chain-icon{width:42px!important;height:42px!important}
  #science .chain-part{padding:10px 5px 12px!important}
}


/* v19: Mobile gesture-only playing surface; preserve original board proportions.
   Controls remain in the DOM for unchanged game listeners but are no longer shown. */
#game .control-strip {display:none!important}
#game.active {
  grid-template-rows:46px 43px minmax(0,1fr) clamp(104px,17dvh,154px)!important;
}
#game .game-body {align-items:center!important}
#game .board-frame {align-self:center!important}
#game .board-info {
  align-self:center!important;
  height:min(100%,calc((100vw - 92px)*1.5));
  justify-content:flex-start!important;
}
#game .reading-info .guide-message {
  max-height:3.72em;
  line-height:1.24;
  font-size:clamp(10px,2.85vw,14px);
}
#game .measurements {height:calc(100% - max(6px,env(safe-area-inset-bottom)))!important;align-self:start;margin-bottom:0!important}
@media (max-height:660px){
  #game.active {grid-template-rows:40px 39px minmax(0,1fr) clamp(87px,16dvh,105px)!important}
  #game .reading-info .guide-message{max-height:2.5em}
}
@media (max-width:350px){
  #game .board-info {height:min(100%,calc((100vw - 92px)*1.5))}
  #game .reading-info .guide-message{font-size:10px}
}

/* v19: Researcher screen uses the space freed by removing the share link. */
#people #shareBtn{display:none!important}
#people .people-body{
  justify-content:space-evenly;
  gap:clamp(8px,1.7dvh,20px);
  padding-bottom:calc(16px + env(safe-area-inset-bottom));
}
#people .portrait-row{grid-template-columns:minmax(82px,37%) minmax(0,1fr)}
#people .science-facts,#people .student-note{padding:clamp(9px,1.55dvh,14px) 12px}
#people .people-actions{margin-top:0;align-items:stretch}
@media(max-height:720px){
  #people .people-body{gap:6px;padding-top:7px;padding-bottom:calc(9px + env(safe-area-inset-bottom))}
  #people .portrait-row{grid-template-columns:minmax(75px,34%) minmax(0,1fr)}
  #people .science-facts,#people .student-note{padding:7px 9px}
}
@media(max-height:590px){
  #people .people-body{gap:3px}
  #people .portrait-row{grid-template-columns:minmax(70px,31%) minmax(0,1fr)}
  #people .science-facts{padding:5px 8px}
}

/* v21: prevent mobile double-tap enlargement during active play, not on info pages. */
html.sipm-playing,html.sipm-playing body{touch-action:manipulation;overscroll-behavior:none}
#game #boardFrame,#game #board{touch-action:none!important;-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important}

/* v21: move ONLY the third splash title to the logo height on preceding screens. */
#splash4 .splash-content-title{transform:translateY(clamp(-128px,-13dvh,-73px))}


/* v0.22 — approved pencil artworks on the two introductory screens.
   Sizing changes only the illustrations, never the existing game screen. */
#intro .hero-illustration, #science .science-illustration {
  display:block;
  width:min(100%,565px);
  height:auto;
  min-height:0;
  min-width:0;
  flex:1 1 auto;
  object-fit:contain;
  object-position:center;
  margin:0 auto;
  filter:none;
}
#intro .hero-illustration {max-height:min(33dvh,295px)}
#science .science-illustration {max-height:min(34dvh,295px)}
@media(max-height:720px){
  #intro .hero-illustration {max-height:28dvh}
  #science .science-illustration {max-height:29dvh}
}
@media(max-height:590px){
  #intro .hero-illustration {max-height:24dvh}
  #science .science-illustration {max-height:25dvh}
}

/* v0.22 — optional score presentation after the existing laboratory scan. */
.participant-overlay[hidden]{display:none!important}
.participant-overlay{
  position:absolute;inset:0;z-index:45;
  display:flex;align-items:center;justify-content:center;
  padding:calc(15px + env(safe-area-inset-top)) 17px calc(15px + env(safe-area-inset-bottom));
  background:rgba(20,47,71,.44);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
.participant-card{
  box-sizing:border-box;width:min(100%,430px);max-height:100%;overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:clamp(18px,4.4dvh,30px) clamp(16px,4.3vw,30px) clamp(16px,3.6dvh,27px);
  border:1px solid #b9d1e5;border-radius:18px;
  background:repeating-linear-gradient(151deg,#fff 0px,#fff 17px,#f7fbfe 18px,#fff 20px);
  box-shadow:0 16px 50px rgba(15,51,85,.22);
  text-align:center;color:#24303a;
}
.participant-eyebrow{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:#0055bb;font-weight:700}
.participant-card h2{font-size:clamp(23px,5.6vw,30px);line-height:1.2;margin:9px 0 12px;color:#24303a}
.participant-percent{font-size:clamp(62px,17vw,88px);line-height:1;letter-spacing:-.05em;font-variant-numeric:tabular-nums;font-weight:800;color:#0055bb}
.participant-percent span{font-size:.48em;letter-spacing:0;margin-left:2px}
.participant-grade{font-size:clamp(17px,4.4vw,21px);font-weight:700;color:#1d5488;margin:12px 0 13px}
.participant-meter{height:10px;width:100%;overflow:hidden;border-radius:20px;background:#e6eef5;border:1px solid #d4e3ef}
.participant-meter span{height:100%;display:block;width:0;background:linear-gradient(90deg,#5a9cc5,#0055bb);border-radius:inherit;transition:width .8s ease-out}
.participant-count{font-size:clamp(13px,3.35vw,15px);margin-top:12px;font-weight:700;color:#3b566d}
.participant-target{font-size:12px;color:#61778b;margin-top:4px}
.participant-message{font-size:clamp(13px,3.25vw,15px);color:#526370;line-height:1.48;margin:16px auto 20px;max-width:340px}
.participant-actions{display:flex;flex-direction:column;gap:9px}
.participant-primary,.participant-secondary{border-radius:9px;min-height:45px;padding:9px 12px;font-size:clamp(13px,3.4vw,15px);font-weight:600}
.participant-primary{background:#0055bb;border:1px solid #0055bb;color:white}
.participant-secondary{background:#fff;border:1px solid #d8e3ec;color:#0055bb}
.participant-actions button:active{filter:brightness(.95)}
@media(max-height:560px){
 .participant-card{padding:13px 15px}
 .participant-card h2{margin:5px 0 7px;font-size:22px}
 .participant-percent{font-size:56px}
 .participant-grade{margin:7px 0}
 .participant-message{font-size:12px;margin:10px auto}
 .participant-primary,.participant-secondary{min-height:38px}
}
@media(prefers-reduced-motion:reduce){.participant-meter span{transition:none}}


/* v0.23 — one editorial introduction; consistent navigation and help. */
:root{--app-action-radius:10px;--app-action-height:44px}
/* Same type family on all editorial screens and score dialogs; the game board layout is unchanged. */
#intro,#final,#people,.participant-card,.pause-box{font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}

#intro .intro-unified{
  justify-content:space-between;
  gap:clamp(8px,1.5dvh,15px);
  padding:clamp(12px,2.6dvh,24px) clamp(18px,4vw,32px) calc(12px + env(safe-area-inset-bottom));
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
#intro .intro-title{
  flex:0 0 auto;
  margin:0;
  color:#1f2b36;
  font-size:clamp(27px,7vw,40px);
  line-height:1.09;
  letter-spacing:-.025em;
}
#intro .hero-illustration{
  flex:0 1 auto;
  width:min(100%,530px);
  height:auto;
  max-height:min(29dvh,255px);
  min-height:90px;
  object-fit:contain;
  margin-inline:auto;
}
#intro .intro-explanation{
  width:min(100%,510px);
  flex:0 0 auto;
  text-align:left;
  color:#344e64;
  font-size:clamp(13px,3.4vw,15px);
  line-height:1.46;
}
#intro .intro-explanation p{margin:0;padding:0}
#intro .intro-explanation p + p{
  border-top:1px solid #dfe9f0;
  margin-top:clamp(9px,1.5dvh,15px);
  padding-top:clamp(9px,1.5dvh,15px);
}
#intro .intro-explanation strong{color:#1e5285;font-weight:700}
#intro .scene-bottom{
  width:min(100%,510px);
  min-height:52px;
  flex:0 0 auto;
  margin-top:0;
  padding:8px 0 0;
  border-top:1px solid #dfe9f0;
  justify-content:flex-end;
}

/* A deliberate two-tier button vocabulary for intro, lab, researcher, pause and score. */
.app-btn{
  appearance:none;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:var(--app-action-height);
  padding:10px 17px;
  border-radius:var(--app-action-radius);
  border:1px solid transparent;
  text-decoration:none;
  text-align:center;
  font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  font-size:clamp(13px,3.4vw,15px);
  font-weight:600;
  line-height:1.3;
  box-shadow:none;
  transition:background-color .15s ease,border-color .15s ease;
  cursor:pointer;
  touch-action:manipulation;
}
.app-btn--primary{background:#0055bb;border-color:#0055bb;color:#fff}
.app-btn--secondary{background:#fff;border-color:#b8d0e3;color:#0055bb}
.app-btn--primary:hover{background:#004b9f;border-color:#004b9f;color:#fff;text-decoration:none}
.app-btn--secondary:hover{background:#f2f8fd;border-color:#83a8c6;color:#0055bb;text-decoration:none}
.app-btn:active{filter:brightness(.94)}
.app-btn:focus-visible{outline:3px solid #49a7ce;outline-offset:3px}
.app-btn span[aria-hidden="true"]{font-size:18px;line-height:1}
#intro .scene-bottom .app-btn,#final .scene-bottom .app-btn{min-height:44px;max-width:100%}
#final .scene-bottom{min-height:52px;gap:8px;padding-top:7px}
#people .people-actions .app-btn{min-height:44px;border-radius:var(--app-action-radius)!important;font-weight:600!important}
#people .people-actions .cta-link.app-btn{background:#0055bb!important;border:1px solid #0055bb!important;color:#fff!important}
#people .people-actions .app-btn--secondary{background:#fff;border:1px solid #b8d0e3;color:#0055bb}
#people .people-actions .app-btn--secondary:hover{background:#f2f8fd}
.participant-actions .app-btn{width:100%;min-height:44px}
.pause-box .app-btn{min-width:160px}

/* The optional scientific drawing is available only through the existing '?' help button. */
.pause-screen{padding:12px}
.pause-box{
  width:min(100%,440px);
  max-width:440px;
  max-height:calc(100dvh - 38px);
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:clamp(14px,3dvh,23px);
  border-radius:14px;
}
.pause-box h2{color:#1f2b36;font-size:clamp(21px,5vw,26px)}
.pause-box #pauseText{font-size:clamp(13px,3.35vw,15px);color:#344e64;line-height:1.45;margin:0 auto 13px;max-width:380px}
.help-science[hidden]{display:none!important}
.help-science{margin:0 auto 14px;border-top:1px solid #dfe9f0;padding-top:11px}
.help-science img{display:block;width:100%;height:auto;max-height:clamp(95px,24dvh,180px);object-fit:contain}
.help-science p{font-size:clamp(12px,3.1vw,13px);line-height:1.42;color:#3e5a70;margin:8px 0 0}

@media(max-height:690px){
  #intro .intro-unified{gap:7px;padding-top:9px}
  #intro .hero-illustration{max-height:24dvh;min-height:70px}
  #intro .intro-explanation{font-size:clamp(12px,3.35vw,14px);line-height:1.34}
  #intro .intro-explanation p + p{margin-top:7px;padding-top:7px}
  #intro .scene-bottom{min-height:48px;padding-top:5px}
}
@media(max-width:350px){
  #intro .intro-unified{padding-left:13px;padding-right:13px}
  #intro .hero-illustration{max-height:22dvh}
  .app-btn{padding-inline:12px}
}
@media(prefers-reduced-motion:reduce){.app-btn{transition:none}}
