/* =========================================================
   Ephemeral Board — styles
   ========================================================= */

:root {
    --bg-canvas: #09090b;
    --bg-surface: rgba(24, 24, 27, 0.85);
    --bg-surface-end: rgba(18, 18, 21, 0.92);
    --bg-header: rgba(9, 9, 11, 0.82);
    --bg-input: rgba(9, 9, 11, 0.9);
    --bg-pill: rgba(24, 24, 27, 0.9);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-text: #09090b;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --accent-border: rgba(56, 189, 248, 0.35);
    --accent-glow: rgba(56, 189, 248, 0.35);
    --glow-1: rgba(56, 189, 248, 0.07);
    --glow-2: rgba(99, 102, 241, 0.06);
    --grid-line: rgba(255, 255, 255, 0.04);
    --success: #34d399;
    --danger: #fb7185;
    --warning: #fbbf24;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Theme: Emerald */
[data-theme="emerald"] {
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-text: #022c22;
    --accent-soft: rgba(16, 185, 129, 0.15);
    --accent-border: rgba(16, 185, 129, 0.35);
    --accent-glow: rgba(16, 185, 129, 0.35);
    --glow-1: rgba(16, 185, 129, 0.08);
    --glow-2: rgba(20, 184, 166, 0.06);
}

/* Theme: Violet */
[data-theme="violet"] {
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-text: #ffffff;
    --accent-soft: rgba(139, 92, 246, 0.16);
    --accent-border: rgba(139, 92, 246, 0.38);
    --accent-glow: rgba(139, 92, 246, 0.4);
    --glow-1: rgba(139, 92, 246, 0.09);
    --glow-2: rgba(217, 70, 239, 0.06);
}

/* Theme: Amber */
[data-theme="amber"] {
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-text: #18181b;
    --accent-soft: rgba(245, 158, 11, 0.15);
    --accent-border: rgba(245, 158, 11, 0.35);
    --accent-glow: rgba(245, 158, 11, 0.35);
    --glow-1: rgba(245, 158, 11, 0.08);
    --glow-2: rgba(234, 88, 12, 0.05);
}

/* Theme: Rose */
[data-theme="rose"] {
    --accent: #f43f5e;
    --accent-hover: #fb7185;
    --accent-text: #ffffff;
    --accent-soft: rgba(244, 63, 94, 0.16);
    --accent-border: rgba(244, 63, 94, 0.38);
    --accent-glow: rgba(244, 63, 94, 0.38);
    --glow-1: rgba(244, 63, 94, 0.08);
    --glow-2: rgba(236, 72, 153, 0.06);
}

/* Theme: Orange */
[data-theme="orange"] {
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-text: #ffffff;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --accent-border: rgba(249, 115, 22, 0.38);
    --accent-glow: rgba(249, 115, 22, 0.38);
    --glow-1: rgba(249, 115, 22, 0.08);
    --glow-2: rgba(234, 179, 8, 0.05);
}

/* Theme: Pure Black (OLED) */
[data-theme="black"] {
    --bg-canvas: #000000;
    --bg-surface: rgba(12, 12, 12, 0.95);
    --bg-surface-end: rgba(8, 8, 8, 0.98);
    --bg-header: rgba(0, 0, 0, 0.88);
    --bg-input: #050505;
    --bg-pill: #0c0c0c;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted: #737373;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --accent: #ffffff;
    --accent-hover: #e5e5e5;
    --accent-text: #000000;
    --accent-soft: rgba(255, 255, 255, 0.12);
    --accent-border: rgba(255, 255, 255, 0.28);
    --accent-glow: rgba(255, 255, 255, 0.18);
    --glow-1: transparent;
    --glow-2: transparent;
    --grid-line: rgba(255, 255, 255, 0.025);
}

/* Theme: Pure White */
[data-theme="white"] {
    color-scheme: light;
    --bg-canvas: #f4f4f5;
    --bg-surface: rgba(255, 255, 255, 0.92);
    --bg-surface-end: rgba(250, 250, 250, 0.96);
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-input: #ffffff;
    --bg-pill: #ffffff;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;
    --border-subtle: rgba(0, 0, 0, 0.09);
    --border-strong: rgba(0, 0, 0, 0.16);
    --accent: #18181b;
    --accent-hover: #27272a;
    --accent-text: #ffffff;
    --accent-soft: rgba(24, 24, 27, 0.08);
    --accent-border: rgba(24, 24, 27, 0.2);
    --accent-glow: rgba(0, 0, 0, 0.15);
    --glow-1: rgba(0, 0, 0, 0.02);
    --glow-2: rgba(0, 0, 0, 0.02);
    --grid-line: rgba(0, 0, 0, 0.045);
}

/* =========================================================
   Base
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    background-image:
        radial-gradient(circle at 15% 0%, var(--glow-1) 0%, transparent 45%),
        radial-gradient(circle at 85% 10%, var(--glow-2) 0%, transparent 45%);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

main,
header,
footer {
    position: relative;
    z-index: 1;
}

::selection {
    background: var(--accent-soft);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.font-mono-code {
    font-family: 'JetBrains Mono', monospace;
}

h1,
h2,
h3,
p {
    margin: 0;
}

button,
input,
textarea {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.3);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.5);
}

/* Skip link */
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 0.2s var(--ease-out);
}
.skip-link:focus {
    transform: translateY(0);
}

