
:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#0c191e;color:#e8eee5}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 25% 35%,#1b333a66,transparent 65%)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;border:1px solid #365055;background:#13282f;padding:10px 14px;cursor:pointer;border-radius:5px;transition:background .15s}button:hover:not(:disabled){background:#25454b}button:focus-visible,a:focus-visible{outline:2px solid #ffc880;outline-offset:3px}button:disabled{opacity:.4;cursor:default}header{display:flex;align-items:center;justify-content:space-between;padding:20px 4%;border-bottom:1px solid #294047;font-size:10px;letter-spacing:2px}a{color:#bbcbc9;text-decoration:none}header button{font-size:11px;letter-spacing:0}main{max-width:1440px;margin:auto;padding:32px 4%}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{font-size:10px;letter-spacing:2px;color:#a1bab6;margin:0 0 12px}h1{font-family:Georgia,serif;font-weight:400;letter-spacing:-3px;font-size:clamp(44px,5vw,76px);margin:0;line-height:1.1}h1 em{color:#ffc880;font-weight:400}h1 span{font-size:40px;color:#ffc880;display:inline-block;margin-left:20px}.intro p:not(.eyebrow){color:#92aaa9;font-size:13px;margin-bottom:0}.stats{display:flex;gap:35px}.stats small{font-size:9px;letter-spacing:2px;color:#8ca7a8;display:block}.stats strong{font-family:Georgia,serif;font-weight:400;font-size:34px;color:#ffd49c}.layout{display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:24px}.board{border:1px solid #375151;border-radius:8px;overflow:hidden;align-self:start;background:#101f25}.board-label,.board-footer{padding:14px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:9px;letter-spacing:1px;color:#9bb4b1}.board-label{border-bottom:1px solid #345052}.board-label span:last-child{color:#e7c38e}canvas{width:100%;height:auto;display:block;touch-action:manipulation}.board-footer{letter-spacing:0;min-height:57px}.board-footer button{white-space:nowrap;font-size:11px;padding:6px 9px}.board-footer span{flex:1}aside{padding:4px 0}#types{display:grid;gap:8px;margin-bottom:22px}.tower{text-align:left;padding:12px 14px;position:relative}.tower.selected{border-color:#e7be83;background:#253939}.tower b{display:block;font-size:14px;margin-bottom:5px}.tower small{display:block;font-size:11px;color:#98b2b0;line-height:1.5}.tower .cost{float:right;color:#ffd49c}#sites{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;margin-bottom:14px}#sites button{padding:7px 0;font-size:11px}#sites button.active{border-color:#ffc880}#selection{font-size:12px;min-height:42px;color:#c2d3cb;line-height:1.6}.actions{display:flex;gap:6px;margin:8px 0 20px}.actions button{flex:1;font-size:11px;padding:9px 3px}.primary{background:#e7bd86;color:#14272b;border-color:#e7bd86;font-weight:700;width:100%;padding:15px;margin-bottom:9px}.primary:hover:not(:disabled){background:#ffdaa7}#pulse{width:100%;color:#ffd49c}.hint{font-size:11px;line-height:1.8;color:#93aaa8}#restart{border:0;background:none;padding:5px 0;color:#9bb0ae;font-size:11px;text-decoration:underline}footer{display:flex;justify-content:space-between;gap:20px;font-size:9px;color:#6f8c8e;letter-spacing:1px;margin-top:25px}@media(max-width:900px){.layout{grid-template-columns:1fr}.intro{gap:20px}.stats{gap:14px}.stats strong{font-size:24px}header>span{display:none}#types{grid-template-columns:repeat(3,1fr)}aside{max-width:700px;width:100%;margin:auto}footer{flex-direction:column}main{padding:24px 3%}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

@media(max-width:540px){.intro{display:block}.stats{margin-top:22px;justify-content:space-between}.stats strong{white-space:nowrap;font-size:28px}h1{font-size:51px;letter-spacing:-2px}.tower b{font-size:12px}.tower .cost{float:none;display:block;margin-top:5px}}

/* Night-watch instruments and tower cards. */
.preferences{display:flex;gap:8px}
header{background:#0a1922b3}
header .preferences button{font-size:10px;padding:8px 11px;border-color:#385254}
h1{text-shadow:0 3px 25px #0006}h1 span{filter:drop-shadow(0 0 12px #edbd7744)}
.stats>div{border-left:1px solid #56695366;padding-left:18px;min-width:85px}
.stats .danger{color:#ff9b86}
.board{box-shadow:0 18px 55px #0004;border-color:#62756377;background:#0d222d}
.board-label{background:linear-gradient(100deg,#183239,#12252e);font-size:9px}
.tide-strip{display:flex;gap:16px;align-items:center;background:#10242d;padding:9px 18px;border-bottom:1px solid #3b565244}
#remaining{font-size:9px;letter-spacing:1px;color:#a8beb1;min-width:180px}
#tide-progress{height:3px;background:#3b514d;width:100%;border-radius:5px;overflow:hidden}
#tide-progress:before{content:'';display:block;height:100%;width:var(--progress,0%);background:linear-gradient(90deg,#6fae9b,#edcb8a);transition:width .3s}
canvas{aspect-ratio:960/620}
.board-footer{background:#10252c;min-height:67px;color:#c0cdb9;font-size:11px;line-height:1.5}
.tower{display:flex;gap:12px;align-items:center;background:linear-gradient(110deg,#1b3439,#11262f);padding:15px 12px;border-color:#405d5b;border-radius:7px}
.tower-icon{font-size:30px;width:34px;flex-shrink:0;line-height:1;filter:drop-shadow(0 0 8px #74c6ac33);text-align:center}
.tower-copy{flex:1;min-width:0}.tower b{font-size:13px}.tower small{font-size:11px;color:#abc0b7}
.tower.selected{border-color:#d9bd86;background:linear-gradient(110deg,#29483f,#1b3438);box-shadow:inset 3px 0 #dbbe86,0 2px 15px #d9bd8609}
#selection{min-height:30px;font-size:12px}#selection-stats{font-size:10px;color:#8faeab;line-height:1.6;margin-bottom:10px}
.actions{margin-bottom:18px}.primary{box-shadow:0 3px 0 #8e7352;font-size:13px;letter-spacing:.3px;border-radius:6px}
.primary:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px 0 #8e7352}
button:active:not(:disabled){filter:brightness(1.12)}#pulse{background:linear-gradient(110deg,#342f27,#1e2c2c);border-color:#7c7351}
#sites button{min-height:34px;font-variant-numeric:tabular-nums;background:#122b32}#sites button.active{background:#354840}
@media(max-width:900px){.tower{display:block;text-align:left;min-height:155px}.tower-icon{display:block;margin-bottom:12px}.tower .cost{float:right}.tower b{font-size:12px}.tower small{font-size:10px}.intro .stats{gap:20px}.stats>div{padding-left:12px;min-width:70px}}
@media(max-width:540px){header{padding:15px 3%;letter-spacing:1px;font-size:9px}header .preferences button{font-size:9px;padding:8px}.preferences{gap:5px}#remaining{min-width:130px;font-size:8px}.tide-strip{padding:8px 12px;gap:10px}.tower{padding:12px 9px}.tower .cost{float:none;display:block}.tower small{line-height:1.5}.stats>div{flex:1}.board-label{font-size:8px;padding:12px}.board-footer{padding:12px;font-size:10px}}
