/* SAILING: the window's look (dlg/dlg.sailing.php, the harness). The game's paper and ink, the house gold, Jost for
   the body, Monotype Corsiva for the headings. Every rule is scoped to .sail and sets its own font, because the game
   css gives every div 13px Jost. The stage is one canvas (view.js) with DOM over it: the readings, the tiny map, the
   coach's word, the control sets (controls.js) and the cards (sailing.js).
   THE SIZES: in the game's popup on a desktop the stage is 16:9 inside the paper. FULL (.sl-full, set by sailing.js:
   a phone in either orientation, max-width 760px or max-height 520px, or a window with no game around it: the
   admin's test tab, the harness) fills the whole viewport, safe areas kept. .sl-port = taller than wide.
   Nothing scrolls or zooms while steering: touch-action none on the stage. Touch targets are 44px or more.
   THE HELM (2026-11-15, a hand-sheet boat: .sl-controls.sl-helm): the tiller in the hand with its ghost, the gold arc
   of the groove and the speed; the rope pad (92px with a mouse, 116px under a finger); the hand mark that replaces the
   cursor; the thumb's ring; and the feedback layer of sailing.js (pops, the next gust, the coach's steps). */
.popupFrameWidth { max-width: max(900px, min(1700px, calc(100vw - 40px), calc((100vh - 70px) * 1.7778 + 40px))); }
.sail { --ink: #463320; --ink-2: #6b5a44; --muted: #948567; --line: #d9cfb6; --gold: #CC9900; --gold-2: #FFCC00; --red: #8f2a1e; --green: #336633;
        --paper: rgba(243, 237, 214, .93); --glass: rgba(243, 237, 214, .78);
        position: relative; color: var(--ink); font: 14px/1.45 'Jost', sans-serif; text-align: left; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.sail *, .sail *::before, .sail *::after { box-sizing: border-box; }
.sail :where(div, p, span, b, i, em, li, small, button) { font-family: inherit; font-size: inherit; font-style: normal; }
.sail :where(p) { margin: 0 0 8px; }
.sail .sl-hide { display: none !important; }
.sl-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 70px); overflow: hidden; background: #cfd3c8; border-radius: 6px; touch-action: none; overscroll-behavior: none; }
@supports not (aspect-ratio: 1) { .sl-stage { height: 56.25vw; } }
.sail.sl-full { position: fixed; inset: 0; z-index: 50; background: #1d1a15; }
.sail.sl-full .sl-stage { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; }
.sl-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---- the readings */
.sl-prog { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; width: min(34%, 320px); height: 7px; transform: translateX(-50%); background: rgba(43, 38, 32, .28); border: 1px solid rgba(43, 38, 32, .55); border-radius: 5px; overflow: hidden; pointer-events: none; }
.sl-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .2s linear; }
.sl-gauges { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.sl-g { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px 0 5px; background: var(--glass); border: 1px solid rgba(70, 51, 32, .35); border-radius: 11px; color: var(--ink); width: max-content; }
.sl-g svg { flex: none; }
.sl-g i { display: block; width: 54px; height: 6px; background: rgba(70, 51, 32, .2); border-radius: 3px; overflow: hidden; }
.sl-g i b { display: block; height: 100%; width: 100%; background: var(--green); transition: width .25s; }
.sl-g em { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sl-g em:empty { display: none; }
.sl-g.sl-low { border-color: var(--red); color: var(--red); animation: slPulse .7s infinite alternate; }
.sl-g.sl-low i b { background: var(--red); }
.sl-level { position: relative; display: block; width: 52px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(143, 42, 30, .55), rgba(70, 51, 32, .15) 30%, rgba(70, 51, 32, .15) 70%, rgba(143, 42, 30, .55)); }
.sl-level::after { content: ''; position: absolute; left: 50%; top: -2px; width: 1px; height: 12px; background: var(--ink); opacity: .5; }
.sl-level b { position: absolute; left: calc(50% - 5px); top: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transition: transform .1s linear; }
@keyframes slPulse { from { box-shadow: 0 0 0 0 rgba(143, 42, 30, .0); } to { box-shadow: 0 0 0 4px rgba(143, 42, 30, .35); } }
.sl-map { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 2px 10px rgba(30, 20, 10, .35); pointer-events: none; }
.sl-coach { position: absolute; top: 17%; left: 50%; max-width: min(78%, 520px); transform: translate(-50%, -6px); padding: 5px 14px; background: var(--paper); border: 1px solid rgba(70, 51, 32, .4); border-radius: 16px; font-size: 14.5px; font-weight: 500; text-align: center; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.sl-coach.sl-show { opacity: 1; transform: translate(-50%, 0); }
.sl-sys { position: absolute; top: calc(148px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); display: flex; gap: 6px; }
.sl-sysbtn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: var(--glass); border: 1px solid rgba(70, 51, 32, .4); border-radius: 50%; color: var(--ink); cursor: pointer; }
.sl-sysbtn .sl-mute-x { display: none; } .sl-sysbtn.sl-muted .sl-mute-x { display: inline; } .sl-sysbtn.sl-muted .sl-mute-wave { display: none; }
.sail:not(.sl-sailing) #slQuit { display: none; }
.sail:not(.sl-sailing) :is(.sl-map, .sl-prog, .sl-coach, .sl-gauges) { visibility: hidden; }
.sail:not(.sl-sailing) :is(.sl-pops, .sl-gust, .sl-steps, .sl-line, .sl-stickhint, .sl-helpbtn) { display: none !important; }
.sl-quitask { position: absolute; top: 30%; left: 50%; width: min(86%, 380px); transform: translateX(-50%); display: none; padding: 12px 14px; background: var(--paper); border: 1px solid var(--ink-2); border-radius: 10px; box-shadow: 0 8px 24px rgba(30, 20, 10, .4); text-align: center; z-index: 6; }
.sl-quitask.sl-show { display: block; } .sl-quitask .sl-btn { margin: 4px; padding: 0 16px; }

/* ---- buttons */
.sail .sl-btn { position: relative; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; background: var(--glass); border: 1.5px solid rgba(70, 51, 32, .55); border-radius: 12px; color: var(--ink); font: 600 13px/1 'Jost', sans-serif; cursor: pointer; touch-action: none; }
.sail .sl-btn:active, .sail .sl-btn.sl-on { background: var(--gold-2); border-color: var(--ink); }
.sail .sl-btn.sl-main { background: linear-gradient(#ffd95a, #e0aa12); border-color: #6b4a00; color: #2b1d00; }
.sail .sl-btn.sl-off { opacity: .4; }
.sl-key { position: absolute; right: 3px; top: 2px; font: 600 9px/1 'Jost', sans-serif; color: var(--ink-2); opacity: .8; letter-spacing: .04em; pointer-events: none; }
@media (pointer: coarse) { .sl-key { display: none; } }

/* ---- the control sets */
.sl-controls { position: absolute; inset: 0; pointer-events: none; }
.sail.sl-carded .sl-controls, .sail:not(.sl-sailing) .sl-controls { visibility: hidden; }
.sl-glance { position: absolute; left: 0; right: 0; top: 0; height: 58%; pointer-events: auto; }
.sl-band { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: auto; }
.sl-controls.sl-has-rud .sl-band { cursor: ew-resize; }
.sl-ctl { position: absolute; inset: 0; pointer-events: none; padding-bottom: env(safe-area-inset-bottom, 0px); }
.sail .sl-ctl > * { pointer-events: auto; position: absolute; }
.sl-rud { left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: 200px; height: 104px; transform: translateX(-50%); pointer-events: none !important; color: #4a3a26; }
.sl-til-arc { position: absolute; left: 10px; right: 10px; top: 6px; height: 180px; border: 2px dashed rgba(243, 237, 214, .75); border-radius: 50%; clip-path: inset(0 0 78% 0); }
.sl-til-bar, .sl-til-now { position: absolute; left: calc(50% - 7px); bottom: 0; width: 14px; height: 96px; border-radius: 7px; transform-origin: 50% 100%; }
.sl-til-bar { background: linear-gradient(90deg, #8a6c46, #b8946a 45%, #7a5f3d); border: 1.5px solid #2b2620; box-shadow: 0 2px 6px rgba(20, 10, 0, .4); }
.sl-til-bar i { position: absolute; left: -9px; top: -12px; width: 29px; height: 29px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, #d7a51c 60%, #8a6400); border: 1.5px solid #2b2620; }
.sl-til-now { background: rgba(243, 237, 214, .4); border: 1px dashed rgba(43, 38, 32, .6); }
.sl-wheel { width: 128px; height: 128px; bottom: calc(-22px + env(safe-area-inset-bottom, 0px)); }
.sl-wheel-svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(20, 10, 0, .5)); color: #5d472c; }
.sl-rud .sl-key { right: -18px; top: 40px; font-size: 10px; color: #f3edd6; }
.sail .sl-hold { left: calc(50% + 58px); width: 50px; padding: 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); min-height: 44px; font-size: 11px; opacity: .8; }
.sail .sl-wheel + .sl-hold { left: calc(50% + 62px); }
.sl-thr { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 66px; height: 210px; background: var(--glass); border: 1.5px solid rgba(70, 51, 32, .55); border-radius: 14px; cursor: ns-resize; touch-action: none; }
.sl-thr-track { position: absolute; left: 50%; top: 14px; bottom: 14px; width: 6px; margin-left: -3px; background: rgba(70, 51, 32, .35); border-radius: 3px; }
.sl-thr-det { position: absolute; left: 4px; width: 22px; height: 22px; margin-bottom: -11px; padding: 0; background: none; border: 0; color: var(--ink); font: 700 12px/22px 'Jost', sans-serif; pointer-events: none; }
.sl-thr-knob { position: absolute; left: 22px; right: 5px; height: 30px; margin-bottom: -15px; background: linear-gradient(#ffd95a, #d7a51c); border: 1.5px solid #2b2620; border-radius: 8px; transition: bottom .08s; box-shadow: 0 2px 5px rgba(20, 10, 0, .35); }
.sl-thr.sl-broken .sl-thr-knob { background: #a23322; }
/* THE TWIN LEVERS (2026-11-16): port at the lower left, starboard at the lower right, the yoke between them */
.sl-twin { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 76px; height: 236px; background: var(--glass); border: 1.5px solid rgba(70, 51, 32, .55); border-radius: 14px; cursor: ns-resize; touch-action: none; }
.sl-twin-l { left: calc(14px + env(safe-area-inset-left, 0px)); }
.sl-twin-r { right: calc(14px + env(safe-area-inset-right, 0px)); }
.sl-twin .sl-thr-knob { left: 30px; right: 6px; }
.sl-twin .sl-thr-det { left: 3px; width: 24px; font-size: 11px; }
.sl-twin .sl-thr-det.sl-zero { color: #a23322; }
.sl-twin-rpm { position: absolute; left: calc(50% + 3px); width: 7px; background: #e08a2c; border-radius: 3px; box-shadow: 0 0 6px rgba(255, 150, 40, .7); transition: bottom .1s, height .1s; }
.sl-twin.sl-astern .sl-twin-rpm { background: #8fb0c0; box-shadow: 0 0 6px rgba(140, 190, 220, .6); }
.sl-twin.sl-broken .sl-thr-knob { background: #a23322; }
.sl-twin.sl-broken .sl-twin-rpm { background: #5a2a22; box-shadow: none; }
.sl-twin-name { position: absolute; left: 0; right: 0; top: -20px; text-align: center; font: 700 11px/16px 'Jost', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #f3edd6; text-shadow: 0 1px 2px #000; }
.sl-twin .sl-key { left: 50%; bottom: -18px; transform: translateX(-50%); color: #f3edd6; }
.sl-twin-yoke { left: 50%; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: 92px; height: 92px; transform: translateX(-50%); cursor: move; touch-action: none; }
.sl-yoke-bg { fill: rgba(243, 237, 214, .22); stroke: rgba(70, 51, 32, .6); stroke-width: 2; }
.sl-yoke-arc { fill: none; stroke: rgba(243, 237, 214, .5); stroke-width: 2; stroke-dasharray: 3 4; }
.sl-yoke-arrow { fill: #ffd24a; stroke: #2b2620; stroke-width: 1.5; }
.sl-yoke-knob { fill: #d7a51c; stroke: #2b2620; stroke-width: 2; }
.sl-twin-yoke .sl-key { left: 50%; bottom: -16px; transform: translateX(-50%); color: #f3edd6; white-space: nowrap; }
@media (pointer: coarse) { .sl-twin { width: 84px; } .sl-twin-yoke { display: none; } }
.sl-orders { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 6px; }
.sail .sl-order { width: 66px; min-height: 48px; }
.sl-sheet { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 62px; height: 232px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; background: var(--glass); border: 1.5px solid rgba(70, 51, 32, .55); border-radius: 14px; cursor: ns-resize; touch-action: none; }
.sl-sheet-t { font-size: 10px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.sl-sheet-track { position: relative; flex: 1; width: 8px; background: repeating-linear-gradient(135deg, #d8cfb4 0 4px, #a3987c 4px 8px); border: 1px solid rgba(43, 38, 32, .6); border-radius: 4px; }
.sl-sheet-knob { position: absolute; left: -17px; width: 42px; height: 24px; margin-bottom: -12px; background: linear-gradient(#b8946a, #8a6c46); border: 1.5px solid #2b2620; border-radius: 7px; box-shadow: 0 2px 5px rgba(20, 10, 0, .35); }
.sl-sheet-opt { position: absolute; left: -22px; width: 52px; height: 6px; margin-bottom: -3px; background: var(--gold-2); border: 1px solid #6b4a00; border-radius: 3px; transition: bottom .2s; }
.sl-sheet-now { position: absolute; left: -9px; width: 26px; height: 2px; margin-bottom: -1px; background: var(--ink); }
.sl-sheet.sl-trim { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 0, .35); }
.sl-sheet.sl-strain { border-color: var(--red); animation: slPulse .3s infinite alternate; }
.sail .sl-lean { left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 66px; height: 66px; flex-direction: column; border-radius: 50%; font-size: 11px; }
.sl-has-stroke_l .sl-lean { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.sl-strokes-only .sl-lean { left: 50%; margin-left: -33px; bottom: calc(108px + env(safe-area-inset-bottom, 0px)); } /* between the two stroke halves, never on a pad */
.sail .sl-lean.sl-warn { border-color: var(--red); animation: slPulse .5s infinite alternate; }
.sl-belt { left: calc(10px + env(safe-area-inset-left, 0px)); top: 34%; display: flex; flex-direction: column; gap: 6px; }
.sail .sl-gear { width: 48px; height: 48px; padding: 0; overflow: hidden; }
.sl-gear-n { position: absolute; left: 4px; bottom: 2px; font-size: 11px; font-weight: 700; }
.sl-gear-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(43, 38, 32, .35); pointer-events: none; }
.sl-rigged { display: flex; flex-direction: column; gap: 4px; margin-top: 1px; pointer-events: none; }
.sl-rig { width: 30px; height: 30px; margin-left: 9px; display: grid; place-items: center; border: 1.5px dashed rgba(70, 51, 32, .6); border-radius: 50%; background: rgba(243, 237, 214, .6); color: var(--ink-2); }
.sl-rig svg { width: 16px; height: 16px; }
.sail .sl-gear.sl-need { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 0, .55); animation: slPulse .6s infinite alternate; }
.sail .sl-oar { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 100px; height: 100px; border-radius: 50%; overflow: hidden; }
.sail .sl-oar-l { left: calc(14px + env(safe-area-inset-left, 0px)); } .sail .sl-oar-r { right: calc(14px + env(safe-area-inset-right, 0px)); }
.sail .sl-oar-small { width: 68px; height: 68px; }
.sl-oar-rec { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(43, 38, 32, .3); pointer-events: none; }
.sl-beat { left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 84px; height: 84px; margin-left: -42px; pointer-events: none !important; }
.sl-beat-bg { fill: rgba(243, 237, 214, .55); stroke: rgba(43, 38, 32, .5); stroke-width: 2; }
.sl-beat-arc { fill: none; stroke: #2b2620; stroke-width: 6; stroke-dasharray: 100; stroke-dashoffset: 100; transform: rotate(-90deg); stroke-linecap: round; }
.sl-beat-fill { fill: var(--gold-2); }
.sl-beat-mark { stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
.sl-beat.sl-beat-now .sl-beat-arc { stroke: var(--gold); }
.sl-beat.sl-beat-hit { animation: slBeat .28s ease-out; }
.sl-beat b { position: absolute; left: 0; right: 0; top: 34px; text-align: center; font-size: 10px; font-weight: 700; color: #2b1d00; }
@keyframes slBeat { from { transform: scale(1.22); } to { transform: scale(1); } }

/* ---- THE HELM: the tiller in the hand, the rope pad, the hand mark, the thumb's ring */
.sl-controls.sl-helm .sl-glance { height: 30%; }
.sl-controls.sl-helm .sl-band { height: 70%; cursor: default; }
.sl-controls.sl-helm.sl-nocursor :is(.sl-band, .sl-glance) { cursor: none; }
.sl-tiller-helm { width: 264px; height: 174px; }
.sl-tiller-helm::before { content: ''; position: absolute; left: -4%; right: -4%; top: -12%; bottom: -34%; border-radius: 50%; background: radial-gradient(ellipse at 50% 58%, rgba(28, 22, 14, .46), rgba(28, 22, 14, .22) 45%, rgba(28, 22, 14, 0) 70%); }
.sl-til-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.sl-til-track { fill: none; stroke: rgba(243, 237, 214, .85); stroke-width: 2; stroke-dasharray: 3 5; }
.sl-til-hard { fill: none; stroke: rgba(160, 48, 34, .8); stroke-width: 3.5; stroke-linecap: round; }
.sl-til-mid { stroke: rgba(243, 237, 214, .95); stroke-width: 2; stroke-linecap: round; }
.sl-til-groove { fill: none; stroke: var(--gold-2); stroke-width: 5.5; stroke-linecap: round; stroke-dasharray: 0 200; filter: drop-shadow(0 0 2px rgba(60, 40, 0, .7)); }
.sl-grooved .sl-til-groove { stroke: #fff0a8; filter: drop-shadow(0 0 5px #ffcc00) drop-shadow(0 0 2px rgba(60, 40, 0, .7)); }
.sl-spilt .sl-til-groove { stroke: #c9b98a; }
.sl-hardover .sl-til-hard { stroke: #e2452f; stroke-width: 5.5; }
.sl-tiller-helm .sl-til-bar, .sl-til-ghost { position: absolute; left: calc(50% - 9px); bottom: 5px; width: 18px; height: 130px; border-radius: 9px; transform-origin: 50% 100%; }
.sl-til-ghost { background: rgba(243, 237, 214, .55); border: 1px dashed rgba(43, 38, 32, .6); opacity: 0; }
:is(.sl-til-bar, .sl-til-ghost).sl-art { left: calc(50% - 7px); width: 19px; height: 132px; background: center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; transform-origin: 37% 99.4%; }
.sl-til-bar.sl-art { filter: brightness(1.12) drop-shadow(0 0 1.5px #f3edd6) drop-shadow(0 2px 3px rgba(20, 10, 0, .6)); }
.sl-til-bar.sl-art i { display: none; }
.sl-til-ghost.sl-art { filter: grayscale(1) brightness(2); }
.sl-til-kn { position: absolute; left: 50%; top: -26px; transform: translateX(-50%); padding: 0 9px; background: var(--glass); border: 1px solid rgba(70, 51, 32, .35); border-radius: 10px; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-grooved .sl-til-kn { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 204, 0, .4); }
.sl-tiller-helm .sl-key { right: 4px; top: auto; bottom: 2px; }
.sl-controls.sl-frozen :is(.sl-tiller-helm, .sl-rope, .sl-hand) { opacity: .5; }
.sail .sl-rope { --pull: 0; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 92px; height: 92px; padding: 0; overflow: hidden; border-width: 2px; border-radius: 50%; cursor: grab; box-shadow: 0 0 0 calc(var(--pull) * 8px) rgba(255, 204, 0, calc(.2 + var(--pull) * .45)); }
.sail .sl-rope:active { background: var(--glass); }
.sail .sl-rope.sl-on { background: rgba(255, 214, 80, .55); border-color: var(--ink); cursor: grabbing; }
.sail .sl-rope.sl-tight { border-color: #c9790e; }
.sail .sl-rope.sl-stall { border-color: #e2452f; background: rgba(226, 69, 47, .3); box-shadow: 0 0 0 6px rgba(226, 69, 47, .5); }
.sl-rope-run { position: absolute; left: 50%; top: 0; bottom: 0; width: 22px; margin-left: -11px; pointer-events: none; }
.sl-rope-run > i { position: absolute; left: 3px; right: 3px; top: -60px; height: 300px; background: repeating-linear-gradient(-58deg, #d6ccae 0 6px, #8f8468 6px 8px); border: solid #2b2620; border-width: 0 1.5px; border-radius: 3px; will-change: transform; }
.sl-rope-run > i.sl-art { left: 0; right: 0; top: -40px; height: 270px; background: center / 100% 100% no-repeat; border: 0; filter: drop-shadow(0 1px 1px rgba(20, 10, 0, .5)); }
.sl-rope-t { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-shadow: 0 0 3px #f3edd6, 0 0 3px #f3edd6, 0 0 2px #f3edd6; pointer-events: none; }
.sl-rope .sl-key { right: 0; left: 0; top: 9px; text-align: center; text-shadow: 0 0 3px #f3edd6, 0 0 3px #f3edd6; }
@media (pointer: coarse) { .sail .sl-rope { width: 116px; height: 116px; } }
.sail .sl-ctl > .sl-hand { --pull: 0; left: 0; top: 0; width: 0; height: 0; display: none; pointer-events: none; z-index: 5; will-change: transform; }
.sail .sl-ctl > .sl-hand.sl-show { display: block; }
.sl-hand i { position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1.5px #2b2620, inset 0 0 0 1.5px #2b2620; transition: transform .08s, background .1s; }
.sl-hand i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #2b2620; }
.sl-hand.sl-on i { transform: scale(.74); border-color: #ffe07a; background: rgba(255, 204, 0, calc(.3 + var(--pull) * .6)); }
.sl-hand.sl-tight i { border-color: #f0a030; }
.sl-hand.sl-stall i { border-color: #e2452f; background: rgba(226, 69, 47, .5); box-shadow: 0 0 0 1.5px #2b2620, inset 0 0 0 1.5px #2b2620, 0 0 0 6px rgba(226, 69, 47, .4); }
.sail .sl-ctl > :is(.sl-tether, .sl-midtick) { display: none; pointer-events: none; z-index: 4; }
.sail .sl-ctl > :is(.sl-tether, .sl-midtick).sl-show { display: block; }
.sl-tether { height: 0; margin-top: -1px; border-top: 2px dashed rgba(255, 255, 255, .8); filter: drop-shadow(0 0 1px #2b2620); }
.sl-tether.sl-hard { border-top-color: #ff6a52; }
.sl-midtick { width: 3px; height: 20px; margin: -10px 0 0 -1.5px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(43, 38, 32, .8); }
.sail .sl-ctl > .sl-stick { width: 0; height: 0; display: none; pointer-events: none; z-index: 4; }
.sail .sl-ctl > .sl-stick.sl-show { display: block; }
.sl-stick::before { content: ''; position: absolute; left: -106px; top: -30px; width: 212px; height: 60px; border: 2px dashed rgba(243, 237, 214, .85); border-radius: 30px; background: rgba(43, 38, 32, .2); }
.sl-stick i { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border: 1.5px solid #2b2620; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, #d7a51c 60%, #8a6400); opacity: .92; }

/* ---- THE HELM's feedback: the verdict pops, the next gust, the coach's steps, the full log's word */
.sl-pops { position: absolute; left: 50%; top: 29%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; z-index: 3; }
.sl-pop { padding: 3px 15px; background: rgba(43, 38, 32, .66); border: 1px solid rgba(255, 204, 0, .65); border-radius: 15px; color: #ffe07a; font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: .02em; white-space: nowrap; animation: slPop 1.5s ease-out forwards; }
.sl-pop-dim { color: #ece5cf; border-color: rgba(236, 229, 207, .45); }
.sl-pop-red { color: #ffd3c9; border-color: rgba(226, 69, 47, .85); }
@keyframes slPop { 0% { opacity: 0; transform: translateY(8px) scale(.92); } 12% { opacity: 1; transform: none; } 72% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
.sl-gust { position: absolute; width: 0; height: 0; display: none; color: #2b2620; pointer-events: none; z-index: 2; }
.sl-gust.sl-show { display: block; }
.sl-gust i { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; display: grid; place-items: center; background: var(--glass); border: 1px solid rgba(70, 51, 32, .5); border-radius: 50%; }
.sl-gust b { position: absolute; left: -24px; top: 19px; width: 48px; text-align: center; font-size: 11.5px; font-weight: 700; line-height: 1.2; color: #2b2620; text-shadow: 0 0 3px #f3edd6, 0 0 3px #f3edd6, 0 0 2px #f3edd6; }
.sl-gust.sl-soon i { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 204, 0, .5); animation: slPulse .5s infinite alternate; }
.sl-steps { position: absolute; top: calc(17% + 40px); left: 50%; max-width: min(86%, 580px); transform: translateX(-50%); display: none; align-items: center; gap: 9px; padding: 6px 15px 6px 8px; background: var(--paper); border: 1.5px solid var(--gold); border-radius: 19px; box-shadow: 0 3px 12px rgba(30, 20, 10, .3); font-size: 14.5px; font-weight: 500; line-height: 1.3; pointer-events: none; z-index: 3; }
.sl-steps.sl-show { display: flex; }
.sl-step-n { flex: none; padding: 2px 9px; background: var(--gold-2); border: 1px solid #6b4a00; border-radius: 10px; color: #2b1d00; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sl-step-ok { flex: none; display: none; color: var(--green); }
.sl-steps.sl-ticked { border-color: var(--green); }
.sl-steps.sl-ticked .sl-step-ok { display: block; animation: slBeat .3s ease-out; }
.sl-steps.sl-ticked .sl-step-t { opacity: .6; }
.sl-coach:not(.sl-show) ~ .sl-steps { top: 17%; }
.sl-line { position: absolute; left: 50%; top: calc(24px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: none; padding: 1px 12px; background: var(--glass); border: 1px solid rgba(70, 51, 32, .35); border-radius: 12px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.sl-line.sl-show { display: block; }
.sl-stickhint { position: absolute; left: 30%; bottom: 31%; width: 0; height: 0; display: none; pointer-events: none; }
.sail.sl-step-1.sl-step-touch .sl-stickhint { display: block; }
.sl-stickhint i:first-child { position: absolute; left: -84px; top: -28px; width: 168px; height: 56px; border: 2px dashed rgba(243, 237, 214, .9); border-radius: 28px; background: rgba(43, 38, 32, .18); }
.sl-stickhint i:last-child { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border: 1.5px solid #2b2620; border-radius: 50%; background: rgba(255, 204, 0, .85); animation: slStickHint 1.7s ease-in-out infinite; }
@keyframes slStickHint { 0%, 100% { transform: translateX(-52px); } 50% { transform: translateX(52px); } }
.sail.sl-step-2 .sl-rope { animation: slAsk .6s infinite alternate; }
@keyframes slAsk { from { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0); } to { box-shadow: 0 0 0 9px rgba(255, 204, 0, .6); } }
.sl-helpbtn { display: none; font: 700 18px/1 'Jost', sans-serif; }
.sail.sl-sailing.sl-coachable .sl-helpbtn { display: grid; }

/* ---- the cards */
.sl-cards { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(46, 40, 30, .34); z-index: 8; }
.sl-cards.sl-show { display: flex; }
.sl-card { flex: 1 1 auto; width: 100%; max-width: 560px; min-width: 0; max-height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 16px 18px 14px; background: var(--paper); border: 1px solid #b9ad88; border-radius: 12px; box-shadow: 0 10px 34px rgba(30, 20, 10, .45); animation: slCard .22s ease-out; }
@keyframes slCard { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sl-card h2 { margin: 0 0 6px; font: 30px/1.1 'Monotype Corsiva', 'Jost', cursive; color: var(--ink); }
.sl-card h3 { margin: 0 0 2px; font: 600 15px/1.2 'Jost', sans-serif; }
.sl-kicker { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sl-wait { margin: 6px 0; text-align: center; color: var(--ink-2); }
.sl-note { color: var(--ink-2); font-size: 12.5px; }
.sl-boat { margin: 8px 0; padding: 9px 11px; background: rgba(255, 255, 255, .35); border: 1px solid var(--line); border-radius: 9px; }
.sl-boat p { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }
.sl-facts { display: flex; flex-wrap: wrap; gap: 5px; } .sl-facts span { padding: 1px 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; background: rgba(255, 255, 255, .4); }
.sl-facts span:empty { display: none; }
.sl-legs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; padding: 0; list-style: none; }
.sl-legs li { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sl-legs li b { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid var(--ink-2); border-radius: 50%; font-size: 12px; }
.sl-card-btns { position: sticky; bottom: -14px; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px -4px -6px; padding: 8px 4px 10px; background: linear-gradient(rgba(243, 237, 214, 0), #f1ebd4 30%); }
.sail .sl-card-btn { padding: 0 18px; font-size: 14px; }
.sail .sl-card-btn.sl-main { flex: 1 1 auto; font-size: 15px; }
.sl-count { margin: 6px 0 0; text-align: center; font: 64px/1 'Monotype Corsiva', 'Jost', cursive; color: var(--gold); text-shadow: 0 1px 0 #6b4a00; }
.sl-count.sl-pop { animation: slBeat .3s ease-out; }
.sl-bars { display: grid; gap: 5px; margin: 6px 0; }
.sl-bars > div { display: grid; grid-template-columns: 54px 1fr 74px; align-items: center; gap: 8px; font-size: 12.5px; }
.sl-bars i { display: block; height: 8px; background: rgba(70, 51, 32, .18); border-radius: 4px; overflow: hidden; } .sl-bars i b { display: block; height: 100%; background: var(--gold); }
.sl-bars em { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sl-ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 7px; }
.sail .sl-gcard { display: flex; align-items: flex-start; gap: 9px; min-height: 64px; padding: 8px 9px; background: rgba(255, 255, 255, .4); border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); text-align: left; cursor: pointer; font: 13px/1.3 'Jost', sans-serif; }
.sl-gicon { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1.5px solid var(--ink-2); border-radius: 9px; background: var(--paper); }
.sl-gicon b { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; display: grid; place-items: center; background: var(--gold-2); border: 1px solid #6b4a00; border-radius: 50%; font-size: 11px; }
.sl-gtext { display: flex; flex-direction: column; gap: 1px; } .sl-gtext i { color: var(--ink-2); font-size: 12.5px; } .sl-gtext small { color: var(--muted); font-size: 11.5px; }
.sail .sl-gcard.sl-picked { border-color: var(--gold); background: rgba(255, 204, 0, .2); }
.sail .sl-gcard.sl-locked { opacity: .5; cursor: default; }
.sail .sl-gcard.sl-nofit { opacity: .7; }
.sl-shake { animation: slShake .25s; } @keyframes slShake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sl-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.sl-stats > div { flex: 1 1 84px; padding: 7px 8px; background: rgba(255, 255, 255, .4); border: 1px solid var(--line); border-radius: 9px; text-align: center; }
.sl-stats b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; } .sl-stats span { font-size: 11.5px; color: var(--muted); }
.sl-stats .sl-score { border-color: var(--gold); background: rgba(255, 204, 0, .2); }
.sl-stats .sl-st-groove { border-color: var(--gold); }
.sl-advice { margin: 4px 0 0; padding: 6px 11px; background: rgba(255, 204, 0, .13); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; font-size: 13.5px; }
.sl-facts .sl-handled { border-color: var(--gold); background: rgba(255, 204, 0, .18); }
.sl-pos { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; padding: 4px 11px 4px 6px; background: rgba(255, 255, 255, .38); border: 1px solid var(--line); border-radius: 9px; color: var(--ink-2); font-size: 13px; }
.sl-pos svg { flex: none; } .sl-pos-ring { fill: rgba(255, 255, 255, .5); stroke: var(--line); stroke-width: 1.5; }
.sl-pos-way { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sl-pos-wind { fill: none; stroke: #b88600; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sl-rigging { margin-top: 14px; }
.sl-card.sl-won { border-color: var(--gold); } .sl-card.sl-lost { border-color: var(--red); } .sl-card.sl-lost h2 { color: var(--red); }
.sl-close { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); width: 44px; height: 44px; display: none; place-items: center; background: var(--paper); border: 1px solid #b9ad88; border-radius: 50%; color: var(--ink); font-size: 26px; line-height: 1; text-decoration: none; z-index: 2; }
.sail.sl-full .sl-close { display: grid; }

/* ---- small screens */
.sail.sl-port .sl-map { width: 104px; height: 104px; } .sail.sl-port .sl-sys { top: calc(118px + env(safe-area-inset-top, 0px)); flex-direction: column; }
.sail.sl-port .sl-prog { top: calc(120px + env(safe-area-inset-top, 0px)); width: 44%; }
.sail.sl-port .sl-coach { top: 24%; font-size: 13.5px; max-width: 70%; }
.sail.sl-port .sl-belt { top: 30%; }
.sail.sl-port .sl-g i { width: 44px; }
.sail.sl-port .sl-tiller-helm { left: 36%; width: 200px; height: 132px; }
.sail.sl-port .sl-tiller-helm .sl-til-bar, .sail.sl-port .sl-til-ghost { height: 99px; width: 14px; left: calc(50% - 6px); }
@media (min-width: 700px) { .sail.sl-port .sl-tiller-helm { left: 50%; width: 264px; height: 174px; } .sail.sl-port .sl-tiller-helm .sl-til-bar, .sail.sl-port .sl-til-ghost { height: 130px; width: 19px; left: calc(50% - 7px); } }
.sail.sl-port .sl-pops { top: 33%; } .sail.sl-port .sl-steps { top: calc(24% + 44px); font-size: 13.5px; } .sail.sl-port .sl-coach:not(.sl-show) ~ .sl-steps { top: 24%; }
@media (max-height: 520px) {
  .sl-map { width: 96px; height: 96px; } .sl-sys { top: calc(110px + env(safe-area-inset-top, 0px)); }
  .sl-coach { top: 13%; font-size: 13px; padding: 3px 12px; }
  .sl-gauges { flex-direction: row; flex-wrap: wrap; max-width: 30%; } .sl-g i { width: 36px; }
  .sl-belt { top: auto; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); left: calc(92px + env(safe-area-inset-left, 0px)); flex-direction: row; }
  .sl-strokes-only .sl-belt { left: calc(126px + env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .sl-thr { height: 170px; } .sl-twin { height: 180px; } .sl-sheet { height: 190px; } .sail .sl-order { min-height: 44px; }
  .sl-prog { width: 26%; }
  .sl-card { padding: 10px 14px; } .sl-card h2 { font-size: 24px; } .sl-count { font-size: 44px; }
  .sl-rud { height: 88px; } .sl-til-bar, .sl-til-now { height: 80px; }
  .sl-tiller-helm { width: 180px; height: 119px; } .sl-tiller-helm .sl-til-bar, .sl-til-ghost { height: 89px; width: 13px; left: calc(50% - 6px); }
  .sl-rigged { flex-direction: row; } .sl-rig { margin: 9px 0 0; }
  .sl-controls.sl-helm .sl-belt { top: calc(40px + env(safe-area-inset-top, 0px)); bottom: auto; left: calc(10px + env(safe-area-inset-left, 0px)); flex-direction: column; } /* never under the thumb that steers */
  .sl-controls.sl-has-twin .sl-belt { top: calc(40px + env(safe-area-inset-top, 0px)); bottom: auto; left: calc(10px + env(safe-area-inset-left, 0px)); flex-direction: column; } /* the levers own the lower corners */
  .sl-controls.sl-helm .sl-rigged { flex-direction: column; } .sl-controls.sl-helm .sl-rig { margin: 0 0 0 9px; }
  .sl-pops { top: 30%; } .sl-pop { font-size: 13.5px; } .sl-steps { top: calc(13% + 32px); font-size: 13px; padding: 4px 12px 4px 6px; } .sl-coach:not(.sl-show) ~ .sl-steps { top: 13%; }
  .sl-pos { font-size: 12.5px; padding: 2px 9px 2px 5px; } .sl-pos svg { width: 34px; height: 34px; }
}
@keyframes slPopFade { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-card, .sl-beat.sl-beat-hit, .sl-count.sl-pop, .sl-g.sl-low, .sl-stickhint i:last-child, .sl-gust.sl-soon i, .sail.sl-step-2 .sl-rope, .sl-steps.sl-ticked .sl-step-ok { animation: none; } .sl-pop { animation: slPopFade 1.5s linear forwards; } }

/* THE SPHERE (2026-11-18, the heat vein): boats.js draws the sphere where the follow camera sees her; she only steers, so
   the DOM dial is hidden (it is still built: the proofs and the hand's marks read it) and there is no pad. */
.sail .sl-look-sphere .sl-tiller-helm { visibility: hidden; }
.sl-g-heat i b { background: linear-gradient(90deg, #c2531c, #ffb45a 60%, #fff3c4); transition: width .12s; }
