/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #1a1c22;
    --bg2:       #22252e;
    --bg3:       #2a2d38;
    --border:    #383c4a;
    --text:      #e2e4ed;
    --text2:     #9aa0b8;
    --text3:     #636880;
    --accent:    #7b8cde;
    --accent2:   #a78bfa;
    --gold:      #e8b84b;
    --red-letter:#f87070;
    --mark-bg:   rgba(123,140,222,.28);
    --sidebar-w: 220px;
    --ref-w:     300px;
    --header-h:  44px;
    --bm-h:      30px;
    --status-h:  24px;
    --radius:    6px;
    --font-ui:   system-ui, -apple-system, sans-serif;
    --font-read: Georgia, 'Times New Roman', serif;
}

html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 14px; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: var(--text); background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
mark { background: var(--mark-bg); color: inherit; border-radius: 2px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ─── Layout ────────────────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100vh; }

#header {
    flex-shrink: 0; height: var(--header-h);
    background: var(--bg2); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px; padding: 0 12px; z-index: 100;
}

#bookmarks-bar {
    flex-shrink: 0; height: var(--bm-h);
    background: var(--bg2); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 4px; padding: 0 10px; overflow-x: auto;
}

#status-bar {
    flex-shrink: 0; height: var(--status-h);
    background: var(--bg2); border-top: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 12px;
    font-size: 11px; color: var(--text3); gap: 16px; user-select: none;
}
#status-location { font-weight: 600; color: var(--text2); }
.status-mid { flex: 1; }
#status-counts { margin-left: auto; }

#workspace { flex: 1; display: flex; overflow: hidden; }

/* ─── Header elements ─────────────────────────────────────── */
#logo { font-size: 14px; font-weight: 700; white-space: nowrap; margin-right: 4px; }
#logo span { color: var(--accent); }

.hist-btn {
    width: 26px; height: 26px; background: var(--bg3);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 13px; color: var(--text2);
}
.hist-btn:hover { background: var(--border); color: var(--text); }
.hist-btn:disabled { opacity: .35; cursor: default; }

#quick-ref { width: 180px; height: 28px; font-size: 13px; }
#quick-ref-go {
    height: 28px; padding: 0 10px; font-size: 12px;
    background: var(--accent); color: #fff; border-radius: var(--radius);
}
#quick-ref-go:hover { opacity: .85; }

.header-spacer { flex: 1; }

.hdr-icon-btn {
    width: 28px; height: 28px; font-size: 14px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
}
.hdr-icon-btn:hover { background: var(--border); }

#font-size-ctrl { display: flex; gap: 2px; }
#font-size-ctrl button {
    width: 24px; height: 24px; font-size: 11px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--text2);
}
#font-size-ctrl button.active { color: var(--accent); border-color: var(--accent); }

/* ─── Bookmarks bar ─────────────────────────────────────────── */
.bm-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }
.bm-slot {
    min-width: 28px; height: 22px; padding: 0 6px; font-size: 11px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: 4px;
    color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}
.bm-slot:hover { border-color: var(--accent); color: var(--text); }
.bm-slot.filled { background: var(--bg); color: var(--accent); border-color: var(--accent2); }

/* ─── Sidebar ─────────────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-w); min-width: 160px; max-width: 360px;
    background: var(--bg2); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}
#sidebar-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#sidebar-tabs button {
    flex: 1; padding: 7px 2px; font-size: 10px; color: var(--text2);
    letter-spacing: .3px; text-transform: uppercase;
}
#sidebar-tabs button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.sidebar-panel { flex: 1; overflow-y: auto; display: none; }
.sidebar-panel.active { display: block; }

.lib-category { padding: 10px 12px 4px; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; }
.lib-book { padding: 5px 12px 5px 20px; cursor: pointer; font-size: 13px; color: var(--text2); }
.lib-book:hover { background: var(--bg3); color: var(--text); }
.lib-book.active { color: var(--accent); background: rgba(123,140,222,.1); }

#nav-panel { padding: 10px; display: none; flex-direction: column; gap: 8px; }
#nav-panel.active { display: flex; }
#nav-panel label { font-size: 11px; color: var(--text3); text-transform: uppercase; margin-bottom: 2px; }
#nav-panel select { width: 100%; }
.nav-btn-row { display: flex; gap: 6px; }
.nav-btn-row button { flex: 1; padding: 6px 4px; font-size: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); }
.nav-btn-row button:hover { background: var(--border); }
#nav-go-btn { flex: 1.5; background: var(--accent); color: #fff; border-color: var(--accent); }

#search-panel { display: flex; flex-direction: column; height: 100%; }
#search-form { padding: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#search-input { width: 100%; margin-bottom: 6px; }
.search-opts { display: flex; gap: 8px; font-size: 11px; flex-wrap: wrap; margin-bottom: 4px; }
.search-opts label { display: flex; align-items: center; gap: 3px; cursor: pointer; }
#search-go { width: 100%; margin-top: 6px; padding: 6px; background: var(--accent); color: #fff; border-radius: var(--radius); font-size: 13px; }
#search-results { flex: 1; overflow-y: auto; padding: 4px 0; }
.sr-count { padding: 6px 10px; font-size: 11px; color: var(--text3); }
.sr-item { padding: 6px 10px; cursor: pointer; border-bottom: 1px solid var(--bg3); }
.sr-item:hover { background: var(--bg3); }
.sr-ref { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.sr-text { font-size: 12px; color: var(--text2); line-height: 1.4; }

/* Topics + Dictionary panels share same layout */
#topics-panel, #dict-panel { display: flex; flex-direction: column; height: 100%; }
.panel-search-row { padding: 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; display: flex; gap: 6px; }
.panel-search-row input { flex: 1; }
.panel-search-row select { width: 80px; font-size: 11px; }
#topics-list, #dict-list { flex: 1; overflow-y: auto; }
.topic-item, .dict-item {
    padding: 6px 12px; cursor: pointer; font-size: 13px; color: var(--text2);
    border-bottom: 1px solid var(--bg3);
}
.topic-item:hover, .dict-item:hover { background: var(--bg3); color: var(--text); }
.dict-item-src { font-size: 10px; color: var(--text3); float: right; margin-top: 2px; }

