:root{font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#e9f0f7;background:#0b1420;font-synthesis:none}*{box-sizing:border-box}body{margin:0}.app{max-width:980px;margin:auto;min-height:100vh;padding-bottom:92px}header{display:flex;justify-content:space-between;align-items:center;padding:21px 20px;border-bottom:1px solid #243548}.brand{display:flex;align-items:center;gap:12px}.brand strong{display:block;font-size:18px}.brand small{display:block;color:#8da5b9;font-size:9px;letter-spacing:1.5px;margin-top:3px}.planet{color:#5ce0b3;font-size:30px}.tag{border:1px solid #285348;border-radius:20px;color:#78d5b4;font-size:10px;padding:6px 9px;white-space:nowrap}main{padding:18px}.heading{margin:10px 0 24px}.heading p{font-size:11px;color:#5ce0b3;letter-spacing:2px;font-weight:700}.heading h1{margin:5px 0;font-size:29px}.heading span,.card small{color:#91a5b8;font-size:12px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.card,.panel{background:#142333;border:1px solid #283b4c;border-radius:15px;padding:17px}.card{min-width:0}.card.primary{background:linear-gradient(135deg,#163b3c,#142333)}.card>span{display:block;color:#a4b8c9;font-size:12px}.card strong{display:block;font-size:clamp(17px,3.3vw,27px);margin:13px 0 9px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.panel{margin-top:17px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.section-head h2{font-size:17px}form{display:grid;gap:13px;margin-top:12px}label{font-size:13px;color:#afc1d1}input{display:block;width:100%;background:#0b1725;border:1px solid #3b5063;border-radius:9px;padding:13px;margin-top:7px;color:white;font:inherit}button{cursor:pointer;border:0;border-radius:9px;background:#48cfa1;color:#09201c;font-weight:750;padding:13px}button.quiet{background:transparent;color:#80d5b8;padding:8px}#message{margin:0;font-size:12px;color:#e4bc79;min-height:16px}.history{display:grid;gap:10px}.history article{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #283b4c;padding:12px 0;font-size:13px}.history article span{color:#9bb0c0}.history article strong{text-align:right;overflow-wrap:anywhere}nav{position:fixed;bottom:0;left:0;right:0;background:#102030;border-top:1px solid #304254;display:flex;justify-content:space-around;padding:12px 8px max(12px,env(safe-area-inset-bottom))}nav a{display:flex;flex-direction:column;align-items:center;gap:3px;text-decoration:none;color:#a9bdcb;font-size:20px}nav span{font-size:10px}nav a[aria-current]{color:#64dbb0}@media(min-width:700px){.cards{grid-template-columns:repeat(4,1fr)}main{padding:28px}nav{max-width:980px;margin:auto}}

/* Mobile dashboard: compact 2x2 summary cards; desktop remains unchanged. */
@media (max-width:699px){
  .cards{gap:8px}
  .card{padding:12px 13px;border-radius:12px}
  .card>span{font-size:11px;line-height:1.2}
  .card strong{margin:8px 0 0;font-size:clamp(16px,4.2vw,21px);line-height:1.25}
  .card small{display:none}
}

/* Screenshot-first entry, with accessible native collapsed manual backup. */
.upload-area{margin-top:12px;border:1px dashed #456477;background:#102030;border-radius:13px;padding:20px 15px;text-align:center}
.upload-icon{font-size:30px;color:#78d5b4}
.upload-area h3{margin:6px 0 5px;font-size:17px}
.upload-area p{color:#a9bdcb;font-size:12px;line-height:1.5;margin:7px auto 14px;max-width:440px}
.screenshot-picker{display:block;max-width:320px;margin:auto;text-align:left}
.screenshot-picker input{padding:8px}
.screenshot-picker input::file-selector-button{background:#48cfa1;color:#09201c;border:0;border-radius:6px;padding:8px;margin-right:8px;cursor:pointer}
#screenshot-error:empty,.screenshot-previews:empty{display:none}
.screenshot-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,96px));justify-content:center;gap:10px;margin:12px 0;padding:0;list-style:none}
.screenshot-previews li{min-width:0}
.screenshot-previews img{display:block;width:100%;aspect-ratio:1;object-fit:contain;background:#0b1725;border:1px solid #304254;border-radius:8px}
.screenshot-previews button{width:100%;min-height:36px}
.upload-area .upload-status{margin:11px auto 0;color:#e4bc79}
.manual-backup{margin-top:15px;border-top:1px solid #304254;padding-top:14px}
.manual-backup summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px;font-weight:700;color:#e9f0f7}
.manual-backup summary::-webkit-details-marker{display:none}
.manual-backup summary:before{content:"+";font-size:19px;color:#78d5b4;margin-right:6px}
.manual-backup[open] summary:before{content:"−"}
.manual-backup summary span{margin-left:auto;color:#91a5b8;font-size:11px;font-weight:400}
.manual-backup form{margin-top:17px}

/* Extensible, real bottom-tab navigation. Add new data-tab/data-view pairs later. */
.tab-view[hidden]{display:none!important}
.bottom-nav{gap:6px;justify-content:space-around}
.bottom-nav .nav-item{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;background:transparent;color:#a9bdcb;border:0;border-radius:8px;padding:2px 4px;font-size:20px;font-weight:400}
.bottom-nav .nav-item span{font-size:10px}
.bottom-nav .nav-item[aria-current="page"]{color:#64dbb0}
.bottom-nav .nav-item:focus-visible{outline:2px solid #64dbb0;outline-offset:3px}

/* Compact, responsive dashboard trend and latest snapshot. */
.chart-subtitle,.latest-note{color:#91a5b8;font-size:12px;line-height:1.5;margin:2px 0 12px}
.chart-container{height:180px;border-radius:10px;background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),#294152 25%);overflow:hidden}
.chart-container svg{width:100%;height:100%;display:block}
.chart-range{color:#9bb0c0;font-size:11px;margin-top:10px}
.latest-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:14px}
.latest-grid div{min-width:0}
.latest-grid small{display:block;color:#91a5b8;font-size:11px;margin-bottom:5px}
.latest-grid strong{display:block;font-size:14px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.latest-note{margin:16px 0 0}
@media(max-width:699px){.chart-container{height:150px}.chart-panel,.latest-panel{padding:14px}.latest-grid{gap:12px}}

/* Upload-tab recent snapshots: compact preview, incrementally expandable. */
.recent-panel .section-head h2{margin:4px 0 10px}
.recent-count{color:#91a5b8;font-size:11px;white-space:nowrap}
.recent-panel .history article{align-items:center}
.recent-more{display:block;margin:14px auto 0;background:#203d4a;color:#78d5b4;width:100%;max-width:280px}
.recent-more[hidden]{display:none}
@media(max-width:699px){.recent-panel{padding:14px}.recent-panel .history article{font-size:12px}}


#screenshot-extract:disabled{opacity:.55;cursor:default}
#screenshot-progress:empty{display:none}
.screenshot-previews li:has(.screenshot-draft){grid-column:1/-1;text-align:left}
.screenshot-previews li:has(.screenshot-draft)>img{width:96px}
.screenshot-previews li:has(.screenshot-draft)>button{width:auto}
.screenshot-draft{display:grid;gap:10px;min-width:0;margin:6px 0 0;padding:10px;border:1px solid #304254;border-radius:8px}
.screenshot-draft legend{max-width:100%;overflow-wrap:anywhere;font-size:12px}
.screenshot-draft p{margin:0;overflow-wrap:anywhere}
.screenshot-draft input[aria-invalid=true]{border-color:#e4bc79}
.capture-check{display:flex;align-items:center;gap:8px}
.capture-check input{width:auto;margin:0;order:-1}


.screenshot-cashouts h2{font-size:17px}
.screenshot-cashouts p,.screenshot-cashouts details{font-size:13px}
.screenshot-cashouts details{margin-top:12px}
.screenshot-cashouts summary{cursor:pointer}
.screenshot-draft button:disabled{opacity:.55;cursor:default}
.screenshot-totals{color:#a9bdcb}

#storageStatus{color:#a9bdcb;font-size:13px;line-height:1.4;margin:0 0 12px}
#entry button:disabled,#cashout-form button:disabled,#reset:disabled{opacity:.55;cursor:default}

.backup-panel p,.backup-panel label{font-size:13px;line-height:1.45}
.backup-panel label{margin:10px 0}
.backup-panel label[hidden]{display:none}
#backupStatus:empty,#restoreReview:empty{display:none}
.backup-panel button:disabled{opacity:.55;cursor:default}