.noscript-warning {
    position: relative;
    z-index: 5;
    margin: 20px auto;
    max-width: 560px;
    padding: 14px 18px;
    border: 1px solid rgba(251, 113, 133, 0.4);
    border-radius: 14px;
    background: rgba(251, 113, 133, 0.1);
    color: var(--danger);
    text-align: center;
    font-size: 13px;
}

/* =========================================================
   Ambient background
   ========================================================= */

.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 10%, transparent 75%);
    opacity: 0.7;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    will-change: transform;
}

.orb-a {
    width: 48vmax;
    height: 48vmax;
    top: -22vmax;
    left: -14vmax;
    background: radial-gradient(circle, var(--accent-soft), transparent 68%);
    animation: orbFloat 28s var(--ease-out) infinite alternate;
}

.orb-b {
    width: 42vmax;
    height: 42vmax;
    top: -18vmax;
    right: -12vmax;
    background: radial-gradient(circle, var(--glow-2), transparent 68%);
    animation: orbFloat 34s var(--ease-out) infinite alternate-reverse;
}

.orb-c {
    width: 36vmax;
    height: 36vmax;
    bottom: -20vmax;
    left: 38%;
    background: radial-gradient(circle, var(--glow-1), transparent 70%);
    animation: orbFloat 40s var(--ease-out) infinite alternate;
}

[data-theme="white"] .aurora-orb {
    opacity: 0.4;
}

/* =========================================================
   Theme helpers
   ========================================================= */

.surface-card {
    position: relative;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-end) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.surface-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
    opacity: 0.55;
    pointer-events: none;
}

.surface-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 18px 50px -26px rgba(0, 0, 0, 0.6);
}

.theme-header {
    background-color: var(--bg-header);
    border-color: var(--border-subtle);
    box-shadow: 0 1px 0 var(--border-subtle), 0 22px 44px -38px rgba(0, 0, 0, 0.9);
}

header.theme-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
    opacity: 0.55;
    pointer-events: none;
}

.theme-pill {
    background-color: var(--bg-pill);
    border-color: var(--border-subtle);
}

.theme-input {
    background-color: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.theme-input:focus,
.theme-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-btn-accent {
    background-color: var(--accent);
    color: var(--accent-text);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.18s var(--ease-out);
}

.theme-btn-accent:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 10px 28px -12px var(--accent-glow);
}

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

.theme-btn-accent:disabled {
    box-shadow: none;
    transform: none;
}

.theme-text-accent { color: var(--accent); }
.theme-text-primary { color: var(--text-primary); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-muted); }
.theme-border { border-color: var(--border-subtle); }

.theme-badge-accent {
    background-color: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent-border);
}

#room-role-badge[data-role="guest"] {
    background-color: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

/* =========================================================
   Header bits
   ========================================================= */

.brand-mark {
    position: relative;
    background-image: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: 0 8px 24px -14px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    animation: brandGlow 5s ease-in-out infinite;
}

.brand-title {
    background: linear-gradient(100deg, var(--text-primary) 15%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-pill);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f43f5e;
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5);
    animation: livePulse 2.4s ease-out infinite;
}

.theme-swatch {
    position: relative;
    transition: transform 0.18s var(--ease-out), box-shadow 0.18s ease;
    outline: none;
}

.theme-swatch:hover {
    transform: scale(1.22);
}

.theme-swatch.active {
    box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 3.5px var(--accent);
    transform: scale(1.12);
}