/* ─── Resize handle ─────────────────────────────────────────── */
.resize-handle { width: 4px; flex-shrink: 0; cursor: col-resize; background: var(--border); }
.resize-handle:hover, .resize-handle.dragging { background: var(--accent); }

/* ─── Reading panes ─────────────────────────────────────────── */
#panes-container { flex: 1; display: flex; overflow: hidden; min-width: 300px; }
.reader-pane { flex: 1; display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow: hidden; min-width: 200px; }
.reader-pane:last-child { border-right: none; }

.pane-header {
    flex-shrink: 0; height: 36px; background: var(--bg2); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 6px; padding: 0 8px;
}
.pane-header select.translation-sel { width: 80px; height: 26px; font-size: 12px; padding: 2px 4px; }
.pane-location { font-size: 12px; color: var(--text2); flex: 1; white-space: nowrap; }
.pane-nav { display: flex; gap: 2px; }
.pane-prev, .pane-next {
    width: 24px; height: 24px; font-size: 14px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text2);
}
.pane-prev:hover, .pane-next:hover { color: var(--text); background: var(--border); }
.add-pane-btn, .close-pane-btn {
    height: 24px; padding: 0 8px; font-size: 12px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text2);
}
.add-pane-btn:hover, .close-pane-btn:hover { color: var(--text); background: var(--border); }

.pane-content { flex: 1; overflow-y: auto; padding: 16px 20px 40px; font-family: var(--font-read); }

.chapter-heading {
    font-size: 15px; font-weight: 700; color: var(--text2); margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border); font-family: var(--font-ui);
}

.verse-block {
    display: flex; gap: 6px; margin-bottom: 6px; padding: 3px 4px;
    border-radius: 4px; position: relative;
}
.verse-block:hover { background: rgba(255,255,255,.03); }
.verse-block.has-note { border-left: 3px solid var(--gold); padding-left: 6px; }
.verse-block.rl-verse .vtext { color: var(--red-letter); }

/* Verse highlighting */
.verse-block.hl-yellow { background: rgba(255,230,50,.12); }
.verse-block.hl-green  { background: rgba(74,222,128,.12); }
.verse-block.hl-blue   { background: rgba(96,165,250,.12); }
.verse-block.hl-pink   { background: rgba(244,114,182,.12); }
.verse-block.hl-yellow:hover { background: rgba(255,230,50,.18); }
.verse-block.hl-green:hover  { background: rgba(74,222,128,.18); }
.verse-block.hl-blue:hover   { background: rgba(96,165,250,.18); }
.verse-block.hl-pink:hover   { background: rgba(244,114,182,.18); }

.vnum {
    flex-shrink: 0; font-size: 10px; font-weight: 700; color: var(--text3);
    font-family: var(--font-ui); line-height: 1.8; cursor: pointer; min-width: 18px; user-select: none;
}
.vnum:hover { color: var(--accent); }
.vtext { font-size: 15px; line-height: 1.7; color: var(--text); }

.copy-verse-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    opacity: 0; font-size: 10px; padding: 2px 6px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; color: var(--text3);
}
.verse-block:hover .copy-verse-btn { opacity: 1; }
.copy-verse-btn:hover { color: var(--text); border-color: var(--accent); }

sup.snum {
    font-size: 9px; color: var(--accent); cursor: pointer;
    vertical-align: super; margin: 0 1px; font-family: var(--font-ui);
}
sup.snum:hover { color: var(--accent2); text-decoration: underline; }

