/* ============================================================
   TAMAGOTCHI HEDONISTA — mobile-first UI
   ============================================================ */

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

:root {
    --bg:         #0a0a14;
    --border:     rgba(255,255,255,0.12);
    --text:       rgba(255,255,255,0.9);
    --text-muted: rgba(255,255,255,0.45);
    --radius:     12px;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ── Layout ──────────────────────────────────────────────── */

#app {
    display: flex;
    flex-direction: column;
    height: 100dvh;   /* dynamic viewport height for mobile browsers */
}

/* ── Intro overlay ───────────────────────────────────────── */

#onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(circle at top, rgba(79, 172, 254, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(10,10,20,0.96), rgba(5,5,10,0.98));
    backdrop-filter: blur(10px);
}

#onboarding-card {
    width: min(100%, 460px);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    padding: 22px 18px 18px;
    max-height: min(92dvh, 720px);
    overflow-y: auto;
    background: rgba(12, 16, 27, 0.92);
    box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.overlay-kicker {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 10px;
}

#onboarding-title {
    font-size: 28px;
    line-height: 1.05;
    font-weight: 700;
    max-width: 10ch;
}

.overlay-copy {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255,255,255,0.76);
}

.overlay-copy.compact {
    color: rgba(255,255,255,0.58);
}

.intro-points {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.intro-point {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255,255,255,0.04);
}

.intro-point p {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.72);
}

.intro-badge,
.legend-pill,
.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.intro-badge.immediate,
.legend-pill.immediate,
.action-pill.immediate {
    background: rgba(78, 205, 196, 0.14);
    border: 1px solid rgba(78, 205, 196, 0.28);
    color: #81ecec;
}

.intro-badge.persistent,
.legend-pill.persistent,
.action-pill.persistent {
    background: rgba(255, 159, 67, 0.14);
    border: 1px solid rgba(255, 159, 67, 0.28);
    color: #ffbe76;
}

#start-btn {
    width: 100%;
    margin-top: 18px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
    color: rgba(255,255,255,0.92);
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
}

@media (max-width: 520px), (max-height: 760px) {
    #onboarding-overlay {
        padding: 12px;
        align-items: flex-start;
    }

    #onboarding-card {
        padding: 16px 14px 14px;
        border-radius: 16px;
        max-height: calc(100dvh - 24px);
    }

    .overlay-kicker {
        margin-bottom: 8px;
    }

    #onboarding-title {
        font-size: 22px;
        max-width: none;
    }

    .overlay-copy {
        margin-top: 10px;
        font-size: 13px;
        line-height: 1.35;
    }

    .intro-points {
        gap: 8px;
        margin-top: 12px;
    }

    .intro-point {
        padding: 10px;
    }

    .intro-point p {
        margin-top: 6px;
        font-size: 12px;
        line-height: 1.3;
    }

    #start-btn {
        margin-top: 14px;
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ── Avatar section (top ~60%) ───────────────────────────── */

#avatar-section {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

#bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-image: url('backgrounds/default.jpg');
    filter: brightness(0.55) saturate(1.2);
    transition: background-image 0.7s ease;
}

#avatar-section::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, background 0.35s ease;
}

#avatar-section.state-stress-low::after {
    opacity: 1;
    background: radial-gradient(circle at 50% 35%, rgba(255, 159, 67, 0.10), transparent 45%);
}

#avatar-section.state-stress-high::after {
    opacity: 1;
    background:
        radial-gradient(circle at 50% 35%, rgba(214, 48, 49, 0.16), transparent 48%),
        linear-gradient(180deg, rgba(214,48,49,0.08), transparent 60%);
}

#avatar-section.state-ssri::after {
    opacity: 1;
    background: linear-gradient(180deg, rgba(116, 185, 255, 0.10), transparent 55%);
}

#avatar-section.state-shutdown::after {
    opacity: 1;
    background: linear-gradient(180deg, rgba(99, 110, 114, 0.18), rgba(10,10,20,0.08));
}

/* ── HUD (top-right corner) ──────────────────────────────── */

#hud {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
}

.hud-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hud-spacer {
    height: 5px;
}

.hud-label {
    font-size: 16px;
    width: 20px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.hud-track {
    width: 60px;
    height: 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
}

.hud-fill {
    height: 100%;
    background: var(--color, white);
    border-radius: 3px;
    transition: width 0.6s ease;
    width: 0%;
}

/* ── HUD detail panel (hover) ────────────────────────────── */

#hud-detail {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(10, 10, 20, 0.88);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    width: min(220px, calc(100vw - 32px));
    max-height: min(50vh, 360px);
    overflow-y: auto;
    backdrop-filter: blur(6px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#hud.open #hud-detail {
    opacity: 1;
    transform: translateY(0);
}

.detail-group { margin-bottom: 8px; }
.detail-group:last-child { margin-bottom: 0; }

.detail-group-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 4px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

.detail-key {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    width: 72px;
    flex-shrink: 0;
    text-align: right;
}

.detail-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.10);
    border-radius: 2px;
    overflow: hidden;
}

