:root {
    --deep: #061525;
    --ocean: #0a2847;
    --teal: #1a6b7a;
    --aqua: #2ec4b6;
    --foam: #cbf3f0;
    --coral: #ff6b6b;
    --gold: #ffd166;
    --glass: rgba(10, 40, 71, 0.75);
    --glass-border: rgba(46, 196, 182, 0.35);
    --text: #e8f7ff;
    --text-dim: #9ec8d8;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --radius: 18px;
    --font: 'Nunito', system-ui, sans-serif;
    --font-play: 'Bubblegum Sans', cursive;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    font-family: var(--font);
    color: var(--text);
    background: var(--deep);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

body {
    background:
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(10,80,100,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 75% 70%, rgba(8,60,90,0.3) 0%, transparent 55%),
        radial-gradient(ellipse 120% 80% at 50% 0%, #134e6f 0%, transparent 55%),
        radial-gradient(ellipse 80% 50% at 80% 100%, #0d3d56 0%, transparent 50%),
        linear-gradient(180deg, #04101f 0%, #071e33 30%, var(--deep) 60%, #020c18 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle 2px at 15% 25%, rgba(46,196,182,0.12) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 45% 15%, rgba(46,196,182,0.08) 0%, transparent 100%),
        radial-gradient(circle 2px at 72% 40%, rgba(46,196,182,0.1) 0%, transparent 100%),
        radial-gradient(circle 1px at 88% 20%, rgba(255,209,102,0.06) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 25% 65%, rgba(46,196,182,0.07) 0%, transparent 100%),
        radial-gradient(circle 2px at 60% 75%, rgba(46,196,182,0.09) 0%, transparent 100%),
        radial-gradient(circle 1px at 35% 85%, rgba(255,255,255,0.04) 0%, transparent 100%),
        radial-gradient(circle 1.5px at 80% 60%, rgba(46,196,182,0.06) 0%, transparent 100%);
    animation: particles-drift 20s ease-in-out infinite alternate;
}

@keyframes particles-drift {
    0% { opacity: 0.7; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(-8px); }
}

#bubble-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(46,196,182,0.15));
    border: 1px solid rgba(255,255,255,0.2);
    animation: rise linear infinite;
    opacity: 0.6;
}

@keyframes rise {
    to { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* Top bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 12px 22px;
    background: linear-gradient(180deg, rgba(6,21,37,0.95) 60%, rgba(6,21,37,0.6) 85%, transparent);
    backdrop-filter: blur(8px);
}

.timeline-wrap--full { margin-right: 0; }

.btn-reset-game {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--coral);
    background: rgba(255, 107, 107, 0.2);
    color: #ffc9c9;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 2;
}

/* score-display is now in bottom-bar, styled via .bottom-stat */

.timeline-track {
    position: relative;
    height: 44px;
    border-radius: 22px;
    background:
        linear-gradient(180deg,
            rgba(4,25,50,0.95) 0%,
            rgba(8,50,75,0.9) 30%,
            rgba(12,65,95,0.85) 60%,
            rgba(6,40,65,0.95) 100%);
    overflow: visible;
    box-shadow:
        inset 0 3px 8px rgba(0,0,0,0.6),
        inset 0 -2px 4px rgba(46,196,182,0.1),
        0 2px 10px rgba(0,0,0,0.4);
    border: 1.5px solid rgba(46,196,182,0.25);
}

.timeline-sea {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    z-index: 1;
}

/* caustic light ripples */
.timeline-sea::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(46,196,182,0.06) 15%,
        rgba(46,196,182,0.12) 25%,
        rgba(46,196,182,0.04) 35%,
        transparent 45%,
        rgba(46,196,182,0.08) 55%,
        rgba(46,196,182,0.14) 65%,
        rgba(46,196,182,0.05) 75%,
        transparent 100%);
    animation: caustic-sweep 5s ease-in-out infinite;
}

.timeline-sea::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background:
        radial-gradient(circle 6px at 20% 85%, rgba(46,196,182,0.06), transparent),
        radial-gradient(circle 4px at 55% 90%, rgba(46,196,182,0.05), transparent),
        radial-gradient(circle 5px at 80% 80%, rgba(46,196,182,0.04), transparent);
}

