*{box-sizing:border-box;margin:0;padding:0}
body{font-family:system-ui,-apple-system,sans-serif;background:#eef1f6;color:#1a1a1a;min-height:100vh}
#app{display:flex;flex-direction:column;min-height:100vh;max-width:520px;margin:0 auto}
.top{display:flex;justify-content:space-between;align-items:flex-start;padding:14px 16px 8px}
.top h1{font-size:1.2rem}
.muted{color:#5c6470;font-size:.82rem}
.icon-btn{border:1px solid #c5cad3;background:#fff;border-radius:10px;width:40px;height:40px;font-size:1.1rem;cursor:pointer}
.view{flex:1;overflow-y:auto;padding:0 12px 12px}
.nav{display:flex;border-top:1px solid #d8dde6;background:#fff;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
.nav button{flex:1;border:none;background:transparent;font-size:.72rem;padding:8px 4px;color:#5c6470;cursor:pointer;border-radius:8px}
.nav button.active{background:#dbe8f8;color:#1a5fb4;font-weight:600}
.card{background:#fff;border-radius:14px;padding:14px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.card h2{font-size:1rem;margin-bottom:10px}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.stat{background:#f4f6fa;border-radius:10px;padding:10px;text-align:center}
.stat b{display:block;font-size:1.4rem;color:#1a5fb4}
.stat span{font-size:.72rem;color:#5c6470}
.stat-link{border:none;cursor:pointer;font:inherit;width:100%;text-align:center}
.stat-link:active{background:#e3eaf5}
.btn{display:block;width:100%;padding:12px;margin-top:8px;border:none;border-radius:10px;font-size:.95rem;font-weight:600;cursor:pointer}
.btn.primary{background:#2481cc;color:#fff}
.btn.secondary{background:#fff;color:#1a5fb4;border:1px solid #2481cc}
.btn.danger{background:#fff5f5;color:#c62828;border:1px solid #f5c2c2}
.btn:disabled{opacity:.5}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.item{padding:10px 0;border-bottom:1px solid #eceff3}
.item:last-child{border:none}
.item h3{font-size:.9rem;margin-bottom:4px}
.tag{font-size:.7rem;background:#eef1f6;padding:2px 8px;border-radius:6px;display:inline-block;margin-right:4px}
input,select{width:100%;padding:11px;border:1px solid #c5cad3;border-radius:10px;font-size:16px;margin:8px 0}
.toast{padding:10px;border-radius:8px;margin:8px 0;font-size:.85rem}
.toast.ok{background:#e8f5e9;color:#2e7d32}
.toast.err{background:#ffebee;color:#c62828}
.variant{padding:10px;border:1px solid #e0e4ea;border-radius:10px;margin:6px 0;cursor:pointer}
.variant:active{background:#eef5fc}
.empty{text-align:center;color:#5c6470;padding:24px 12px}
.red-msg{white-space:pre-wrap;font-family:inherit;font-size:.82rem;line-height:1.35;margin:0 0 8px;background:#f8f9fb;padding:10px;border-radius:10px;border:none}

.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}
.grid3 .btn{margin-top:0;font-size:.72rem;padding:10px 5px;line-height:1.2}
.site-actions{margin-bottom:0}
.sources-panel{margin-top:10px;max-height:50vh;overflow-y:auto}
.source-chip{display:block;width:100%;text-align:left;padding:10px 12px;margin:4px 0;border:1px solid #e0e4ea;border-radius:10px;background:#f8f9fb;font-size:.85rem;font-weight:600;color:#1a1a1a;cursor:pointer}
.source-chip:active{background:#eef5fc}

.home-status-wrap{margin-bottom:8px}
.home-status{display:flex;align-items:flex-start;gap:8px;padding:10px 10px 10px 12px;border-radius:10px;font-size:.88rem;font-weight:600}
.home-status-text{flex:1;min-width:0;line-height:1.35;white-space:pre-line}
.site-post-actions{margin-top:10px}
.site-post-full{width:100%;margin-bottom:8px}
.site-post-row{margin-bottom:8px}
.site-post-row:last-child{margin-bottom:0}
.home-status-dismiss{flex-shrink:0;width:28px;height:28px;margin:-4px -2px 0 0;padding:0;border:none;border-radius:8px;background:transparent;font-size:1.25rem;line-height:1;color:inherit;opacity:.55;cursor:pointer}
.home-status-dismiss:active,.home-status-dismiss:hover{opacity:1;background:rgba(0,0,0,.06)}
.home-status-wait{background:#fff8e1;color:#6d5a00}
.home-status-ok{background:#e8f5e9;color:#2e7d32}
.home-status-err{background:#ffebee;color:#c62828}
.sources-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.sources-grid .source-chip{margin:0;text-align:center;padding:8px 4px;font-size:.72rem;line-height:1.15}
#togglePriceSources.active{background:#eef5fc;border-color:#1a5fb4}

#togglePriceSources.disabled,#togglePriceSources:disabled,.source-chip.disabled,.source-chip:disabled{opacity:.55;background:#e8eaee!important;color:#888!important;border-color:#d0d4dc!important;cursor:not-allowed;pointer-events:none}