.detail-fill {
    height: 100%;
    background: var(--dc, rgba(255,255,255,0.45));
    border-radius: 2px;
    transition: width 0.5s ease;
}

.detail-val {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
    #hud-detail {
        right: -2px;
        width: min(220px, calc(100vw - 24px));
        max-height: 42vh;
    }
}

/* ── Avatar ──────────────────────────────────────────────── */

.avatar-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    z-index: 5;
    pointer-events: none;
}

#avatar-canvas-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scale the p5 canvas (drawn at 480×480) down to fit the container */
#avatar-canvas-wrap canvas {
    display: block !important;
    width: 320px !important;
    height: 320px !important;
    background: transparent !important;
}

/* ── CSS Animations ──────────────────────────────────────── */

@keyframes idle {
    0%, 100% { transform: translateX(-50%) translateY(0px);    }
    50%       { transform: translateX(-50%) translateY(-4px);  }
}
@keyframes sway {
    0%, 100% { transform: translateX(-50%) rotate(-3deg); }
    50%       { transform: translateX(-50%) rotate( 3deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0px);   }
    40%       { transform: translateX(-50%) translateY(-14px); }
    60%       { transform: translateX(-50%) translateY(-10px); }
}
@keyframes shake {
    0%, 100% { transform: translateX(-50%) rotate(0deg);            }
    15%       { transform: translateX(calc(-50% - 5px)) rotate(-2deg); }
    30%       { transform: translateX(calc(-50% + 5px)) rotate( 2deg); }
    45%       { transform: translateX(calc(-50% - 4px)) rotate(-1deg); }
    60%       { transform: translateX(calc(-50% + 4px)) rotate( 1deg); }
    75%       { transform: translateX(calc(-50% - 3px));              }
    90%       { transform: translateX(calc(-50% + 2px));              }
}
@keyframes droop {
    0%, 100% { transform: translateX(-50%) translateY(0px)  scaleY(1.00); }
    50%       { transform: translateX(-50%) translateY(5px)  scaleY(0.97); }
}
@keyframes barely-moving {
    0%, 100% { transform: translateX(-50%) scale(1.00) translateY(0px);  }
    50%       { transform: translateX(-50%) scale(0.99) translateY(2px); }
}

.anim-idle          { animation: idle         3.5s ease-in-out infinite; }
.anim-sway          { animation: sway         2.2s ease-in-out infinite; }
.anim-bounce        { animation: bounce       0.65s ease-in-out infinite; }
.anim-shake         { animation: shake        0.45s ease-in-out infinite; }
.anim-droop         { animation: droop        3.8s ease-in-out infinite; }
.anim-barely-moving { animation: barely-moving 6s   ease-in-out infinite; }

/* ── Recent actions strip ────────────────────────────────── */

#recent-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg);
    overflow-x: auto;
    scrollbar-width: none;
    min-height: 34px;
    border-bottom: 1px solid var(--border);
}

#recent-actions::-webkit-scrollbar { display: none; }

.recent-label {
    font-size: 10px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.recent-chip {
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px 9px;
    font-size: 11px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}
.recent-chip:hover { background: rgba(255,255,255,0.18); }

/* ── Controls (bottom ~45%) ──────────────────────────────── */

#controls {
    flex: 1;
    min-height: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

#search-wrap {
    flex-shrink: 0;
    padding: 10px 12px 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

#action-legend {
    display: flex;
    gap: 8px;
    padding: 8px 12px 0;
    flex-wrap: wrap;
}

#global-state-panel {
    padding: 8px 12px 0;
}

.global-state-header {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    margin-bottom: 8px;
}

.global-state-list {
    display: grid;
    gap: 8px;
}

.global-state-item {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.035);
}

.global-state-copy {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255,255,255,0.68);
}

.global-state-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.global-state-pill.immediate {
    background: rgba(78, 205, 196, 0.14);
    border: 1px solid rgba(78, 205, 196, 0.28);
    color: #81ecec;
}

.global-state-pill.persistent {
    background: rgba(255, 159, 67, 0.14);
    border: 1px solid rgba(255, 159, 67, 0.28);
    color: #ffbe76;
}

.global-state-empty {
    font-size: 12px;
    color: rgba(255,255,255,0.42);
    padding: 4px 0 2px;
}

#search-input {
    width: 100%;
    flex: 1 1 auto;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
#search-input:focus { border-color: rgba(255,255,255,0.35); }
#search-input::placeholder { color: var(--text-muted); }

#action-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    overscroll-behavior: contain;
}
#action-area::-webkit-scrollbar { width: 3px; }
#action-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ── Category grid ───────────────────────────────────────── */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 6px;
    color: var(--text);
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.category-btn:active { background: rgba(255,255,255,0.18); transform: scale(0.96); }
.cat-emoji { font-size: 22px; line-height: 1; }
.cat-label { text-transform: capitalize; }

