*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#0f172a;color:#e2e8f0}
header{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;padding:1rem;padding-top:max(1rem,env(safe-area-inset-top));background:#1e293b;position:sticky;top:0}
h1{font-size:1.25rem;margin:0}.actions{display:flex;gap:.4rem}
button{background:#3b82f6;color:#fff;border:0;border-radius:8px;padding:.55rem .9rem;font-size:.95rem;cursor:pointer}button:disabled{opacity:.5}
button.small{padding:.3rem .6rem;font-size:.8rem;background:#475569}button.del{background:#dc2626}
main{max-width:900px;margin:auto;padding:1rem}.meta{color:#94a3b8;font-size:.85rem}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:.8rem}
.card{background:#1e293b;border-radius:12px;padding:1rem}.card h3{margin:0 0 .4rem;display:flex;justify-content:space-between}
.row{display:flex;justify-content:space-between;font-size:.95rem;margin:.2rem 0}.muted{color:#94a3b8;font-size:.8rem}
.up{color:#22c55e}.down{color:#ef4444}.pct{font-size:1.1rem;font-weight:700}
section{margin-top:1.5rem;background:#1e293b;border-radius:12px;padding:1rem}
form{display:flex;flex-wrap:wrap;gap:.5rem}input,select{flex:1 1 140px;padding:.55rem;border-radius:8px;border:1px solid #475569;background:#0f172a;color:#e2e8f0;font-size:1rem}
table{width:100%;border-collapse:collapse;margin-top:1rem;font-size:.9rem}td,th{padding:.4rem;border-bottom:1px solid #334155;text-align:left}
.err{color:#f87171;min-height:1em}

.list{background:#1e293b;border-radius:12px;overflow:hidden}
.lrow{display:grid;grid-template-columns:minmax(3.2rem,.8fr) 1.6fr .9fr .9fr 1fr;gap:.4rem;align-items:center;padding:.6rem .7rem;border-bottom:1px solid #334155;font-variant-numeric:tabular-nums;font-size:.92rem}
.lrow:last-child{border-bottom:0}.lhead{font-size:.72rem;color:#94a3b8;text-transform:uppercase;padding:.4rem .7rem}
.r{text-align:right}.sym{font-weight:700}.sub{display:block;font-size:.7rem;color:#94a3b8}
@media(max-width:420px){.lrow{font-size:.8rem;gap:.25rem;padding:.55rem .5rem}.sub{font-size:.65rem}}
button.ccy{background:#0ea5e9;font-weight:700;margin-right:.6rem}
footer.fx{margin-top:1rem;text-align:center;font-size:.72rem}p.fx{font-size:.75rem;margin:.6rem 0 0}

/* ---- mobile-first layout v3: no header, bottom button bar ---- */
html{background:#0f172a}
body{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);min-height:100vh}
main{max-width:720px;padding:.5rem .5rem calc(1rem + env(safe-area-inset-bottom))}
.list{margin-top:.25rem}
.lrow{grid-template-columns:2.9rem minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.1fr);gap:.3rem;padding:.55rem .5rem;font-size:.84rem;white-space:nowrap}
.lrow>span{overflow:hidden;text-overflow:ellipsis}
.lhead{font-size:.66rem;padding:.4rem .5rem}
.sub{font-size:.68rem}
.bar{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem;margin:.75rem 0 .25rem}
.bar button{min-height:48px;font-size:1rem;font-weight:600;border-radius:12px;margin:0;padding:.5rem .3rem;touch-action:manipulation}
button.ccy{margin-right:0}
.meta{text-align:center;font-size:.75rem;margin:.35rem 0}
.inst{text-align:center;margin:0}
section button,section input{min-height:44px}
@media(min-width:600px){.lrow{font-size:1rem;padding:.75rem 1rem;grid-template-columns:4rem 1.6fr 1fr 1fr 1.1fr}.lhead{font-size:.75rem}.sub{font-size:.75rem}main{padding-top:1.5rem}}

/* admin list with reorder */
.alist{margin-top:.75rem}
.arow{display:grid;grid-template-columns:minmax(3.2rem,1fr) auto auto;grid-template-areas:"info mv act";align-items:center;gap:.4rem;padding:.4rem 0;border-bottom:1px solid #334155}
.ainfo{grid-area:info;min-width:0}.ainfo b,.ainfo .sub{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.amv{grid-area:mv;display:flex;gap:.3rem}.amv button{min-width:44px;min-height:44px;padding:0 .5rem}
.abtns{grid-area:act;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.3rem;min-width:0}
/* phones: name + reorder on the first line, the other buttons on their own line underneath (never over the name) */
@media(max-width:480px){.arow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"info mv" "act act";row-gap:.35rem}}
.abtns button{min-width:44px;min-height:44px;padding:0 .5rem;font-size:.85rem}
button.mv{background:#334155;font-size:1rem}
/* v4: list font +13% */
.lrow{font-size:.95rem;gap:.2rem;padding:.55rem .4rem;grid-template-columns:2.9rem minmax(0,1.55fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.1fr)}
.lrow .sym{font-size:1rem}
.lrow .sub{font-size:.74rem}
.lhead{font-size:.7rem;padding:.4rem .4rem}
@media(min-width:600px){.lrow{font-size:1.12rem;padding:.75rem 1rem;grid-template-columns:4.4rem 1.6fr 1fr 1fr 1.1fr}.lrow .sym{font-size:1.15rem}.lrow .sub{font-size:.82rem}.lhead{font-size:.8rem}}
/* v5: single-currency price; wider price + CHG columns */
.lrow{grid-template-columns:2.7rem minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr);gap:.15rem;padding:.7rem .35rem}
.lrow>span{text-overflow:clip}
@media(min-width:600px){.lrow{grid-template-columns:4.4rem 1.6fr 1fr 1fr 1.25fr;padding:.85rem 1rem}}
.lrow{grid-template-columns:3.2rem minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr)}
.lrow{grid-template-columns:3.2rem minmax(0,1.4fr) minmax(0,1.07fr) minmax(0,1.07fr) minmax(0,1.2fr)}
/* v6: 6 columns (coin, price, 24h, 7d, 90d, CHG) */
.lrow{grid-template-columns:2.8rem minmax(0,1.45fr) minmax(0,1.05fr) minmax(0,.9fr) minmax(0,.95fr) minmax(0,1fr);gap:.12rem;padding:.7rem .3rem;font-size:.88rem}
.lrow .sym{font-size:.95rem}
@media(min-width:600px){.lrow{grid-template-columns:4.4rem 1.5fr 1fr 1fr 1fr 1.1fr;gap:.4rem;padding:.85rem 1rem;font-size:1.12rem}.lrow .sym{font-size:1.15rem}}
.lrow{font-size:.88em}.lrow .sym{font-size:.95em}.lhead{font-size:.7em}
.lrow{grid-template-columns:2.7rem minmax(0,1.35fr) minmax(0,1.1fr) minmax(0,.95fr) minmax(0,.95fr) minmax(0,1fr)}
@media(min-width:600px){.lrow{font-size:1.12em}.lrow .sym{font-size:1.03em}.lhead{font-size:.8em}}

/* centred columns */
.lrow>span{text-align:center!important;justify-self:stretch}
#meta,.meta{font-size:1.5rem;white-space:nowrap;margin:.5rem 0}

/* v7: magnify view */
.bar{grid-template-columns:1fr 1fr 1fr 48px}
.bar button.mag{background:#475569;font-size:1.25rem;padding:0;min-width:48px}
#big{position:fixed;inset:0;display:flex;flex-direction:column;background:#0f172a;margin:0;border-radius:0;
  padding:max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.5rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left));--bf:24px}
#big[hidden]{display:none}
.brow{display:grid;grid-template-columns:calc(var(--bf)*2.9) minmax(0,1.5fr) minmax(0,1.1fr) minmax(0,1.1fr);column-gap:calc(var(--bf)*.35);align-items:center;
  font-size:var(--bf);font-variant-numeric:tabular-nums;white-space:nowrap;border-bottom:1px solid #334155;padding:0 .15em}
.brow>span{overflow:hidden}
.brow .sym{font-weight:700}
.bhead{font-size:max(12px,calc(var(--bf)*.38));color:#94a3b8;text-transform:uppercase;padding-bottom:.3em;flex:0 0 auto}
#bigList{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;overflow:hidden}
#bigList .brow{flex:1 1 0;min-height:1.3em}
#bigList .brow:last-child{border-bottom:0}
#bigMeta{flex:0 0 auto;text-align:center;color:#94a3b8;font-size:max(16px,calc(var(--bf)*.42));margin:.4rem 0;white-space:nowrap}
.bback{flex:0 0 auto;min-height:48px;font-size:1.1rem;font-weight:600;border-radius:12px;background:#475569}
.brow{grid-template-columns:minmax(0,3.3fr) minmax(0,7fr) minmax(0,5.9fr) minmax(0,6.2fr);column-gap:calc(var(--bf)*.22);padding:0 .1em}
/* v8: big view = main layout, only larger text (no vertical spreading) */
#big{position:static;display:block;inset:auto;background:none;max-width:720px;margin:0 auto;
  padding:max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left))}
#big[hidden]{display:none}
.bigcard{background:#1e293b;border-radius:12px;overflow:hidden;margin-top:.25rem}
#bigList{display:block;flex:none;overflow:visible;min-height:0}
#bigList .brow{flex:none;min-height:0}
.brow{padding:.7rem .3rem}
.bhead{padding:.4rem .3rem}
#bigMeta{font-size:1.5rem;margin:.5rem 0}
.bback{display:block;width:100%;margin-top:.75rem}

/* v9: PIN gate */
.bar{grid-template-columns:1fr 1fr 1fr 48px 64px}
.lockb{font-size:.8rem!important;white-space:nowrap;padding:0 2px}
.keymenu{display:grid;grid-template-columns:1fr 1fr;gap:.5rem;margin:.25rem 0}
.keymenu[hidden]{display:none}
.keymenu button{min-height:48px;font-size:1rem;background:#475569;border-radius:12px}
#lock{max-width:420px;margin:0 auto;text-align:center;background:none;
  padding:max(1rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left))}
#lock[hidden]{display:none}
#lock h2{font-size:1.6rem;margin:1.2rem 0 .3rem}
.dots{display:flex;justify-content:center;gap:.8rem;min-height:1.4rem;margin:1rem 0 .3rem}
.dots span{width:16px;height:16px;border-radius:50%;border:2px solid #94a3b8}
.dots span.on{background:#e2e8f0;border-color:#e2e8f0}
.pad{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem;margin-top:.8rem}
.pad button{min-height:72px;font-size:1.9rem;font-weight:600;border-radius:18px;background:#1e293b;touch-action:manipulation}
.pad button:active{background:#334155}
.pad button.ok{background:#3b82f6}
.lockfoot{display:flex;justify-content:center;gap:1rem;margin-top:1.2rem}
.lockfoot button{min-height:44px}
.lbl{display:block;margin:.5rem 0}
.lbl select{min-height:44px;margin-left:.4rem}

/* v10: price chart modal */
.lrow[data-sym],.brow[data-sym]{cursor:pointer}
body.modal{overflow:hidden}
.chartwrap{position:fixed;inset:0;z-index:50;background:rgba(2,6,23,.7);display:flex;align-items:center;justify-content:center;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
.chartwrap[hidden]{display:none}
.chartbox{background:#0f172a;border:1px solid #334155;border-radius:16px;width:100%;max-width:720px;padding:12px 12px 8px;color:#e2e8f0}
.chhead{display:flex;align-items:center;justify-content:space-between}
.chhead h2{margin:0;font-size:1.25rem}
.chclose{min-width:44px;min-height:44px;font-size:1.2rem;border-radius:12px;background:#334155}
.chsum{display:flex;gap:.8rem;align-items:baseline;margin:.2rem 0 .5rem;font-size:1.35rem;font-weight:700;font-variant-numeric:tabular-nums}
.chsum #chChg{font-size:1rem}
.chsum .up{color:#22c55e}.chsum .down{color:#ef4444}
.chrng{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:8px}
.chrng button{min-height:44px;border-radius:10px;background:#1e293b;font-weight:600}
.chrng button.on{background:#3b82f6}
.chplot{position:relative;height:min(52vh,320px);touch-action:none}
#chSvg{width:100%;height:100%;display:block}
.chtip{position:absolute;top:0;background:#1e293b;border:1px solid #475569;border-radius:8px;padding:4px 8px;font-size:.8rem;white-space:nowrap;pointer-events:none}
.chtip[hidden]{display:none}
.chhl{display:flex;justify-content:space-between;margin-top:6px;font-size:.9rem;color:#94a3b8}
.chhl b{color:#e2e8f0;font-variant-numeric:tabular-nums}

/* v11: consistent bottom bar  Refresh | 3 middle | Lock */
.bar,.bar.chbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:.75rem 0 .25rem}
.bar.chbar{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}   /* 24h 7d 90d 180d 365d Back Lock */
.bar button{min-width:0;min-height:48px;padding:0 2px;font-size:.95rem;white-space:nowrap;overflow:hidden}
.bar .bl{font-size:1.5rem;background:#3b82f6}
.bar .mag{background:#475569;font-size:1.2rem}
.bar .lockb{font-size:.85rem!important;background:#475569;font-variant-numeric:tabular-nums}
.bar .chrng{display:contents}
.bar .chrng button{background:#1e293b;border-radius:12px;font-weight:600}
.bar .chrng button.on{background:#3b82f6}
.chhead{justify-content:flex-start;gap:.6rem}
#big .bar{margin-top:.75rem}
.bar #chClose,.bar #bigBtn.back{font-size:.8rem;letter-spacing:-.2px}
@media (max-width:480px){
  .chartwrap{padding-left:0;padding-right:0}
  .chartbox{border-left:0;border-right:0;border-radius:0;padding:12px max(8px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))}
}

/* ---- Admin push cards ---- */
.pcards{display:grid;gap:1rem;margin-top:1.25rem}
@media(min-width:900px){.pcards{grid-template-columns:1fr 1fr;align-items:start}}
.pcard{background:#0f172a;border:1px solid #334155;border-radius:14px;padding:1rem}
.phead{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.phead h3{margin:0;font-size:1.1rem}
.pill{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#94a3b8;border:1px solid #475569;border-radius:999px;padding:.1rem .55rem}
.pcard>.muted{margin:.4rem 0 .8rem;line-height:1.4}
.pgrid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem .6rem}
.pgrid .wide,.pgrid .pact{grid-column:1/-1}
.fld{display:flex;flex-direction:column;gap:.25rem;min-width:0}.fld>span{font-size:.75rem;color:#94a3b8;font-weight:600}
.fld input,.fld select{flex:none;width:100%;min-width:0;min-height:44px;box-sizing:border-box;background:#1e293b}
.tog{display:flex;align-items:center;gap:.6rem;min-height:44px;cursor:pointer}.tog input{width:22px;height:22px;min-height:0;flex:none;margin:0;accent-color:#3b82f6}
.pact{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.2rem}
button.pbtn{flex:1 1 160px;min-height:44px;border-radius:10px;font-size:.95rem;font-weight:600;padding:.5rem 1rem}
button.pbtn.sec{background:#334155}
.rlist{margin:.9rem 0 .6rem;border-top:1px solid #334155}
.rrow{display:flex;align-items:center;gap:.6rem;padding:.55rem 0;border-bottom:1px solid #334155}
.ricon{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:700}
.ricon.up{background:#14532d;color:#4ade80}.ricon.down{background:#7f1d1d;color:#f87171}.ricon.both{background:#1e3a8a;color:#93c5fd}
.rtxt{flex:1;min-width:0;font-size:.92rem;overflow-wrap:anywhere}
button.rdel{flex:none;min-height:36px;padding:.3rem .7rem;font-size:.8rem;border-radius:8px;background:transparent;color:#f87171;border:1px solid #7f1d1d}
.rempty{color:#94a3b8;font-size:.85rem;padding:.6rem 0}
.pmsg{min-height:1.2em;margin:.5rem 0 0;font-size:.85rem}.pmsg.ok{color:#4ade80}.pmsg.bad{color:#f87171}.pmsg.busy{color:#94a3b8}

.nset{display:grid;gap:.8rem}@media(min-width:600px){.nset{grid-template-columns:1fr 1fr}.nset .pact{grid-column:1/-1}}
.ngrp{border:1px solid #334155;border-radius:12px;padding:.6rem .8rem .8rem;margin:0;display:grid;gap:.55rem}
.ngrp legend{padding:0 .35rem;font-weight:600;color:#e2e8f0}
.ndev{margin-top:.8rem;font-size:.85rem;line-height:1.45;color:#94a3b8}.ndev .nd{border-top:1px solid #1e293b;padding:.45rem 0}
.ndev .warn{color:#fbbf24}.ndev .okc{color:#4ade80}
@media(min-width:900px){.pcard.pwide{grid-column:1/-1}.nset{grid-template-columns:1fr 1fr}}

/* ---- v12: sortable headings, alert history, theme switch ---- */
[data-sort]{cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
[data-sort].sorted{color:#60a5fa}
[data-sort][data-dir=asc]::after{content:" ▲";font-size:.8em}
[data-sort][data-dir=desc]::after{content:" ▼";font-size:.8em}
.tfoot{text-align:center;margin:.25rem 0 0}.tfoot button{min-height:36px;background:#334155}
.rrow.off .rtxt{opacity:.55}
.rtag{display:inline-block;font-size:.7rem;border:1px solid #475569;border-radius:999px;padding:0 .45rem;color:#94a3b8;margin-left:.25rem}
button.ron{color:#93c5fd;border-color:#1e3a8a}
.hlist{margin:.6rem 0;max-height:420px;overflow:auto;border-top:1px solid #334155}
.hrow{display:flex;gap:.7rem;padding:.5rem 0;border-bottom:1px solid #334155;font-size:.88rem}
.htime{flex:none;width:6.5rem;color:#94a3b8;font-variant-numeric:tabular-nums}.htxt{flex:1;min-width:0;overflow-wrap:anywhere}

/* light theme (html[data-theme=light]; default follows the system) */
html[data-theme=light],html[data-theme=light] body{background:#f1f5f9;color:#0f172a}
html[data-theme=light] .list,html[data-theme=light] section,html[data-theme=light] .bigcard,html[data-theme=light] header{background:#fff}
html[data-theme=light] #lock,html[data-theme=light] #big{background:none}
html[data-theme=light] .lrow,html[data-theme=light] .brow,html[data-theme=light] .arow,html[data-theme=light] .rrow,html[data-theme=light] .hrow,
html[data-theme=light] .rlist,html[data-theme=light] .hlist,html[data-theme=light] td,html[data-theme=light] th{border-color:#e2e8f0}
html[data-theme=light] .muted,html[data-theme=light] .meta,html[data-theme=light] #bigMeta,html[data-theme=light] .lhead,html[data-theme=light] .bhead,
html[data-theme=light] .sub,html[data-theme=light] .fld>span,html[data-theme=light] .chhl,html[data-theme=light] .htime,html[data-theme=light] .rempty,html[data-theme=light] .ndev{color:#64748b}
html[data-theme=light] .up{color:#15803d}html[data-theme=light] .down{color:#dc2626}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] .fld input,html[data-theme=light] .fld select{background:#fff;color:#0f172a;border-color:#cbd5e1}
html[data-theme=light] .pcard,html[data-theme=light] .chartbox{background:#f8fafc;border-color:#e2e8f0;color:#0f172a}
html[data-theme=light] .ngrp{border-color:#e2e8f0}html[data-theme=light] .ngrp legend,html[data-theme=light] .chhl b{color:#0f172a}
html[data-theme=light] button.small,html[data-theme=light] .bar .mag,html[data-theme=light] .bar .lockb,html[data-theme=light] button.mv,
html[data-theme=light] button.pbtn.sec,html[data-theme=light] .tfoot button{background:#e2e8f0;color:#0f172a}
html[data-theme=light] button.del{background:#dc2626;color:#fff}
html[data-theme=light] .bar .chrng button,html[data-theme=light] .chrng button,html[data-theme=light] .pad button{background:#e2e8f0;color:#0f172a}
html[data-theme=light] .bar .chrng button.on,html[data-theme=light] .chrng button.on,html[data-theme=light] .pad button.ok{background:#3b82f6;color:#fff}
html[data-theme=light] .pad button:active{background:#cbd5e1}
html[data-theme=light] .dots span{border-color:#64748b}html[data-theme=light] .dots span.on{background:#0f172a;border-color:#0f172a}
html[data-theme=light] .chtip{background:#fff;border-color:#cbd5e1;color:#0f172a}
html[data-theme=light] .chartwrap{background:rgba(15,23,42,.35)}
html[data-theme=light] .pill,html[data-theme=light] .rtag{color:#64748b;border-color:#cbd5e1}
html[data-theme=light] [data-sort].sorted{color:#2563eb}
html[data-theme=light] .pmsg.ok,html[data-theme=light] .ndev .okc{color:#15803d}html[data-theme=light] .ndev .warn{color:#b45309}
.chlab{pointer-events:none;paint-order:stroke;stroke:#0f172a;stroke-width:3px;stroke-linejoin:round}#chSvg{color:#e2e8f0}
html[data-theme=light] .chlab{stroke:#fff}html[data-theme=light] #chSvg{color:#0f172a}
.meter{height:10px;border-radius:5px;background:#334155;overflow:hidden;margin:.4rem 0}.meter>i{display:block;height:100%;background:#22c55e}.meter.warn>i{background:#f59e0b}.meter.bad>i{background:#ef4444}

/* ---- v14: admin logout buttons ---- */
button.logoutbtn,html[data-theme=light] button.logoutbtn{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:0;grid-column:1/-1;padding:.7rem 1rem;font-size:1rem;font-weight:600;background:#dc2626;color:#fff;border:0;border-radius:8px}
button.logoutbtn:hover{background:#b91c1c}button.logoutbtn:focus-visible{outline:2px solid #fca5a5;outline-offset:2px}
/* ---- v14b: admin shortcut menu + back to top ---- */
html{scroll-behavior:smooth}#adminBox [id^=sec-]{scroll-margin-top:.75rem}#adminBox{scroll-margin-top:0}
.anav{display:flex;flex-wrap:wrap;gap:.35rem;margin:.25rem 0 1rem}
.anav a{font-size:.8rem;padding:.3rem .6rem;border-radius:999px;background:#1e293b;color:#e2e8f0;border:1px solid #334155;text-decoration:none;white-space:nowrap}
.anav a:hover{background:#334155}
.totop{margin-left:auto;font-size:.75rem;font-weight:500;color:#93c5fd;text-decoration:none;white-space:nowrap;padding:.15rem .4rem}
.sechead{display:flex;align-items:center;gap:.5rem}
html[data-theme=light] .anav a{background:#f1f5f9;color:#0f172a;border-color:#cbd5e1}html[data-theme=light] .anav a:hover{background:#e2e8f0}
html[data-theme=light] .totop{color:#1d4ed8}
@media(prefers-color-scheme:light){html:not([data-theme=dark]) .anav a{background:#f1f5f9;color:#0f172a;border-color:#cbd5e1}html:not([data-theme=dark]) .totop{color:#1d4ed8}}
/* ---- v15: admin as collapsible cards with heading bars (approved mock C) ---- */
#adminNav,#pricesCard>.phead{display:none}
body.adm #adminNav{display:flex}
body.adm #admin{background:none;padding:0;margin-top:.8rem}
body.adm #adminBox>.logoutbtn{margin-bottom:.8rem}body.adm #adminBox>.pcards+.pcards{margin-top:.6rem}body.adm #adminBox>.pcards~.logoutbtn{margin-top:.8rem}
#adminBox .pcards{margin-top:0;gap:.6rem}
#adminBox .pcard,body.adm #pricesCard{background:#1e293b;border:1px solid #475569;border-radius:12px;padding:0 1rem 1rem;overflow:hidden}
body.adm #pricesCard .list{background:none;margin:0 -1rem}
#adminBox .phead,body.adm #pricesCard>.phead{display:flex;align-items:center;gap:.5rem;justify-content:flex-start;margin:0 -1rem .9rem;padding:.65rem 1rem;background:#334155;border-bottom:2px solid #64748b;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}
#adminBox .phead h3,#pricesCard .phead h3{margin:0;font-size:1.1rem;font-weight:700}
#adminBox .phead .totop,#pricesCard .phead .totop{margin-left:auto}
#adminBox .phead h3::before,#pricesCard .phead h3::before{content:"▸";display:inline-block;width:1.1em;color:#94a3b8}
#adminBox .pcard.open .phead h3::before,#pricesCard.open .phead h3::before{content:"▾"}
#adminBox .pcard:not(.open),body.adm #pricesCard:not(.open){padding-bottom:0}
#adminBox .pcard:not(.open) .phead,body.adm #pricesCard:not(.open)>.phead{margin-bottom:0;border-bottom:0}
#adminBox .pcard:not(.open)>:not(.phead),body.adm #pricesCard:not(.open)>:not(.phead){display:none}
#adminBox .phead:focus-visible,#pricesCard .phead:focus-visible{outline:2px solid #60a5fa;outline-offset:-2px}
html[data-theme=light] #adminBox .pcard,html[data-theme=light] body.adm #pricesCard{background:#fff;border-color:#94a3b8;color:#0f172a}
html[data-theme=light] #adminBox .phead,html[data-theme=light] body.adm #pricesCard>.phead{background:#e5e7eb;border-bottom-color:#9ca3af;color:#111827}
@media(prefers-color-scheme:light){html:not([data-theme=dark]) #adminBox .pcard,html:not([data-theme=dark]) body.adm #pricesCard{background:#fff;border-color:#94a3b8;color:#0f172a}html:not([data-theme=dark]) #adminBox .phead,html:not([data-theme=dark]) body.adm #pricesCard>.phead{background:#e5e7eb;border-bottom-color:#9ca3af;color:#111827}}
#adminBox .phead button.small{min-height:0;padding:.3rem .6rem;font-size:.8rem}
/* v16: admin idle warning */
.idlewarn{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin:0 0 .6rem;padding:.6rem .8rem;border-radius:10px;background:#78350f;color:#fef3c7;border:1px solid #f59e0b;font-size:.9rem}.idlewarn[hidden]{display:none}.idlewarn button{min-height:36px;padding:.3rem .8rem;background:#f59e0b;color:#111827;font-weight:700;border-radius:8px;border:0}
html[data-theme=light] .idlewarn{background:#fef3c7;color:#78350f}

/* ---- interested coins ---- */
.bar .star{background:#334155;font-size:1.25rem}
.bar .star.on{background:#eab308;color:#0f172a}
#intView .title{display:flex;align-items:center;gap:.5rem;margin:.3rem .2rem .5rem}
#intView .title h2{margin:0;font-size:1.2rem}#intView .title .star{color:#eab308;font-size:1.3rem}
#intView .note{display:block;font-size:.65rem;color:#94a3b8;font-weight:400;overflow:hidden;text-overflow:ellipsis}
html[data-theme=light] .bar .star{background:#e2e8f0;color:#0f172a}
html[data-theme=light] .bar .star.on{background:#eab308;color:#0f172a}
html[data-theme=light] #intView .note{color:#64748b}
.flashform .chk{display:flex;gap:.5rem;align-items:center;margin:.35rem 0}.flashform .fld{display:block;margin-top:.6rem}
/* the flash form shares .ppform (a one-line flex row) but holds a stacked list: lay it out as a column */
form.ppform.flashform{display:block}.flashform .fld>span{display:block;margin-bottom:.25rem}.flashform .fld input{width:100%;max-width:16rem}
.flashform .chk{min-height:44px;margin:0;cursor:pointer}.flashform .chk input{flex:none;width:22px;height:22px;min-height:0;margin:0;accent-color:#3b82f6}.flashform>button{margin:.6rem .5rem 0 0}
.sdot{display:inline-block;width:.45em;height:.45em;border-radius:50%;background:#78828f;margin-right:.3em;vertical-align:middle}
.mvbox{grid-column:1/-1;margin-top:.5rem;padding:.6rem;border:1px solid #3b82f6;border-radius:.6rem}.mvbox input,.mvbox select{margin:.25rem .3rem .25rem 0}
#intView .lrow{grid-template-columns:3.2rem minmax(0,1.6fr) minmax(0,1.1fr) minmax(0,1.1fr)}   /* Coin Price 24h 7d (matches the widget) */

.ppform{display:flex;gap:8px;align-items:flex-end;margin-top:12px}.ppform .fld{flex:1}.ppform input{width:100%}

/* ---- markets (APK 3.13 release) ---- */
.bar{grid-template-columns:repeat(7,minmax(0,1fr))}.bar.chbar{grid-template-columns:repeat(7,minmax(0,1fr))}
.bar .mkb{background:#334155;font-size:1.15rem}.bar .mkb.on{background:#38bdf8;color:#0f172a}
html[data-theme=light] .bar .mkb{background:#e2e8f0;color:#0f172a}html[data-theme=light] .bar .mkb.on{background:#38bdf8}
#mkView .title{display:flex;align-items:center;gap:.5rem;margin:.3rem .2rem .5rem}#mkView .title h2{margin:0;font-size:1.2rem}
.mkchip{margin-left:auto;font-size:.72rem;font-weight:700;padding:.15rem .55rem;border-radius:999px;background:#334155;color:#e2e8f0}
.mkchip.open{background:#166534;color:#dcfce7}.mkchip.closed,.mkchip.delayed{background:#f59e0b;color:#0f172a}
.lrow.mkrow{grid-template-columns:minmax(0,1.4fr) minmax(0,1.1fr) minmax(0,.9fr) minmax(0,.8fr) minmax(0,.8fr)}
.mkgrp{padding:.45rem .7rem;font-size:.68rem;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8;border-bottom:1px solid #334155}
.mkst{display:block;font-size:.6rem;font-weight:700;color:#f59e0b;letter-spacing:.04em}
.mkg{margin-top:.9rem}.mkg h3{font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8;margin:.2rem .2rem .3rem}
.lrow.mkgrow{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr)}
.mknote{font-size:.78rem;margin:.6rem .3rem}
.mksyms{display:flex;flex-wrap:wrap;gap:.4rem .9rem;margin-top:.3rem}.mksyms label{display:flex;gap:.3rem;align-items:center;font-size:.9rem}
.pbtn.sec{background:#475569}

/* ---- Markets name tooltips (website) ---- */
.mktip{appearance:none;background:none;border:0;padding:0;margin:0;color:inherit;font:inherit;font-weight:700;text-align:left;cursor:help;
  -webkit-tap-highlight-color:transparent;max-width:100%;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:.2em;text-decoration-color:#64748b}
.mktip:focus-visible{outline:2px solid #38bdf8;outline-offset:2px;border-radius:4px}
.mktip .mkst{pointer-events:none;text-decoration:none}
#mkTipPop{position:fixed;z-index:1000;width:min(20.5rem,calc(100vw - 1.5rem));padding:.7rem .8rem;border-radius:10px;
  background:#1e293b;color:#e2e8f0;border:1px solid #475569;box-shadow:0 12px 32px rgba(0,0,0,.5);
  font-size:.82rem;font-weight:400;line-height:1.35;text-align:left;white-space:normal}
#mkTipPop[hidden]{display:none!important}
#mkTipPop b{display:block;font-size:.92rem;font-weight:700;margin:0 0 .3rem;color:#f8fafc}
#mkTipPop .mkblurb{margin:0 0 .45rem;color:#cbd5e1}
#mkTipPop .mkhrs{margin:0;color:#94a3b8;font-size:.75rem}
html[data-theme=light] #mkTipPop{background:#fff;color:#0f172a;border-color:#cbd5e1;box-shadow:0 12px 32px rgba(15,23,42,.2)}
html[data-theme=light] #mkTipPop b{color:#0f172a}
html[data-theme=light] #mkTipPop .mkblurb{color:#334155}
html[data-theme=light] #mkTipPop .mkhrs{color:#64748b}
#mkView .sym{overflow:visible}
