/* ==========================================================================
   The Voyage tab — live 3D sea (src/voyage3d.js)
   Gold-and-sea HUD over a full-bleed WebGL canvas.
   ========================================================================== */
#panelSea.panel-content {
    padding: 0;
    overflow: hidden;
    position: relative;
    animation: none;
}

.sea3d-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #04070c;
    touch-action: none;
    cursor: grab;
    user-select: none;
}
.sea3d-stage:active { cursor: grabbing; }

.sea3d-canvas, .sea3d-canvas canvas {
    position: absolute;
    inset: 0;
    display: block;
}

.sea3d-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(2, 5, 10, 0.55) 100%),
        linear-gradient(180deg, rgba(2, 5, 10, 0.45) 0%, transparent 18%, transparent 82%, rgba(2, 5, 10, 0.5) 100%);
}

/* --- top-left: when and where ------------------------------------------- */
.sea3d-hud {
    position: absolute;
    top: clamp(14px, 2.2vh, 24px);
    left: clamp(16px, 2vw, 28px);
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    max-width: min(70%, 520px);
}
.sea3d-when {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(17px, 1.7vw, 26px);
    letter-spacing: 0.08em;
    color: #f4cf7e;
    background: linear-gradient(180deg, #ffe7a8 0%, #e9b257 55%, #b9822e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}
.sea3d-sea {
    font-family: 'Spectral', Georgia, serif;
    font-style: italic;
    font-size: clamp(13px, 1.05vw, 16px);
    color: rgba(226, 238, 240, 0.88);
    margin-top: 2px;
}
.sea3d-weather {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 12px 3px 10px;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #bff3ef;
    background: rgba(6, 22, 30, 0.55);
    border: 1px solid rgba(127, 233, 228, 0.35);
    backdrop-filter: blur(4px);
}
.sea3d-weather::before {
    content: "";
    display: inline-block;
    width: 7px; height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    vertical-align: 0.05em;
}
.sea3d-weather[data-mood="charged"] { color: #f2d48a; border-color: rgba(242, 212, 138, 0.4); }
.sea3d-weather[data-mood="tense"]   { color: #ffb37a; border-color: rgba(255, 179, 122, 0.45); }
.sea3d-weather[data-mood="storm"]   { color: #ff8a8a; border-color: rgba(255, 120, 120, 0.55); animation: sea3dPulse 1.6s ease-in-out infinite; }
@keyframes sea3dPulse { 50% { box-shadow: 0 0 18px rgba(255, 110, 110, 0.45); } }

/* --- landfall banner ------------------------------------------------------ */
.sea3d-land {
    position: absolute;
    left: 50%;
    top: 16%;
    transform: translate(-50%, -12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 34px 13px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.9s ease, transform 0.9s ease;
    text-align: center;
    background:
        linear-gradient(90deg, transparent, rgba(4, 14, 22, 0.66) 18%, rgba(4, 14, 22, 0.66) 82%, transparent);
}
.sea3d-land::before, .sea3d-land::after {
    content: "";
    position: absolute;
    left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(242, 196, 107, 0.85), transparent);
}
.sea3d-land::before { top: 0; }
.sea3d-land::after { bottom: 0; }
.sea3d-land.is-on { opacity: 1; transform: translate(-50%, 0); }
.sea3d-land-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(16px, 1.6vw, 24px);
    letter-spacing: 0.12em;
    color: #ffe2a0;
    text-shadow: 0 0 18px rgba(242, 184, 75, 0.45), 0 2px 8px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}
.sea3d-land-sub {
    font-family: 'Spectral', Georgia, serif;
    font-style: italic;
    font-size: clamp(12px, 1vw, 15px);
    color: rgba(200, 240, 238, 0.9);
}

/* --- bottom: camera ------------------------------------------------------- */
.sea3d-tools {
    position: absolute;
    right: clamp(14px, 1.8vw, 24px);
    bottom: clamp(12px, 2vh, 20px);
    display: flex;
    align-items: center;
    gap: 14px;
}
.sea3d-hint {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(220, 235, 240, 0.6);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.sea3d-cam.nav-btn {
    width: auto;
    padding: 7px 14px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- loading / cuts ------------------------------------------------------- */
.sea3d-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: radial-gradient(ellipse at 50% 60%, #0b2430 0%, #04070c 70%);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.12em;
    color: #e9c47a;
    transition: opacity 1.2s ease;
    z-index: 3;
}
.sea3d-loading.is-gone { opacity: 0; pointer-events: none; }
.sea3d-loading.is-error .sea3d-loading-ring { display: none; }
.sea3d-loading-ring {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(127, 233, 228, 0.18);
    border-top-color: #f2c46b;
    animation: sea3dSpin 1.1s linear infinite;
}
@keyframes sea3dSpin { to { transform: rotate(360deg); } }

.sea3d-fade {
    position: absolute;
    inset: 0;
    background: #02050a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
    z-index: 2;
}
.sea3d-fade.is-on { opacity: 1; }

/* Stacked layouts give <main> the height of its content; the canvas has none. */
@media (max-width: 1100px) {
    #panelSea.panel-content { min-height: min(72vh, 620px); }
}
@media (max-width: 700px) {
    .sea3d-hint { display: none; }
    .sea3d-land { top: 22%; padding: 10px 18px; }
    .sea3d-land-title { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
    .sea3d-weather[data-mood="storm"] { animation: none; }
}

/* ==========================================================================
   The Voyage, played (src/sea-play.js)
   ========================================================================== */
.sea3d-fade.is-quick { transition-duration: 0.25s; }
.sea3d-stage.is-flash::after {
    content: ""; position: absolute; inset: 0; background: #fff; opacity: 0;
    animation: seaFlash 0.45s ease-out; pointer-events: none; z-index: 9;
}
@keyframes seaFlash { 0% { opacity: 0.85; } 100% { opacity: 0; } }

.sea3d-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.sea3d-layer > * { pointer-events: auto; }

/* --- crew medallions ------------------------------------------------------ */
.sea-ficha {
    --s: 46px;
    position: absolute; left: 0; top: 0;
    width: var(--s); height: var(--s);
    border-radius: 50%;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
    cursor: grab;
    touch-action: none;
    will-change: transform;
}
.sea-ficha.is-on { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }
.sea-ficha img, .sea-ficha b {
    display: block; width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--c, #e9c47a);
    box-shadow: 0 0 0 2px rgba(242, 196, 107, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
    background: #0b1a22;
    color: #f4cf7e; font: 700 18px/1 'Cinzel', serif; text-align: center;
    pointer-events: none;
}
.sea-ficha b { display: flex; align-items: center; justify-content: center; }
.sea-ficha::after {
    content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: rgba(242, 196, 107, 0.9); border-bottom: 0;
}
.sea-ficha-name {
    position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%);
    font: 600 10px/1 'Outfit', sans-serif; letter-spacing: 0.06em; white-space: nowrap;
    color: #fff; text-shadow: 0 1px 4px #000, 0 0 8px #000;
    opacity: 0; transition: opacity 0.2s;
}
.sea-ficha:hover .sea-ficha-name, .sea-ficha.is-picking .sea-ficha-name { opacity: 1; }
.sea-ficha-badge {
    position: absolute; right: -6px; top: -6px; font-style: normal; font-size: 14px;
    filter: drop-shadow(0 1px 2px #000);
}
.sea-ficha-badge:empty { display: none; }
.sea-ficha.is-picking img { box-shadow: 0 0 0 3px #7fe9e4, 0 0 22px #7fe9e4; }
.sea-ficha.sea-ghost { position: fixed; z-index: 9999; opacity: 0.95; visibility: visible; pointer-events: none; cursor: grabbing; }
.sea-ficha.sea-ghost { transition: transform 0.09s ease-out; }
.sea-ficha.sea-ghost.is-snap img { box-shadow: 0 0 0 3px rgba(255, 214, 120, 0.9), 0 0 18px rgba(255, 200, 90, 0.6); }

/* --- hotspots: posts, works, zones ---------------------------------------- */
.sea-hot {
    position: absolute; left: 0; top: 0;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px 5px 7px;
    border-radius: 999px;
    border: 1px solid rgba(242, 196, 107, 0.55);
    background: linear-gradient(180deg, rgba(8, 24, 32, 0.82), rgba(4, 12, 18, 0.82));
    color: #f6e7c4;
    font: 600 11px/1.1 'Outfit', sans-serif; letter-spacing: 0.03em; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s, border-color 0.2s, box-shadow 0.2s;
}
.sea-hot.is-on { opacity: 1; visibility: visible; transition: opacity 0.3s, border-color 0.2s, box-shadow 0.2s; }
.sea-hot:hover, .sea-hot.is-drop { border-color: #7fe9e4; box-shadow: 0 0 0 2px rgba(127, 233, 228, 0.35), 0 0 20px rgba(127, 233, 228, 0.35); }
.sea-hot-g { font-size: 14px; }
.sea-hot-c { color: #7fe9e4; font-variant-numeric: tabular-nums; }
.sea-hot.is-manned { border-color: rgba(127, 233, 228, 0.7); }
.sea-hot.is-full .sea-hot-c { color: #f2c46b; }
.sea-rig { border-style: dashed; }
.sea-rig.is-broken { border-color: rgba(255, 140, 110, 0.8); color: #ffd2c4; }
.sea-rig.is-off { opacity: 0.55; }
.sea-zone { padding: 7px 13px 7px 9px; font-size: 12px; border-color: rgba(242, 196, 107, 0.8); }
.sea-zone .sea-hot-n { font-family: 'Cinzel', serif; font-weight: 700; }
.sea-zone.is-report { border-color: rgba(127, 233, 228, 0.8); }
.sea-hot-got { color: #bff3ef; }
.sea-risk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px currentColor; background: currentColor; font-style: normal; }
.sea-risk.is-low { color: #7fe9a4; }
.sea-risk.is-mid { color: #f2c46b; }
.sea-risk.is-high { color: #ff7b6b; }

/* --- the dock: panel of the moment + the gold button ----------------------- */
.sea3d-dock {
    position: absolute; left: 50%; bottom: clamp(12px, 2.2vh, 22px);
    transform: translateX(-50%);
    width: min(720px, calc(100% - 32px));
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    z-index: 4;
    pointer-events: none;
}
.sea3d-dock > * { pointer-events: auto; }
.sea-panel {
    position: absolute; z-index: 4;
    left: 50%; transform: translateX(-50%);
    bottom: calc(clamp(12px, 2.2vh, 22px) + 74px);
    width: min(720px, calc(100% - 32px));
    padding: 12px 16px 12px;
    border-radius: 14px;
    border: 1px solid rgba(242, 196, 107, 0.45);
    background: linear-gradient(180deg, rgba(6, 20, 28, 0.9), rgba(3, 10, 16, 0.92));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 231, 168, 0.12);
    color: #e7eef0;
    animation: seaPanelIn 0.35s ease;
    max-height: 46vh; overflow-y: auto;
    /* A scrollbar coming and going must not reflow the buttons under the pointer. */
    scrollbar-gutter: stable;
    overflow-x: hidden;
}
/* Inside the panel a hovered button only glows, it does not grow: grown, it
   could push the panel's scroll about and slip out from under the pointer,
   and it blinked on and off (Start the day, Post them for me, Lower the tender). */
.sea-panel .nav-btn:hover:not(:disabled), .sea-panel .btn-harem:hover:not(:disabled) { transform: none; }
@keyframes seaPanelIn { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1100px) {
    .sea-panel.is-board, .sea-panel.is-plan {
        left: auto; right: 16px; transform: none;
        top: 64px; bottom: calc(clamp(12px, 2.2vh, 22px) + 74px);
        width: 340px; max-height: none;
    }
    .sea-panel.is-board .sea-panel-foot, .sea-panel.is-plan .sea-panel-foot { justify-content: stretch; }
    .sea-panel.is-board .sea-panel-foot .nav-btn, .sea-panel.is-plan .sea-panel-foot .nav-btn { flex: 1 1 100%; }
}
.sea-panel[hidden] { display: none; }
.sea-panel-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.sea-panel-head b { font: 700 15px/1.2 'Cinzel', serif; letter-spacing: 0.08em; color: #f4cf7e; }
.sea-panel-head span { font: italic 13px/1.35 'Spectral', Georgia, serif; color: rgba(220, 236, 240, 0.85); }
.sea-bench { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 6px; border-radius: 10px; background: rgba(127, 233, 228, 0.05); border: 1px dashed rgba(127, 233, 228, 0.25); }
.sea-bench em { font: italic 12px/24px 'Spectral', serif; color: rgba(200, 240, 238, 0.7); padding: 0 6px; }
.sea-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px 3px 3px; border-radius: 999px;
    border: 1px solid var(--c, #e9c47a);
    background: rgba(0, 0, 0, 0.35); color: #fff;
    font: 600 12px/1 'Outfit', sans-serif; cursor: grab; touch-action: none;
}
.sea-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; pointer-events: none; }
.sea-chip.is-picking { box-shadow: 0 0 0 2px #7fe9e4, 0 0 14px rgba(127, 233, 228, 0.5); }
.sea-hint { margin: 8px 2px 0; font: 12.5px/1.45 'Outfit', sans-serif; color: rgba(225, 236, 238, 0.86); }
.sea-hint b { color: #f4cf7e; }
.sea-warn { margin: 0 0 8px; font: 600 12px/1.4 'Outfit', sans-serif; color: #ffb37a; }
.lf-warn { color: #ffb37a; font-style: normal; font-weight: 600; }
.sea-course { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.sea-course-lead { font: 700 11px/1 'Cinzel', serif; letter-spacing: 0.14em; color: #f4cf7e; margin-right: 4px; text-transform: uppercase; }
.sea-course-opt {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px;
    border: 1px solid rgba(127, 233, 228, 0.3); background: rgba(127, 233, 228, 0.06);
    color: #dff6f4; font: 600 11.5px/1 'Outfit', sans-serif; cursor: pointer;
}
.sea-course-opt i { font-style: normal; }
.sea-course-opt.is-on { border-color: #f2c46b; background: rgba(242, 196, 107, 0.16); color: #ffe7a8; box-shadow: 0 0 12px rgba(242, 196, 107, 0.25); }
.sea-course small { flex: 1 0 100%; font: italic 12px/1.3 'Spectral', serif; color: rgba(210, 232, 236, 0.75); }
.sea-panel-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.sea-panel-foot .nav-btn { width: auto; padding: 9px 16px; }
.sea-proxy { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.sea-proxy-btn { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; }
.sea-proxy-btn.is-plan { grid-column: 1 / -1; }

.sea-return {
    position: relative;
    display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
    min-width: 260px; padding: 11px 26px 14px 16px;
    border-radius: 14px; border: 1px solid rgba(255, 226, 150, 0.9);
    background: linear-gradient(180deg, #ffe39b 0%, #f0b955 48%, #c98a2c 100%);
    color: #2a1705;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 26px rgba(242, 184, 75, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer; overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.sea-return::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
    background: radial-gradient(circle at 10px -2px, transparent 7px, rgba(18, 110, 120, 0.85) 8px) 0 0 / 20px 8px repeat-x;
    animation: seaWave 3s linear infinite;
}
@keyframes seaWave { to { background-position: 20px 0; } }
.sea-return:hover:not(:disabled) { transform: scale(1.03); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 36px rgba(242, 184, 75, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.sea-return:disabled {
    cursor: default; filter: saturate(0.25) brightness(0.62);
    background: linear-gradient(180deg, #cdbb90 0%, #a08a5c 100%);
}
.sea-return.is-draw .sea-return-bowl { animation: seaBowl 2.4s ease-in-out infinite; }
@keyframes seaBowl { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-12deg); } 86% { transform: rotate(10deg); } 94% { transform: rotate(-5deg); } }
.sea-return-bowl {
    grid-row: 1 / 3; width: 34px; height: 34px;
    background: url(../data/ui/fate-bowl.webp) 0 0 / 500% 500% no-repeat;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.sea-return-txt { font: 700 16px/1.1 'Cinzel', serif; letter-spacing: 0.1em; text-transform: uppercase; text-align: left; }
.sea-return-sub { font: 600 11px/1.2 'Outfit', sans-serif; letter-spacing: 0.04em; opacity: 0.8; text-align: left; }
.sea-return[hidden] { display: none; }

.sea-toast {
    position: absolute; top: -40px; left: 50%; transform: translate(-50%, 6px);
    padding: 7px 16px; border-radius: 999px; background: rgba(4, 14, 20, 0.92); border: 1px solid rgba(127, 233, 228, 0.5);
    font: 600 12px/1 'Outfit', sans-serif; color: #c8f7f3; white-space: nowrap;
    opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.sea-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.sea-ending { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 50; }
.sea-ending[hidden] { display: none; }
.sea-ending-card {
    pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 22px 40px; text-align: center;
    background: linear-gradient(90deg, transparent, rgba(3, 10, 16, 0.78) 15%, rgba(3, 10, 16, 0.78) 85%, transparent);
    animation: seaPanelIn 1.6s ease;
}
.sea-ending-card small { font: 600 11px/1 'Outfit', sans-serif; letter-spacing: 0.3em; text-transform: uppercase; color: #7fe9e4; }
.sea-ending-card b { font: 700 clamp(20px, 2.4vw, 34px)/1.15 'Cinzel', serif; color: #ffe2a0; text-shadow: 0 0 22px rgba(242, 184, 75, 0.45); }
.sea-ending-card .nav-btn { width: auto; padding: 9px 22px; }

.sea3d-snap.nav-btn { width: auto; padding: 6px 10px; font-size: 14px; }

/* The Main Deck's morning keeps the chart too (day-ui.js). */
.day-course { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 0 100%; margin-bottom: 8px; }
.day-course-lead { font: 700 11px/1 'Cinzel', serif; letter-spacing: 0.14em; color: var(--ember, #f2c46b); text-transform: uppercase; margin-right: 4px; }
.day-course-opt { padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(127, 233, 228, 0.3); background: rgba(127, 233, 228, 0.06); color: inherit; font: 600 11.5px/1 'Outfit', sans-serif; cursor: pointer; }
.day-course-opt.is-on { border-color: var(--ember, #f2c46b); background: rgba(242, 196, 107, 0.16); }
.day-course small { flex: 1 0 100%; font-style: italic; opacity: 0.75; font-size: 12px; }

@media (max-width: 700px) {
    .sea-return { min-width: 0; width: 100%; }
    .sea-panel { max-height: 40vh; padding: 10px 12px; }
    .sea-hot { font-size: 10px; padding: 4px 8px 4px 6px; }
    .sea-hot-n { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
    .sea-return::after, .sea-return.is-draw .sea-return-bowl { animation: none; }
}

/* Posts and works stay small on the boat; the name opens on hover. */
.sea-post .sea-hot-n, .sea-rig .sea-hot-n { display: none; }
.sea-post:hover .sea-hot-n, .sea-post.is-drop .sea-hot-n, .sea-rig:hover .sea-hot-n { display: inline; }
.sea-post:hover, .sea-rig:hover, .sea-post.is-drop { z-index: 2000; }
/* The icon under the pointer grows (sea-play.js updateNear). */
.sea-hot { scale: 1; }
.sea-hot.is-on { transition: opacity 0.3s, border-color 0.2s, box-shadow 0.2s, scale 0.2s ease-out; }
.sea-hot.is-near { scale: 1.3; z-index: 2000; border-color: #7fe9e4; box-shadow: 0 0 0 2px rgba(127, 233, 228, 0.45), 0 0 22px rgba(127, 233, 228, 0.5); }
.sea-post.is-near .sea-hot-n, .sea-rig.is-near .sea-hot-n { display: inline; }
/* While one is grown, the others step aside so nothing covers or crowds it. */
.is-hot-near .sea-hot.is-on:not(.is-near):not(.is-drop) { opacity: 0; pointer-events: none; }
.sea3d-stage.is-hot-near { cursor: pointer; }
.sea-post { padding: 4px 9px 4px 6px; }

/* The last picture: nothing but the sea and the title. */
.sea3d-stage.is-ending .sea3d-hud, .sea3d-stage.is-ending .sea3d-land,
.sea3d-stage.is-ending .sea3d-tools, .sea3d-stage.is-ending .sea3d-dock,
.sea3d-stage.is-ending .sea3d-layer { opacity: 0; pointer-events: none; transition: opacity 1s; }

/* ==========================================================================
   Dispatch: charts, the golden ball, incidents, the summary (sea-play.js)
   ========================================================================== */
.sea-radar-svg { display: block; overflow: visible; }
.sea-radar-ax { font: 700 9.5px/1 'Cinzel', serif; letter-spacing: 0.06em; fill: rgba(244, 207, 126, 0.92); text-transform: uppercase; }
.sea-radar-v { font: 600 10px 'Outfit', sans-serif; fill: #bff3ef; }
.sea-hot .sea-radar-svg { margin: -4px 0; }
.sea-pct { font: 700 12px/1 'Outfit', sans-serif; color: #ffe2a0; font-variant-numeric: tabular-nums; }
.sea-pct-big { display: block; font: 700 30px/1.1 'Cinzel', serif; color: #ffe2a0; text-shadow: 0 0 16px rgba(242, 184, 75, 0.4); }
.sea-radar-focus { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; padding: 8px; border-radius: 12px;
    background: radial-gradient(circle at 30% 50%, rgba(31, 190, 170, 0.1), transparent 65%), rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(242, 196, 107, 0.22); }
.sea-radar-focus b { display: block; font: 700 14px 'Cinzel', serif; color: #f4cf7e; letter-spacing: 0.06em; }
.sea-radar-focus small { display: block; font: italic 12px 'Spectral', serif; color: rgba(210, 232, 236, 0.75); margin-top: 4px; }
.sea-radar-focus p { margin: 6px 0 0; font: 12px/1.4 'Outfit', sans-serif; color: rgba(225, 236, 238, 0.8); }

/* the show: a stage-level overlay that never blocks the deck */
.sea-show { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 70px 28px 110px;
    pointer-events: none; opacity: 0; transition: opacity 0.5s; z-index: 5; }
.sea-show.is-on { opacity: 1; }
.sea-show > * { pointer-events: auto; }
.sea-skip.nav-btn { position: absolute; top: 14px; right: 16px; z-index: 6; width: auto; padding: 7px 14px; font-size: 12px; letter-spacing: 0.08em; }
.sea-skip[hidden] { display: none; }

.sea-show-banner, .sea-radar-card, .sea-incident, .sea-summary {
    border-radius: 16px; border: 1px solid rgba(242, 196, 107, 0.5);
    background: linear-gradient(180deg, rgba(6, 20, 28, 0.9), rgba(3, 10, 16, 0.94));
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 231, 168, 0.14);
    color: #e7eef0; animation: seaPanelIn 0.4s ease;
}
.sea-show-banner { align-self: flex-start; margin: 0 auto; padding: 10px 26px; text-align: center; }
.sea-show-banner small, .sea-incident small, .sea-summary small { display: block; font: 600 10.5px/1 'Outfit', sans-serif; letter-spacing: 0.28em; text-transform: uppercase; color: #7fe9e4; margin-bottom: 6px; }
.sea-show-banner b { font: 700 16px/1.2 'Cinzel', serif; color: #ffe2a0; letter-spacing: 0.06em; }

.sea-radar-card { width: 280px; padding: 14px 16px 12px; text-align: center; position: relative; }
.sea-radar-card.is-ok { border-color: rgba(127, 233, 164, 0.8); box-shadow: 0 0 0 1px rgba(127, 233, 164, 0.25), 0 14px 44px rgba(0, 0, 0, 0.55); }
.sea-radar-card.is-bad { border-color: rgba(255, 123, 107, 0.8); box-shadow: 0 0 0 1px rgba(255, 123, 107, 0.25), 0 14px 44px rgba(0, 0, 0, 0.55); }
.sea-radar-head { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sea-radar-head b { font: 700 16px 'Cinzel', serif; letter-spacing: 0.08em; color: #f4cf7e; }
.sea-radar-g { font-size: 18px; }
.sea-radar-pct { font: 700 13px 'Outfit', sans-serif; color: #ffe2a0; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(242, 196, 107, 0.45); }
.sea-radar-who { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 2px; }
.sea-radar-card .sea-radar-svg { margin: 4px auto 0; }
.sea-radar-verdict { min-height: 24px; font: 700 15px 'Cinzel', serif; letter-spacing: 0.08em; }
.sea-radar-card.is-ok .sea-radar-verdict { color: #9ff0be; }
.sea-radar-card.is-bad .sea-radar-verdict { color: #ffb0a5; }
.sea-radar-gain { font: 600 13px 'Outfit', sans-serif; color: #e7eef0; letter-spacing: 0; }
.sea-radar-step { position: absolute; top: 10px; right: 12px; font: 600 10px 'Outfit', sans-serif; color: rgba(200, 240, 238, 0.6); }
.sea-mini-face { display: inline-flex; align-items: center; gap: 5px; font: 600 11px 'Outfit', sans-serif; color: #fff; }
.sea-mini-face img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c, #e9c47a); box-shadow: 0 0 0 1px rgba(242, 196, 107, 0.8); }
.sea-bond { font-style: normal; font-size: 15px; }
.sea-bond.is-good { color: #ff8fb1; }
.sea-bond.is-bad { color: #ffcf5a; }

.sea-incident { width: 340px; padding: 16px 18px; }
.sea-incident b { display: block; font: 700 18px 'Cinzel', serif; color: #ffe2a0; letter-spacing: 0.06em; }
.sea-incident p { font: 14px/1.5 'Spectral', Georgia, serif; color: rgba(230, 240, 242, 0.9); margin: 8px 0 12px; }
.sea-incident-opts { display: flex; flex-direction: column; gap: 8px; }
.sea-incident-opt.nav-btn { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 12px; text-align: left; }
.sea-incident-opt span { font: 600 13px 'Outfit', sans-serif; }
.sea-incident-opt em { font: 600 11px 'Outfit', sans-serif; font-style: normal; letter-spacing: 0.04em; color: rgba(210, 232, 236, 0.7); }
.sea-incident-opt em.is-ok { color: #9ff0be; }
.sea-incident-opt em.is-bad { color: #ffb0a5; }
.sea-incident-out { font: italic 14px/1.5 'Spectral', serif; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); }
.sea-incident-out.is-ok { color: #c8f7da; }
.sea-incident-out.is-bad { color: #ffd0c8; }

.sea-summary { width: 360px; padding: 16px 18px 14px; }
.sea-summary > b { display: block; font: 700 18px 'Cinzel', serif; color: #ffe2a0; letter-spacing: 0.06em; margin-bottom: 8px; }
.sea-sum-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sea-sum-list li { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.22); border-left: 3px solid transparent; }
.sea-sum-list li.is-ok { border-left-color: #7fe9a4; }
.sea-sum-list li.is-bad { border-left-color: #ff7b6b; }
.sea-sum-z { flex: 1; }
.sea-sum-z b { display: block; font: 700 13px 'Cinzel', serif; color: #f4cf7e; }
.sea-sum-z small { display: block; font: 11.5px 'Outfit', sans-serif; letter-spacing: 0; text-transform: none; color: rgba(210, 232, 236, 0.75); margin: 2px 0 0; }
.sea-sum-r { font: 600 12.5px 'Outfit', sans-serif; white-space: nowrap; }
.sea-sum-extra { margin: 10px 0 4px; }
.sea-sum-extra p { margin: 3px 0; font: 12.5px/1.4 'Outfit', sans-serif; color: rgba(225, 236, 238, 0.85); }
.sea-summary-close.nav-btn { width: 100%; margin-top: 10px; }

@media (max-width: 900px) {
    .sea-show { justify-content: center; align-items: flex-start; padding: 60px 12px 110px; }
    .sea-radar-card, .sea-incident, .sea-summary { width: min(340px, 100%); }
}

/* While the expedition plays, its own cards speak; the landfall banner waits. */
.sea3d-stage.is-dispatch .sea3d-land { opacity: 0 !important; }

/* The person card in the planner: their drawing, what they are good at, where they fit. */
.sea-person .sea-good { display: block; margin-top: 4px; font: 600 12.5px 'Outfit', sans-serif; color: #bff3ef; }
.sea-person em { font-style: normal; font: 600 10px 'Outfit', sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244, 207, 126, 0.85); margin-right: 4px; }
.sea-person .sea-fits { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.sea-person .sea-fits i { font-style: normal; font: 12.5px 'Outfit', sans-serif; color: rgba(230, 240, 242, 0.9); }
.sea-person .sea-fits i b { display: inline; font: 700 12.5px 'Outfit', sans-serif; color: #ffe2a0; letter-spacing: 0; }

/* The morning's cards (sea-play.js postCardHtml / personBoardHtml). */
.sea-card { margin: 8px 0 2px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(242, 196, 107, 0.22); }
.sea-personcard { display: flex; gap: 10px; align-items: flex-start; }
.sea-card-head { display: flex; align-items: center; gap: 8px; }
.sea-card-head b { font: 700 14px 'Cinzel', serif; letter-spacing: 0.06em; color: #f4cf7e; flex: 1; }
.sea-card-g { font-size: 17px; }
.sea-card-c { font: 600 11px 'Outfit', sans-serif; color: #7fe9e4; }
.sea-card-desc { margin: 4px 0 6px; font: italic 13px/1.4 'Spectral', serif; color: rgba(225, 236, 238, 0.85); }
.sea-card-lines { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sea-card-lines li { font: 12.5px/1.4 'Outfit', sans-serif; color: rgba(230, 240, 242, 0.9); padding-left: 12px; position: relative; }
.sea-card-lines li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 4px; height: 4px; border-radius: 50%; background: #f2c46b; }
.sea-card .is-warn { color: #ffb37a; }
.sea-card .is-good { color: #9ff0be; }
.sea-bondtype { font-style: normal; color: #bff3ef; }
.sea-card-pair { margin: 6px 0 0; font: 12.5px 'Outfit', sans-serif; color: rgba(230, 240, 242, 0.9); }
.sea-card-pair b { color: #f4cf7e; }
.sea-card-tips { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.sea-card-tips em { font-style: normal; font: 600 10px 'Outfit', sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244, 207, 126, 0.85); }
.sea-card-tips span { font: 600 12.5px 'Outfit', sans-serif; color: #bff3ef; }
.sea-card-foot { display: block; margin-top: 6px; font: italic 11px 'Spectral', serif; color: rgba(210, 232, 236, 0.6); }
.sea-x { font: 700 12px 'Outfit', sans-serif; color: #ffe2a0; }

/* The villa: the two big cards (theme.css .haven-card), and "Skip" while
   the crew goes ashore (sea-play.js, PLAN-villa.md §4.2). */
.sea-panel .hc-faces { margin: 6px 0 10px; }
.sea-proxy.is-haven { grid-template-columns: 1fr 1fr; gap: 10px; }
/* The smoke's four cards (Draw lots, Take charge, Send everyone, Sail on). */
.sea-proxy.is-haven.is-four { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sea-proxy.is-four .haven-card { min-height: 104px; padding: 10px 12px; }
.sea-proxy.is-four .haven-card .lf-lbl { font-size: 14.5px; }
@media (max-width: 900px) { .sea-proxy.is-haven.is-four { grid-template-columns: 1fr 1fr; } }
.sea-panel .hc-faces.is-cast { justify-content: center; }
/* The woman on the raft (sea-play.js): no name until she can say it, and asleep. */
.sea-ficha.is-nameless img { filter: grayscale(0.85) brightness(0.8); }
.sea-ficha.is-nameless .sea-ficha-name { font-size: 0; }
.sea-ficha.is-nameless .sea-ficha-name::after { content: "?"; font-size: 12px; }
/* In The Island she is right there on the raft: the panel does not repeat her. */
.sea-panel .hc-faces.is-raftwho { display: none; }
/* While the tender goes to the smoke, the "Smoke over an island" banner stays out of the picture. */
.is-rescue .sea3d-land { opacity: 0 !important; }
.sea-villa-skip {
    position: absolute;
    right: 18px;
    bottom: 86px;
    z-index: 30;
    padding: 7px 16px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(8, 6, 3, 0.62);
    border: 1px solid rgba(244, 199, 94, 0.45);
    color: var(--gold, #f4c75e);
}
.sea-villa-skip[hidden] { display: none; }