#workspace.font-size-sm .vtext { font-size: 13px; }
#workspace.font-size-lg .vtext { font-size: 17px; }
#workspace.font-size-xl .vtext { font-size: 20px; }

.loading { padding: 20px; color: var(--text3); font-size: 13px; font-family: var(--font-ui); text-align: center; }

/* ─── Reference panel ─────────────────────────────────────── */
#ref-panel {
    width: var(--ref-w); min-width: 200px; max-width: 520px;
    background: var(--bg2); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}
#ref-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
#ref-tabs button {
    flex: 1; padding: 7px 2px; font-size: 10px; color: var(--text2);
    letter-spacing: .3px; text-transform: uppercase;
}
#ref-tabs button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.ref-panel-body { flex: 1; overflow-y: auto; display: none; padding: 12px; }
.ref-panel-body.active { display: block; }
.ref-placeholder { font-size: 12px; color: var(--text3); line-height: 1.6; padding: 8px 0; }

/* Strong's */
.strongs-num { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.strongs-orig { font-size: 20px; color: var(--gold); margin-bottom: 4px; }
.strongs-xlit { font-size: 14px; color: var(--text2); margin-bottom: 2px; font-style: italic; }
.strongs-pron { font-size: 12px; color: var(--text3); margin-bottom: 8px; }
.strongs-defn { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 8px; }
.strongs-usage-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); margin-bottom: 4px; }
.strongs-usage { font-size: 12px; color: var(--text2); line-height: 1.5; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.strongs-rev-btn {
    width: 100%; margin-top: 10px; padding: 6px; font-size: 12px;
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text2);
}
.strongs-rev-btn:hover { border-color: var(--accent); color: var(--accent); }
.strongs-rev-result { margin-top: 10px; }
.strongs-rev-heading { font-size: 11px; color: var(--text3); margin-bottom: 6px; text-transform: uppercase; }
.strongs-rev-item {
    padding: 5px 0; border-bottom: 1px solid var(--border); cursor: pointer;
    font-size: 12px; color: var(--text2);
}
.strongs-rev-item:hover { color: var(--accent); }
.strongs-rev-ref { font-size: 11px; color: var(--accent); font-weight: 600; }

/* Commentary (Matthew Henry) */
.commentary-heading { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.commentary-body { font-size: 13px; color: var(--text2); line-height: 1.7; }
.commentary-body h1,.commentary-body h2,.commentary-body h3 {
    color: var(--text); font-size: 13px; font-weight: 700; margin: 12px 0 6px; font-family: var(--font-ui);
}
.commentary-body h1 { font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.commentary-body p { margin-bottom: 8px; }
.commentary-body em { color: var(--text); font-style: italic; }
.commentary-body strong { color: var(--text); }
.commentary-body ul,.commentary-body ol { padding-left: 18px; margin-bottom: 8px; }
.commentary-body li { margin-bottom: 4px; }
.commentary-body blockquote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--text3); margin: 8px 0; }

/* Compare */
.compare-item { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.compare-item:last-child { border-bottom: none; }
.compare-trans { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); margin-bottom: 4px; }
.compare-text { font-size: 13px; line-height: 1.6; color: var(--text); font-family: var(--font-read); }