@keyframes caustic-sweep {
    0% { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

/* bubbles inside the timeline */
.timeline-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.45), rgba(46,196,182,0.1));
    border: 1px solid rgba(255,255,255,0.15);
    animation: tl-bubble-rise linear infinite;
    pointer-events: none;
}

@keyframes tl-bubble-rise {
    0% { transform: translateY(0) scale(1); opacity: 0.6; }
    60% { opacity: 0.4; }
    100% { transform: translateY(-44px) scale(0.6); opacity: 0; }
}

.timeline-submarines {
    position: absolute;
    inset: 0;
    overflow: visible;
    z-index: 2;
}

.sub-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sub-icon {
    display: block;
    line-height: 0;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}

.sub-marker.is-self .sub-icon { transform: scale(1.25); }
.sub-marker.is-done .sub-icon { filter: drop-shadow(0 0 6px rgba(255,209,102,0.5)); }

/* speech bubble with score under submarine */
.sub-bubble {
    position: absolute;
    top: 100%;
    margin-top: 4px;
    background: rgba(6,21,37,0.92);
    border: 1.5px solid var(--aqua);
    border-radius: 8px;
    padding: 2px 6px;
    font-family: var(--font-play);
    font-size: 0.6rem;
    color: var(--foam);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    line-height: 1.3;
    text-align: center;
}

/* speech bubble arrow */
.sub-bubble::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid var(--aqua);
}

.sub-bubble::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 4px solid rgba(6,21,37,0.92);
}

.sub-marker.is-self .sub-bubble {
    border-color: var(--gold);
    color: var(--gold);
    font-size: 0.65rem;
}

.sub-marker.is-self .sub-bubble::before {
    border-bottom-color: var(--gold);
}

.sub-label {
    display: block;
    font-size: 0.5rem;
    font-weight: 700;
    text-align: center;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--foam);
    opacity: 0.8;
    margin-top: 1px;
}

.sub-marker.is-self { z-index: 2; }

.timeline-finish {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(255,209,102,0.4));
}

/* timer-display is now in bottom-bar, styled via .bottom-stat-value */

.score-toast {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(10, 40, 71, 0.95);
    border: 2px solid var(--aqua);
    color: var(--foam);
    font-weight: 800;
    box-shadow: var(--shadow);
    animation: toast-in 0.35s ease;
    text-align: center;
    max-width: 90vw;
}

.score-toast.is-wrong { border-color: var(--coral); color: #ffc9c9; }
.score-toast.is-right { border-color: var(--gold); color: var(--gold); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Photo feed */
/* Main */
#app {
    position: relative;
    z-index: 10;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    min-height: 100dvh;
}

body.game-active #app { padding-top: 72px; padding-bottom: 80px; }

.screen { display: none; animation: fade-in 0.35s ease; }
.screen-active { display: block; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.logo-block { text-align: center; margin: 2rem 0 1.5rem; }
.logo-icon { font-size: 3.5rem; animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

h1 {
    font-family: var(--font-play);
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0.5rem 0;
    color: var(--foam);
    text-shadow: 0 2px 16px rgba(46,196,182,0.4);
}

h2 { font-family: var(--font-play); color: var(--aqua); margin: 0.25rem 0 1rem; }
.subtitle { color: var(--text-dim); margin: 0; }
.welcome { color: var(--text-dim); margin: 0; }

.card {
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 0 auto;
    max-width: 480px;
}

.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.center { text-align: center; }

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--teal);
    border-radius: 12px;
    background: rgba(6,21,37,0.8);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(46,196,182,0.25);
}

.hint { font-size: 0.8rem; color: var(--text-dim); margin: 0.5rem 0 1rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 24px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    width: 100%;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--aqua), #1a8f83);
    color: #042a26;
    box-shadow: 0 4px 20px rgba(46,196,182,0.4);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@keyframes btn-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(46,196,182,0.4); }
    50% { box-shadow: 0 4px 28px rgba(46,196,182,0.65), 0 0 8px rgba(46,196,182,0.3); }
}