.theme-swatch:focus-visible {
    box-shadow: 0 0 0 2px var(--bg-canvas), 0 0 0 4px var(--accent);
}

#my-board-code {
    text-shadow: 0 0 18px var(--accent-soft);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.18s var(--ease-out);
}

.icon-btn:hover {
    color: var(--text-primary);
    background: rgba(128, 128, 128, 0.15);
}

.icon-btn:active {
    transform: scale(0.9);
}

.copy-btn.is-copied {
    color: var(--success);
    animation: popOk 0.4s var(--ease-out);
}

/* Status dot */
.status-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--text-muted);
    transition: background-color 0.25s ease;
}

.status-dot.is-ready {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.status-dot.is-connected {
    background: var(--success);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.status-dot.is-connected::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success);
    animation: statusPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot.is-connecting {
    background: var(--warning);
    animation: statusBlink 1.1s ease-in-out infinite;
}

.status-dot.is-offline {
    background: var(--danger);
}

/* Button shine */
.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.6s var(--ease-out);
    pointer-events: none;
}

.btn-shine:hover::before {
    transform: translateX(130%);
}

#connect-btn.is-loading i {
    animation: spin 1s linear infinite;
}

/* =========================================================
   Sidebar / session
   ========================================================= */

.note-count.is-near {
    color: var(--warning);
}

#clear-board-btn.confirming {
    color: var(--danger);
    border-color: rgba(251, 113, 133, 0.45);
    background: rgba(251, 113, 133, 0.12);
}

.guest-banner {
    animation: bannerIn 0.4s var(--ease-out) both;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: hsl(var(--avatar-hue, 200) 90% 72%);
    background:
        linear-gradient(135deg,
            hsl(var(--avatar-hue, 200) 85% 55% / 0.28),
            hsl(calc(var(--avatar-hue, 200) + 40) 85% 55% / 0.1));
    border: 1px solid hsl(var(--avatar-hue, 200) 85% 60% / 0.28);
    text-transform: uppercase;
}

[data-theme="white"] .avatar {
    color: hsl(var(--avatar-hue, 200) 70% 32%);
}

.participant-row {
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.participant-row:hover {
    border-color: var(--border-strong);
}

.participant-online {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
    flex-shrink: 0;
}

/* Drop zone */
.drop-zone {
    position: relative;
    overflow: hidden;
    background-image:
        radial-gradient(ellipse 80% 90% at 50% 110%, var(--accent-soft), transparent 70%);
}

.drop-zone::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse 60% 70% at 50% 0%, var(--accent-soft), transparent 70%);
    transition: opacity 0.3s ease;
}

.drop-zone:hover::after {
    opacity: 1;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-3px) scale(1.04);
    border-color: var(--accent-border);
    box-shadow: 0 12px 30px -18px var(--accent-glow);
}

.drop-zone .upload-icon {
    transition: transform 0.3s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.drop-zone.drag-active {
    border-color: var(--accent) !important;
    background-color: var(--accent-soft) !important;
    transform: scale(0.992);
    box-shadow: inset 0 0 0 1px var(--accent-border), 0 0 40px -12px var(--accent-glow);
}

.drop-zone.drag-active .upload-icon {
    transform: translateY(-5px) scale(1.12);
}

/* Transfer bars */
.transfer {
    background-color: var(--bg-input);
    border-color: var(--border-subtle);
    animation: transferIn 0.3s var(--ease-out) both;
}

.transfer-bar {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(90deg, var(--accent), var(--accent-hover));
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.16s linear;
}

.transfer-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.3s linear infinite;
}

/* =========================================================
   Feed
   ========================================================= */

.feed-card {
    position: relative;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-end) 100%);
    border-color: var(--border-subtle);
    animation: cardIn 0.5s var(--ease-out) backwards;
    animation-delay: var(--card-delay, 0ms);
    transition: transform 0.25s var(--ease-out), border-color 0.25s ease, box-shadow 0.25s ease;
}

.feed-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
    box-shadow: 0 22px 46px -28px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--accent-soft);
}

.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 190px;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    flex-shrink: 0;
}

.author-badge--remote {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.28);
}

.note-body {
    background-image: linear-gradient(180deg, var(--bg-input) 0%, var(--bg-input) 100%);
    box-shadow: inset 3px 0 0 -1px var(--accent-border);
    transition: box-shadow 0.2s ease;
}

