@font-face{font-family:"Noto Sans Thai";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/noto-sans-thai-400.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Thai";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/noto-sans-thai-500.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Thai";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/noto-sans-thai-600.ttf") format("truetype")}
@font-face{font-family:"Noto Sans Thai";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/noto-sans-thai-700.ttf") format("truetype")}
/* NKW colour pairing: midnight + mint, violet + lavender, coral + blush.
   Inspired by Khroma's UI colour family. All fonts/assets are served locally. */
:root{--ink:#2b0218;--green:#831751;--line:#e6dcef;--muted:#745f86;--mint:#9046cd;--mint-pale:#eee4f7;--purple:#7050dc;--lavender:#f0eaff;--coral:#ff356a;--blush:#ffe9f0;--sky:#dfb9ff;--paper:#f7f1fc;font-family:"Noto Sans Thai",Tahoma,system-ui,sans-serif;color:var(--ink);background:var(--paper);font-size:14px}
body{background:var(--paper);color:var(--ink)}
button,input,select,textarea{font-family:inherit}button{border-radius:9px;font-weight:500;color:var(--ink);border-color:var(--line);transition:background .18s,border-color .18s,box-shadow .18s,transform .18s}button:hover{background:#f3e9fc;border-color:#ceb4e4;box-shadow:0 3px 9px #2b02180b}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #7050dc;outline-offset:3px}button:disabled{box-shadow:none;transform:none}input,textarea,select{accent-color:var(--purple)}a{color:#4d35a5}
header{height:84px;background:var(--ink);border:0;padding:0 4%;box-shadow:0 3px 18px #2b021812}#brand{color:#fff;gap:13px}#brand strong{font-weight:700;font-size:18px;letter-spacing:-.3px}#brand b{font-weight:500;color:#f2e1ff}#brand small{font-size:10px;color:#c2a7d8;letter-spacing:.9px}.logo{background:#9046cd;color:#2b0218;border-radius:12px;width:44px;height:46px;box-shadow:3px 3px 0 #9046cd25}.logo span{color:#2b0218;right:3px;top:1px}nav{gap:8px}nav button{color:#ebd9fa;border:1px solid transparent;font-size:12px;padding:8px 12px}nav button:hover{color:#fff;background:#ffffff0d;border-color:#ffffff1f;box-shadow:none}.local{color:#c79aeb;border-color:#9046cd40;background:#9046cd0e;padding:7px 11px;font-size:10px}
#home{max-width:1440px;padding:46px 4% 40px}.nkw-hero{display:grid;grid-template-columns:1.12fr 1fr;gap:55px;align-items:center;margin-bottom:54px}.nkw-hero-copy{padding:16px 0}.eyebrow{color:#80546b;font-size:10px;letter-spacing:2px;font-weight:700}.nkw-hero-copy>.eyebrow{display:inline-flex;align-items:center;gap:9px;color:#391954;background:#ebdff4;border:1px solid #ceb5e2;border-radius:30px;padding:8px 13px;font-size:9px;letter-spacing:1.2px}.nkw-hero-copy>.eyebrow::before{content:"";width:6px;height:6px;background:#602193;border-radius:50%}h1{font-size:clamp(33px,3.7vw,53px);line-height:1.45;letter-spacing:-1.5px;font-weight:700;color:var(--ink);margin:21px 0 16px}h1 .hero-accent{color:#5b3bb8}h1 .hero-dot{color:var(--coral)}.intro{font-size:14px;color:#725d84;line-height:1.95;margin-bottom:24px}.home-meta{gap:13px;margin:28px 0 0;font-size:10px;flex-wrap:wrap;color:#604873}.home-meta span{display:inline-flex;align-items:center;gap:6px}.home-meta b{display:inline-grid;place-items:center;width:23px;height:23px;background:#e3dafb;color:#5b3bb8;border-radius:7px;font-size:10px}.home-meta span:nth-of-type(2) b{background:#dfccef;color:#391854}.home-meta span:nth-of-type(3) b{background:#ffdae5;color:#9c2554}.home-meta i{color:#9780aa}
.nkw-hero-visual{border:1px solid #e1cfef;border-radius:22px;background:#edd8ff;overflow:hidden;box-shadow:0 18px 45px #421c6210;position:relative}.nkw-hero-visual-top{display:flex;justify-content:space-between;align-items:center;padding:15px 20px;font-size:10px;font-weight:600;letter-spacing:1.5px;color:#703052}.nkw-ready-dot{letter-spacing:0;font-size:10px;background:#f1e4fb;color:#3e195c;padding:5px 9px;border-radius:20px}.nkw-hero-visual img{display:block;width:100%;height:264px;object-fit:contain;object-position:center;background:#e1d5db}.nkw-hero-visual-bottom{background:var(--ink);padding:18px 21px;display:flex;align-items:flex-start;justify-content:space-between;gap:15px;flex-direction:column}.nkw-hero-visual-bottom strong{font-size:14px;font-weight:500;color:#fff}.nkw-hero-visual-bottom span{color:#e1b3cc;font-size:10px}
.section-title{margin:0 0 20px;align-items:end}.section-title h2{font-weight:600;font-size:23px;letter-spacing:-.3px;margin:9px 0 0}.section-title>.eyebrow{font-size:9px}.section-title>span{background:#fff;border:1px solid #e6dcef;padding:8px 12px;border-radius:8px;color:#735f84;font-size:10px}.section-title>span i{display:inline-block;width:6px;height:6px;background:#632595;border-radius:50%;margin-right:6px}.cards{gap:22px;grid-template-columns:1.15fr 1fr 1fr}.card{border:1px solid #e6dcef;border-radius:17px;box-shadow:0 7px 22px #2b021804;transition:transform .2s,box-shadow .2s,border-color .2s}.card:hover{transform:translateY(-4px);box-shadow:0 16px 30px #2b02180c;border-color:#d0b7e4}.active-card{border-color:#c8b5d8}.card-photo{height:225px;background:#e1d5db;border-bottom:4px solid #9046cd}.card-photo img{background:#e1d5db}.badge{top:14px;left:14px;background:#2b0218eF;color:#cca0f0;border-radius:7px;padding:7px 10px;font-size:10px;border:1px solid #ffffff30;box-shadow:0 3px 10px #2b021816}.card-body{padding:23px}.card-body small{color:#8e647a;font-weight:600;font-size:9px;letter-spacing:1.4px}.card-body h2{font-weight:600;font-size:20px;color:var(--ink);margin:12px 0 9px}.card-body p{font-size:12px;color:#845d72;line-height:1.9}.chips{gap:6px}.chips span{background:#f0e8f6;color:#44235f;border:1px solid #ddceea;font-size:9px;padding:5px 7px;border-radius:5px}.primary{background:var(--ink);border-color:var(--ink);color:#fff}.primary:hover{background:#541938;border-color:#541938;color:#fff;box-shadow:0 5px 12px #2b021818}.wide{padding:13px 14px;border-radius:8px;font-size:12px}.wide span{color:#a964e1;font-size:16px}.future-art{height:225px;color:#7050dc;background:#eee7ff;border-bottom:4px solid #9c72ff;gap:0}.future-art small{font-size:9px;letter-spacing:2.6px;font-weight:600;margin:0 0 15px;color:#6f50a9}.nkw-lab-icon{width:190px;height:155px;flex:none}.future-art.sumo{color:#c33f5d;background:#ffe8ed;border-color:#ff809f}.future-art.sumo small{color:#a33e58}.upcoming .soon{background:#f6f4fb;border-color:#e5deef;color:#6d5b89;font-size:10px;border-radius:7px}.upcoming:last-child .soon{background:#fff4f6;border-color:#f0d8e0;color:#9b4b62}.notice{border:1px solid #e9ddbb;border-left:4px solid #e8b951;background:#fff9e9;color:#75613a;padding:13px 17px;font-size:11px;border-radius:8px;margin-top:27px;line-height:1.9}
footer{padding:25px 4%;background:#fff;border-color:#e9e0f0;gap:20px;color:#6a527d}footer>span{color:#6f274d;letter-spacing:1.8px;font-size:9px;font-weight:700}footer p{font-size:10px;color:#7d5369}footer small{color:#9582a5}
#lab{padding:27px 2.8% 32px;max-width:1920px;margin:auto}.lab-title{margin-bottom:20px;align-items:center}.lab-title .eyebrow{color:#7b648e;font-size:10px;letter-spacing:1px}.lab-title h2{font-size:23px;color:#4b102f;letter-spacing:-.5px;font-weight:600;margin-top:9px}.title-tools{gap:7px;flex-wrap:wrap;justify-content:flex-end}.title-tools button{font-size:11px;min-height:37px;padding:8px 12px;border-radius:8px;background:#fff}.title-tools [data-dialog="missions"]{background:#f1eaff;border-color:#d9cbf7;color:#58369f}.title-tools [data-dialog="rules"]{background:#fff5e0;border-color:#eddba7;color:#786024}.title-tools [data-dialog="settings"]{background:#f4e7ff;border-color:#e2c9f7;color:#963167}.title-tools [data-dialog="field"]{background:#ede1f6;border-color:#d1b8e5;color:#442260}
.project-bar{background:#fff;border:1px solid #e6dcef;border-radius:12px;padding:12px;gap:7px;box-shadow:0 3px 10px #2b021803;margin-bottom:14px}.project-bar input{border-radius:7px;border-color:#e6dcef;background:#fbf7fe;color:#551839;font-size:11px;min-height:36px}.project-bar #project{font-weight:600;width:205px}.project-bar button{font-size:11px;min-height:36px;padding:7px 10px}.project-bar #save{background:#f0e7f7;border-color:#d3bee4;color:#442160}.project-bar #saved{color:#87536f;font-size:9px}
#lab > #simulationControls.nkw-sim-toolbar{background:#fff;border:1px solid #eccbdd;border-top:3px solid #9046cd;border-radius:12px;min-height:68px;gap:8px;box-shadow:0 6px 18px #2b021809;padding:11px 14px;top:8px}.nkw-toolbar-title{color:#5a3f71!important}#simulationControls button{border-radius:8px;font-size:12px;padding:10px 16px}#simulationControls #run{background:#2b0218;border-color:#2b0218;color:#fff;min-width:158px}#simulationControls #run:hover{background:#541938;box-shadow:0 5px 12px #2b021818}#simulationControls #pause{background:#fff4d8;border-color:#ecda9f;color:#785d19}#simulationControls #stop{background:#ffe7ed;border-color:#f1becd;color:#9d2c50}#simulationControls #reset{background:#eee7ff;border-color:#d7c8f7;color:#6341ac}#simulationControls label{color:#875670}#simulationControls select{border-color:#e3d3f0;background:#faf7fd;color:#6d254b}.nkw-audio-controls{border-color:#e6dcef!important}#simulationControls #motorSound{color:#472166;background:#efe5f8;border-color:#d5c0e7}#simulationControls #motorSound[aria-pressed="false"]{background:#f5f1f8;border-color:#e3d9eb;color:#745f85}#simulationControls #motorVolume{accent-color:#7050dc}#simulationControls #motorVolumeValue{color:#5d4c91}
.workbench{gap:16px}.editor-panel,.sim-panel,.panel{border-color:#e5d8f0;border-radius:13px;box-shadow:0 4px 16px #2b021804}.panel-head{padding:13px 15px;border-color:#eae0f2;background:#fcf8ff;min-height:49px}.panel-head strong{font-size:12px;color:#57193a;font-weight:600}.panel-head .tiny{color:#7c648f}.editor-panel>.panel-head{background:#eee8fb}.editor-panel>.panel-head strong{color:#573e8f}.editor-panel>.panel-head .tiny{color:#725f98}.sim-panel>.panel-head{background:#ede4f5}.sim-panel>.panel-head strong{color:#42225c}.sim-panel>.panel-head .tiny{color:#635072}.dot{background:#642696;box-shadow:0 0 0 3px #64269615;width:7px;height:7px}.dot.blue{background:#8a62dc;box-shadow:0 0 0 3px #8a62dc18}.example-bar{background:#fcf9ff;border-color:#e8e1f5;padding:9px;gap:6px}.example-bar label{color:#695481}.example-bar select{border-color:#dacfeb;background:white;color:#503b75;padding:6px;border-radius:6px;font-size:10px}.example-bar button{color:#674492;border-color:#dfd3f0;background:#fff}.editor-bottom{color:#7b6a89;background:#faf9fe;border-color:#e3dfef;padding:9px;font-size:9px}.blocklyToolboxDiv{border-right:1px solid #e4def2}.blocklyTreeLabel{font-family:"Noto Sans Thai",Tahoma,sans-serif!important;font-size:12px!important}.blocklyFlyoutBackground{fill:#eeeaf6!important}.viewport-wrap{background:#f8eaf1}.view-buttons{gap:4px}.view-buttons button{background:#fffffff2;border-color:#e2d0f0;color:#7e3c5f;border-radius:7px;font-size:9px;padding:6px 9px;box-shadow:0 2px 5px #2b021807}.view-buttons button.selected{background:#2b0218;color:#fff;border-color:#2b0218}.view-label{color:#7d3d5f;font-size:9px}.view-label span{color:#96647f}.debug{color:#783c5c;background:#ffffffd6;padding:4px 7px;border:1px solid #f0d9e5;border-radius:6px;font-size:9px}.state{color:#41215c;background:#efe4f8;border:1px solid #ceb5e2;font-size:9px;padding:6px 10px;font-weight:500}
.telemetry{padding:12px 8px;gap:7px;background:#fff;border-top:1px solid #eae0f2}.telemetry>div{border:0!important;border-radius:8px;background:#f7edff;padding:10px 12px;min-width:0}.telemetry>div:nth-child(2){background:#eee4f7}.telemetry>div:nth-child(3){background:#f0eaff}.telemetry>div:nth-child(4){background:#fff1dc}.telemetry small{font-size:9px;color:#81526b;margin-bottom:5px}.telemetry strong{font-size:20px;color:#7a2452;font-weight:600}.telemetry>div:nth-child(2) strong{color:#4b1d70}.telemetry>div:nth-child(3) strong{color:#6d469e}.telemetry>div:nth-child(4) strong{color:#8c6323}.telemetry em{color:#7f6892;font-size:9px}
.lower-grid{gap:16px;margin-top:16px}#sensors{padding:16px 14px;gap:8px}.sensor{font-size:9px;color:#8c6479}.sensor strong{color:#7b2955;font-weight:600;font-size:14px}.sensor progress{accent-color:#7050dc;height:6px}.sensor:nth-child(n+5) progress{accent-color:#66259c}.sensor-note{color:#92687e;font-size:9px;padding-bottom:13px}.event{border-color:#f2edf7;color:#593c71;gap:9px}.event time{background:#f7edff;color:#8e426b;border-radius:4px;padding:0 5px;height:max-content;font-size:9px;min-width:48px}.event small{color:#846e96}.results{margin-top:16px}.results>.panel-head{background:#f4edfa}.results>.panel-head>strong{color:#583873}.results .panel-head button{border-color:#e0d1ed;color:#7b375b;font-size:10px}.results .panel-head #record{background:#2b0218;border-color:#2b0218;color:#fff}.results .panel-head select{border-color:#e1cfef;color:#7f4564;background:white}.results textarea{border-color:#efd9e5;background:#fdfbff;color:#632d4a;border-radius:8px;line-height:1.8}.results textarea::placeholder{color:#a27c90}th{background:#f5edfc;color:#6b4887;font-size:10px;font-weight:600}td,th{border-color:#ece2f4}td{color:#723d59}#history td small{font-size:9px;color:#9a7287}#history button{color:#67419b;background:#f3edff;border-color:#e0d1f6}
dialog{border:1px solid #edd3e1;background:#fbf7fe;color:#4f1534;border-radius:17px;box-shadow:0 30px 90px #2b021844}dialog::backdrop{background:#2b0218b2;backdrop-filter:blur(5px)}.dialog-top{padding:17px 22px;background:#2b0218;border-color:#54213c;gap:15px}.dialog-top strong{color:#fff;font-size:14px;font-weight:500}.dialog-top button{color:#fae0ee;background:#ffffff0c;border-color:#ffffff2b;font-size:11px}.dialog-top button:hover{background:#ffffff1c}#dialogBody{font-size:12px;color:#713153;line-height:1.95}#dialogBody h3{font-size:18px;font-weight:600;color:#581b3c}#dialogBody p{color:#895370}.mission{background:#fff;border-color:#e4d6f0;border-left:4px solid #9046cd;border-radius:10px;padding:17px 19px;margin-bottom:13px}.mission:nth-of-type(2){border-left-color:#9c72ff}.mission:nth-of-type(3){border-left-color:#ff809f}.mission .primary{font-size:11px;padding:9px 14px}.mission small{color:#75628e}.settings label{color:#885671}.settings input,.settings select{color:#682448;border-color:#eed5e2;border-radius:7px;background:#fff}.tiny{color:#966e83}#toast{background:#2b0218;border:1px solid #6d3452;box-shadow:0 6px 22px #2b021835;border-radius:10px;color:#fff;line-height:1.8;font-size:12px}.nkw-field-tools label{color:#814d69}.nkw-field-tools select{border-color:#e2d2f0;color:#5f3d7a}.nkw-field-tools button,.nkw-field-actions button{font-size:11px}#fieldMap{background:#efe5f8;border-color:#decced;border-radius:10px}#fieldMap .nkw-field-cell:hover,#fieldMap .nkw-field-cell:focus{fill:#7050dc20;stroke:#7050dc}#fieldStatus{color:#655291}
@media(min-width:1600px){#home{padding-top:56px}.nkw-hero{gap:70px}.nkw-hero-visual img{height:290px}.nkw-hero-visual-bottom{flex-direction:row;align-items:center}.intro{font-size:15px}}
@media(max-width:1200px){#simulationControls .nkw-toolbar-title{width:100%;font-size:11px}.nkw-audio-controls{margin-left:0}#simulationControls>label{margin-left:auto}.nkw-hero{gap:28px}.nkw-hero-visual-bottom{gap:6px}.home-meta{gap:8px;font-size:9px}.home-meta b{width:20px;height:20px}.title-tools button{padding:7px 9px;font-size:10px}.project-bar #saved{width:100%;margin-left:0}}
@media(max-width:1000px){.nkw-hero{grid-template-columns:1.1fr 1fr;gap:25px}.nkw-hero-visual img{height:235px}.nkw-hero-copy>.eyebrow{font-size:8px;letter-spacing:.5px}h1{font-size:34px;letter-spacing:-1px}.intro{font-size:12px}.home-meta{gap:9px}.home-meta i{display:none}.home-meta span{font-size:9px}.cards{grid-template-columns:1fr 1fr;gap:18px}.cards .card:last-child{grid-column:span 2}.cards .card:last-child{display:grid;grid-template-columns:1fr 1fr}.cards .card:last-child .future-art{height:100%;min-height:220px;border-bottom:0;border-right:4px solid #ff809f}.card-body h2{font-size:19px}.section-title h2{font-size:21px}.lab-title{align-items:flex-start}.project-bar input{flex:1 1 100px}.project-bar #classroom,.project-bar #number{flex:0 1 60px}.editor-panel{max-width:100%}.telemetry{gap:7px}.panel-head .tiny{font-size:9px}.telemetry>div{padding:9px 11px}}
@media(max-width:700px){header{height:76px;padding:0 18px}#brand strong{font-size:14px}#brand small{font-size:9px}.logo{width:36px;height:39px;font-size:26px}nav{gap:2px}nav button{font-size:10px;padding:6px}#home{padding:27px 20px 30px}.nkw-hero{grid-template-columns:1fr;gap:24px;margin-bottom:33px}.nkw-hero-copy{padding:4px 0}.nkw-hero-copy>.eyebrow{font-size:8px;letter-spacing:1px}h1{font-size:clamp(31px,7.5vw,44px);line-height:1.45;margin-top:18px}.intro{font-size:12px}.home-meta{margin-top:21px;gap:12px}.home-meta i{display:block}.nkw-hero-visual img{height:230px}.nkw-hero-visual-top{padding:12px 16px}.nkw-hero-visual-bottom{padding:15px 17px;gap:5px}.nkw-hero-visual-bottom strong{font-size:13px}.section-title h2{font-size:20px}.section-title .eyebrow{font-size:9px}.cards{grid-template-columns:1fr}.cards .card:last-child{grid-column:auto;display:block}.cards .card:last-child .future-art{height:200px;min-height:0;border-right:0;border-bottom:4px solid #ff809f}.card-photo,.future-art{height:215px}.card-body{padding:21px}.future-art .nkw-lab-icon{height:150px}.notice{font-size:10px;padding:12px 14px}footer{padding:20px;gap:9px;text-align:center}footer p{font-size:9px}.lab-title h2{font-size:20px;letter-spacing:-.4px}.lab-title{gap:12px}.title-tools{justify-content:flex-start}.title-tools button{min-height:34px;padding:7px 10px}.project-bar{padding:10px;border-radius:10px}.project-bar #project{width:100%;flex-basis:100%}.project-bar #student{flex:1 1 100px}.project-bar #classroom,.project-bar #number{flex:0 1 55px}.project-bar button{flex:1 1 25%;font-size:10px}.project-bar #saved{font-size:9px}#lab{padding:19px 12px}#lab > #simulationControls.nkw-sim-toolbar{top:0;padding:10px;gap:7px;border-radius:10px}#simulationControls button{font-size:12px}#simulationControls #run{min-width:0}#simulationControls .nkw-toolbar-title{font-size:10px}#simulationControls .nkw-audio-controls{padding-top:8px}#simulationControls #motorSound{font-size:11px}#simulationControls .nkw-audio-controls label{font-size:10px}#simulationControls #motorVolumeValue{font-size:10px}#simulationControls>label{font-size:10px}.panel-head{padding:12px}.panel-head strong{font-size:11px}.panel-head .tiny{font-size:8px}.view-buttons button{padding:5px 7px;font-size:9px}.state{font-size:8px;padding:5px 7px}.telemetry{gap:5px;padding:9px 6px}.telemetry>div{padding:8px 6px;border-radius:6px}.telemetry small{font-size:8px}.telemetry strong{font-size:15px}.telemetry em{font-size:8px}.debug{font-size:8px;padding:3px 5px}.dialog-top{padding:15px 16px}.dialog-top strong{font-size:12px}#dialogBody{padding:17px;font-size:11px}.mission{padding:14px;border-left-width:3px}.mission h3{font-size:16px!important}.mission button{float:none;display:block;margin-left:auto;margin-bottom:8px}.results .panel-head>div{gap:6px}.lower-grid{gap:13px}#sensors{gap:5px;padding:14px 10px}.sensor strong{font-size:12px}.sensor-note{font-size:8px}.nkw-field-tools select{font-size:11px}.nkw-field-tools label{font-size:11px}}
@media(prefers-reduced-motion:reduce){button,.card{transition:none}.card:hover{transform:none}}
@media print{body{background:#fff;color:#000}.nkw-hero,header,footer,#simulationControls{display:none!important}#printArea{font-family:"Noto Sans Thai",Tahoma,sans-serif}}

/* Keep the WebGL drawing buffer and CSS viewport at the same logical size on HiDPI screens. */
.sim-panel{display:flex;flex-direction:column;min-width:0}.sim-panel>.panel-head,.sim-panel>.telemetry{flex:0 0 auto}
.sim-panel>.viewport-wrap{position:relative;flex:1 1 auto;min-width:0;min-height:365px;overflow:hidden;isolation:isolate}
#viewport{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}
#viewport>canvas{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-width:100%;max-height:100%;margin:0;padding:0}
.viewport-wrap>.view-label{position:absolute;left:10px;bottom:3px;z-index:4;margin:0;padding:2px 5px;line-height:1.5;max-width:calc(100% - 210px);background:#f1e8f8c9;border-radius:4px;pointer-events:none}
.viewport-wrap>.debug{position:absolute;right:10px;bottom:3px;z-index:4;margin:0;padding:3px 6px}
.viewport-wrap>.view-buttons,.viewport-wrap>.state{z-index:4}
@media(min-width:1600px){.sim-panel>.viewport-wrap{min-height:440px}}
@media(max-width:1000px){.sim-panel>.viewport-wrap{flex:none;height:420px;min-height:420px}}
@media(max-width:600px){.sim-panel>.viewport-wrap{height:330px;min-height:330px}.viewport-wrap>.view-label{left:6px;bottom:2px;padding:1px 3px;max-width:54%;font-size:7px}.viewport-wrap>.debug{right:6px;bottom:2px;font-size:8px}.viewport-wrap>.view-label span{display:none}}

.sumo-enter{display:block;text-decoration:none}.sumo-card .card-photo{border-bottom-color:#ff809f;background:white}.sumo-card .card-photo img{background:white}.sumo-card .badge{color:#ffd6e2}.sumo-card .chips span{background:#fff0f4;border-color:#f0d2de;color:#994565}

.line-enter{display:flex;text-decoration:none;align-items:center;justify-content:space-between;box-sizing:border-box}

/* Preserve complete uploaded robot images. */
.cards .card .card-photo{height:auto;aspect-ratio:auto;background:#fff}.cards .card .card-photo img{display:block;width:100%;height:auto;object-fit:contain;object-position:center;background:#fff;transform:none}.nkw-hero-visual img{object-fit:contain;background:#fff}

/* Equal classroom menu cards, with unobstructed uploaded covers. */
#home .cards{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:1fr;align-items:stretch}
#home .cards>.card{display:flex;flex-direction:column;grid-column:auto;min-width:0;height:100%}
#home .cards .card-photo{flex:0 0 auto;aspect-ratio:4/3;height:auto;overflow:hidden;background:#e8e5eb}
#home .cards .card-photo img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;background:#e8e5eb;box-sizing:border-box;padding:12px}
#home .cards .card-body{display:flex;flex:1;flex-direction:column;min-width:0}
#home .cards .card-body h2{line-height:1.5;min-height:3em}
#home .cards .card-body p{min-height:4em;margin-top:0}
#home .cards .card-body>.wide{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px;margin-top:auto;line-height:1.6;white-space:normal;text-align:left}
#home .cards .card-body>.wide span{float:none;flex:0 0 auto}
@media(max-width:1000px) and (min-width:701px){#home .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){#home .cards{grid-template-columns:minmax(0,1fr)}}

#home .cards .card-body p{margin-bottom:24px}
#home .nkw-hero-visual img{background:#e8e5eb;object-fit:contain}
@media(min-width:1100px){#home .cards .card-body h2{min-height:1.5em}}

.start-button-choice{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11px}.start-button-choice select{padding:7px 9px;border-radius:8px;border:1px solid #cebcdd;background:#fff;color:#4e2039;font:inherit}.microbit-keys{display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px}.microbit-keys button{font-size:11px!important;padding:8px!important}#buttonState{font-size:10px;color:#82385f;padding:4px 6px;background:#f5e9ff;border-radius:6px;white-space:nowrap}
.rescue-tool-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:12px 16px}.rescue-tool-row input[type=number]{width:72px;padding:8px;border:1px solid #cdb7df;border-radius:8px}.rescue-tool-row label{display:flex;gap:7px;align-items:center}.cargo-panel{background:linear-gradient(115deg,#ffeff8,#fff1df)}.rescue-debug{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f3fb;border-radius:10px;margin:12px;padding:12px;min-height:32px}.rescue-missions{display:flex;flex-wrap:wrap;gap:10px;padding:14px}.rescue-missions span{padding:10px 13px;background:#f0edf7;border-radius:10px;color:#696379}.rescue-missions .complete{background:#eadcf5;color:#421666}.rescue-ledger{overflow:auto;padding:0 14px 12px}.rescue-ledger table{min-width:540px;width:100%}#replaySeek{width:calc(100% - 32px);margin:12px 16px}.rescue-replay-events{display:flex;overflow-x:auto;gap:8px;padding:12px;max-height:135px}.rescue-replay-events button{flex:0 0 225px;text-align:left;font-size:12px;white-space:normal}.rescue-replay-events small{display:block;color:#706b80}
.mini-scenarios{margin:14px 0;background:linear-gradient(120deg,#ffeff8,#fff5e9)}.mini-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px}.mini-card{padding:14px;border:1px solid #e3d7ed;border-radius:16px;background:#ffffffd9;display:flex;flex-direction:column}.mini-card svg{width:100%;height:auto;border-radius:10px;background:#f3edf8}.mini-card h3{margin:12px 0 6px;font-size:16px}.mini-card p{font-size:13px;flex:1}.mini-card button{width:100%}.mini-card .selected{background:#992864;color:white}@media(max-width:780px){.mini-cards{grid-template-columns:1fr}.mini-card svg{max-height:160px}}