.btn-primary.btn-large {
    animation: btn-glow 2.5s ease-in-out infinite;
}

.btn-secondary {
    background: rgba(255,255,255,0.12);
    color: var(--foam);
    border: 1px solid var(--glass-border);
}

.btn-large { font-size: 1.15rem; padding: 18px 28px; }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-answer {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    margin-bottom: 0.5rem;
    background: rgba(6,21,37,0.6);
    border: 2px dashed var(--teal);
    border-radius: 12px;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
}

.btn-answer.has-value {
    border-style: solid;
    border-color: var(--aqua);
    color: var(--foam);
    font-weight: 700;
}

/* Game content */
.story-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.story-header .icon { font-size: 1.75rem; }
.story-header h3 {
    font-family: var(--font-play);
    margin: 0;
    font-size: 1.2rem;
    color: var(--gold);
}

.story-body { font-size: 0.95rem; line-height: 1.55; }
.story-body p { margin: 0 0 0.75rem; }
.story-urgent { color: var(--coral); font-weight: 700; }

blockquote {
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--aqua);
    background: rgba(46,196,182,0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.testimony { margin-bottom: 1rem; }

.secret-note {
    background: rgba(255,209,102,0.1);
    border: 1px solid rgba(255,209,102,0.3);
    border-radius: 12px;
    padding: 1rem;
}

.task-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: 12px;
    font-size: 0.9rem;
}

.lock-notice {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gold);
}

.lock-notice .countdown {
    font-family: var(--font-play);
    font-size: 2rem;
    display: block;
    margin: 0.5rem 0;
}