.note-body:hover {
    box-shadow: inset 3px 0 0 0 var(--accent);
}

.note-body a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.media-shell {
    position: relative;
    overflow: hidden;
    border-radius: 0.85rem;
    border: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.35);
}

[data-theme="white"] .media-shell {
    background: rgba(0, 0, 0, 0.06);
}

.media-shell img {
    display: block;
    width: 100%;
    max-height: 13rem;
    object-fit: cover;
    transition: transform 0.45s var(--ease-out), filter 0.3s ease;
}

.media-shell:hover img {
    transform: scale(1.035);
}

.media-shell video {
    display: block;
    width: 100%;
    max-height: 13rem;
    object-fit: contain;
    background: #000;
}

.media-shell audio {
    display: block;
    width: 100%;
}

html:not([data-theme="white"]) audio {
    filter: invert(0.9) hue-rotate(180deg);
    height: 36px;
}

html[data-theme="white"] audio {
    height: 36px;
}

.file-pill {
    background-color: var(--bg-input);
    border-color: var(--border-subtle);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-pill:hover {
    border-color: var(--border-strong);
}

.file-kind {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.empty-icon {
    position: relative;
    animation: floatY 5s ease-in-out infinite;
}

.empty-icon::before,
.empty-icon::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 1.25rem;
    border: 1px solid var(--accent-border);
    opacity: 0;
    animation: emptyRing 3.4s ease-out infinite;
    pointer-events: none;
}

.empty-icon::after {
    animation-delay: 1.7s;
}

.empty-hint {
    opacity: 0;
    animation: fadeUp 0.7s var(--ease-out) 0.7s forwards;
}

/* =========================================================
   Toasts
   ========================================================= */

.toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--text-primary);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    font-size: 12px;
    font-weight: 500;
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateX(24px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s var(--ease-out);
}

.toast.is-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast.is-leaving {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
}

.toast--success {
    border-color: rgba(52, 211, 153, 0.35);
    color: #a7f3d0;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.92), rgba(6, 78, 59, 0.78));
}

.toast--error {
    border-color: rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    background: linear-gradient(180deg, rgba(76, 5, 25, 0.92), rgba(76, 5, 25, 0.78));
}

.toast--warning {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fde68a;
    background: linear-gradient(180deg, rgba(69, 26, 3, 0.92), rgba(69, 26, 3, 0.78));
}

.toast--info {
    border-color: var(--border-strong);
}

.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: currentColor;
    opacity: 0.4;
    transform-origin: left;
    animation: toastProgress 4.2s linear forwards;
}

/* =========================================================
   Modal
   ========================================================= */

#approval-modal.is-open .approval-card {
    animation: modalIn 0.34s var(--ease-out) both;
}

.request-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 0 0 0 var(--accent-glow);
    animation: requestPulse 2.2s ease-out infinite;
}

/* =========================================================
   Reveal / entrance
   ========================================================= */

.reveal {
    animation: revealUp 0.7s var(--ease-out) both;
    animation-delay: var(--reveal-delay, 0ms);
}

/* =========================================================
   Keyframes
   ========================================================= */

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bannerIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes transferIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatY {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@keyframes orbFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(5vw, 4vh, 0) scale(1.08);
    }
    100% {
        transform: translate3d(-4vw, 7vh, 0) scale(0.96);
    }
}

@keyframes brandGlow {
    0%, 100% {
        box-shadow: 0 8px 24px -14px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }
    50% {
        box-shadow: 0 12px 34px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(244, 63, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
    }
}

@keyframes statusPing {
    0% {
        transform: scale(1);
        opacity: 0.65;
    }
    80%, 100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

@keyframes statusBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

@keyframes popOk {
    0% {
        transform: scale(0.8);
    }
    60% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes emptyRing {
    0% {
        opacity: 0.55;
        transform: scale(1);
    }
    70%, 100% {
        opacity: 0;
        transform: scale(1.35);
    }
}

@keyframes requestPulse {
    0% {
        box-shadow: 0 0 0 0 var(--accent-glow);
    }
    70% {
        box-shadow: 0 0 0 10px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
    .live-badge {
        display: none;
    }

    .brand-title {
        font-size: 16px;
    }

    .toast {
        font-size: 11.5px;
    }

    #clear-board-btn span {
        display: none;
    }
}

@media (hover: none) {
    .feed-card:hover {
        transform: none;
    }
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .aurora-orb {
        display: none;
    }
}
