*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#081e2b;color:#e9f5f1;font-family:Georgia,serif}body{height:100dvh;overflow:hidden;background:radial-gradient(ellipse at 50% 20%,#174052,#081e2b 70%)}button,a{-webkit-tap-highlight-color:transparent}button{font:700 12px system-ui,sans-serif;border:1px solid #729eaa;border-radius:7px;color:#ecf6f2;background:#183e4d;padding:10px 16px;cursor:pointer;touch-action:none}button:hover{background:#285869}button:active,button.pressed{background:#4f7a87;transform:translateY(1px)}button:focus-visible,canvas:focus-visible,a:focus-visible{outline:3px solid #ffcc88;outline-offset:3px}[hidden]{display:none!important}header{height:90px;max-width:1440px;margin:auto;padding:19px 46px 10px 76px;display:flex;align-items:center;justify-content:space-between}small,.hud,.readout,aside span,aside p,.tiny{font-family:system-ui,sans-serif}header small{font-size:9px;letter-spacing:4px;color:#a0c9cd}h1{font-size:34px;line-height:1;margin:5px 0;color:#f1c3ac;font-weight:400}.desktop-actions{display:flex;gap:8px}#help-button{background:#d7ebef15;border-radius:50%;width:38px;padding:0;font-size:21px;opacity:.8}main{height:calc(100dvh - 110px);display:flex;gap:clamp(20px,4vw,70px);justify-content:center;align-items:center;padding:0 26px}.cabinet{height:min(100%,780px);aspect-ratio:540/766;display:flex;flex-direction:column;border:1px solid #5d8991;border-radius:16px;overflow:hidden;box-shadow:0 25px 75px #0007;background:#0d2e3b}.hud{display:flex;height:48px;flex-shrink:0;justify-content:space-around;align-items:center;background:#143a47;font-size:9px;letter-spacing:1.6px}.hud strong{display:block;font-size:18px;letter-spacing:1px;color:#f5d5bf;margin-top:2px}canvas{display:block;width:100%;min-height:0;flex:1;aspect-ratio:540/680;touch-action:none;user-select:none;-webkit-touch-callout:none}.readout{height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;font-size:12px;color:#c3dee0}.readout button{font-size:10px;padding:5px 9px}aside{width:210px;max-width:20vw;align-self:center}aside span{letter-spacing:3px;font-size:10px;color:#95b8bb}aside h2{font-size:34px;line-height:1.2;font-weight:400;color:#c8dfdc}aside p{font-size:12px;line-height:1.9;color:#9cbec5}.note-line{height:1px;background:#406571;width:50px;margin:30px 0}aside a{font:12px system-ui;color:#e7b8a2;display:block;margin-top:32px}.reef-note{padding-top:60px}.shell{font-size:100px;line-height:1;color:#c6a0b6;transform:rotate(-20deg);margin:25px 0}.tiny{font-size:8px!important;letter-spacing:1.5px}.touch-controls{display:none}.modal{position:fixed;inset:0;background:#04121ad9;z-index:80;display:grid;place-items:center;padding:14px;overflow:auto}.modal-card{background:#123746;border:1px solid #86afb3;border-radius:18px;padding:28px 34px;max-width:510px;max-height:calc(100dvh - 28px);overflow:auto;box-shadow:0 20px 80px #0008}.modal small{font:9px system-ui;letter-spacing:3px;color:#b7d5d7}.modal h2{font-size:32px;font-weight:400;color:#f1c3ac;margin:12px 0 18px}.modal p{font:14px/1.65 system-ui;color:#d0e3e5}.modal button{margin:6px 5px 0 0;min-height:44px}#instruction-close,#next{background:#e7b59d;color:#102d39;border-color:#f1ceba}#new-run,#review{font-size:11px}.flyout-nav{z-index:50}.flyout-toggle{margin:4px}.flyout-panel{background:#102d39;color:#e9f5f1}.flyout-panel a{color:#c9e3e7}.flyout-panel .sidebar{padding:20px}.flyout-panel ul{list-style:none;padding:0}.flyout-panel li{padding:4px}.flyout-panel a{font:13px system-ui}.flyout-panel h2,.flyout-panel h3{font:18px Georgia}
@media(max-width:1000px){aside{display:none}header{height:68px}main{height:calc(100dvh - 80px)}}
body.touch-device header{position:absolute;left:12px;top:12px;padding:0;height:auto;z-index:2}body.touch-device header small{display:none}body.touch-device h1{font-size:23px}body.touch-device .desktop-actions{display:none}body.touch-device main{height:100dvh;padding:8px 98px 8px 8px;gap:0}body.touch-device aside{display:none}body.touch-device .cabinet{height:min(100%,900px);max-width:100%;border-radius:9px}body.touch-device .hud{height:34px;font-size:8px}body.touch-device .hud strong{font-size:14px;display:inline;margin-left:4px}body.touch-device .readout{height:28px;font-size:10px}body.touch-device #pause{display:none}body.touch-device #actions{position:fixed;right:max(10px,env(safe-area-inset-right));top:75px;bottom:10px;width:76px;flex-direction:column;justify-content:center;gap:8px;pointer-events:none}body.touch-device #actions button{pointer-events:auto;padding:8px 4px;min-height:44px;width:76px;font-size:11px}body.touch-device #touch-fire{min-height:60px!important;background:#e7b59d;color:#102d39}body:has(.modal:not([hidden])) #actions{visibility:hidden!important}body.touch-device .modal-card{padding:18px 22px}body.touch-device .modal h2{font-size:27px}body.touch-device .modal p{font-size:12px;margin:9px 0}body.touch-device .modal small{font-size:8px}
@media(max-width:500px) and (orientation:portrait){body.touch-device header{position:static;height:54px;padding:8px 16px}body.touch-device main{height:calc(100dvh - 144px);padding:0 8px}body.touch-device #actions{top:auto;bottom:max(8px,env(safe-area-inset-bottom));right:8px;left:8px;width:auto;height:70px;flex-direction:row}body.touch-device #actions button{width:23%;min-height:56px}body.touch-device .cabinet{height:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
body.touch-device .cabinet{aspect-ratio:auto;height:auto;width:min(calc((100dvh - 80px)*540/680 + 2px),calc(100vw - 108px));flex-shrink:0}
body.touch-device canvas{flex:none;aspect-ratio:540/680;height:auto}
.hud strong.low{color:#ffae88;text-decoration:underline;text-underline-offset:4px}
.shell{width:130px;margin:20px 0;transform:rotate(-10deg);font-size:0}.shell svg{display:block;width:100%}
.mobile-tip{display:none}
@media(min-width:501px){body.touch-device .mobile-tip{display:block;position:fixed;left:13px;top:50%;width:140px;transform:translateY(-25%);font:11px/1.7 system-ui;color:#9abdc4;pointer-events:none}body.touch-device .mobile-tip small{font-size:8px;letter-spacing:1.7px;color:#e2b49e}}
body:has(.modal:not([hidden])) .mobile-tip{visibility:hidden}
@media(max-width:500px) and (orientation:portrait){body.touch-device .cabinet{height:auto;width:min(calc((100dvh - 208px)*540/680 + 2px),calc(100vw - 16px))}}
