/* PageTurner PA — styles.css
   All CSS for the dashboard. Linked from index.html.
   Part of the 3-file build: index.html + styles.css + app.js
*/

/* ── Base styles ─────────────────────────────────────────────────────────── */
:root{--acc:#B45309;--acc-lt:#FEF3C7;--acc-txt:#92400E;--acc-dk:#78350F;--bg:#FAFAF8;--bg2:#F3F2EE;--bg3:#EDECE8;--text:#1A1916;--text2:#6B6860;--text3:#9B9A95;--border:rgba(0,0,0,.1);--border2:rgba(0,0,0,.15);--card:#FFFFFF;--r:8px;--rl:12px;--font:'Segoe UI',system-ui,-apple-system,sans-serif;--sidebar-width:212px;--card-shadow:none;--card-border:.5px solid var(--border);--bg-pattern:none;--font-size:14px;}
*{box-sizing:border-box;margin:0;padding:0;}
body.theme-dark .author-profile-card{background:#0D0D0D!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark .ev-card{background:#0D0D0D!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark .prov{background:#0D0D0D!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark .author-profile-card strong{color:#FFFFFF!important;}
body.theme-dark .ev-card strong{color:#FFFFFF!important;}
body.theme-dark .prov strong{color:#FFFFFF!important;}
body.theme-red .author-profile-card,body.theme-red .ev-card,body.theme-red .prov{border-color:rgba(220,38,38,.2)!important;}
body.theme-orange .author-profile-card,body.theme-orange .ev-card,body.theme-orange .prov{border-color:rgba(234,88,12,.2)!important;}
body.theme-yellow .author-profile-card,body.theme-yellow .ev-card,body.theme-yellow .prov{border-color:rgba(202,138,4,.2)!important;}
body.theme-green .author-profile-card,body.theme-green .ev-card,body.theme-green .prov{border-color:rgba(22,163,74,.2)!important;}
body.theme-blue .author-profile-card,body.theme-blue .ev-card,body.theme-blue .prov{border-color:rgba(37,99,235,.2)!important;}
body.theme-indigo .author-profile-card,body.theme-indigo .ev-card,body.theme-indigo .prov{border-color:rgba(67,56,202,.2)!important;}
body.theme-purple .author-profile-card,body.theme-purple .ev-card,body.theme-purple .prov{border-color:rgba(147,51,234,.2)!important;}
body.theme-dark{color:#FFFFFF;}
body.theme-dark .card{background:#0D0D0D!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark #sidebar{background:#000000!important;border-right-color:rgba(255,255,255,.1)!important;}
body.theme-dark #main{background:transparent!important;}
body.theme-dark body,body.theme-dark{background:transparent!important;}
body.theme-dark .sb-item{color:#E2E0F0!important;}
body.theme-dark .sb-item:hover,body.theme-dark .sb-item.active{background:rgba(255,255,255,.08)!important;color:#FFFFFF!important;}
body.theme-dark .sb-section{color:rgba(255,255,255,.35)!important;}
body.theme-dark .ph{background:#0D0D0D!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark .pt{color:#FFFFFF!important;font-weight:800!important;}
body.theme-dark .ps{color:#B0ACCC!important;}
body.theme-dark table th{background:#0A0A0A!important;color:#FFFFFF!important;font-weight:800!important;border-bottom-color:rgba(255,255,255,.15)!important;}
body.theme-dark table td{color:#E2E0F0!important;border-bottom-color:rgba(255,255,255,.08)!important;}
body.theme-dark table tr:hover td{background:rgba(255,255,255,.04)!important;}
body.theme-dark input,body.theme-dark select,body.theme-dark textarea{background:#111111!important;color:#FFFFFF!important;border-color:rgba(255,255,255,.2)!important;}
body.theme-dark input::placeholder,body.theme-dark textarea::placeholder{color:rgba(255,255,255,.3)!important;}
body.theme-dark .metric{background:#0D0D0D!important;border-color:rgba(255,255,255,.12)!important;}
body.theme-dark .metric-lbl{color:#B0ACCC!important;}
body.theme-dark .metric-val{color:#FFFFFF!important;font-weight:800!important;}
body.theme-dark .tab-bar{background:rgba(0,0,0,.85)!important;border-bottom-color:rgba(255,255,255,.1)!important;}
body.theme-dark .tab{color:#B0ACCC!important;}
body.theme-dark .tab.active{color:#FFFFFF!important;font-weight:800!important;border-bottom-color:#A78BFA!important;}
body.theme-dark .btn{background:#111111!important;color:#E2E0F0!important;border-color:rgba(255,255,255,.15)!important;}
body.theme-dark .btn.ba{background:#A78BFA!important;color:#FFFFFF!important;border:none!important;}
body.theme-dark .ct{color:#FFFFFF!important;font-weight:800!important;}
body.theme-dark .fl-lbl{color:#B0ACCC!important;}
body.theme-dark #mob-topbar{background:#000000!important;border-bottom-color:rgba(255,255,255,.1)!important;}
body.theme-dark #mob-topbar *{color:#FFFFFF!important;}
body.theme-dark .leader-row{border-bottom-color:rgba(255,255,255,.08)!important;}
body.theme-dark .avatar{border:1.5px solid rgba(255,255,255,.15)!important;}
body.theme-dark .sb-item[style*="color:#A32D2D"]{color:#FF6B6B!important;}
body.theme-dark #dash-ctrl-box{background:#0D0D0D!important;border-color:rgba(255,255,255,.2)!important;}
body.theme-dark #dash-ctrl-box .btn{background:#1A1A1A!important;border-color:rgba(255,255,255,.2)!important;color:#E2E0F0!important;}
body.theme-dark #dash-ctrl-box span{color:#B0ACCC!important;}
body.theme-dark .avatar{border:1.5px solid rgba(255,255,255,.15)!important;}
body.theme-dark .sb-item[style*="color:#A32D2D"]{color:#FF6B6B!important;}
body.theme-red .sb-item, body.theme-orange .sb-item, body.theme-yellow .sb-item,
body.theme-green .sb-item, body.theme-blue .sb-item, body.theme-indigo .sb-item,
body.theme-purple .sb-item {color:var(--text)!important;}
body.theme-red th, body.theme-orange th, body.theme-yellow th,
body.theme-green th, body.theme-blue th, body.theme-indigo th,
body.theme-purple th {color:var(--text)!important; font-weight:800!important;}
body.theme-red td, body.theme-orange td, body.theme-yellow td,
body.theme-green td, body.theme-blue td, body.theme-indigo td,
body.theme-purple td {color:var(--text)!important;}
body.theme-red .ct, body.theme-orange .ct, body.theme-yellow .ct,
body.theme-green .ct, body.theme-blue .ct, body.theme-indigo .ct,
body.theme-purple .ct {color:var(--text)!important; font-weight:800!important;}
body.theme-red .pt, body.theme-orange .pt, body.theme-yellow .pt,
body.theme-green .pt, body.theme-blue .pt, body.theme-indigo .pt,
body.theme-purple .pt {color:var(--text)!important; font-weight:800!important;}
body.theme-red .metric-val, body.theme-orange .metric-val, body.theme-yellow .metric-val,
body.theme-green .metric-val, body.theme-blue .metric-val, body.theme-indigo .metric-val,
body.theme-purple .metric-val {color:var(--text)!important; font-weight:800!important;}
body.theme-red input, body.theme-red select, body.theme-red textarea,
body.theme-orange input, body.theme-orange select, body.theme-orange textarea,
body.theme-yellow input, body.theme-yellow select, body.theme-yellow textarea,
body.theme-green input, body.theme-green select, body.theme-green textarea,
body.theme-blue input, body.theme-blue select, body.theme-blue textarea,
body.theme-indigo input, body.theme-indigo select, body.theme-indigo textarea,
body.theme-purple input, body.theme-purple select, body.theme-purple textarea
{background:#FFFFFF!important; color:var(--text)!important; border-color:var(--border2)!important;}
body.theme-red .tab.active, body.theme-orange .tab.active, body.theme-yellow .tab.active,
body.theme-green .tab.active, body.theme-blue .tab.active, body.theme-indigo .tab.active,
body.theme-purple .tab.active {color:var(--acc)!important; font-weight:800!important;}
body.theme-red .tab, body.theme-orange .tab, body.theme-yellow .tab,
body.theme-green .tab, body.theme-blue .tab, body.theme-indigo .tab,
body.theme-purple .tab {color:var(--text2)!important;}
body.theme-red .btn, body.theme-orange .btn, body.theme-yellow .btn,
body.theme-green .btn, body.theme-blue .btn, body.theme-indigo .btn,
body.theme-purple .btn {color:var(--text)!important;}
body.theme-red .btn.ba, body.theme-orange .btn.ba, body.theme-yellow .btn.ba,
body.theme-green .btn.ba, body.theme-blue .btn.ba, body.theme-indigo .btn.ba,
body.theme-purple .btn.ba {color:#FFFFFF!important;}
body.theme-red #sidebar{background:#FEE2E2!important;}
body.theme-red .sb-item.active, body.theme-red .sb-item:hover{background:rgba(220,38,38,.1)!important; color:#991B1B!important;}
body.theme-orange #sidebar{background:#FFEDD5!important;}
body.theme-orange .sb-item.active, body.theme-orange .sb-item:hover{background:rgba(234,88,12,.1)!important; color:#9A3412!important;}
body.theme-yellow #sidebar{background:#FEF9C3!important;}
body.theme-yellow .sb-item.active, body.theme-yellow .sb-item:hover{background:rgba(202,138,4,.12)!important; color:#854D0E!important;}
body.theme-yellow .pt, body.theme-yellow .ct, body.theme-yellow .metric-val
{color:#1A1600!important;}
body.theme-yellow input, body.theme-yellow select, body.theme-yellow textarea
{color:#1A1600!important;}
body.theme-green #sidebar{background:#DCFCE7!important;}
body.theme-green .sb-item.active, body.theme-green .sb-item:hover{background:rgba(22,163,74,.1)!important; color:#166534!important;}
body.theme-blue #sidebar{background:#DBEAFE!important;}
body.theme-blue .sb-item.active, body.theme-blue .sb-item:hover{background:rgba(37,99,235,.1)!important; color:#1E40AF!important;}
body.theme-blue .ps, body.theme-blue .metric-lbl, body.theme-blue .fl-lbl
{color:#1E3A6B!important; font-weight:600!important;}
body.theme-indigo #sidebar{background:#E0E7FF!important;}
body.theme-indigo .sb-item.active, body.theme-indigo .sb-item:hover{background:rgba(67,56,202,.1)!important; color:#312E81!important;}
body.theme-indigo .ps, body.theme-indigo .metric-lbl, body.theme-indigo .fl-lbl
{color:#2A2570!important; font-weight:600!important;}
body.theme-purple #sidebar{background:#F3E8FF!important;}
body.theme-purple .sb-item.active, body.theme-purple .sb-item:hover{background:rgba(147,51,234,.1)!important; color:#6B21A8!important;}
body.theme-pride input, body.theme-pride select, body.theme-pride textarea
{background:#FFFFFF!important; color:#0A0514!important;}
body.theme-pride td{color:#0A0514!important;}
body.theme-pride th{color:#0A0514!important; font-weight:800!important;
 background:linear-gradient(90deg,rgba(255,0,24,.06),rgba(0,68,255,.06),rgba(118,0,137,.06))!important;}
body.theme-pride #sidebar{background:linear-gradient(180deg,#FF0018 0%,#FF7700 18%,#FFEF00 36%,#00811F 52%,#0044FF 68%,#760089 84%,#8B5CF6 100%)!important;}
body.theme-pride .sb-section{color:rgba(255,255,255,.6)!important;}
body.theme-pride .sb-item{color:rgba(255,255,255,.9)!important;}
body.theme-pride .sb-item:hover,body.theme-pride .sb-item.active{background:rgba(255,255,255,.2)!important;color:#fff!important;}
body.theme-pride #sb-user-email{color:rgba(255,255,255,.6)!important;}
body.theme-pride .ph{background:#FFFFFF!important;border-color:rgba(139,92,246,.2)!important;}
body.theme-pride .pt{background:linear-gradient(90deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089)!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;background-clip:text!important;}
body.theme-pride #mob-topbar{background:linear-gradient(90deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089)!important;}
body.theme-pride #mob-topbar *{color:#fff!important;}
body.theme-pride .card{border:var(--card-border)!important;position:relative!important;background:#FFFFFF!important;overflow:visible!important;}
body.theme-pride .card::before{content:'';position:absolute;inset:-2px;border-radius:calc(var(--rl) + 2px);background:linear-gradient(135deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089);z-index:-1;}
body.theme-pride .metric{border:var(--card-border)!important;position:relative!important;background:#FFFFFF!important;overflow:visible!important;}
body.theme-pride .metric::before{content:'';position:absolute;inset:-2px;border-radius:calc(var(--rl) + 2px);background:linear-gradient(135deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089);z-index:-1;}
body.theme-pride .ct{background:linear-gradient(90deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089)!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;background-clip:text!important;font-weight:800!important;}
body.theme-pride .metric-val{color:#0A0514!important;font-weight:800!important;}
body.theme-pride .tab.active{background:linear-gradient(90deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089)!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;background-clip:text!important;font-weight:800!important;}
body.theme-pride .author-profile-card{
 background:#FFFFFF!important;
 border:var(--card-border)!important;
 position:relative!important;
 overflow:visible!important;
}
body.theme-pride .author-profile-card::before{
 content:'';position:absolute;inset:-2px;
 border-radius:calc(var(--rl) + 2px);
 background:linear-gradient(135deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089);
 z-index:-1;
}
body.theme-pride .ev-card{
 background:#FFFFFF!important;
 border:var(--card-border)!important;
 position:relative!important;
 overflow:visible!important;
}
body.theme-pride .ev-card::before{
 content:'';position:absolute;inset:-2px;
 border-radius:calc(var(--r) + 2px);
 background:linear-gradient(135deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089);
 z-index:-1;
}
body.theme-pride .prov{
 background:#FFFFFF!important;
 border:var(--card-border)!important;
 position:relative!important;
 overflow:visible!important;
}
body.theme-pride .prov::before{
 content:'';position:absolute;inset:-2px;
 border-radius:calc(var(--r) + 2px);
 background:linear-gradient(135deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089);
 z-index:-1;
}
body.theme-pride .btn.ba{background:linear-gradient(90deg,#FF0018,#FF7700,#FFEF00,#00811F,#0044FF,#760089)!important;color:#FFFFFF!important;border:none!important;}
html,body{height:100%;margin:0;}body{font-family:var(--font);font-size:var(--font-size,14px);color:var(--text);background:var(--bg);background-image:var(--bg-pattern);display:flex;flex-direction:column;}
#app-row{display:flex;flex:1;min-height:0;height:calc(100vh - 0px);overflow:hidden;}
#sidebar{width:var(--sidebar-width);flex-shrink:0;background:var(--bg2);border-right:.5px solid var(--border);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;padding-bottom:env(safe-area-inset-bottom, 34px);}
.sb-logo{padding:14px 14px 12px;border-bottom:.5px solid var(--border);display:flex;align-items:center;gap:8px;}
.sb-logo-icon{width:28px;height:28px;background:var(--acc);border-radius:6px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;}
.sb-logo-text{font-weight:700;font-size:13px;}.sb-logo-sub{font-size:10px;color:var(--text3);}
.sb-section{padding:10px 10px 3px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text3);font-weight:700;}
.sb-item{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:var(--r);cursor:pointer;color:var(--text2);font-size:13px;margin:1px 6px;transition:background .12s,color .12s;}
.sb-item:hover{background:var(--bg3);color:var(--text);}.sb-item.active{background:var(--acc-lt);color:var(--acc-txt);font-weight:700;}
.sb-badge{margin-left:auto;background:var(--acc);color:#fff;border-radius:10px;padding:1px 6px;font-size:10px;font-weight:700;}
.sb-new{margin-left:auto;background:#EAF3DE;color:#3B6D11;border-radius:10px;padding:1px 6px;font-size:10px;font-weight:700;}
#main{flex:1;overflow-y:auto;overflow-x:hidden;background:var(--bg);min-width:0;}
.page{display:none;padding:22px 28px 140px;width:100%;box-sizing:border-box;}.page.active{display:block;}
.ph{margin-bottom:18px;background:var(--card);border-radius:var(--r);padding:14px 16px;border:var(--card-border)!important;box-shadow:var(--card-shadow)!important;}.ph .pt{font-size:18px;font-weight:700;margin-bottom:3px;}.ph .ps{font-size:12px;color:var(--text3);}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.g3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;}
.g4{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.g5{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;}
.gauto{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:10px;}
.card{background:var(--card);border:var(--card-border)!important;border-radius:var(--rl);padding:14px 16px;margin-bottom:14px;box-shadow:var(--card-shadow)!important;overflow:visible;}
.card table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;background:var(--card);}
.modal-inner{background:var(--card);border-radius:var(--rl);padding:22px;width:560px;max-width:95vw;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.3);}
.card-hl{border-left:3px solid var(--acc);border-radius:0 var(--rl) var(--rl) 0;}
.ct{font-size:11px;color:var(--text3);font-weight:700;text-transform:uppercase;letter-spacing:.05em;margin-bottom:10px;display:flex;align-items:center;gap:6px;}
.fl-lbl{font-size:11px;color:var(--text2);font-weight:700;margin-bottom:4px;display:block;}
.fl-grp{display:flex;flex-direction:column;gap:3px;margin-bottom:10px;}
input,select,textarea{font-size:13px;padding:7px 10px;border-radius:var(--r);border:.5px solid var(--border2);background:var(--card);color:var(--text);width:100%;font-family:var(--font);}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--acc);box-shadow:0 0 0 2px rgba(180,83,9,.12);}
textarea{resize:vertical;min-height:70px;}
.btn{display:inline-flex;align-items:center;gap:5px;padding:7px 12px;border-radius:var(--r);font-size:12px;cursor:pointer;border:.5px solid var(--border2);background:transparent;color:var(--text);font-family:var(--font);transition:background .12s;}
.btn:hover{background:var(--bg2);}.btn.ba{background:var(--acc);color:#fff;border-color:transparent;}.btn.ba:hover{background:var(--acc-dk);}
.btn.sm{padding:4px 9px;font-size:11px;}.btn-row{display:flex;gap:8px;flex-wrap:wrap;}
.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:700;}
.b-am{background:var(--acc-lt);color:var(--acc-txt);}.b-bl{background:#E6F1FB;color:#185FA5;}.b-gr{background:#EAF3DE;color:#3B6D11;}
.b-rd{background:#FCEBEB;color:#A32D2D;}.b-gy{background:var(--bg3);color:var(--text2);}.b-pk{background:#FBEAF0;color:#993556;}.b-te{background:#E1F5EE;color:#0F6E56;}
table{width:100%;border-collapse:collapse;font-size:13px;}
th{text-align:left;font-size:11px;color:var(--text3);font-weight:700;padding:6px 10px;border-bottom:.5px solid var(--border);text-transform:uppercase;letter-spacing:.05em;}
td{padding:9px 10px;border-bottom:.5px solid var(--border);vertical-align:middle;}
tr:last-child td{border-bottom:none;}tr:hover td{background:var(--bg2);}
.divider{height:.5px;background:var(--border);margin:12px 0;}
.tag{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:20px;font-size:11px;background:var(--bg3);color:var(--text2);}
.pill{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:20px;border:.5px solid var(--border2);cursor:pointer;font-size:12px;color:var(--text2);transition:all .12s;}
.pill:hover{border-color:var(--acc);color:var(--acc);}.pill.on{background:var(--acc-lt);color:var(--acc-txt);border-color:var(--acc);font-weight:700;}
.stars{color:var(--acc);letter-spacing:1px;}
.metric{background:var(--card);border:var(--card-border);border-radius:var(--r);padding:14px 16px;box-shadow:var(--card-shadow);cursor:pointer;transition:box-shadow .12s;}
.metric:hover{box-shadow:0 4px 16px rgba(0,0,0,.12);}
.metric-lbl{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text3);margin-bottom:8px;line-height:1.3;}
.metric-val{font-size:28px;font-weight:800;color:var(--text);line-height:1;}
.metric-val{font-size:22px;font-weight:700;}.metric-lbl{font-size:11px;color:var(--text3);margin-bottom:3px;}.metric-sub{font-size:11px;margin-top:2px;}
.avatar{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;flex-shrink:0;}
.av-am{background:#FAEEDA;color:#854F0B;}.av-bl{background:#E6F1FB;color:#185FA5;}.av-te{background:#E1F5EE;color:#0F6E56;}.av-pk{background:#FBEAF0;color:#993556;}
.progress-wrap{height:5px;background:var(--bg3);border-radius:3px;overflow:hidden;}
.progress-fill{height:100%;background:var(--acc);border-radius:3px;transition:width .5s;}
.cb{width:16px;height:16px;border-radius:4px;border:.5px solid var(--border2);cursor:pointer;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:var(--card);}
.cb.on{background:var(--acc);border-color:var(--acc);}.cb.on::after{content:'✓';font-size:10px;color:#fff;}
.upload-zone{border:1.5px dashed var(--border2);border-radius:var(--rl);padding:28px 20px;text-align:center;cursor:pointer;background:var(--bg2);transition:all .15s;}
.upload-zone:hover,.upload-zone.drag{border-color:var(--acc);background:var(--acc-lt);}
.tab-bar{display:flex;border-bottom:var(--card-border)!important;margin-bottom:18px;overflow-x:auto;background:var(--card);border-radius:var(--r) var(--r) 0 0;padding:0 4px;position:sticky;top:0;z-index:10;}
.tab{padding:9px 14px;font-size:13px;cursor:pointer;color:var(--text2);border-bottom:2px solid transparent;margin-bottom:-.5px;white-space:nowrap;transition:color .12s;}
.tab:hover{color:var(--text);}.tab.active{color:var(--acc);border-bottom-color:var(--acc);font-weight:700;}
.tab-panel{display:none;}.tab-panel.active{display:block;}
.info-box{background:var(--acc-lt);border:.5px solid var(--acc);border-radius:var(--r);padding:10px 12px;font-size:12px;color:var(--acc-txt);display:flex;gap:8px;align-items:flex-start;margin-bottom:12px;}
.success-box{background:#EAF3DE;border:.5px solid #3B6D11;border-radius:var(--r);padding:10px 12px;font-size:12px;color:#3B6D11;display:flex;gap:8px;align-items:flex-start;margin-bottom:12px;}
.g-thumb{aspect-ratio:1;border-radius:var(--r);background:var(--bg2);border:.5px solid var(--border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-size:11px;color:var(--text2);text-align:center;padding:10px;transition:all .12s;}
.g-thumb:hover{border-color:var(--acc);}.g-thumb.sel{border:2px solid var(--acc);background:var(--acc-lt);}
.g-thumb .prev-reel{background:#0f0f0f;border-radius:12px;width:140px;height:249px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;gap:8px;padding:14px;font-size:11px;text-align:center;flex-shrink:0;}
.prev-static{background:var(--bg3);border-radius:8px;width:200px;height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:12px;color:var(--text2);padding:14px;border:.5px solid var(--border);flex-shrink:0;text-align:center;}
.prev-thread{background:var(--card);border-radius:10px;border:.5px solid var(--border);padding:12px;font-size:12px;}
.q-item{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:.5px solid var(--border);}
.q-item:last-child{border-bottom:none;}
.prov{background:var(--card);border:var(--card-border)!important;border-radius:var(--r);padding:12px 14px;margin-bottom:8px;transition:all .15s;position:relative;box-shadow:var(--card-shadow)!important;}
.prov:hover{border-color:var(--acc);}
.ev-card{background:var(--card);border:var(--card-border)!important;border-radius:var(--r);padding:12px 14px;margin-bottom:8px;display:flex;gap:12px;align-items:flex-start;position:relative;box-shadow:var(--card-shadow)!important;}
.ev-date{text-align:center;min-width:44px;flex-shrink:0;}.ev-date .mo{font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;}.ev-date .dy{font-size:22px;font-weight:700;line-height:1.1;}
.sop-card{border:.5px solid var(--border);border-radius:var(--r);padding:14px;margin-bottom:8px;cursor:pointer;transition:border-color .12s;}
.sop-card:hover{border-color:var(--acc);}
.sop-body{display:none;margin-top:10px;padding-top:10px;border-top:.5px solid var(--border);}
.sop-step{display:flex;gap:10px;padding:7px 0;border-bottom:.5px solid var(--border);font-size:12px;}
.sop-step:last-child{border-bottom:none;}
.sop-step-num{width:20px;height:20px;border-radius:50%;background:var(--acc-lt);color:var(--acc-txt);font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.author-profile-card{background:var(--card);border:var(--card-border)!important;border-radius:var(--rl);padding:16px;margin-bottom:14px;position:relative;box-shadow:var(--card-shadow)!important;}
.score-dots{display:flex;gap:3px;}.dot{width:8px;height:8px;border-radius:50%;}.dot-on{background:var(--acc);}.dot-off{background:var(--border2);}
.countdown-box{text-align:center;background:var(--bg2);border-radius:var(--r);padding:12px 8px;}
.countdown-num{font-size:26px;font-weight:700;color:var(--acc);}.countdown-lbl{font-size:10px;color:var(--text3);margin-top:2px;}
.leader-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:.5px solid var(--border);}
.leader-row:last-child{border-bottom:none;}.rank{font-size:14px;font-weight:700;width:22px;color:var(--text3);}.rank.gold{color:var(--acc);}
.wired-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:20px;font-size:10px;background:#EAF3DE;color:#3B6D11;font-weight:700;}
.toast{position:fixed;bottom:20px;right:20px;background:var(--text);color:#fff;padding:10px 16px;border-radius:var(--r);font-size:13px;z-index:9999;display:none;align-items:center;gap:8px;box-shadow:0 4px 20px rgba(0,0,0,.2);}
.toast.show{display:flex;}
.milestone-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:.5px solid var(--border);}
.milestone-row:last-child{border-bottom:none;}
.tour-dot-wrap{display:flex;flex-direction:column;align-items:center;width:20px;flex-shrink:0;}
.tour-dot{width:10px;height:10px;border-radius:50%;border:2px solid var(--acc);background:var(--acc-lt);margin-top:4px;}
.tour-dot.done{background:var(--acc);}.tour-vert{width:1px;background:var(--border);flex:1;min-height:28px;}
.tour-stop-row{display:flex;gap:10px;padding-bottom:0;}
.nl-stat{background:var(--bg2);border-radius:var(--r);padding:10px 12px;text-align:center;}
.nl-val{font-size:18px;font-weight:700;color:var(--acc);}.nl-lbl{font-size:10px;color:var(--text3);margin-top:2px;}
@media(max-width:700px){
 #mob-topbar{display:flex!important;}
 #app-row{flex-direction:column;overflow:visible;}
 #sidebar{display:none!important;position:fixed;top:0;left:0;height:100vh;z-index:500;width:260px;box-shadow:4px 0 20px rgba(0,0,0,.2);}
 #sidebar.mob-open{display:flex!important;}
 #mob-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:499;}
 #mob-overlay.show{display:block;}
 #main{overflow-y:auto;width:100%;height:calc(100vh - 48px);}
 .page{padding:14px 12px;}
 .g2,.g3,.g4,.g5{grid-template-columns:1fr;}
 .gauto{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));}
 .tab-bar{gap:0;overflow-x:auto;}
 .tab{padding:8px 10px;font-size:12px;}
 table{font-size:12px;}
 th,td{padding:7px 8px;}
 .card{padding:12px;}
 .metric-val{font-size:18px;}
 .ph .pt{font-size:16px;}
 .btn-row{flex-wrap:wrap;}
 .prev-reel{width:120px;height:213px;}
 .prev-static{width:160px;height:160px;}
}
@media(min-width:701px){
 #mob-topbar{display:none!important;}
 #mob-overlay{display:none!important;}
}
#mob-topbar{
 position:sticky;top:0;z-index:400;
 background:var(--bg2);border-bottom:.5px solid var(--border);
 padding:10px 14px;align-items:center;gap:10px;
 display:none;
 flex-shrink:0;
}
#mob-menu-btn{
 width:36px;height:36px;border:none;background:transparent;cursor:pointer;
 align-items:center;justify-content:center;color:var(--text);font-size:22px;flex-shrink:0;
 display:flex;
}
#mob-title{font-weight:700;font-size:14px;flex:1;}
body.has-bg-img #main > .page.active > *:not(.card):not(.ph):not(.tab-bar):not(.btn-row) {
 position:relative;
 z-index:1;
}
body.has-bg-img .tab-bar{background:var(--card)!important;backdrop-filter:blur(4px);}
body.has-bg-img th{background:var(--bg2)!important;}
body.has-bg-img .leader-row{background:var(--card);}
body.has-bg-img .sb-item:hover{background:var(--bg3)!important;}
.tab{background:var(--card);border-radius:var(--r) var(--r) 0 0;}
.tab.active{background:var(--card);}
.btn-row{background:var(--card);border:var(--card-border)!important;border-radius:var(--r);padding:8px 10px;margin-bottom:10px;box-shadow:var(--card-shadow)!important;}
.fl-grp{background:var(--card);border:var(--card-border)!important;border-radius:var(--r);padding:8px 10px;margin-bottom:8px;}
.fl-lbl{background:transparent;font-weight:700;font-size:11px;color:var(--text3);display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:.04em;}
input, select{background:var(--card);border:.5px solid var(--border2);border-radius:var(--r);padding:7px 10px;font-size:13px;color:var(--text);font-family:var(--font);width:100%;}
textarea{background:var(--card);border:.5px solid var(--border2);border-radius:var(--r);padding:8px 10px;font-size:13px;color:var(--text);font-family:var(--font);width:100%;resize:vertical;}
input:focus, select:focus, textarea:focus{outline:none;border-color:var(--acc);box-shadow:0 0 0 2px var(--acc-lt);}
.sb-section{background:transparent;color:var(--text3);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;padding:12px 12px 4px;}
.badge{padding:2px 7px;border-radius:20px;font-size:11px;font-weight:700;border:.5px solid transparent;}
.b-gr{background:#DCFCE7;color:#166534;border-color:#BBF7D0;}
.b-am{background:#FEF9C3;color:#854D0E;border-color:#FDE68A;}
.b-rd{background:#FEE2E2;color:#991B1B;border-color:#FECACA;}
.b-bl{background:#DBEAFE;color:#1E40AF;border-color:#BFDBFE;}
.b-pk{background:#FCE7F3;color:#9D174D;border-color:#F9A8D4;}
.b-gy{background:#F3F4F6;color:#374151;border-color:#E5E7EB;}
.b-te{background:#F0FDF4;color:#065F46;border-color:#A7F3D0;}
.metric-lbl{color:var(--text3);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px;}
.metric-val{color:var(--text);font-size:22px;font-weight:800;line-height:1.1;}
blockquote{background:var(--card);border-left:3px solid var(--acc);border-radius:0 var(--r) var(--r) 0;padding:10px 14px;margin:8px 0;color:var(--text2);}
.ct{background:transparent;font-size:13px;font-weight:800;color:var(--text);display:flex;align-items:center;gap:7px;margin-bottom:12px;padding-bottom:8px;border-bottom:.5px solid var(--border);}
th{background:var(--bg2);color:var(--text);font-weight:700;font-size:12px;padding:8px 12px;text-align:left;border-bottom:.5px solid var(--border);}
td{background:var(--card);color:var(--text2);font-size:13px;padding:8px 12px;border-bottom:.5px solid var(--border);}
tr:hover td{background:var(--bg2);}
.ps{color:var(--text3);font-size:13px;margin-top:4px;}
.pt{font-size:18px;font-weight:800;color:var(--text);}
.modal-inner .fl-grp, [style*="position:fixed"] .fl-grp{background:transparent;border:none;padding:0;margin-bottom:12px;}
#sidebar .sb-section{color:var(--text3);}
#sidebar .sb-item{color:var(--text);border-radius:var(--r);}
.leader-row{background:var(--card);border-bottom:.5px solid var(--border);padding:10px 4px;display:flex;align-items:center;gap:10px;}
.tag{background:var(--bg2);color:var(--text2);border:.5px solid var(--border);border-radius:4px;padding:2px 8px;font-size:12px;}
.pill{background:var(--bg2);color:var(--text2);border:.5px solid var(--border);border-radius:20px;padding:3px 10px;font-size:12px;cursor:pointer;}
.pill.on{background:var(--acc);color:#fff;border-color:var(--acc);}
.info-box{background:var(--acc-lt);border:var(--card-border)!important;border-radius:var(--r);padding:10px 14px;font-size:12px;color:var(--text2);display:flex;gap:8px;align-items:flex-start;box-shadow:var(--card-shadow)!important;}
.success-box{background:#DCFCE7;border:.5px solid #BBF7D0;border-radius:var(--r);padding:14px;color:#166534;display:flex;gap:12px;align-items:flex-start;}
.countdown-box{background:var(--card);border:.5px solid var(--border);border-radius:var(--r);padding:12px;text-align:center;}
.countdown-num{font-size:28px;font-weight:800;color:var(--acc);}
.countdown-lbl{font-size:11px;color:var(--text3);margin-top:4px;}
.nl-stat{background:var(--card);border:.5px solid var(--border);border-radius:var(--r);padding:10px;}
.nl-val{font-size:20px;font-weight:800;color:var(--text);}
.nl-lbl{font-size:11px;color:var(--text3);}
.dot{width:8px;height:8px;border-radius:50%;}
.dot-on{background:var(--acc);}
.divider{height:.5px;background:var(--border);margin:12px 0;}
.upload-zone{background:var(--bg2);border:1.5px dashed var(--border2);border-radius:var(--r);padding:28px;text-align:center;cursor:pointer;transition:all .15s;}
.upload-zone.drag,.upload-zone:hover{border-color:var(--acc);background:var(--acc-lt);}
.q-item{background:var(--card);border:.5px solid var(--border);border-radius:var(--r);padding:10px 12px;display:flex;align-items:center;gap:10px;margin-bottom:6px;}
.prev-reel{background:linear-gradient(180deg,var(--bg3) 0,var(--bg2) 100%);border:.5px solid var(--border);border-radius:var(--r);padding:20px 16px;width:160px;min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;}
.prev-static{background:var(--bg2);border:.5px solid var(--border);border-radius:var(--r);padding:20px;width:200px;height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;}
.prev-thread{background:var(--card);border:.5px solid var(--border);border-radius:var(--rl);padding:16px;}
.score-dots{display:flex;gap:3px;}
body.theme-dark-academia,body.theme-dark-romance,body.theme-scifi,body.theme-astronomy,body.theme-emo-girl{color:var(--text);}
body.theme-dark-academia .card,body.theme-dark-romance .card,body.theme-scifi .card,body.theme-astronomy .card,body.theme-emo-girl .card{background:var(--card)!important;border:var(--card-border)!important;}
body.theme-dark-academia .author-profile-card,body.theme-dark-romance .author-profile-card,body.theme-scifi .author-profile-card,body.theme-astronomy .author-profile-card,body.theme-emo-girl .author-profile-card{background:var(--card)!important;border-color:var(--border2)!important;}
body.theme-dark-academia .ev-card,body.theme-dark-romance .ev-card,body.theme-scifi .ev-card,body.theme-astronomy .ev-card,body.theme-emo-girl .ev-card{background:var(--card)!important;}
body.theme-dark-academia .prov,body.theme-dark-romance .prov,body.theme-scifi .prov,body.theme-astronomy .prov,body.theme-emo-girl .prov{background:var(--card)!important;}
body.theme-dark-academia #sidebar,body.theme-dark-romance #sidebar,body.theme-scifi #sidebar,body.theme-astronomy #sidebar,body.theme-emo-girl #sidebar{background:var(--bg2)!important;}
body.theme-dark-academia input,body.theme-dark-academia select,body.theme-dark-academia textarea,
body.theme-dark-romance input,body.theme-dark-romance select,body.theme-dark-romance textarea,
body.theme-scifi input,body.theme-scifi select,body.theme-scifi textarea,
body.theme-astronomy input,body.theme-astronomy select,body.theme-astronomy textarea,
body.theme-emo-girl input,body.theme-emo-girl select,body.theme-emo-girl textarea{background:var(--bg2)!important;color:var(--text)!important;border-color:var(--border2)!important;}
body.theme-dark-academia th,body.theme-dark-romance th,body.theme-scifi th,body.theme-astronomy th,body.theme-emo-girl th{background:var(--bg3)!important;color:var(--text)!important;}
body.theme-dark-academia td,body.theme-dark-romance td,body.theme-scifi td,body.theme-astronomy td,body.theme-emo-girl td{background:var(--card)!important;color:var(--text2)!important;}
body.theme-dark-academia .ph,body.theme-dark-romance .ph,body.theme-scifi .ph,body.theme-astronomy .ph,body.theme-emo-girl .ph{background:var(--card)!important;}
body.theme-dark-academia .tab-bar,body.theme-dark-romance .tab-bar,body.theme-scifi .tab-bar,body.theme-astronomy .tab-bar,body.theme-emo-girl .tab-bar{background:var(--bg2)!important;}
body.theme-dark-academia .metric,body.theme-dark-romance .metric,body.theme-scifi .metric,body.theme-astronomy .metric,body.theme-emo-girl 
body.theme-dark-academia .fl-grp,body.theme-dark-romance .fl-grp,body.theme-scifi .fl-grp,body.theme-astronomy .fl-grp,body.theme-emo-girl .fl-grp{background:var(--bg2)!important;border-color:var(--border2)!important;}
body.theme-dark-academia .btn-row,body.theme-dark-romance .btn-row,body.theme-scifi .btn-row,body.theme-astronomy .btn-row,body.theme-emo-girl .btn-row{background:var(--bg2)!important;border-color:var(--border)!important;}
body.theme-cottagecore .card,body.theme-ocean .card,body.theme-rose-gold .card,body.theme-contemp-romance .card,body.theme-clean-girl .card{background:#FFFFFF!important;border:var(--card-border)!important;}
body.theme-cottagecore #sidebar{background:#E8F0E4!important;}
body.theme-ocean #sidebar{background:#D6EAF8!important;}
body.theme-rose-gold #sidebar{background:#FAE5D3!important;}
body.theme-contemp-romance #sidebar{background:#F8E6F0!important;}
body.theme-clean-girl #sidebar{background:#F0EDEA!important;}

/* ── Component & overlay styles ─────────────────────────────────────────── */
/* Auth gate display controlled by JS only — do not set display:none on #app-row here */
/* Glass card effect - all card-like elements */
body.card-glass .card,body.card-glass .prov,body.card-glass .ev-card,body.card-glass .author-profile-card,body.card-glass .metric{backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;}
/* Card shadow on all card-like elements */
.prov,.ev-card,.author-profile-card{box-shadow:var(--card-shadow)!important;}

/* ── UNIVERSAL CARD STYLE CONSISTENCY ──
   Every card-like container respects the --card-border and --card-shadow variables.
   This ensures card style selection works across every page and every theme. */
.card, .prov, .ev-card, .author-profile-card, .metric, .ph, .btn-row, .countdown-box, .nl-stat, .leader-row, .info-box, .success-box, .q-item {
  border: var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
  background: var(--card);
}
/* Tab bar uses card bg but only bottom border */
.tab-bar { background: var(--card); }
/* Form groups get card styling too */
.fl-grp { border: var(--card-border) !important; background: var(--card); }
/* Modal inner areas stay clean */
.modal-inner, [id$="-modal"] .fl-grp { border: none !important; background: transparent; box-shadow: none !important; }

/* ── MOBILE BOTTOM BUFFER ── clears iPhone home bar & browser chrome */
@media(max-width:700px){
  .page{padding:14px 12px 160px;}
  #main{
    padding-bottom:calc(80px + env(safe-area-inset-bottom, 34px));
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  #sidebar{
    height:100vh;
    padding-bottom:calc(180px + env(safe-area-inset-bottom, 34px)) !important;
    overflow-y:auto !important;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
  }
  /* Give the sidebar bottom section even more breathing room on mobile */
  #sidebar > div[style*="margin-top:auto"]{
    padding-bottom:100px !important;
  }
}
@media(min-width:1400px){
  .g2{grid-template-columns:1fr 1fr;}
  .g3{grid-template-columns:1fr 1fr 1fr;}
  .g4{grid-template-columns:repeat(4,1fr);}
  .g5{grid-template-columns:repeat(5,1fr);}
  .page{padding:24px 36px;}
}
@media(min-width:1800px){
  .g2{grid-template-columns:1fr 1fr;}
  .g3{grid-template-columns:1fr 1fr 1fr;}
  .page{padding:28px 48px;}
}
/* Author cards, book rows, provider cards fill width */
#authors-list, #books-table-wrap, #editors-list, #designers-list, #charart-list, #pr-list {
  width:100%;
}

/* ── Layout integrity — ensures main content always fills remaining width ── */
@media(min-width:701px){
  #app-row{display:flex!important;flex-direction:row!important;overflow:hidden;}
  #main{flex:1!important;min-width:0!important;width:auto!important;overflow-y:auto;overflow-x:hidden;}
  #sidebar{flex-shrink:0;width:var(--sidebar-width);}
}
#banner-spacer{display:block;width:100%;flex-shrink:0;}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT LOCK — These rules are final authority on page layout.
   They ensure #app-row and #main always fill 100% of the viewport.
   Added at end of file so they override all earlier conflicting rules.
═══════════════════════════════════════════════════════════════════════════ */

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
}

#app-row {
  width: 100% !important;
  flex: 1 1 auto !important;
  flex-direction: row !important;
  overflow: hidden !important;
  min-height: 0 !important;
}
/* When app-row is shown (JS sets display:flex), ensure it's always a row */
#app-row[style*="display: flex"],
#app-row[style*="display:flex"] {
  flex-direction: row !important;
  width: 100% !important;
}

#sidebar {
  flex-shrink: 0 !important;
  width: var(--sidebar-width) !important;
  min-width: 0 !important;
}

#main {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.page {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ── STICKY NOTES — dark theme legibility ───────────────────────────────── */
/* Textarea: light text on dark background */
body.theme-dark #sticky-note-area,
body.theme-dark-academia #sticky-note-area,
body.theme-dark-romance #sticky-note-area,
body.theme-scifi #sticky-note-area,
body.theme-astronomy #sticky-note-area,
body.theme-emo-girl #sticky-note-area,
body.theme-suicide-awareness #sticky-note-area,
body.theme-black-excellence #sticky-note-area {
  background: rgba(255,255,255,.08) !important;
  color: #F0EEF8 !important;
  border-color: rgba(255,255,255,.2) !important;
}

/* Placeholder text */
body.theme-dark #sticky-note-area::placeholder,body.theme-dark-academia #sticky-note-area::placeholder,body.theme-dark-romance #sticky-note-area::placeholder,body.theme-scifi #sticky-note-area::placeholder,body.theme-astronomy #sticky-note-area::placeholder,body.theme-emo-girl #sticky-note-area::placeholder,body.theme-suicide-awareness #sticky-note-area::placeholder,body.theme-black-excellence #sticky-note-area::placeholder {
  color: rgba(255,255,255,.35) !important;
}

/* Formatting toolbar buttons */
body.theme-dark [onclick*="insertStickyFormat"],body.theme-dark-academia [onclick*="insertStickyFormat"],body.theme-dark-romance [onclick*="insertStickyFormat"],body.theme-scifi [onclick*="insertStickyFormat"],body.theme-astronomy [onclick*="insertStickyFormat"],body.theme-emo-girl [onclick*="insertStickyFormat"],body.theme-suicide-awareness [onclick*="insertStickyFormat"],body.theme-black-excellence [onclick*="insertStickyFormat"] {
  background: rgba(255,255,255,.1) !important;
  color: #F0EEF8 !important;
  border-color: rgba(255,255,255,.2) !important;
}

/* Clear button */
body.theme-dark [onclick*="clearStickyNote"],body.theme-dark-academia [onclick*="clearStickyNote"],body.theme-dark-romance [onclick*="clearStickyNote"],body.theme-scifi [onclick*="clearStickyNote"],body.theme-astronomy [onclick*="clearStickyNote"],body.theme-emo-girl [onclick*="clearStickyNote"],body.theme-suicide-awareness [onclick*="clearStickyNote"],body.theme-black-excellence [onclick*="clearStickyNote"] {
  color: #FF8080 !important;
}

/* ── Firefox scrolling fix ───────────────────────────────────────────────── */
@-moz-document url-prefix() {
  #main {
    overflow-y: scroll !important;
    scrollbar-width: thin;
  }
  .page {
    min-height: 0;
    overflow: visible;
  }
  #app-row {
    overflow: hidden !important;
  }
}

/* ── Dark theme — modal & customize panel legibility ──────────────────────── */
body.theme-dark .modal-inner input, body.theme-dark .modal-inner select, body.theme-dark .modal-inner textarea,
body.theme-dark-academia .modal-inner input, body.theme-dark-academia .modal-inner select, body.theme-dark-academia .modal-inner textarea,
body.theme-dark-romance .modal-inner input, body.theme-dark-romance .modal-inner select, body.theme-dark-romance .modal-inner textarea,
body.theme-scifi .modal-inner input, body.theme-scifi .modal-inner select, body.theme-scifi .modal-inner textarea,
body.theme-astronomy .modal-inner input, body.theme-astronomy .modal-inner select, body.theme-astronomy .modal-inner textarea,
body.theme-emo-girl .modal-inner input, body.theme-emo-girl .modal-inner select, body.theme-emo-girl .modal-inner textarea,
body.theme-suicide-awareness .modal-inner input, body.theme-suicide-awareness .modal-inner select, body.theme-suicide-awareness .modal-inner textarea,
body.theme-black-excellence .modal-inner input, body.theme-black-excellence .modal-inner select, body.theme-black-excellence .modal-inner textarea {
  background: rgba(255,255,255,.08) !important;
  color: #F0EEF8 !important;
  border-color: rgba(255,255,255,.2) !important;
}
body.theme-dark .modal-inner label, body.theme-dark .modal-inner .fl-lbl,
body.theme-dark-academia .modal-inner label, body.theme-dark-academia .modal-inner .fl-lbl,
body.theme-dark-romance .modal-inner label, body.theme-dark-romance .modal-inner .fl-lbl,
body.theme-scifi .modal-inner label, body.theme-scifi .modal-inner .fl-lbl,
body.theme-astronomy .modal-inner label, body.theme-astronomy .modal-inner .fl-lbl,
body.theme-emo-girl .modal-inner label, body.theme-emo-girl .modal-inner .fl-lbl,
body.theme-suicide-awareness .modal-inner label, body.theme-suicide-awareness .modal-inner .fl-lbl,
body.theme-black-excellence .modal-inner label, body.theme-black-excellence .modal-inner .fl-lbl {
  color: #D0CDE8 !important;
}
/* Range/slider inputs on dark themes */
body.theme-dark input[type=range],body.theme-dark-academia input[type=range],body.theme-dark-romance input[type=range],body.theme-scifi input[type=range],body.theme-astronomy input[type=range],body.theme-emo-girl input[type=range],body.theme-suicide-awareness input[type=range],body.theme-black-excellence input[type=range] {
  accent-color: var(--acc) !important;
}
/* Number inputs (tile size W/H boxes) */
body.theme-dark input[type=number],body.theme-dark-academia input[type=number],body.theme-dark-romance input[type=number],body.theme-scifi input[type=number],body.theme-astronomy input[type=number],body.theme-emo-girl input[type=number],body.theme-suicide-awareness input[type=number],body.theme-black-excellence input[type=number] {
  background: rgba(255,255,255,.1) !important;
  color: #F0EEF8 !important;
  border-color: rgba(255,255,255,.25) !important;
}
/* Text inside customize sections */
body.theme-dark #customize-modal .fl-lbl,body.theme-dark-academia #customize-modal .fl-lbl,body.theme-dark-romance #customize-modal .fl-lbl,body.theme-scifi #customize-modal .fl-lbl,body.theme-astronomy #customize-modal .fl-lbl,body.theme-emo-girl #customize-modal .fl-lbl,body.theme-suicide-awareness #customize-modal .fl-lbl,body.theme-black-excellence #customize-modal .fl-lbl,
body.theme-dark #customize-modal [style*="color:var(--text3)"],body.theme-dark-academia #customize-modal [style*="color:var(--text3)"],body.theme-dark-romance #customize-modal [style*="color:var(--text3)"],body.theme-scifi #customize-modal [style*="color:var(--text3)"],body.theme-astronomy #customize-modal [style*="color:var(--text3)"],body.theme-emo-girl #customize-modal [style*="color:var(--text3)"],body.theme-suicide-awareness #customize-modal [style*="color:var(--text3)"],body.theme-black-excellence #customize-modal [style*="color:var(--text3)"] {
  color: rgba(220,215,240,.7) !important;
}
/* Customize panel bg-fit buttons */
body.theme-dark #customize-modal button,body.theme-dark-academia #customize-modal button,body.theme-dark-romance #customize-modal button,body.theme-scifi #customize-modal button,body.theme-astronomy #customize-modal button,body.theme-emo-girl #customize-modal button,body.theme-suicide-awareness #customize-modal button,body.theme-black-excellence #customize-modal button {
  color: #F0EEF8 !important;
  border-color: rgba(255,255,255,.2) !important;
}
body.theme-dark #customize-modal button.active-fit, body.theme-dark #customize-modal button[style*="var(--acc)"],body.theme-dark-academia #customize-modal button.active-fit, body.theme-dark-academia #customize-modal button[style*="var(--acc)"],body.theme-dark-romance #customize-modal button.active-fit, body.theme-dark-romance #customize-modal button[style*="var(--acc)"],body.theme-scifi #customize-modal button.active-fit, body.theme-scifi #customize-modal button[style*="var(--acc)"],body.theme-astronomy #customize-modal button.active-fit, body.theme-astronomy #customize-modal button[style*="var(--acc)"],body.theme-emo-girl #customize-modal button.active-fit, body.theme-emo-girl #customize-modal button[style*="var(--acc)"],body.theme-suicide-awareness #customize-modal button.active-fit, body.theme-suicide-awareness #customize-modal button[style*="var(--acc)"],body.theme-black-excellence #customize-modal button.active-fit, body.theme-black-excellence #customize-modal button[style*="var(--acc)"] {
  color: #fff !important;
}

/* ── Dark theme — customize modal section headers, upload area, pattern grid ── */
/* Shared dark theme selector shorthand */
body.theme-dark #customize-modal, body.theme-dark-academia #customize-modal,
body.theme-dark-romance #customize-modal, body.theme-scifi #customize-modal,
body.theme-astronomy #customize-modal, body.theme-emo-girl #customize-modal,
body.theme-suicide-awareness #customize-modal, body.theme-black-excellence #customize-modal {
  background: #0D0D0D !important;
  color: #E2E0F0 !important;
}
body.theme-dark #customize-modal > div, body.theme-dark-academia #customize-modal > div,
body.theme-dark-romance #customize-modal > div, body.theme-scifi #customize-modal > div,
body.theme-astronomy #customize-modal > div, body.theme-emo-girl #customize-modal > div,
body.theme-suicide-awareness #customize-modal > div, body.theme-black-excellence #customize-modal > div {
  background: #0D0D0D !important;
}
/* Section header labels (uppercase track labels) */
body.theme-dark #customize-modal [style*="text-transform:uppercase"],
body.theme-dark-academia #customize-modal [style*="text-transform:uppercase"],
body.theme-dark-romance #customize-modal [style*="text-transform:uppercase"],
body.theme-scifi #customize-modal [style*="text-transform:uppercase"],
body.theme-astronomy #customize-modal [style*="text-transform:uppercase"],
body.theme-emo-girl #customize-modal [style*="text-transform:uppercase"],
body.theme-suicide-awareness #customize-modal [style*="text-transform:uppercase"],
body.theme-black-excellence #customize-modal [style*="text-transform:uppercase"] {
  color: rgba(200,195,230,.6) !important;
}
/* Helper/description text */
body.theme-dark #customize-modal [style*="color:var(--text2)"],
body.theme-dark-academia #customize-modal [style*="color:var(--text2)"],
body.theme-dark-romance #customize-modal [style*="color:var(--text2)"],
body.theme-scifi #customize-modal [style*="color:var(--text2)"],
body.theme-astronomy #customize-modal [style*="color:var(--text2)"],
body.theme-emo-girl #customize-modal [style*="color:var(--text2)"],
body.theme-suicide-awareness #customize-modal [style*="color:var(--text2)"],
body.theme-black-excellence #customize-modal [style*="color:var(--text2)"] {
  color: #C0BCDC !important;
}
/* bg-upload-preview area background */
body.theme-dark #customize-modal #bg-upload-preview,
body.theme-dark-academia #customize-modal #bg-upload-preview,
body.theme-dark-romance #customize-modal #bg-upload-preview,
body.theme-scifi #customize-modal #bg-upload-preview,
body.theme-astronomy #customize-modal #bg-upload-preview,
body.theme-emo-girl #customize-modal #bg-upload-preview,
body.theme-suicide-awareness #customize-modal #bg-upload-preview,
body.theme-black-excellence #customize-modal #bg-upload-preview {
  color: #E2E0F0 !important;
}
body.theme-dark #customize-modal [style*="background:var(--bg2)"],
body.theme-dark-academia #customize-modal [style*="background:var(--bg2)"],
body.theme-dark-romance #customize-modal [style*="background:var(--bg2)"],
body.theme-scifi #customize-modal [style*="background:var(--bg2)"],
body.theme-astronomy #customize-modal [style*="background:var(--bg2)"],
body.theme-emo-girl #customize-modal [style*="background:var(--bg2)"],
body.theme-suicide-awareness #customize-modal [style*="background:var(--bg2)"],
body.theme-black-excellence #customize-modal [style*="background:var(--bg2)"] {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.12) !important;
}
/* Sharp/Pill range slider labels */
body.theme-dark #customize-modal span[style*="font-size:11px"],
body.theme-dark-academia #customize-modal span[style*="font-size:11px"],
body.theme-dark-romance #customize-modal span[style*="font-size:11px"],
body.theme-scifi #customize-modal span[style*="font-size:11px"],
body.theme-astronomy #customize-modal span[style*="font-size:11px"],
body.theme-emo-girl #customize-modal span[style*="font-size:11px"],
body.theme-suicide-awareness #customize-modal span[style*="font-size:11px"],
body.theme-black-excellence #customize-modal span[style*="font-size:11px"] {
  color: #C0BCDC !important;
}
/* Remove image link */
body.theme-dark #customize-modal [onclick*="clearBgUpload"],
body.theme-dark-academia #customize-modal [onclick*="clearBgUpload"],
body.theme-dark-romance #customize-modal [onclick*="clearBgUpload"],
body.theme-scifi #customize-modal [onclick*="clearBgUpload"],
body.theme-astronomy #customize-modal [onclick*="clearBgUpload"],
body.theme-emo-girl #customize-modal [onclick*="clearBgUpload"],
body.theme-suicide-awareness #customize-modal [onclick*="clearBgUpload"],
body.theme-black-excellence #customize-modal [onclick*="clearBgUpload"] {
  color: #FF8080 !important;
}
/* Reset + Done footer */
body.theme-dark #customize-modal [onclick*="resetCustomizations"],
body.theme-dark-academia #customize-modal [onclick*="resetCustomizations"],
body.theme-dark-romance #customize-modal [onclick*="resetCustomizations"],
body.theme-scifi #customize-modal [onclick*="resetCustomizations"],
body.theme-astronomy #customize-modal [onclick*="resetCustomizations"],
body.theme-emo-girl #customize-modal [onclick*="resetCustomizations"],
body.theme-suicide-awareness #customize-modal [onclick*="resetCustomizations"],
body.theme-black-excellence #customize-modal [onclick*="resetCustomizations"] {
  color: #A09CC0 !important;
}
/* file input text */
body.theme-dark #customize-modal input[type="file"],
body.theme-dark-academia #customize-modal input[type="file"],
body.theme-dark-romance #customize-modal input[type="file"],
body.theme-scifi #customize-modal input[type="file"],
body.theme-astronomy #customize-modal input[type="file"],
body.theme-emo-girl #customize-modal input[type="file"],
body.theme-suicide-awareness #customize-modal input[type="file"],
body.theme-black-excellence #customize-modal input[type="file"] {
  color: #C0BCDC !important;
}
/* Card opacity label */
body.theme-dark #customize-modal #card-opacity-main-label,
body.theme-dark-academia #customize-modal #card-opacity-main-label,
body.theme-dark-romance #customize-modal #card-opacity-main-label,
body.theme-scifi #customize-modal #card-opacity-main-label,
body.theme-astronomy #customize-modal #card-opacity-main-label,
body.theme-emo-girl #customize-modal #card-opacity-main-label,
body.theme-suicide-awareness #customize-modal #card-opacity-main-label,
body.theme-black-excellence #customize-modal #card-opacity-main-label {
  color: #E2E0F0 !important;
}
/* Hex label for custom accent */
body.theme-dark #customize-modal #accent-hex-label,
body.theme-dark-academia #customize-modal #accent-hex-label,
body.theme-dark-romance #customize-modal #accent-hex-label,
body.theme-scifi #customize-modal #accent-hex-label,
body.theme-astronomy #customize-modal #accent-hex-label,
body.theme-emo-girl #customize-modal #accent-hex-label,
body.theme-suicide-awareness #customize-modal #accent-hex-label,
body.theme-black-excellence #customize-modal #accent-hex-label {
  color: #A09CC0 !important;
}
/* Sticky header in customize modal */
body.theme-dark #customize-modal [style*="position:sticky"],
body.theme-dark-academia #customize-modal [style*="position:sticky"],
body.theme-dark-romance #customize-modal [style*="position:sticky"],
body.theme-scifi #customize-modal [style*="position:sticky"],
body.theme-astronomy #customize-modal [style*="position:sticky"],
body.theme-emo-girl #customize-modal [style*="position:sticky"],
body.theme-suicide-awareness #customize-modal [style*="position:sticky"],
body.theme-black-excellence #customize-modal [style*="position:sticky"] {
  background: #0D0D0D !important;
  border-color: rgba(255,255,255,.1) !important;
}
body.theme-dark #customize-modal [style*="font-weight:800"],
body.theme-dark-academia #customize-modal [style*="font-weight:800"],
body.theme-dark-romance #customize-modal [style*="font-weight:800"],
body.theme-scifi #customize-modal [style*="font-weight:800"],
body.theme-astronomy #customize-modal [style*="font-weight:800"],
body.theme-emo-girl #customize-modal [style*="font-weight:800"],
body.theme-suicide-awareness #customize-modal [style*="font-weight:800"],
body.theme-black-excellence #customize-modal [style*="font-weight:800"] {
  color: #F0EEF8 !important;
}
body.theme-dark #customize-modal label,
body.theme-dark-academia #customize-modal label,
body.theme-dark-romance #customize-modal label,
body.theme-scifi #customize-modal label,
body.theme-astronomy #customize-modal label,
body.theme-emo-girl #customize-modal label,
body.theme-suicide-awareness #customize-modal label,
body.theme-black-excellence #customize-modal label {
  color: #C0BCDC !important;
}

/* ── ROTATING MARQUEE PROMO BANNER ───────────────────────────────────── */
@keyframes promo-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

#promo-marquee-track {
  animation: promo-marquee-scroll linear infinite;
  /* duration set dynamically via JS based on content width */
}

#promo-marquee-viewport:hover #promo-marquee-track,
#promo-banner.paused #promo-marquee-track {
  animation-play-state: paused;
}

.promo-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 28px;
  white-space: nowrap;
  font-size: 13px;
}

.promo-marquee-item .promo-m-emoji {
  font-size: 15px;
}

.promo-marquee-item .promo-m-title {
  font-weight: 700;
  letter-spacing: .01em;
}

.promo-marquee-item .promo-m-line {
  opacity: .9;
  font-size: 12px;
}

.promo-marquee-item .promo-m-link {
  background: rgba(255,255,255,.25);
  color: inherit;
  text-decoration: none;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border: .5px solid rgba(255,255,255,.4);
  transition: background .15s;
  margin-left: 4px;
}

.promo-marquee-item .promo-m-link:hover {
  background: rgba(255,255,255,.4);
}

.promo-marquee-sep {
  opacity: .35;
  padding: 0 4px;
}

@media (prefers-reduced-motion: reduce) {
  #promo-marquee-track {
    animation: none;
  }
}
