*{box-sizing:border-box}body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,"Noto Sans Thai",sans-serif;background:#f2f0e5;color:#243f37}button,select,a{font:inherit}button,select{min-height:44px;border:1px solid #c9d4c7;border-radius:12px;background:#fffdf5;color:inherit;padding:10px 14px;cursor:pointer}button:hover{filter:brightness(.96)}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #c67440;outline-offset:3px}button:disabled{opacity:.4;cursor:default}.studio{max-width:1150px;margin:auto;padding:0 28px}.top{height:88px;border-bottom:1px solid #cbd1c3;display:flex;align-items:center;justify-content:space-between;gap:12px}.back{color:inherit;text-decoration:none;font-size:13px}.wordmark{font-size:13px;letter-spacing:.2em;font-weight:800}.language select{max-width:145px;background:transparent}.layout{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(340px,1.15fr);gap:70px;align-items:center;padding:45px 0}.edition{font-size:11px;letter-spacing:.14em;color:#7e8b72}h1{font-size:clamp(32px,4.8vw,56px);line-height:1.08;letter-spacing:-.04em;margin:22px 0}p{line-height:1.65}.tagline{font-size:19px;color:#607763}.description{font-size:15px;max-width:370px}.badge{display:inline-block;font-size:12px;border:1px solid #cad5bb;padding:9px 14px;border-radius:30px;margin:15px 0}details{margin:25px 0;font-size:14px}summary{cursor:pointer;min-height:44px;padding:12px 0}details p{color:#607763}.tools{display:flex;flex-wrap:wrap;gap:7px}.tools button{font-size:11px;background:transparent;padding:8px 11px}#notice{min-height:25px;font-size:12px}.game-panel{padding:20px;background:#e6eadb;border:1px solid #d1d9c4;border-radius:26px;box-shadow:0 20px 45px #243f3710;overflow:hidden}.panel-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.panel-top button{font-size:12px;padding:8px 12px}.stats{display:flex;justify-content:space-around;margin:18px 0}.stats div{display:flex;flex-direction:column;align-items:center;gap:4px}.stats strong{font-size:24px;letter-spacing:-.04em}.stats span{font-size:10px;text-transform:uppercase;letter-spacing:.08em}.play-area{position:relative;isolation:isolate;background:#f7f6ec;border:1px solid #d0d8c1;border-radius:16px;overflow:hidden}#board{min-height:330px}.overlay{position:absolute;inset:0;background:#edf1e7e8;backdrop-filter:blur(7px);z-index:3;display:flex;align-items:center;justify-content:center;padding:18px}.overlay[hidden]{display:none}.overlay-card{text-align:center;max-width:310px}.overlay h2{font-size:27px;line-height:1.2;margin:12px 0}.overlay p{font-size:13px}.emblem{font-size:38px;color:#e58c5f}.primary{background:#294f3e;color:#fff;border:0;min-width:170px;font-weight:650;margin:8px 0}.actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.actions button{font-size:12px}#status{text-align:center;min-height:48px;padding:12px 0;font-size:12px;line-height:1.4}footer{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #cbd1c3;padding:24px 0;color:#7e8b72;font-size:10px;letter-spacing:.04em}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.space{background:#101d2a;color:#deecec}.space .top,.space footer{border-color:#2c3d4b}.space .game-panel{background:#172a3a;border-color:#314352}.space .play-area{background:#0f202f;border-color:#334957}.space .overlay{background:#132939eb}.space button,.space select{background:#203b49;color:#dbecec;border-color:#3b5662}.space .primary{background:#d0f078;color:#18342d}.space .description,.space .tagline,.space details p{color:#9eb8bc}.space .badge{border-color:#46565b}.space .edition,.space footer{color:#8ca4ac}.space .emblem{color:#d0f078}.space canvas{display:block;width:100%;touch-action:none;aspect-ratio:3/4}.space #board{min-height:0}
@media(max-width:740px){.studio{padding:0 16px}.top{height:68px}.wordmark{font-size:10px}.language select{max-width:125px;font-size:12px}.layout{display:flex;flex-direction:column;gap:18px;padding:22px 0}.intro{width:100%;display:grid;grid-template-columns:1fr auto;gap:0 8px}.edition{grid-column:1/-1;font-size:9px}h1{font-size:30px;margin:9px 0;grid-column:1/-1}.tagline{font-size:13px;margin:0;grid-column:1/-1}.description,.badge{display:none}details{margin:8px 0 0;grid-column:1/-1;font-size:12px}details p{margin:0 0 8px}.tools{grid-column:1/-1}.tools button{min-height:36px}#notice{display:none}.game-panel{width:100%;max-width:480px;padding:14px;border-radius:20px}.stats{margin:12px 0}.stats strong{font-size:21px}#board{min-height:280px}.overlay h2{font-size:23px}footer{font-size:9px;padding:20px 0}.space canvas{max-height:58dvh;object-fit:contain}.space #board{display:grid;place-items:center}.space canvas{width:auto;max-width:100%}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

@media(max-width:740px){.playing .edition,.playing .tagline{display:none}.playing h1{font-size:24px;margin:2px 0}.playing .layout{padding:14px 0;gap:12px}.playing .intro details{margin-top:0}.playing .intro .tools{margin-top:0}.playing .tubes{min-height:260px!important;padding-top:22px;padding-bottom:22px}.playing .space canvas{max-height:55dvh}}

.space #board{min-height:0}.space canvas{aspect-ratio:6/7;width:100%;height:auto;max-height:none;touch-action:none}.game-panel{max-width:480px}.actions button{min-width:44px;min-height:44px}.space .tools button{min-height:44px}@media(max-width:740px){.space canvas{width:100%;max-height:none}.studio{padding:0 10px}.game-panel{padding:10px}.layout{gap:10px}.playing .intro h1{font-size:22px}.playing #help{display:none}.playing .intro .tools{display:none}.playing footer{display:none}#status{font-size:11px;max-height:82px;overflow:auto}.actions{gap:5px}.actions button{padding:8px 10px;font-size:11px}.stats{margin:8px 0}}
@media(max-width:740px){.playing .top{height:52px}.playing .intro{display:none}.playing .layout{padding:8px 0;gap:0}.playing #status{display:none}.playing .stats{margin:6px 0}.playing .stats strong{font-size:18px}.playing #board{display:grid;place-items:center}.playing canvas{width:min(100%,calc((100dvh - 300px)*6/7));height:auto;max-width:100%}.playing .actions{margin-top:10px}.playing .overlay-card .tools{display:flex;justify-content:center;margin-top:8px}}