:root{--tg-bg: #ffffff;--tg-text: #000000;--tg-hint: #707579;--tg-link: #2481cc;--tg-button: #2481cc;--tg-button-text: #ffffff;--tg-secondary-bg: #f0f0f0;--tg-section-bg: #ffffff;--radius: 14px}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}body{margin:0;background:var(--tg-secondary-bg);color:var(--tg-text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:16px}.app{max-width:640px;margin:0 auto;padding:16px 14px 32px}.head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.head h1{font-size:22px;margin:0}.sub{margin:2px 0 0;color:var(--tg-hint);font-size:14px}.refresh{background:var(--tg-section-bg);color:var(--tg-link);border:none;border-radius:50%;width:40px;height:40px;font-size:20px;cursor:pointer}.stale{background:#ffae0022;color:#9a6b00;padding:8px 12px;border-radius:10px;font-size:13px;margin:0 0 12px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{background:var(--tg-section-bg);border-radius:var(--radius);padding:14px;box-shadow:0 1px 3px #0000000f}.card.wide{grid-column:1 / -1}.card h2{font-size:13px;font-weight:600;color:var(--tg-hint);margin:0 0 10px;text-transform:uppercase;letter-spacing:.03em}.big{display:flex;flex-direction:column;gap:2px;margin-bottom:8px}.amount{font-size:22px;font-weight:700}.hint{color:var(--tg-hint);font-size:13px}.row{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;margin-bottom:8px}.delta{font-weight:700;font-size:15px}.delta.up{color:#1a9d4b}.delta.down{color:#d2353f}.list{list-style:none;margin:10px 0 0;padding:0}.list li{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-top:1px solid var(--tg-secondary-bg);font-size:14px}.list .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list .val{font-variant-numeric:tabular-nums;font-weight:600;flex-shrink:0}.bars{list-style:none;margin:0;padding:0}.bars li{margin-bottom:10px}.bar-row{display:flex;justify-content:space-between;gap:10px;font-size:14px;margin-bottom:4px}.bar-row .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-row .val{font-weight:700;flex-shrink:0}.bar-track{height:8px;background:var(--tg-secondary-bg);border-radius:6px;overflow:hidden}.bar-fill{height:100%;background:var(--tg-button);border-radius:6px}.reorder-hint{color:var(--tg-hint);font-size:12px;margin:0 0 10px;text-align:center;opacity:.8}.card{touch-action:pan-y}.drag-ghost{opacity:.4}.card.sortable-chosen{box-shadow:0 6px 20px #00000040;transform:scale(1.01)}.chart-card{margin-bottom:0}.chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}.chart-head h2{margin:0 0 4px}.amount.sm{font-size:18px}.chart{width:100%;height:auto;display:block}.chart-line{fill:none;stroke:var(--tg-button);stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round}.chart-area{fill:var(--tg-button);opacity:.12;stroke:none}.chart-dot,.bar{fill:var(--tg-button)}.refresh.sm{width:30px;height:30px;font-size:16px}.refresh.sm:disabled{opacity:.4}.dolar-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.dolar-cell{display:flex;flex-direction:column;gap:2px}.dolar-cell .amount{font-size:17px}.tappable{cursor:pointer}.tap-hint{color:var(--tg-link);font-size:12px;margin:10px 0 0;text-align:right}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:flex-end;justify-content:center;z-index:1000;padding:12px}.modal{background:var(--tg-section-bg);color:var(--tg-text);border-radius:16px;padding:18px;width:100%;max-width:460px;margin-bottom:env(safe-area-inset-bottom,8px);box-shadow:0 -4px 24px #0000004d}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.modal-head h2{margin:0;font-size:18px}.field{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}.field.grow{flex:1;margin-bottom:0}.field select,.field input{background:var(--tg-bg);color:var(--tg-text);border:1px solid var(--tg-secondary-bg);border-radius:10px;padding:11px 12px;font-size:16px;width:100%}.conv-row{display:flex;align-items:flex-end;gap:8px;margin-bottom:14px}.swap{background:var(--tg-secondary-bg);color:var(--tg-text);border:none;border-radius:10px;width:40px;height:44px;font-size:18px;flex-shrink:0;cursor:pointer}.result{background:var(--tg-bg);border:1px solid var(--tg-secondary-bg);border-radius:10px;padding:11px 12px;font-size:18px;font-weight:700;min-height:44px;display:flex;align-items:center}.center{text-align:center}.copy-btn{width:100%;background:var(--tg-button);color:var(--tg-button-text);border:none;border-radius:10px;padding:12px;font-size:15px;font-weight:600;cursor:pointer;margin-bottom:10px}.modal .seg{display:flex;width:100%}.modal .seg .seg-b{flex:1;font-size:13px}.chart-x{fill:var(--tg-hint);font-size:9px}.seg{display:inline-flex;background:var(--tg-secondary-bg);border-radius:9px;padding:2px;gap:2px}.seg-per{display:flex;margin-top:10px}.seg-per .seg-b{flex:1;padding:6px 4px;font-size:12px;text-align:center}.seg-b{border:none;background:transparent;color:var(--tg-hint);font-size:13px;font-weight:600;padding:6px 12px;border-radius:7px;cursor:pointer}.seg-b.on{background:var(--tg-section-bg);color:var(--tg-text);box-shadow:0 1px 2px #0000001a}.centered{min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--tg-hint)}.err{color:#d2353f;text-align:center}.btn{background:var(--tg-button);color:var(--tg-button-text);border:none;border-radius:10px;padding:10px 20px;font-size:15px;cursor:pointer}.foot{text-align:center;color:var(--tg-hint);font-size:12px;margin-top:18px}