/* Cross-refs */
.xref-heading { font-size: 11px; color: var(--text3); margin-bottom: 8px; }
.xref-item { padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.xref-item:last-child { border-bottom: none; }
.xref-ref { font-size: 11px; color: var(--accent); font-weight: 700; margin-bottom: 3px; }
.xref-text { font-size: 12px; color: var(--text2); line-height: 1.5; font-family: var(--font-read); }
.xref-votes { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* Notes */
.note-add-area { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.note-ref-label { font-size: 11px; color: var(--text3); margin-bottom: 6px; }
#note-textarea { width: 100%; height: 80px; resize: vertical; font-size: 13px; padding: 6px 8px; }
.note-actions { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.note-save-btn { padding: 5px 12px; font-size: 12px; background: var(--accent); color: #fff; border-radius: var(--radius); }
.note-save-btn:hover { opacity: .85; }
#notes-sort { font-size: 11px; height: 26px; flex: 1; }
.note-item { padding: 8px 0; border-bottom: 1px solid var(--border); position: relative; }
.note-item-ref { font-size: 11px; color: var(--accent); font-weight: 600; cursor: pointer; margin-bottom: 3px; }
.note-item-ref:hover { text-decoration: underline; }
.note-item-text { font-size: 12px; color: var(--text2); line-height: 1.5; white-space: pre-wrap; }
.note-item-del { position: absolute; right: 0; top: 8px; font-size: 14px; color: var(--text3); width: 20px; height: 20px; }
.note-item-del:hover { color: var(--red-letter); }

/* Reading Plan panel */
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-card {
    padding: 12px; background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
}
.plan-card:hover { border-color: var(--accent); }
.plan-card-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.plan-card-meta { font-size: 11px; color: var(--text3); }
.plan-card-progress { margin-top: 8px; height: 4px; background: var(--border); border-radius: 2px; }
.plan-card-bar { height: 100%; background: var(--accent); border-radius: 2px; }

.plan-day-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.plan-day-title { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); }
.plan-day-nav button {
    width: 26px; height: 26px; background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 13px; color: var(--text2);
}
.plan-day-nav button:hover { color: var(--text); background: var(--border); }
.plan-back-btn { font-size: 11px; color: var(--accent); cursor: pointer; margin-bottom: 10px; display: inline-block; }
.plan-back-btn:hover { text-decoration: underline; }
.plan-chapter-item {
    padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer;
    font-size: 13px; color: var(--text2);
}
.plan-chapter-item:hover { color: var(--accent); }
.plan-chapter-item.done { color: var(--text3); text-decoration: line-through; }

/* ─── Context menu ─────────────────────────────────────────── */
.ctx-menu {
    position: fixed; background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 4px 0; z-index: 1000;
    min-width: 190px; box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.ctx-item { padding: 6px 14px; font-size: 12px; cursor: pointer; color: var(--text); }
.ctx-item:hover { background: rgba(123,140,222,.2); color: var(--accent); }
.ctx-sep { height: 1px; background: var(--border); margin: 3px 0; }

/* ─── Overlays shared ─────────────────────────────────────── */
.overlay-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 500; display: flex; align-items: center; justify-content: center;
}
.overlay-panel {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
    width: min(700px, 90vw); max-height: 80vh;
    display: flex; flex-direction: column; overflow: hidden;
}
.overlay-header {
    display: flex; align-items: center; padding: 14px 16px;
    border-bottom: 1px solid var(--border); gap: 10px;
}
.overlay-header h2 { flex: 1; font-size: 16px; font-weight: 700; color: var(--text); }
.overlay-close {
    width: 28px; height: 28px; font-size: 18px; background: var(--bg3);
    border: 1px solid var(--border); border-radius: 50%; color: var(--text2);
}
.overlay-close:hover { color: var(--text); }
.overlay-body { flex: 1; overflow-y: auto; padding: 14px 16px; }

#topic-detail-overlay, #dict-overlay, #plan-overlay, #bm-dialog { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 500; display: flex; align-items: center; justify-content: center; }
#topic-detail-panel, #dict-overlay-panel, #plan-overlay-panel {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
    width: min(700px, 90vw); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden;
}
#topic-detail-header, #dict-overlay-header, #plan-overlay-header {
    display: flex; align-items: center; padding: 14px 16px;
    border-bottom: 1px solid var(--border); gap: 8px;
}
#topic-detail-name, #dict-overlay-word, #plan-overlay-title {
    flex: 1; font-size: 16px; font-weight: 700; color: var(--text);
}
#topic-detail-close, #dict-overlay-close, #plan-overlay-close {
    width: 28px; height: 28px; font-size: 18px; background: var(--bg3);
    border: 1px solid var(--border); border-radius: 50%; color: var(--text2);
}
#topic-detail-body, #dict-overlay-body, #plan-overlay-body {
    flex: 1; overflow-y: auto; padding: 14px 16px;
}

/* Topic detail */
.topic-body-text { font-size: 13px; color: var(--text2); line-height: 1.6; margin-bottom: 12px; }
.topic-refs-heading { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); margin-bottom: 8px; }
.topic-ref-item { padding: 7px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.topic-ref-item:last-child { border-bottom: none; }
.topic-ref-ref { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 3px; }
.topic-ref-text { font-size: 13px; color: var(--text); line-height: 1.5; font-family: var(--font-read); }

/* Dictionary overlay */
.dict-src-badge { font-size: 10px; color: var(--text3); background: var(--bg3); padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); }
.dict-body { font-size: 13px; color: var(--text2); line-height: 1.7; }

/* Bookmark dialog */
#bm-dialog-inner { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 20px; min-width: 280px; }
.bm-dialog-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
#bm-slots-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bm-dialog-slot { padding: 6px 12px; font-size: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text2); cursor: pointer; }
.bm-dialog-slot:hover { border-color: var(--accent); color: var(--accent); }
.bm-dialog-slot.filled { color: var(--accent); border-color: var(--accent2); }
#bm-dialog-cancel { padding: 5px 14px; font-size: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text2); }

/* ─── Toast ─────────────────────────────────────────────────── */
#toast {
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
    background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
    padding: 8px 18px; font-size: 13px; color: var(--text);
    opacity: 0; pointer-events: none; z-index: 999;
}
#toast.show { opacity: 1; }