.photo-task {
    background: rgba(46,196,182,0.12);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.upload-zone {
    border: 2px dashed var(--aqua);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    cursor: pointer;
}

.upload-zone input { display: none; }

.complete-screen {
    text-align: center;
    padding: 1rem 0;
}

.complete-screen .trophy { font-size: 4rem; }
.final-time {
    font-family: var(--font-play);
    font-size: 2.5rem;
    color: var(--gold);
}

/* Scoreboard */
.scoreboard {
    padding: 0.25rem 0 1rem;
}
.scoreboard-title {
    text-align: center;
    font-family: var(--font-play);
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    background: linear-gradient(135deg, var(--gold), #fff6b0, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255,209,102,0.5));
    animation: scoreboard-glow 2s ease-in-out infinite alternate;
}
@keyframes scoreboard-glow {
    0% { filter: drop-shadow(0 0 6px rgba(255,209,102,0.3)); }
    100% { filter: drop-shadow(0 0 14px rgba(255,209,102,0.7)); }
}
.scoreboard-subtitle {
    text-align: center;
    font-size: 0.8rem;
    color: var(--sand);
    opacity: 0.7;
    margin-bottom: 1rem;
}
.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}
.scoreboard-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08));
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.2s, background 0.3s;
}
.scoreboard-row:nth-child(1) {
    background: linear-gradient(135deg, rgba(255,209,102,0.15), rgba(255,209,102,0.05));
    border-color: rgba(255,209,102,0.3);
    font-size: 1rem;
}
.scoreboard-row:nth-child(2) {
    background: linear-gradient(135deg, rgba(192,192,192,0.12), rgba(192,192,192,0.04));
    border-color: rgba(192,192,192,0.2);
}
.scoreboard-row:nth-child(3) {
    background: linear-gradient(135deg, rgba(205,127,50,0.12), rgba(205,127,50,0.04));
    border-color: rgba(205,127,50,0.2);
}
.scoreboard-row.is-self {
    background: linear-gradient(135deg, rgba(46,196,182,0.2), rgba(46,196,182,0.08));
    border: 2px solid var(--aqua);
    box-shadow: 0 0 12px rgba(46,196,182,0.2), inset 0 0 8px rgba(46,196,182,0.05);
}
.scoreboard-rank {
    font-size: 1.3rem;
    min-width: 2rem;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.scoreboard-name {
    flex: 1;
    font-family: var(--font-play);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.scoreboard-status {
    color: var(--sand);
    font-size: 0.8rem;
    min-width: 2.5rem;
    text-align: right;
    opacity: 0.8;
}
.scoreboard-score {
    font-family: var(--font-play);
    color: var(--gold);
    font-weight: 800;
    font-size: 1.05em;
    min-width: 3.2rem;
    text-align: right;
    text-shadow: 0 0 6px rgba(255,209,102,0.4);
}
.scoreboard-team-photos {
    display: flex;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem 0.5rem 2.8rem;
}
.scoreboard-photo-thumb {
    background: none;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.scoreboard-photo-thumb:active {
    transform: scale(0.93);
}
.scoreboard-photo-thumb:hover {
    border-color: var(--aqua);
}
.scoreboard-photo-thumb img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    display: block;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* Modals */
.modal {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0;
    max-width: 95vw;
    width: 400px;
    max-height: 85dvh;
    background: var(--glass);
    backdrop-filter: blur(16px);
    color: var(--text);
    box-shadow: var(--shadow);
}

.modal::backdrop { background: rgba(2,10,20,0.75); }

/* Lock scroll when any dialog is open */
html.dialog-open,
html.dialog-open body {
    overflow: hidden !important;
    touch-action: none;
    height: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 { margin: 0; font-size: 1rem; }

.name-list {
    padding: 0.5rem;
    overflow-y: auto;
    max-height: 60dvh;
}

.name-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    margin: 4px 0;
    border: none;
    border-radius: 10px;
    background: rgba(6,21,37,0.5);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

.name-item:hover, .name-item:focus {
    background: rgba(46,196,182,0.2);
    outline: none;
}

.name-item.selected {
    background: rgba(46,196,182,0.35);
    font-weight: 700;
}

#dialog-choice { padding-bottom: 1rem; }
#dialog-choice p { padding: 0 1rem; color: var(--text-dim); font-size: 0.9rem; }

.choice-options { padding: 0.5rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }

.choice-card {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid var(--teal);
    background: rgba(6,21,37,0.5);
    cursor: pointer;
    text-align: left;
    color: inherit;
    font-family: inherit;
}

.choice-card:hover { border-color: var(--aqua); }
.choice-card strong { color: var(--aqua); display: block; margin-bottom: 0.25rem; }
.choice-card span { font-size: 0.85rem; color: var(--text-dim); }

/* Photo overlay */
.modal-photo {
    border: none;
    padding: 0;
    max-width: 96vw;
    max-height: 96dvh;
    background: transparent;
    overflow: visible;
}

.modal-photo::backdrop { background: rgba(2,10,20,0.9); }

.modal-photo figure { margin: 0; text-align: center; }

.modal-photo img {
    max-width: 100%;
    max-height: 75dvh;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.modal-photo figcaption {
    margin-top: 0.75rem;
    color: var(--foam);
    font-weight: 700;
}

.btn-close-overlay {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--aqua);
    background: rgba(6,21,37,0.9);
    color: var(--foam);
    font-size: 1.25rem;
    cursor: pointer;
}

#btn-share-whatsapp {
    margin-top: 1rem;
    width: auto;
    min-width: 200px;
}

.btn-reset {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 10px 16px;
    opacity: 0.85;
}

/* Bottom bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 8px 20px max(8px, env(safe-area-inset-bottom));
    background: linear-gradient(0deg, rgba(6,21,37,0.97), rgba(6,21,37,0.85));
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
}

.bottom-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    align-self: center;
}

.bottom-stat-icon { font-size: 1rem; line-height: 1; }

.bottom-stat-value {
    font-family: var(--font-play);
    font-size: 1.1rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255,209,102,0.4);
    letter-spacing: 0.03em;
}

/* Score orb — centered, pops above the bar */
#score-display {
    position: relative;
    margin-top: -24px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #145e6e, #0a2847 70%);
    border: 3px solid var(--aqua);
    box-shadow:
        0 0 18px rgba(46,196,182,0.4),
        0 0 0 5px rgba(6,21,37,0.9),
        inset 0 -4px 10px rgba(0,0,0,0.3);
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    align-self: flex-end;
    animation: orb-pulse 3s ease-in-out infinite;
}

@keyframes orb-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(46,196,182,0.4), 0 0 0 5px rgba(6,21,37,0.9), inset 0 -4px 10px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 26px rgba(46,196,182,0.6), 0 0 0 5px rgba(6,21,37,0.9), inset 0 -4px 10px rgba(0,0,0,0.3); }
}

