.gate{min-height:100vh;display:grid;place-items:center;padding:28px 16px;background:linear-gradient(180deg,#f4faf7,#f7f8fa)}
.card{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px 24px;box-shadow:0 10px 30px #147d6710}
.card h1{margin:8px 0 6px;font-size:26px}
.card p{color:#6d7d78;font-size:13px;line-height:1.6}
.card form{display:grid;gap:10px;margin-top:16px}
.card label{display:grid;gap:6px;font-size:12px;color:#5d6e68}
.card input{border:1px solid #d7e3dc;border-radius:8px;padding:11px 12px;font:inherit}
.tabs{display:flex;gap:8px;margin-top:8px}
.tabs button{background:#f3f7f5;color:#5d6e68;border-radius:8px;padding:8px 12px}
.tabs button[aria-pressed="true"]{background:#edf6f2;color:#147d67}
.crumb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 0;font-size:12px;color:#6d7d78}
.crumb button,.folder-chip{background:#f4faf7;border:1px solid #d7e8df;border-radius:999px;padding:6px 10px;color:#146b56;font-size:12px}
.folders{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.cost-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px 14px;margin:0 0 22px;box-shadow:0 8px 24px #147d6710}
.cost-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
.cost-head h2{margin:4px 0 0;font-size:16px;font-weight:650}
.cost-totals{display:flex;gap:22px}
.cost-totals span{display:block;font-size:11px;color:#6d7d78}
.cost-total{font-size:26px;font-weight:650;color:var(--green);letter-spacing:-.4px;line-height:1.1}
.cost-caption{margin:16px 0 6px;font-size:13px;font-weight:650}
.cost-table{width:100%;border-collapse:collapse;font-size:13px}
.cost-table th{text-align:left;font-size:11px;font-weight:600;color:#6d7d78;padding:6px 8px;border-bottom:1px solid var(--line)}
.cost-table td{padding:7px 8px;border-bottom:1px solid #eef3f1}
.cost-table th.num,.cost-table td.num{text-align:right}
.cost-grid{display:grid;grid-template-columns:minmax(88px,.8fr) 1fr 1fr;align-items:stretch}
.cost-grid>div{padding:8px;border-bottom:1px solid #eef3f1;font-size:13px;display:flex;flex-direction:column;justify-content:center}
.cost-grid .h{font-size:11px;font-weight:600;color:#6d7d78;border-bottom:1px solid var(--line)}
.cost-grid .num{text-align:right}
.cost-grid .qty,.cost-grid .cny{display:block}
.cost-grid .cny{color:var(--green);font-weight:650;margin-top:2px}
.cost-grid .when{display:none}
.cost-grid .total{font-weight:650}
.cost-grid .total .cny{font-size:14px}
.cost-note{color:#8a9a90;font-size:11px;margin:12px 0 0;line-height:1.6}
.product-mark{margin:6px 0 0;font-size:11px;letter-spacing:.2px;color:#7b8c84;line-height:1.4}
.tagline{margin:0;color:#5f746c;font-size:14px}
.ver{font-size:.55em;font-weight:650;color:#147d67;letter-spacing:0}
.head-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.usage-inline{font-size:12px;color:#5f746c}
.health-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px 14px;margin:0 0 14px}
.health-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:12px}
.health-grid div{background:#f6faf8;border-radius:10px;padding:10px 12px}
.health-grid span{display:block;font-size:11px;color:#6d7d78}
.health-grid strong{display:block;margin:4px 0;font-size:16px;font-weight:650;color:#243f34}
.health-grid small{display:block;color:#8a9a90;font-size:10px;line-height:1.5}
.health-actions,.trash-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.health-actions button,.trash-tools button,.view-switch button{min-height:44px}
.trash-tools input{width:72px;border:1px solid #d7e3dc;border-radius:8px;padding:8px 10px;font:inherit}
.trash-tools label{font-size:12px;color:#5d6e68;display:flex;align-items:center;gap:8px}
.cost-effective{margin:10px 0 0;font-size:13px;color:#243f34}
.cost-groups{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.cost-group{background:#f6faf8;border-radius:10px;padding:8px 10px}
.cost-group span{display:block;font-size:11px;color:#6d7d78}
.cost-group strong{display:block;margin-top:4px;color:var(--green);font-size:14px}
.cost-group small{display:block;color:#8a9a90;font-size:10px;margin-top:2px}
.view-switch{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.view-switch button{background:#f3f7f5;color:#5d6e68;border-radius:999px;padding:8px 14px}
.view-switch button[aria-pressed="true"]{background:#edf6f2;color:#147d67}
.day-title{font-size:13px;margin:16px 0 8px;color:#345246}
.day-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
.tile{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;cursor:pointer;min-height:112px;display:flex;flex-direction:column}
.tile .thumb,.tile img{width:100%;height:96px;object-fit:cover;border-radius:0}
.tile-name{font-size:11px;padding:6px 8px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tile-fallback{height:96px;display:grid;place-items:center;background:#e7f2ec;color:#146b56;font-size:13px}
.sheet{position:fixed;inset:0;background:#10211c88;z-index:40;display:grid;place-items:end center;padding:16px}
.sheet-card{background:#fff;color:#172b29;width:min(520px,100%);border-radius:16px;padding:16px;max-height:min(70vh,560px);overflow:auto}
.sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.sheet-head h2{margin:0;font-size:16px}
.version-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #edf1ee;font-size:13px}
.version-row a,.version-row button{min-height:44px}
@media(max-width:720px){
.cost-head{flex-direction:column;align-items:flex-start}
.cost-total{font-size:22px}
.cost-panel{padding:14px 14px 10px}
.cost-table td,.cost-table th{white-space:normal}
.cost-grid{grid-template-columns:1fr}
.cost-grid .h{display:none}
.cost-grid .when{display:block;font-size:11px;color:#6d7d78;font-weight:600}
.cost-grid .num{text-align:left;border-bottom:0;padding-top:2px;padding-bottom:2px}
.cost-grid>div:nth-child(3n+1){font-weight:650;border-bottom:0;padding-bottom:0;margin-top:8px}
.cost-grid>div:nth-child(3n){border-bottom:1px solid #eef3f1;padding-bottom:8px}
}
.danger{color:#9a5340}
.row-actions{display:flex;gap:10px;justify-content:flex-end}
@media(max-width:720px){
.card{padding:22px 16px}
aside .product-mark{display:none}
.row-actions{gap:6px}
.health-grid,.cost-groups{grid-template-columns:1fr 1fr}
.cost-groups .cost-group:last-child{grid-column:1 / -1}
.head-side{align-items:flex-start}
.product-head{align-items:flex-start}
.day-grid{grid-template-columns:repeat(3,1fr)}
.sheet{padding:0}
.sheet-card{border-radius:16px 16px 0 0;width:100%}
}
.thumb{width:40px;height:40px;object-fit:cover;border-radius:6px;background:#e7f0eb;cursor:pointer;flex:none}
button.file-open{background:none;padding:0;color:inherit;text-align:left;cursor:pointer;max-width:100%}
.lightbox{position:fixed;inset:0;z-index:50;background:#10211c;color:#fff;display:flex;flex-direction:column}
.lightbox-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;background:#16332b}
.lightbox-bar button{background:#1f4a3e;color:#fff;border-radius:8px;padding:10px 12px;min-height:44px;font-size:14px}
.lightbox-bar button:disabled{opacity:.35}
.lightbox-name{flex:1 1 140px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.lightbox-stage{flex:1;min-height:0;display:grid;place-items:center;overflow:hidden;touch-action:none;position:relative}
.lightbox-stage img{max-width:100%;max-height:100%;object-fit:contain;transform-origin:center center;user-select:none}
.lightbox-stage video{width:min(960px,100%);max-height:100%;background:#000}
.lightbox-stage audio{width:min(480px,92%)}
.lightbox-status{margin:0;color:#d7ebe3;font-size:14px}
body.preview-open{overflow:hidden}
@media(max-width:720px){.thumb{width:48px;height:48px}.lightbox-bar{padding:8px}}
