/* EXZURA design system — single neon theme for web and Android parity. */
:root,
body[data-theme="exzura"] {
    color-scheme: dark;
    --bg-dark: #08040f;
    --bg-control: #150c25;
    --bg-card: rgba(24, 14, 42, 0.72);
    --bg-card-hover: rgba(36, 21, 62, 0.86);
    --border-color: rgba(190, 140, 255, 0.14);
    --border-glow: rgba(232, 121, 249, 0.38);
    --primary: #e879f9;
    --primary-gradient: linear-gradient(135deg, #a855f7 0%, #e879f9 55%, #fb7185 100%);
    --secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --text-main: #f7f1ff;
    --text-muted: #a999c0;
    --text-dim: #76678f;
    --badge-high: #fb7185;
    --badge-med: #fbbf24;
    --badge-low: #34d399;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --glass-blur: blur(18px);
    --shadow-main: 0 24px 70px rgba(3, 0, 10, 0.55);
    --exzura-cyan: #67e8f9;
    --exzura-violet: #8b5cf6;
    --exzura-pink: #f472b6;
    --font-display: 'Unbounded', 'Inter', system-ui, sans-serif;
    --header-height: 138px;
}

* { scrollbar-width: thin; scrollbar-color: rgba(168, 85, 247, 0.45) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.4); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

html { scroll-behavior: smooth; }
body[data-theme="exzura"] {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #08040f;
    background-image:
        radial-gradient(circle at 12% -10%, rgba(139, 92, 246, 0.22), transparent 42%),
        radial-gradient(circle at 88% 0%, rgba(217, 70, 239, 0.14), transparent 38%),
        radial-gradient(circle at 50% 120%, rgba(244, 114, 182, 0.1), transparent 55%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
body[data-theme="exzura"] ::selection { background: rgba(232, 121, 249, 0.35); color: #fff; }

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid #f0abfc;
    outline-offset: 2px;
}

.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f0abfc;
    color: #17051f;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 0.18s ease;
}
.skip-link:focus-visible { transform: none; }
.dev-banner {
    position: relative;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px 9px;
    padding: 7px 18px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(232, 121, 249, 0.24), rgba(251, 113, 133, 0.16));
    border-bottom: 1px solid rgba(232, 121, 249, 0.24);
    color: #f5d0fe;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
}
.dev-banner .dev-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #f0abfc;
    box-shadow: 0 0 10px #e879f9;
    animation: dev-pulse 2.2s ease-in-out infinite;
}
.dev-banner .dev-note { color: #c4b5fd; font-weight: 500; letter-spacing: 0.08em; }
.dev-banner .dev-sep { color: rgba(232, 121, 249, 0.6); }
.dev-chip {
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.42);
    background: rgba(251, 191, 36, 0.14);
    color: #fde68a;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}
@keyframes dev-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px #e879f9; }
    50% { opacity: 0.5; box-shadow: 0 0 3px #e879f9; }
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d8b4fe;
}

/* ---------- Shell ---------- */
.app-container.exzura-app {
    display: block;
    width: 100%;
    min-height: 100vh;
    height: auto;
}
.site-ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.ambient-orb-a { width: 46vw; height: 46vw; top: -18vw; left: -10vw; background: radial-gradient(circle, rgba(139, 92, 246, 0.4), transparent 68%); }
.ambient-orb-b { width: 42vw; height: 42vw; top: 26vh; right: -16vw; background: radial-gradient(circle, rgba(217, 70, 239, 0.28), transparent 68%); }
.ambient-grid {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(90% 70% at 50% 10%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(90% 70% at 50% 10%, #000 0%, transparent 78%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(8, 4, 15, 0.72);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-bottom: 1px solid rgba(190, 140, 255, 0.1);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-header.is-scrolled { background: rgba(8, 4, 15, 0.92); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.site-header-inner {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 13px 32px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    flex: 0 0 auto;
}
.brand-mark { width: 42px; height: 42px; filter: drop-shadow(0 0 14px rgba(217, 70, 239, 0.5)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.16em;
    background: linear-gradient(100deg, #e9d5ff 0%, #f0abfc 45%, #fda4af 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand-copy small { font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }

.top-nav { display: flex; flex-direction: row; align-items: center; gap: 2px; margin-left: auto; margin-top: 0; flex: 0 0 auto; flex-wrap: nowrap; }
.top-nav .nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: 600 13px/1 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.top-nav .nav-item:hover { color: #fff; background: rgba(168, 85, 247, 0.12); }
.top-nav .nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(232, 121, 249, 0.18));
    border-color: rgba(232, 121, 249, 0.3);
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.18), inset 0 0 12px rgba(255, 255, 255, 0.04);
}
.top-nav .nav-item.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 2px;
    width: 14px; height: 2px;
    border-radius: 2px;
    transform: translateX(-50%);
    background: var(--primary-gradient);
    box-shadow: 0 0 9px #f0abfc;
}
.badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(232, 121, 249, 0.16);
    border: 1px solid rgba(232, 121, 249, 0.24);
    color: #f5d0fe;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.header-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .btn { padding: 8px 13px; font-size: 12px; min-height: 36px; }
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
}
.icon-btn:hover { background: rgba(168, 85, 247, 0.16); border-color: rgba(232, 121, 249, 0.4); }
.mobile-menu-toggle { display: none; }

.site-tools {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 0 32px 13px;
}
.site-tools:has(> .search-bar-container[hidden]) { display: none; }
.search-bar-container { position: relative; flex: 1 1 auto; min-width: 0; width: auto; }
.search-bar-container .search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; width: 17px; height: 17px; }
#global-search {
    width: 100%;
    height: 43px;
    padding: 0 46px 0 44px;
    border-radius: 13px;
    border: 1px solid rgba(190, 140, 255, 0.14);
    background: rgba(18, 10, 32, 0.72);
    color: var(--text-main);
    font: 14px 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
#global-search::placeholder { color: var(--text-dim); }
#global-search:focus { border-color: rgba(232, 121, 249, 0.55); background: rgba(22, 12, 38, 0.9); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.14), 0 0 30px rgba(168, 85, 247, 0.1); }
.search-hint {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    min-width: 20px; height: 20px; display: inline-grid; place-items: center;
    border-radius: 5px; border: 1px solid rgba(190, 140, 255, 0.18);
    color: var(--text-dim); font: 600 11px/1 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.03);
}
.tool-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.server-pill {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid rgba(190, 140, 255, 0.12);
    background: rgba(18, 10, 32, 0.6);
}
.status-indicator { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.8); flex: 0 0 auto; }
.status-indicator.offline { background: #fb7185; box-shadow: 0 0 10px rgba(251, 113, 133, 0.8); }
.server-pill-copy { display: flex; flex-direction: column; line-height: 1.15; }
.server-pill-copy strong { font-size: 9px; letter-spacing: 0.16em; color: #e9d5ff; }
.server-pill-copy small { font-size: 10px; color: var(--text-dim); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-content { display: block; flex: none; overflow: visible; }
.exzura-workspace { max-width: 1560px; margin: 0 auto; padding: 20px 32px 0; }
.tab-content-area { padding: 0; overflow: visible; flex: none; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: exzura-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes exzura-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sync-statusline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 9px 14px;
    margin: 0 0 18px;
    border: 1px solid rgba(190, 140, 255, 0.08);
    border-radius: 13px;
    background: rgba(14, 8, 26, 0.5);
    font-size: 12px;
    color: var(--text-dim);
}
.sync-statusline > p { margin: 0; flex: 1 1 200px; }
.sync-status-mark { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 9px rgba(52, 211, 153, 0.8); }
#cloud-conflict-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#cloud-conflict-actions p { margin: 0; color: #fbcfe8; }

/* ---------- Buttons & controls ---------- */
.btn {
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 36px; padding: 7px 13px; font-size: 12px; border-radius: 10px; }
.btn-primary {
    background: linear-gradient(135deg, #a855f7 0%, #e879f9 58%, #fb7185 100%);
    color: #fff;
    border: 0;
    box-shadow: 0 10px 30px rgba(217, 70, 239, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(217, 70, 239, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-secondary { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); color: var(--text-main); }
.btn-secondary:hover { background: rgba(168, 85, 247, 0.16); border-color: rgba(232, 121, 249, 0.3); }
.btn-outline { background: rgba(255, 255, 255, 0.02); border-color: rgba(190, 140, 255, 0.18); color: var(--text-main); }
.btn-outline:hover { border-color: rgba(232, 121, 249, 0.55); color: #fff; background: rgba(168, 85, 247, 0.12); box-shadow: 0 0 24px rgba(168, 85, 247, 0.14); }
.btn-glow { box-shadow: 0 14px 40px rgba(217, 70, 239, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); color: #f4eaff; backdrop-filter: blur(12px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.28); }
.btn-steam { background: linear-gradient(135deg, #1b2838, #2a475e 70%, #3d6e8f); color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); }
.btn-steam:hover { box-shadow: 0 10px 28px rgba(42, 71, 94, 0.55); transform: translateY(-2px); }
.full-width { width: 100%; }

.form-control,
.form-group input,
.form-group select,
.form-group textarea,
.modal-dialog input,
.modal-dialog select,
.modal-dialog textarea,
#library-grid select,
#library-grid textarea,
.notes-layout input,
.notes-layout select,
.notes-layout textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background: rgba(10, 5, 19, 0.62);
    color: var(--text-main);
    font: 14px/1.5 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.form-control:hover, .modal-dialog input:hover, .modal-dialog select:hover { border-color: rgba(190, 140, 255, 0.3); }
.form-control:focus, .modal-dialog input:focus, .modal-dialog select:focus, .modal-dialog textarea:focus, #library-grid select:focus, #library-grid textarea:focus {
    border-color: rgba(232, 121, 249, 0.55);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.13);
    background: rgba(16, 8, 29, 0.85);
}
select.form-control, .modal-dialog select, #library-grid select { cursor: pointer; }
textarea.form-control, .modal-dialog textarea, #library-grid textarea { resize: vertical; min-height: 88px; }
label { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.feature-toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.feature-toolbar label { display: flex; flex-direction: column; gap: 6px; }
.feature-toolbar .btn { align-self: flex-end; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bookmark-filters > label:first-child { flex: 1 1 280px; max-width: 420px; min-width: 0; }
.bookmark-filters .check-filter { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0 6px; color: var(--text-muted); font-size: 13px; white-space: nowrap; cursor: pointer; }
.bookmark-filters .check-filter input { width: 16px; height: 16px; margin: 0; accent-color: #e879f9; }
.collection-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.collection-empty-mark { font-size: 26px; color: #f0abfc; text-shadow: 0 0 22px rgba(240, 171, 252, 0.65); }
.collection-empty p { margin: 0; max-width: 420px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.collection-empty.glass-card:hover { transform: none; }

/* ---------- Cards, grids, pills ---------- */
.glass-card {
    background: linear-gradient(160deg, rgba(31, 19, 52, 0.82), rgba(14, 8, 26, 0.92));
    border: 1px solid rgba(190, 140, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.glass-card:hover { background: linear-gradient(160deg, rgba(37, 23, 62, 0.9), rgba(17, 9, 31, 0.94)); border-color: rgba(232, 121, 249, 0.3); transform: translateY(-3px); box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45), 0 0 34px rgba(168, 85, 247, 0.08); }
.modal-dialog.glass-card:hover, .market-picker.glass-card:hover, .market-converter.glass-card:hover, .lock-card.glass-card:hover, .account-panel.glass-card:hover { transform: none; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pane-header { margin-bottom: 20px; }
.pane-header h2 { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 30px); }
.pane-header .subtitle { color: var(--text-muted); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 26px 0 16px; }
.section-head h3, .notes-list-heading h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.section-head p { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; padding: 0; border: 0; background: none; }
.pill {
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid rgba(190, 140, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font: 600 12px/1 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.pill:hover { color: #fff; border-color: rgba(232, 121, 249, 0.35); }
.pill.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(244, 114, 182, 0.28));
    border-color: rgba(232, 121, 249, 0.5);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}
.tag-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.07); color: var(--text-muted); font-size: 11px; font-weight: 600; }
.tag-discount { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); color: #6ee7b7; }
.tag-price { background: rgba(232, 121, 249, 0.12); border-color: rgba(232, 121, 249, 0.26); color: #f5d0fe; }
.tag-priority-HIGH { background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.3); color: #fda4af; }
.tag-priority-NORMAL, .tag-priority-MEDIUM { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.26); color: #fcd34d; }
.tag-priority-LOW { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.26); color: #6ee7b7; }
.tag-hot { background: linear-gradient(135deg, #db2777, #a855f7); color: #fff; border-color: transparent; box-shadow: 0 0 18px rgba(219, 39, 119, 0.42); }

/* ---------- Page heroes ---------- */
.page-hero {
    --hero-a: 168, 85, 247;
    --hero-b: 244, 114, 182;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(26px, 3.2vw, 50px);
    border-radius: 26px;
    border: 1px solid rgba(190, 140, 255, 0.14);
    background:
        radial-gradient(120% 170% at 86% 6%, rgba(var(--hero-a), 0.32), transparent 55%),
        radial-gradient(90% 130% at 6% 118%, rgba(var(--hero-b), 0.18), transparent 62%),
        rgba(15, 9, 28, 0.74);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 26px 70px rgba(0, 0, 0, 0.38);
}
.page-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(85% 120% at 82% 15%, #000, transparent 76%);
    -webkit-mask-image: radial-gradient(85% 120% at 82% 15%, #000, transparent 76%);
    opacity: 0.55;
}
.page-hero::after {
    content: "";
    position: absolute; right: -8%; top: -40%;
    width: 46%; aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--hero-a), 0.24), transparent 66%);
    filter: blur(14px);
    z-index: -1;
}
.page-hero-notes { --hero-a: 139, 92, 246; --hero-b: 103, 232, 249; }
.page-hero-bookmarks { --hero-a: 217, 70, 239; --hero-b: 251, 113, 133; }
.page-hero-vault { --hero-a: 99, 102, 241; --hero-b: 34, 211, 238; }
.page-hero-library { --hero-a: 59, 130, 246; --hero-b: 168, 85, 247; }
.page-hero-purchases { --hero-a: 236, 72, 153; --hero-b: 251, 191, 36; }
.page-hero-market { --hero-a: 232, 121, 249; --hero-b: 103, 232, 249; }
.page-hero-settings { --hero-a: 148, 163, 184; --hero-b: 192, 132, 252; }
.page-hero-copy { max-width: 780px; min-width: 0; }
.page-hero h2 { font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; margin: 12px 0 12px; }
.page-hero p { max-width: 620px; color: var(--text-muted); font-size: 14px; line-height: 1.68; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-stats span { display: flex; flex-direction: column; gap: 2px; padding: 9px 15px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.035); backdrop-filter: blur(8px); }
.hero-stats strong { font-size: 12px; color: #f4ecff; }
.hero-stats small { font-size: 10px; color: var(--text-dim); }
.page-hero-emblem {
    flex: 0 0 auto;
    width: clamp(92px, 11vw, 150px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(232, 121, 249, 0.22);
    background: radial-gradient(circle at 34% 28%, rgba(232, 121, 249, 0.26), transparent 58%), rgba(11, 6, 22, 0.62);
    box-shadow: 0 0 70px rgba(168, 85, 247, 0.2), inset 0 0 30px rgba(255, 255, 255, 0.03);
    color: #eed7ff;
}
.page-hero-emblem svg { width: 52%; height: 52%; filter: drop-shadow(0 0 14px rgba(244, 114, 182, 0.5)); }

/* ---------- Anime hero / layout ---------- */
.anime-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: clamp(380px, 40vw, 540px);
    border-radius: 28px;
    border: 1px solid rgba(232, 121, 249, 0.2);
    background: #0b0616;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.anime-hero-art {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -3;
    transform: scale(1.03);
    animation: hero-drift 26s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: scale(1.03) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); } }
.anime-hero-veil {
    position: absolute; inset: 0; z-index: -2;
    background:
        linear-gradient(90deg, rgba(8, 4, 15, 0.96) 0%, rgba(8, 4, 15, 0.78) 34%, rgba(8, 4, 15, 0.18) 66%, rgba(8, 4, 15, 0.42) 100%),
        linear-gradient(0deg, rgba(8, 4, 15, 0.92) 0%, transparent 42%);
}
.anime-hero-copy { position: relative; z-index: 2; padding: clamp(26px, 4vw, 60px); max-width: 720px; }
.live-eyebrow { color: #f5d0fe; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #f472b6; box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.13), 0 0 12px #f472b6; animation: live-pulse 2.2s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.82); } }
.anime-hero h2 {
    font-family: var(--font-display);
    font-size: clamp(31px, 4.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 16px 0 16px;
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.anime-hero h2 em {
    font-style: normal;
    background: linear-gradient(100deg, #c084fc 0%, #f472b6 55%, #fb7185 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 24px rgba(244, 114, 182, 0.32));
}
.anime-hero p { max-width: 520px; color: #cbbbe0; font-size: clamp(13px, 1.1vw, 16px); line-height: 1.68; }
.anime-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.anime-hero-rating { display: flex; align-items: center; gap: 10px; margin-left: 6px; }
.anime-hero-rating strong { font-family: var(--font-display); font-size: 22px; color: #fde68a; text-shadow: 0 0 20px rgba(253, 230, 138, 0.35); }
.anime-hero-rating small { font-size: 9px; line-height: 1.35; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
.anime-hero-tags { position: absolute; top: 22px; right: 22px; z-index: 3; display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.anime-hero-tags span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(10, 5, 18, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #e9d5ff;
}
.anime-hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 1; background: linear-gradient(0deg, #08040f 4%, transparent 100%); pointer-events: none; }

.anime-toolbar {
    position: relative;
    z-index: 6;
    margin: -26px auto 0;
    width: min(100% - 44px, 1420px);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 20px;
    border: 1px solid rgba(190, 140, 255, 0.18);
    background: rgba(17, 10, 31, 0.86);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.anime-search { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; margin: 0; }
.anime-search > label { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.anime-search .form-control { height: 44px; min-height: 44px; }
.anime-search > .btn { min-height: 44px; }
.anime-search .anime-provider-label { flex: 0 1 220px; }
.anime-filter-panel { position: relative; flex: 0 0 auto; }
.anime-filter-panel > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(190, 140, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}
.anime-filter-panel > summary::-webkit-details-marker { display: none; }
.anime-filter-content {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    min-width: 260px;
    padding: 14px;
    display: grid;
    gap: 12px;
    border-radius: 14px;
    border: 1px solid rgba(190, 140, 255, 0.22);
    background: #150c26;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.anime-filter-content label { display: flex; flex-direction: column; gap: 6px; }
.anime-toolbar-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 14px; }
.anime-toolbar-meta .anime-status { flex: 1 1 300px; }
.anime-toolbar-meta .anime-hint { margin: 0; }
.anime-status { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-dim); }
.anime-status[data-error="true"] { color: #fda4af; }
.anime-hint { color: var(--text-dim); font-size: 11px; }
#anime-updated:empty { display: none; }

.anime-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 330px); gap: 26px; margin-top: 30px; align-items: start; }
.anime-main { min-width: 0; }
.anime-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.anime-section-head h3 { font-family: var(--font-display); font-size: clamp(20px, 2vw, 27px); margin-top: 5px; letter-spacing: -0.015em; }
.anime-rail { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rail-info-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(168, 85, 247, 0.24), transparent 58%),
        linear-gradient(170deg, rgba(31, 18, 52, 0.9), rgba(12, 7, 23, 0.92));
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.4);
}
.rail-info-card h3 { font-family: var(--font-display); font-size: 17px; line-height: 1.35; margin: 10px 0 10px; }
.rail-info-card p { color: var(--text-muted); font-size: 12.5px; line-height: 1.65; }
.rail-feature-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.rail-feature-list li { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #e5d8f7; }
.rail-feature-list li span { color: #f0abfc; text-shadow: 0 0 10px rgba(240, 171, 252, 0.6); }

/* ---------- Notes ---------- */
.notes-layout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 22px; }
.notes-list-column { min-width: 0; }
.notes-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 0 4px; }
.notes-filter-menu { position: relative; }
.notes-filter-menu summary {
    list-style: none; cursor: pointer;
    padding: 8px 12px; border-radius: 9px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted); font-size: 11px; font-weight: 600;
}
.notes-filter-menu summary::-webkit-details-marker { display: none; }
.notes-filter-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(320px, 82vw); padding: 14px; border-radius: 14px; border: 1px solid rgba(190, 140, 255, 0.2); background: #150c26; box-shadow: 0 22px 54px rgba(0, 0, 0, 0.6); }
.notes-filter-panel .feature-toolbar { margin: 0; }
.notes-filter-panel label { flex: 1 1 130px; }
.notes-list-panel { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 300px); overflow: auto; padding-right: 4px; }
.note-list-item { width: 100%; padding: 14px 15px; text-align: left; cursor: pointer; border-radius: 14px; }
.note-list-item h4 { font-size: 13.5px; line-height: 1.4; margin-bottom: 4px; }
.note-list-item p { font-size: 11.5px; color: var(--text-dim); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-list-date { display: block; margin-top: 7px; font-size: 10px; letter-spacing: 0.05em; color: #8b7aa8; }
.note-list-item.active { border-color: rgba(232, 121, 249, 0.5); background: linear-gradient(145deg, rgba(168, 85, 247, 0.22), rgba(24, 14, 42, 0.9)); box-shadow: 0 0 26px rgba(168, 85, 247, 0.14); }
.notes-empty-list { padding: 22px; border: 1px dashed rgba(190, 140, 255, 0.18); border-radius: 14px; color: var(--text-dim); font-size: 12px; text-align: center; }
.note-editor-panel { min-height: 520px; padding: clamp(18px, 2.2vw, 28px); border-radius: 20px; border: 1px solid rgba(190, 140, 255, 0.13); background: linear-gradient(165deg, rgba(27, 16, 46, 0.78), rgba(11, 6, 22, 0.94)); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38); }
.note-editor-panel > label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.note-editor-panel #n-title { font-family: var(--font-display); font-size: 20px; padding: 12px 14px; }
.note-editor-panel .note-content { min-height: 300px; line-height: 1.72; padding: 14px; }
.note-editor-panel .feature-toolbar label { flex: 1 1 200px; }
.empty-editor-state { min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--text-dim); padding: 30px; }
.empty-editor-state .empty-state-glyph { font-size: 34px; color: #f0abfc; text-shadow: 0 0 24px rgba(240, 171, 252, 0.6); }
.empty-editor-state h3 { font-family: var(--font-display); font-size: 18px; color: #f0e4ff; }
.empty-editor-state p { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
#note-save-status { min-height: 16px; color: var(--text-dim); font-size: 11px; margin: 4px 0 8px; }

/* ---------- Vault / accounts ---------- */
.vault-lock-container { display: grid; place-items: center; padding: 26px 0 8px; }
.lock-card { width: min(480px, 100%); padding: clamp(26px, 3vw, 40px); text-align: center; border-radius: 24px; }
.lock-icon { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(232, 121, 249, 0.34); background: radial-gradient(circle at 35% 30%, rgba(232, 121, 249, 0.3), transparent 62%), rgba(20, 11, 36, 0.9); color: #f5d0fe; font-size: 22px; box-shadow: 0 0 38px rgba(168, 85, 247, 0.24); }
.lock-card h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.lock-card p { color: var(--text-muted); font-size: 13px; line-height: 1.65; margin-bottom: 20px; }
#vault-auth-form { display: flex; flex-direction: column; gap: 10px; }
.account-card { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.account-card h4 { font-size: 15px; line-height: 1.35; color: #f7edff; }
.account-card p { font-size: 11.5px; line-height: 1.55; color: var(--text-dim); overflow-wrap: anywhere; }
.account-card .form-control { margin-top: 6px; font-size: 12px; }
.account-card .header-actions { margin-top: 10px; }
.account-card .header-actions button { min-height: 32px; padding: 5px 10px; font-size: 11px; border: 1px solid rgba(190, 140, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: var(--text-main); cursor: pointer; }
.account-card .header-actions button:hover { border-color: rgba(232, 121, 249, 0.5); background: rgba(168, 85, 247, 0.14); }

/* ---------- Bookmarks ---------- */
#bookmarks-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.bookmark-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 17px; min-height: 170px; overflow: hidden; }
.bookmark-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, rgba(232, 121, 249, 0.65), transparent); opacity: 0; transition: opacity 0.2s; }
.bookmark-card:hover::before { opacity: 1; }
.bookmark-card.is-selected { border-color: rgba(232, 121, 249, 0.55); box-shadow: 0 0 0 1px rgba(232, 121, 249, 0.3), 0 18px 50px rgba(168, 85, 247, 0.14); }
.bookmark-heading { display: flex; align-items: flex-start; gap: 9px; }
.bookmark-heading h3 { font-size: 14px; line-height: 1.42; color: #f8f1ff; overflow-wrap: anywhere; }
.bookmark-select-hitarea { display: inline-flex; padding-top: 2px; }
.bookmark-select { width: 15px; height: 15px; accent-color: #d946ef; cursor: pointer; }
.bookmark-path { font-size: 10.5px; letter-spacing: 0.03em; color: #a78bfa; text-transform: uppercase; overflow-wrap: anywhere; }
.bookmark-address { font-size: 11px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-card .header-actions { margin-top: auto; padding-top: 10px; }
.bookmark-card .header-actions .btn, .bookmark-card .header-actions button { min-height: 32px; padding: 5px 10px; font-size: 11px; border: 1px solid rgba(190, 140, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: var(--text-main); cursor: pointer; }
.bookmark-card .header-actions .btn:hover, .bookmark-card .header-actions button:hover { border-color: rgba(232, 121, 249, 0.5); background: rgba(168, 85, 247, 0.14); }
.bookmark-selection-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px; }
.bookmark-selection-summary { display: flex; align-items: center; gap: 14px; flex: 1 1 340px; flex-wrap: wrap; }
.bookmark-selection-count { font-size: 12px; font-weight: 700; color: #f5d0fe; }
.bookmark-selection-hint { font-size: 11px; color: var(--text-dim); flex: 1 1 220px; }
.bookmark-selection-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; width: 100%; }
.bookmark-selection-actions label { display: flex; flex-direction: column; gap: 5px; }
.bookmark-selection-options-toggle { white-space: nowrap; }

/* ---------- Purchases / Steam ---------- */
.game-card-header { display: flex; align-items: center; gap: 13px; margin-bottom: 11px; }
.game-artwork { width: 86px; height: 48px; object-fit: cover; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.09); flex: 0 0 auto; }
.game-info h3 { font-size: 14px; line-height: 1.35; margin-bottom: 5px; }
.game-info p { font-size: 11px; color: var(--text-dim); }
.game-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0; }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(190, 140, 255, 0.09); }
.game-card-footer button { min-height: 32px; padding: 5px 10px; font-size: 11px; border: 1px solid rgba(190, 140, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.03); color: var(--text-main); cursor: pointer; }
.game-card-footer button:hover { border-color: rgba(232, 121, 249, 0.5); background: rgba(168, 85, 247, 0.14); }
.fav-star.active { color: #fbbf24; }
#library-grid .glass-card > label { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
#library-grid .glass-card > .btn { margin-top: 10px; }
#library-grid select, #library-grid textarea { min-height: 36px; font-size: 12px; padding: 7px 9px; }
#library-status { color: var(--text-dim); font-size: 12px; margin: -6px 0 12px; }

/* ---------- Market ---------- */
.market-picker, .market-converter { padding: 20px; margin-bottom: 16px; }
.market-header { margin-top: 22px; }
.market-selection-heading h3, .market-converter-heading h3 { font-family: var(--font-display); font-size: 18px; }
.market-search-results { background: #150c26; border: 1px solid rgba(190, 140, 255, 0.22); border-radius: 12px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6); }
.market-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.market-shortcuts button, .market-quote-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(190, 140, 255, 0.14); background: rgba(255, 255, 255, 0.03); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.market-shortcuts button.active, .market-shortcuts button:hover { border-color: rgba(232, 121, 249, 0.5); color: #fff; background: rgba(168, 85, 247, 0.16); }
.market-options { margin-top: 12px; border: 1px solid rgba(190, 140, 255, 0.1); border-radius: 12px; padding: 10px 13px; background: rgba(255, 255, 255, 0.02); }
.market-options summary { cursor: pointer; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.market-options[open] summary { margin-bottom: 10px; color: #f5d0fe; }
.market-calculation { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; margin: 14px 0; }
.market-result-block output { display: block; margin-top: 6px; font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 28px); color: #f5d0fe; }
.market-status { color: var(--text-dim); font-size: 12px; }
.market-cards { margin-top: 14px; }
.market-hint { color: var(--text-dim); font-size: 11px; line-height: 1.55; }
.market-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }

/* ---------- Settings / account panel ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 18px; }
.settings-card { padding: 20px; }
.settings-card h3 { display: flex; align-items: center; gap: 9px; font-size: 15px; margin-bottom: 10px; }
.settings-card h3 i { color: #f0abfc; }
.settings-card p { color: var(--text-dim); font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.settings-card label { display: flex; flex-direction: column; gap: 6px; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
#settings-account-host { margin-top: 18px; }

#memnora-account-panel {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}
#memnora-account-panel .account-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr); gap: 18px; align-items: start; }
#memnora-account-panel .account-form-column {
    padding: clamp(20px, 2.6vw, 32px);
    border-radius: 22px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background: linear-gradient(165deg, rgba(30, 18, 50, 0.82), rgba(12, 7, 23, 0.94));
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.4);
}
#memnora-account-panel h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
#memnora-account-panel .auth-mark { width: 30px; height: 30px; }
#memnora-account-panel #account-subtitle { color: var(--text-muted); font-size: 13px; }
#memnora-account-panel .auth-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
#memnora-account-panel .auth-tabs .btn { min-height: 34px; padding: 6px 11px; font-size: 11px; }
#memnora-account-panel .auth-tabs button[aria-current="true"] { background: linear-gradient(135deg, rgba(168, 85, 247, 0.36), rgba(244, 114, 182, 0.24)); border-color: rgba(232, 121, 249, 0.5); color: #fff; }
#memnora-account-panel .auth-form { display: grid; gap: 13px; max-width: 460px; }
#memnora-account-panel .auth-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: 11px; font-weight: 600; }
#memnora-account-panel .auth-form input { min-height: 44px; height: 44px; }
#memnora-account-panel .auth-password button { border-left-color: rgba(190, 140, 255, 0.16); border-radius: 0 9px 9px 0; color: var(--text-muted); }
#memnora-account-panel .auth-password button:hover { background: rgba(168, 85, 247, 0.14); color: #fff; }
#memnora-account-panel .auth-status { background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(190, 140, 255, 0.2); border-radius: 10px; color: #eadcff; font-size: 12px; }
#memnora-account-panel .auth-status[data-error="true"] { background: rgba(251, 113, 133, 0.08); border-color: rgba(251, 113, 133, 0.35); color: #fecdd3; }
#memnora-account-panel .auth-actions { display: flex; flex-wrap: wrap; gap: 7px; }
#memnora-account-panel .auth-actions .btn { min-height: 34px; padding: 6px 11px; font-size: 11px; }
#memnora-account-panel .auth-help, #memnora-account-panel .auth-service-note { color: var(--text-dim); font-size: 12px; }
#memnora-account-panel .auth-session { border-top-color: rgba(190, 140, 255, 0.1); font-size: 12px; }
#memnora-account-panel .account-discovery {
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(190, 140, 255, 0.16);
    background: #140b24;
}
#memnora-account-panel .discovery-art {
    height: 160px;
    background:
        radial-gradient(120% 120% at 76% 12%, rgba(232, 121, 249, 0.4), transparent 56%),
        radial-gradient(90% 120% at 18% 100%, rgba(103, 232, 249, 0.22), transparent 60%),
        linear-gradient(150deg, #2b1450, #120a22 70%);
}
#memnora-account-panel .discovery-art::after { content: "✧"; display: block; padding: 34px; font-size: 42px; color: rgba(250, 232, 255, 0.8); text-shadow: 0 0 30px rgba(244, 114, 182, 0.7); }
#memnora-account-panel .discovery-copy { padding: 18px 20px 22px; }
#memnora-account-panel .section-kicker { color: #e9d5ff; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
#memnora-account-panel .discovery-copy h4 { font-family: var(--font-display); font-size: 18px; line-height: 1.35; margin: 8px 0 10px; }
#memnora-account-panel .discovery-copy > p:not(.section-kicker) { color: var(--text-muted); font-size: 12px; }
#memnora-account-panel .discovery-copy .btn { width: 100%; margin-top: 8px; }
#memnora-account-panel .discovery-note { color: var(--text-dim); font-size: 11px; }

/* ---------- Modals / toast ---------- */
.modal-overlay { background: rgba(4, 2, 9, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-dialog { border-radius: 22px; border: 1px solid rgba(232, 121, 249, 0.2); background: linear-gradient(165deg, #1c1030, #0d0717 72%); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65); }
.modal-header { border-bottom: 1px solid rgba(190, 140, 255, 0.12); }
.modal-header h3 { font-family: var(--font-display); font-size: 19px; }
.modal-close { color: var(--text-muted); }
.modal-close:hover { color: #fda4af; }
.modal-footer { border-top: 1px solid rgba(190, 140, 255, 0.1); padding-top: 14px; }
.autocomplete-results { background: #150c26; border: 1px solid rgba(190, 140, 255, 0.22); border-radius: 12px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6); }
.autocomplete-item:hover { background: rgba(168, 85, 247, 0.16); }
#toast-container .toast { background: rgba(24, 14, 42, 0.96); border-left: 3px solid #e879f9; border-radius: 10px; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5); }
#toast-container .toast.error { border-left-color: #fb7185; }

/* ---------- Footer ---------- */
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 56px; padding: 22px 0 30px; border-top: 1px solid rgba(190, 140, 255, 0.1); color: var(--text-dim); font-size: 11px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { filter: drop-shadow(0 0 10px rgba(217, 70, 239, 0.35)); }
.footer-brand span { display: flex; flex-direction: column; line-height: 1.25; }
.footer-brand strong { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.14em; color: #e9d5ff; }
.footer-brand small { font-size: 9px; color: var(--text-dim); }
.footer-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-meta .dev-footer { color: #fde68a; font-weight: 600; }
.footer-meta a { color: var(--text-muted); text-decoration: none; }
.footer-meta a:hover { color: #f5d0fe; }

/* ---------- Mobile dock & sheet ---------- */
.mobile-dock {
    display: none;
    position: fixed;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 95;
    width: min(94vw, 560px);
    padding: 7px;
    border-radius: 22px;
    border: 1px solid rgba(190, 140, 255, 0.2);
    background: rgba(15, 8, 27, 0.92);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.dock-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 2px 6px;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: var(--text-dim);
    font: 600 9.5px 'Inter', sans-serif;
    cursor: pointer;
    transition: color 0.18s, background 0.18s;
}
.dock-btn .icon { width: 20px; height: 20px; }
.dock-btn.active { color: #fff; background: linear-gradient(160deg, rgba(168, 85, 247, 0.28), rgba(244, 114, 182, 0.14)); }
.dock-btn.active .icon { filter: drop-shadow(0 0 8px rgba(240, 171, 252, 0.7)); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(4, 2, 9, 0.66); backdrop-filter: blur(6px); }
.mobile-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 101;
    width: min(100%, 560px);
    transform: translate(-50%, 104%);
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
    border: 1px solid rgba(190, 140, 255, 0.22);
    border-bottom: 0;
    background: linear-gradient(175deg, #1b0f2e, #0b0614 80%);
    box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.65);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-sheet[hidden] { display: none; }
.mobile-sheet.is-open { transform: translate(-50%, 0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head .icon-btn { font-size: 22px; line-height: 1; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sheet-grid button, .sheet-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 13px;
    border-radius: 13px;
    border: 1px solid rgba(190, 140, 255, 0.13);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font: 600 12px 'Inter', sans-serif;
    text-decoration: none;
    cursor: pointer;
}
.sheet-grid button:hover, .sheet-grid a:hover { border-color: rgba(232, 121, 249, 0.4); background: rgba(168, 85, 247, 0.12); }
.sheet-icon { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; background: rgba(168, 85, 247, 0.16); color: #f0abfc; font-size: 13px; }
.sheet-note { margin-top: 14px; text-align: center; color: var(--text-dim); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; }
body.sheet-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .top-nav .nav-item { padding: 8px 9px; font-size: 12px; }
    .brand-copy small { display: none; }
    .anime-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 20px; }
}
@media (max-width: 1120px) {
    .top-nav { display: none; }
    .mobile-menu-toggle { display: inline-grid; }
    .mobile-dock { display: flex; }
    .exzura-workspace { padding-bottom: 92px; }
    .anime-layout { grid-template-columns: minmax(0, 1fr); }
    .anime-rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .anime-rail:has(.anime-calendar-host) { grid-template-columns: minmax(0, 1fr); }
    .search-hint { display: none; }
    #global-search { padding-right: 14px; }
}
@media (max-width: 920px) {
    .site-header-inner { padding: 11px 18px; gap: 14px; }
    .site-tools { padding: 0 18px 11px; flex-wrap: wrap; }
    .site-tools:has(> .search-bar-container[hidden]) { display: none; }
    .exzura-workspace { padding: 16px 18px 92px; }
    .tool-actions { width: 100%; justify-content: flex-start; }
    .server-pill { margin-left: auto; margin-right: 0; }
    .notes-layout { grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 14px; }
    .anime-hero { min-height: 400px; }
    .anime-hero-veil { background: linear-gradient(90deg, rgba(8, 4, 15, 0.95), rgba(8, 4, 15, 0.55) 60%, rgba(8, 4, 15, 0.35)); }
    .page-hero-emblem { width: 92px; }
    #memnora-account-panel .account-layout { grid-template-columns: minmax(0, 1fr); }
    #memnora-account-panel .account-discovery { display: none; }
}
@media (max-width: 720px) {
    .brand-mark { width: 36px; height: 36px; }
    .brand-copy strong { font-size: 16px; }
    .topbar-actions .btn span { display: none; }
    .topbar-actions .btn { min-width: 38px; padding: 8px; }
    .btn-add-note-label { display: none; }
    .anime-hero { min-height: 430px; border-radius: 22px; }
    .anime-hero-art { object-position: 62% center; }
    .anime-hero-veil { background: linear-gradient(0deg, rgba(8, 4, 15, 0.97) 8%, rgba(8, 4, 15, 0.62) 55%, rgba(8, 4, 15, 0.32) 100%); }
    .anime-hero-copy { padding: 24px 20px 26px; }
    .anime-hero h2 { font-size: clamp(30px, 9vw, 44px); }
    .anime-hero-actions .btn { flex: 1 1 auto; }
    .anime-hero-rating { margin-left: 0; }
    .anime-hero-tags { display: none; }
    .anime-toolbar { width: calc(100% - 16px); margin-top: -18px; padding: 12px; }
    .anime-search > label, .anime-search .anime-provider-label { flex-basis: 100%; }
    .anime-search > .btn { flex: 1 1 auto; }
    .anime-filter-panel { flex: 1 1 auto; }
    .anime-filter-panel > summary { width: 100%; justify-content: center; }
    .anime-filter-content { right: auto; left: 0; width: min(90vw, 320px); }
    .anime-section-head h3 { font-size: 21px; }
    .notes-layout { grid-template-columns: minmax(0, 1fr); }
    .notes-list-panel { max-height: 260px; }
    .note-editor-panel { min-height: 420px; }
    .empty-editor-state { min-height: 320px; }
    .page-hero { padding: 24px 20px; border-radius: 22px; }
    .page-hero-emblem { display: none; }
    .hero-stats span { padding: 7px 11px; }
    .section-head { margin-top: 22px; }
    .settings-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-meta { gap: 12px; }
}
@media (max-width: 520px) {
    .dev-banner { font-size: 9px; padding: 6px 12px; gap: 6px; }
    .dev-banner .dev-note { display: none; }
    .dev-chip { display: none; }
    .site-header-inner { padding: 10px 14px; }
    .site-tools { padding: 0 14px 10px; }
    .exzura-workspace { padding: 12px 14px 92px; }
    .tool-actions { gap: 6px; }
    .tool-actions .btn span { display: none; }
    .tool-actions .btn { min-width: 38px; padding: 7px 9px; }
    .server-pill { padding: 6px 9px; }
    .server-pill-copy small { max-width: 92px; }
    .sync-statusline { gap: 8px; }
    .sync-statusline > p { flex-basis: 100%; }
    .grid-cards { grid-template-columns: minmax(0, 1fr); }
    .bookmark-selection-toolbar { align-items: stretch; }
    .bookmark-selection-summary { gap: 8px; }
    .dock-btn span { font-size: 9px; }
    .anime-search { gap: 8px; }
    .anime-search .form-control, .anime-search > .btn { height: 42px; min-height: 42px; }
    .anime-hero-actions { gap: 8px; }
    .anime-hero-actions .btn { padding: 10px 13px; font-size: 12px; }
    .anime-hero { min-height: 0; }
    .anime-hero-copy { padding: 22px 18px 24px; }
    .anime-hero h2 { font-size: 30px; line-height: 1.08; margin: 12px 0 12px; }
    .anime-hero p { font-size: 13px; }
    .anime-hero-actions { margin-top: 18px; }
    .anime-hero-rating { display: none; }
    .page-hero h2 { font-size: 30px; }
    .hero-stats { gap: 6px; }
    .hero-stats span { flex: 1 1 30%; }
    .page-hero p { font-size: 13px; }
    .lock-card { padding: 24px 18px; }
    #memnora-account-panel .account-form-column { padding: 18px; }
    .market-picker, .market-converter { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