/* ── Action list ─────────────────────────────────────────── */

.action-list { display: flex; flex-direction: column; gap: 6px; }

.action-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
.action-item:active          { background: rgba(255,255,255,0.15); transform: scale(0.98); }
.action-item.disabled        { opacity: 0.5; cursor: default; }
.action-blocked-reason { font-size: 10px; color: #e17055;  margin-top: 3px; font-style: italic; }
.action-note           { font-size: 10px; color: #74b9ff;  margin-top: 3px; font-style: italic; }

.action-name {
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}
.action-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.action-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.action-dur  {
    font-size: 10px;
    color: rgba(255,255,255,0.32);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Back button ─────────────────────────────────────────── */

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 0 0 10px;
    -webkit-tap-highlight-color: transparent;
}
.back-btn:hover { color: var(--text); }

/* ── Reset button ────────────────────────────────────────── */

#reset-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 9px;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
#reset-btn:active { background: rgba(255,255,255,0.1); }

#lab-btn {
    position: absolute;
    top: 40px;
    left: 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 9px;
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
#lab-btn:active { background: rgba(255,255,255,0.1); }

#lang-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.45);
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

#lang-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 11px;
    outline: none;
    cursor: pointer;
}

/* ── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Death screen ────────────────────────────────────────── */

#death-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: death-fade-in 0.6s ease forwards;
}

@keyframes death-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#death-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    width: min(100%, 460px);
    margin: 0 20px;
    padding: 24px 20px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: rgba(10, 12, 18, 0.92);
    box-shadow: 0 20px 80px rgba(0,0,0,0.45);
}

#death-skull {
    font-size: 72px;
    line-height: 1;
    animation: death-pulse 2s ease-in-out infinite;
}

@keyframes death-pulse {
    0%, 100% { transform: scale(1.0);   opacity: 0.85; }
    50%       { transform: scale(1.06); opacity: 1.0;  }
}

#death-msg {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

#death-cause {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #ff7675;
}

#death-summary {
    font-size: 13px;
    color: rgba(255,255,255,0.68);
}

#death-factors,
#death-last-actions {
    width: 100%;
}

.death-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}

.death-list {
    list-style: none;
    display: grid;
    gap: 6px;
    text-align: left;
}

.death-list li,
.death-empty {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 9px 10px;
    background: rgba(255,255,255,0.04);
    font-size: 13px;
    line-height: 1.35;
    color: rgba(255,255,255,0.78);
}

.death-chip-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.death-chip {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 12px;
    color: rgba(255,255,255,0.82);
    text-transform: capitalize;
}

#death-reset {
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    padding: 12px 32px;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.15s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}
#death-reset:hover  { background: rgba(255, 255, 255, 0.2); }
#death-reset:active { transform: scale(0.96); }

/* ── Event notification overlay ──────────────────────────── */

#event-notification {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 6;   /* above avatar (z-index 5) */
    pointer-events: none;
}

#monster-status-banner {
    position: absolute;
    left: 50%;
    top: 66px;
    transform: translateX(-50%);
    z-index: 7;
    min-width: 220px;
    max-width: min(88vw, 420px);
    text-align: center;
    pointer-events: none;
}

#monster-status-banner.banner-stress,
#monster-status-banner.banner-ssri,
#monster-status-banner.banner-shutdown {
    padding: 9px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

#monster-status-banner.banner-stress {
    background: rgba(110, 32, 18, 0.48);
}

#monster-status-banner.banner-ssri {
    background: rgba(20, 60, 105, 0.44);
}

#monster-status-banner.banner-shutdown {
    background: rgba(45, 52, 54, 0.50);
}

.monster-status-kicker {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.46);
}

.monster-status-copy {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255,255,255,0.88);
}

.event-notif {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 10px 22px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    color: var(--notif-color, rgba(255,255,255,0.92));
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    animation: notif-show 3s ease forwards;
    max-width: min(92vw, 620px);
}

@keyframes notif-show {
    0%   { opacity: 0; transform: translateY(8px)  scale(0.93); }
    12%  { opacity: 1; transform: translateY(0)     scale(1.0);  }
    65%  { opacity: 1; transform: translateY(0)     scale(1.0);  }
    100% { opacity: 0; transform: translateY(-6px)  scale(0.96); }
}

/* ── Audio toggle ────────────────────────────────────────── */

#audio-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
#audio-btn:active { background: rgba(255,255,255,0.1); }

/* ── Pinned actions (from Laboratorio Sensacional) ── */
.pinned-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(168,85,247,0.9);
    text-transform: uppercase;
    padding: 4px 2px 6px;
}

.pinned-list {
    margin-bottom: 4px;
}

.action-item.pinned {
    border-left: 2px solid rgba(168,85,247,0.6);
}

.pinned-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 8px 0 10px;
}
