/* One visible surface. Geometry is measured after safe-area/header allocation. */
html body.reagent-fitting.playing-now #content,html body.reagent-fitting[data-arcade=play] #content{min-height:0;gap:3px!important;overflow:hidden!important}
html body.reagent-fitting #question-area,html body.reagent-fitting .play-reagent_sort #arcade-area{display:flex!important;flex:1!important;min-height:0!important;overflow:hidden!important;padding:0!important;align-items:stretch!important;justify-content:stretch!important;touch-action:manipulation}
html body.reagent-fitting .reagent-fit-game{height:100%!important;width:100%!important;max-height:none!important;min-height:0!important;display:flex!important;flex-direction:column;justify-content:flex-start!important;box-sizing:border-box;margin:0!important;padding:0!important;overflow:hidden}
.reagent-fit-game .lab-field{position:relative;flex:1;min-height:0;width:100%;overflow:hidden;box-sizing:border-box}
html body.reagent-fitting .reagent-fit-game .reagent-board{position:absolute!important;inset:0!important;display:grid!important;grid-template-columns:repeat(var(--lab-cols,1),minmax(0,var(--lab-cell-width,100%)))!important;grid-template-rows:repeat(var(--lab-rows,1),var(--lab-cell-height,0px))!important;gap:var(--lab-gap,4px)!important;align-items:center!important;justify-items:center!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-sizing:border-box}
html body.reagent-fitting #content .reagent-fit-game .reagent-board button.reagent-tube{display:grid!important;place-items:end center!important;grid-column:auto!important;width:100%!important;height:var(--lab-cell-height,0px)!important;max-height:none!important;min-height:0!important;min-width:0!important;aspect-ratio:auto!important;box-sizing:border-box;border-radius:8px!important;overflow:visible!important}
html body.reagent-fitting #content .reagent-fit-game .reagent-board button.reagent-tube[hidden]{display:none!important}
html body.reagent-fitting .reagent-fit-game .reagent-tube svg{width:var(--lab-tube-width,0px)!important;height:var(--lab-tube-height,0px)!important;max-width:100%!important;max-height:none!important;overflow:visible}
.reagent-fit-game .reagent-tube.selected{transform:none!important}.reagent-fit-game .reagent-tube.selected .reagent-wall{stroke-width:2.1}
.reagent-fit-game .reagent-indicators,.reagent-fit-game .reagent-tools{display:none!important}
.reagent-fit-game .reagent-status{position:absolute!important;clip-path:inset(50%);width:1px!important;height:1px!important;min-height:0!important;overflow:hidden;margin:0!important}
.reagent-fit-game .reagent-status.hint-unavailable{position:fixed!important;clip-path:none;width:min(310px,calc(100vw - 24px))!important;height:auto!important;min-height:0!important;left:50%;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);padding:10px 14px;box-sizing:border-box;background:#071c2bf2;border:1px solid #75d7e466;border-radius:12px;font-size:15px;line-height:1.35;color:#d7f1f3;z-index:50;pointer-events:none}
.reagent-fit-game .reagent-meter{flex:none;height:4px;min-height:4px;margin:2px 0 0!important}
.lab-pages{position:absolute;bottom:0;left:0;right:0;height:44px;display:flex;align-items:center;justify-content:center;gap:12px;background:#071c2bda;border-radius:12px;z-index:8}
.lab-pages[hidden]{display:none!important}.lab-pages span{font-size:13px;min-width:45px;text-align:center;font-variant-numeric:tabular-nums}
html body.reagent-fitting #content .lab-pages button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;font-size:26px!important;margin:0!important}
html body.reagent-fitting #content .lab-toolbar{display:grid!important;grid-template-columns:32px minmax(42px,1fr) auto!important;align-items:center;gap:4px!important;min-height:50px!important;height:50px!important;flex:none!important;margin:0!important;padding:2px 4px!important;border:1px solid #8ac5d33b!important;border-radius:14px!important;background:#071c2b88!important;box-sizing:border-box!important}
html body.reagent-fitting #content .lab-toolbar img{width:32px!important;height:32px!important}
html body.reagent-fitting #content .lab-toolbar .timer,html body.reagent-fitting #arcade-time{font-size:18px!important;line-height:1!important;text-align:center;font-variant-numeric:tabular-nums}
.lab-header-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}
html body.reagent-fitting #content .lab-toolbar .lab-action{position:relative;display:grid!important;place-items:center!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;margin:0!important;padding:9px!important;border-radius:12px!important;box-sizing:border-box!important}
.lab-action>svg{width:24px;height:24px;pointer-events:none}.lab-undo-count{position:absolute;bottom:1px;right:4px;font-size:10px;line-height:1;pointer-events:none;color:#b6efef}
html body.reagent-fitting.playing-now .session-mode,html body.reagent-fitting .session-help{display:none!important}
html body.reagent-fitting.playing-now .game-head{min-height:0!important;margin:0!important;flex:none}
html body.reagent-fitting.playing-now .game-head>div{display:flex;justify-content:space-between;align-items:center;gap:6px}
html body.reagent-fitting.playing-now .game-head h2{font-size:16px!important;line-height:1.1!important;margin:2px 0!important}
html body.reagent-fitting.playing-now .round-meta{font-size:12px!important;line-height:1.1!important;margin:0!important;white-space:nowrap}
html body.reagent-fitting .play-reagent_sort .arcade-title{flex:none;margin:0;min-height:22px}
html body.reagent-fitting .play-reagent_sort .arcade-title h1{font-size:16px!important;line-height:1.1!important;margin:0!important}
html body.reagent-fitting .play-reagent_sort .arcade-title strong{font-size:14px!important}
html body.reagent-fitting .play-reagent_sort .arcade-meta{font-size:12px!important;line-height:1.1!important;flex:none}
html body.reagent-fitting .play-reagent_sort #arcade-notice,html body.reagent-fitting .play-reagent_sort .arcade-meta>span:last-child{display:none!important}
html body.reagent-fitting .play-reagent_sort .arcade-controls:has(>[data-reagent-free-next][hidden]){display:none!important}
/* Override Android's universal 88 px toolbar controls only for this lab. */
html body.android-shell.reagent-fitting #content .lab-toolbar{grid-template-columns:32px minmax(42px,1fr) auto!important;height:50px!important;min-height:50px!important;margin:0!important;padding:2px 4px!important;gap:4px!important}
html body.android-shell.reagent-fitting #content .lab-toolbar img{width:32px!important;height:32px!important}
html body.android-shell.reagent-fitting #content .lab-toolbar .timer,html body.android-shell.reagent-fitting #arcade-time{font-size:18px!important}
html body.android-shell.reagent-fitting #content .lab-toolbar button.lab-action{width:44px!important;height:44px!important;min-height:44px!important;padding:9px!important}
html body.reagent-fitting #content .lab-toolbar button.lab-action[hidden],html body.android-shell.reagent-fitting #content .lab-toolbar button.lab-action[hidden]{display:none!important}