#score-display .bottom-stat-icon {
    font-size: 0.9rem;
}

#score-display .bottom-stat-value {
    font-size: 1.35rem;
    color: var(--foam);
    text-shadow: 0 0 12px rgba(46,196,182,0.5);
    line-height: 1;
}

.btn-mute-bottom {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: rgba(10, 40, 71, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    align-self: center;
}

.hidden { display: none !important; }

/* Vis-puzzels */
.fish-question {
    margin: 0.85rem 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(46, 196, 182, 0.18), rgba(10, 40, 71, 0.85));
    border: 2px solid rgba(46, 196, 182, 0.55);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 6px 24px rgba(46, 196, 182, 0.22),
        0 2px 8px rgba(0, 0, 0, 0.35);
    animation: fish-question-pop 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.fish-question.is-command {
    border-color: rgba(255, 209, 102, 0.7);
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.15), rgba(10, 40, 71, 0.9));
    box-shadow:
        0 0 0 1px rgba(255, 209, 102, 0.15) inset,
        0 8px 28px rgba(255, 209, 102, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.35);
}

.fish-question.is-answered-correct {
    border-color: #2ec4b6;
    animation: none;
}

.fish-question.is-answered-wrong {
    border-color: var(--coral);
    animation: none;
}

@keyframes fish-question-pop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fish-question-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.fish-question-fish {
    flex-shrink: 0;
    position: relative;
}

.fish-question-fish::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed rgba(46, 196, 182, 0.45);
    animation: fish-ring-pulse 2.2s ease-in-out infinite;
    pointer-events: none;
}

.fish-question.is-command .fish-question-fish::before {
    border-color: rgba(255, 209, 102, 0.5);
}

.fish-question-answered .fish-question-fish::before {
    display: none;
}

@keyframes fish-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.12); opacity: 0.35; }
}

.fish-question-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fish-question-label {
    display: inline-block;
    font-family: var(--font-play);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--aqua);
    text-shadow: 0 0 12px rgba(46, 196, 182, 0.4);
}

.fish-question.is-command .fish-question-label {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(255, 209, 102, 0.35);
}

.puzzle-clue {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--foam);
    font-weight: 600;
    white-space: pre-line;
}

.fish-btn {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid var(--aqua);
    background: rgba(46, 196, 182, 0.2);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(46, 196, 182, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fish-btn:active {
    transform: scale(0.94);
}

.fish-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.fish-btn.fish-retry {
    width: 40px;
    height: 40px;
    opacity: 0.9;
}

.fish-result {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    width: 100%;
}

.fish-result.is-correct {
    background: rgba(46, 196, 182, 0.25);
    border: 2px solid #2ec4b6;
    color: #a8fff5;
}

.fish-result.is-wrong {
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid var(--coral);
    color: #ffc9c9;
}

.rules-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 1rem 0 0;
    text-align: center;
}

.score-breakdown {
    margin: 1rem 0;
    text-align: left;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.score-breakdown p { margin: 0.35rem 0; font-size: 0.95rem; }
.score-total { margin-top: 0.75rem !important; font-size: 1.1rem !important; color: var(--gold); }