@font-face { font-family: "Inter Tight"; font-weight: 400 700; src: url(fonts/InterTight-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Inter Tight"; font-weight: 100 300; src: url(fonts/InterTight-Thin.ttf) format("truetype"); font-display: swap; }

/* ================= Tokens ================= */
:root {
  --w: 1280px; --h: 690px; --top: 66px; --bottom: 62px;
  --radius: 24px; --radius-md: 16px; --radius-sm: 12px; --gap: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad-x: 22px;
}
/* Fill the tablet's real height (Fully Kiosk may hide the system bars); 690px stays the minimum. */
@supports (height: 100vh) { :root { --h: max(690px, 100vh); } }
@supports (height: 100dvh) { :root { --h: max(690px, 100dvh); } }
[data-theme="dark"] {
  --bg: #06080d;
  --bg-glow: radial-gradient(1000px 520px at 18% -18%, rgba(78, 98, 170, .20), transparent 62%), radial-gradient(800px 520px at 108% 118%, rgba(140, 70, 170, .13), transparent 60%);
  --card: #0f131b; --card-solid: #141924; --card-2: #171c27; --card-3: #202634;
  --line: rgba(255, 255, 255, .065); --line-strong: rgba(255, 255, 255, .12);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .045);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 14px 34px -12px rgba(0, 0, 0, .55);
  --text: #f3f5f9; --muted: #9aa3b6; --faint: #586174; --ghost: #2a3140;
  --grid-line: rgba(255, 255, 255, .055);
  --solar: #ffb340; --house: #5fb0ff; --import: #ff6b5e; --export: #34d399;
  --battery: #a78bfa; --heat: #ff8a4c; --cost: #f4c752; --forecast: #8e97aa; --outdoor: #a9c1e0;
  --free: #f45ce0; --free-2: #9b6bff; --saving: #2fd0e6;
  --good: #34d399; --warn: #ffb547; --bad: #ff6b5e;
  --seg-standard: #2a3142; --seg-none: #1a1f2b;
  --free-ink: #ffd6f8;
  --scrim: rgba(2, 4, 8, .62);
}
[data-theme="light"] {
  --bg: #eceef2;
  --bg-glow: radial-gradient(1000px 520px at 18% -18%, rgba(255, 255, 255, .9), transparent 62%), radial-gradient(800px 520px at 108% 118%, rgba(226, 214, 255, .55), transparent 60%);
  --card: #ffffff; --card-solid: #ffffff; --card-2: #f3f5f8; --card-3: #e7eaf0;
  --line: rgba(15, 23, 42, .07); --line-strong: rgba(15, 23, 42, .13);
  --hi: inset 0 1px 0 rgba(255, 255, 255, .8);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px -10px rgba(15, 23, 42, .14);
  --text: #0c111d; --muted: #566074; --faint: #a0a8b7; --ghost: #dfe3ea;
  --grid-line: rgba(15, 23, 42, .07);
  --solar: #e58a00; --house: #1f7fd6; --import: #e4473a; --export: #0e9f6e;
  --battery: #7a5af0; --heat: #e8641e; --cost: #b98900; --forecast: #8a93a5; --outdoor: #4f6788;
  --free: #d42cc0; --free-2: #7c4dff; --saving: #0891b2;
  --good: #0e9f6e; --warn: #d97f00; --bad: #e4473a;
  --seg-standard: #d6dbe4; --seg-none: #eceef2;
  --free-ink: #8a1179;
  --scrim: rgba(20, 26, 40, .38);
}

/* ================= Base ================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: var(--w); height: var(--h); overflow: hidden; background: var(--bg); }
body {
  font-family: "Inter Tight", system-ui, sans-serif; color: var(--text); background-image: var(--bg-glow);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums; transition: background-color .6s, color .6s;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.tiny { width: 15px; height: 15px; vertical-align: -2px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.thin { font-weight: 200; }
.placeholder { color: var(--faint); }

[hidden] { display: none !important; }
#app { position: relative; width: var(--w); height: var(--h); overflow: hidden; overflow: clip; }

/* Thin display numerals get a hair of stroke so they hold up from across the room. */
.clock-time, .node-value, .soc-ring b, .bat-power, .td-hero .big, .stat b, .kpi .k-value, .price-big,
.fc-day .pv, .hp-live .stat b, .zone .temp, .room b, .period-head h1, .modal-table b, .wx-temp, .hp-title h2, .modal h2, .sheet h2 {
  font-weight: 200; -webkit-text-stroke: .35px currentColor;
}

/* ================= Top bar ================= */
.topbar { height: var(--top); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--pad-x); position: relative; z-index: 5; }
.clock { display: flex; align-items: center; gap: 14px; text-align: left; justify-self: start; }
.clock-time { font-size: 40px; letter-spacing: -.5px; line-height: 1; }
.clock-meta { display: flex; flex-direction: column; gap: 3px; }
.clock-date { font-size: 15px; color: var(--muted); white-space: nowrap; }
.theme-badge { align-self: flex-start; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; padding: 1px 8px; }
.pills { position: relative; display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); }
.pills button { position: relative; z-index: 1; height: 40px; min-width: 88px; padding: 0 18px; border-radius: 99px; font-size: 16px; color: var(--muted); transition: color .3s; }
.pills button.active { color: var(--text); }
.pill-indicator { position: absolute; top: 4px; left: 4px; height: 40px; width: 88px; border-radius: 99px; background: var(--card-3); box-shadow: var(--hi); transition: transform .35s var(--ease), width .35s var(--ease); z-index: 0; }
[data-theme="light"] .pill-indicator { background: #0c111d; }
[data-theme="light"] .pills button.active { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 16px; justify-self: end; }
.weather-mini { display: flex; align-items: center; gap: 10px; }
.weather-mini .ico { width: 30px; height: 30px; color: var(--solar); }
.wx-temp { font-size: 30px; line-height: 1; }
.wx-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.15; }
.wx-text small { font-size: 13px; color: var(--muted); }
.bell { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted); }
.bell.has-warning { color: var(--warn); }
.bell.has-critical { color: var(--bad); animation: pulse 2s infinite; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; border-radius: 11px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg); }
.bell.has-warning .bell-count { background: var(--warn); color: #1b1300; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 94, .45); } 50% { box-shadow: 0 0 0 9px rgba(255, 107, 94, 0); } }

/* ================= Pager ================= */
.pager {
  height: calc(var(--h) - var(--top) - var(--bottom)); display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; touch-action: pan-x;
}
.pager::-webkit-scrollbar { display: none; }
.pager.dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; }
.panel { flex: 0 0 var(--w); width: var(--w); height: 100%; scroll-snap-align: start; scroll-snap-stop: always; padding: 2px var(--pad-x) 10px; position: relative; }

/* ================= Cards ================= */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; min-width: 0; }
.card.tappable { transition: transform .2s var(--ease); }
.card.tappable:active { transform: scale(.988); }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 10px; white-space: nowrap; min-height: 18px; }
.card-title .ico { width: 17px; height: 17px; }
.card-title .spacer { flex: 1; }
.title-stat { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); }
.stale-tag { font-size: 12px; letter-spacing: .02em; color: var(--warn); border: 1px solid currentColor; border-radius: 99px; padding: 1px 8px; text-transform: none; margin-left: 6px; }
.skeleton { background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.legend span { display: inline-flex; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.legend i.line { height: 3px; width: 14px; border-radius: 2px; }
.legend i.dash { height: 0; width: 14px; border-top: 2px dashed var(--c); background: none; border-radius: 0; }
.legend i.band { width: 14px; height: 12px; border-radius: 3px; background: var(--c); opacity: .45; border-top: 3px solid var(--c); }
.legend i.seg-cheap { background: var(--export); } .legend i.seg-peak { background: var(--import); }
.legend i.seg-free { background: linear-gradient(135deg, var(--free), var(--free-2)); } .legend i.seg-saving { background: var(--saving); }
.error-box { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; gap: 10px; font-size: 15px; }
.delta-good { color: var(--good) !important; } .delta-bad { color: var(--bad) !important; }

/* ================= Now panel ================= */
.now-grid { display: grid; height: 100%; gap: var(--gap); grid-template-columns: 488px 1fr 1fr; grid-template-rows: 206px 1fr 154px; }

/* ----- live flow ----- */
.now-flow { grid-row: 1 / span 3; display: flex; flex-direction: column; padding-bottom: 14px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 2px; }
.live-dot.on { background: var(--good); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.flow-wrap { position: relative; flex: 1; margin: 4px 0 2px; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-track { fill: none; stroke: var(--ghost); stroke-width: 2; }
.flow-line { fill: none; stroke: transparent; stroke-width: 3.5; stroke-linecap: round; }
.flow-line.on { stroke-dasharray: 2 12; animation: flow 1.1s linear infinite; }
.flow-line.rev { animation-direction: reverse; }
.flow-line.on.solar { stroke: var(--solar); } .flow-line.on.import { stroke: var(--import); } .flow-line.on.export { stroke: var(--export); }
.flow-line.on.battery { stroke: var(--battery); } .flow-line.on.heat { stroke: var(--heat); } .flow-line.on.free { stroke: var(--free); stroke-width: 4.5; }
@keyframes flow { to { stroke-dashoffset: -28; } }

.node { position: absolute; transform: translate(-50%, -50%); --c: var(--faint); --ring: 84px; }
.node-ring { position: relative; width: var(--ring); height: var(--ring); border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--c); transition: border-color .4s, box-shadow .4s; }
.node-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); opacity: .13; }
.node-ring::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid var(--c); opacity: .22; }
.node-ring .ico { position: relative; width: 34px; height: 34px; color: var(--c); stroke-width: 1.7; }
.node-text { position: absolute; white-space: nowrap; }
.side-r .node-text { left: calc(100% + 20px); top: 50%; transform: translateY(-50%); }
.side-b .node-text { left: 50%; top: calc(100% + 14px); transform: translateX(-50%); text-align: center; }
.node-value { font-size: 34px; line-height: 1.05; }
.node-value small { font-size: 16px; color: var(--muted); margin-left: 3px; -webkit-text-stroke: 0; font-weight: 400; }
.node-label { font-size: 14px; color: var(--muted); margin-top: 2px; }
.node.dim .node-ring { border-color: var(--line-strong); }
.node.dim .node-ring::before { opacity: .04; }
.node.dim .node-ring::after { opacity: 0; }
.node.dim .node-ring .ico { color: var(--faint); }
.node.dim .node-value { color: var(--muted); }
.node.solar { --c: var(--solar); left: 50%; top: 13%; }
.node.grid { --c: var(--import); left: 14%; top: 51%; }
.node.grid.exporting { --c: var(--export); }
.node.grid.free { --c: var(--free); }
.node.grid.free .node-ring { box-shadow: 0 0 0 6px rgba(244, 92, 224, .10), 0 0 28px -4px var(--free); }
.node.grid.free .node-label { color: var(--free); }
.node.battery { --c: var(--battery); left: 86%; top: 51%; }
.node.hp { --c: var(--heat); left: 50%; top: 89%; --ring: 66px; cursor: pointer; }
.node.hp .node-ring .ico { width: 28px; height: 28px; }
.node.hp[data-activity="hot_water"] { --c: var(--house); }
.node.hp .node-value { font-size: 28px; }
.node.house { --c: var(--house); left: 50%; top: 51%; --ring: 132px; }
.node.house .node-ring { border-width: 2.5px; align-content: center; gap: 0; }
.node.house .node-ring::after { inset: -12px; }
.node.house .node-ring .ico { width: 26px; height: 26px; margin-bottom: 2px; }
.node.house .node-value { position: relative; font-size: 32px; }
.node.house .node-label { position: relative; font-size: 13px; margin-top: 0; }
.node-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--free), var(--free-2)); box-shadow: 0 4px 14px -4px var(--free); z-index: 1; }
.node-badge.saving { background: var(--saving); color: #00242a; box-shadow: none; }
.flow-foot { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); min-height: 30px; }
.flow-updated { margin-left: auto; white-space: nowrap; }
.inv-meter { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; --c: var(--house); }
.inv-meter[data-state="near"] { --c: var(--warn); }
.inv-meter[data-state="over"] { --c: var(--bad); }
.inv-label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.inv-label .ico { width: 17px; height: 17px; color: var(--c); }
.inv-bar { position: relative; flex: 1; min-width: 60px; height: 8px; border-radius: 4px; background: var(--card-3); }
.inv-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c); transition: width 1s var(--ease), background-color .4s; }
.inv-tick { position: absolute; left: 80%; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--faint); opacity: .7; }
.inv-val { white-space: nowrap; }
.inv-val b { color: var(--text); font-weight: 500; }
.inv-meter[data-state="near"] .inv-val b, .inv-meter[data-state="over"] .inv-val b { color: var(--c); }
.inv-val em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--c); margin-left: 4px; }

/* ----- price ----- */
.price-card { grid-column: 2 / span 2; display: flex; flex-direction: column; padding-bottom: 12px; }
.price-card::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
.price-card[data-mode="free"] { border-color: rgba(244, 92, 224, .45); }
.price-card[data-mode="free"]::before { opacity: 1; background: radial-gradient(520px 260px at 0% 0%, rgba(244, 92, 224, .22), transparent 70%), radial-gradient(480px 260px at 100% 100%, rgba(155, 107, 255, .16), transparent 70%); }
.price-card[data-mode="saving"] { border-color: rgba(47, 208, 230, .4); }
.price-card[data-mode="saving"]::before { opacity: 1; background: radial-gradient(520px 260px at 0% 0%, rgba(47, 208, 230, .15), transparent 70%); }
.price-card > * { position: relative; }
.price-main { display: flex; gap: 18px; align-items: stretch; flex: 1; min-height: 0; }
.price-now { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.price-big { font-size: 58px; line-height: .95; letter-spacing: -1px; white-space: nowrap; }
.price-big small { font-size: 17px; letter-spacing: 0; color: var(--muted); margin-left: 6px; -webkit-text-stroke: 0; font-weight: 400; }
.free-word { font-weight: 400; -webkit-text-stroke: 0; letter-spacing: -1.5px; background: linear-gradient(100deg, var(--free) 10%, var(--free-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-band { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-top: 8px; white-space: nowrap; }
.price-band b { font-weight: 500; }
.price-band .ico { color: var(--free); width: 18px; height: 18px; }
.price-band .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--forecast)); }
.dot.band-cheap { --c: var(--export); } .dot.band-standard { --c: var(--forecast); } .dot.band-peak { --c: var(--import); }
.price-next { font-size: 15px; color: var(--muted); margin-top: 4px; white-space: nowrap; min-height: 18px; }

.event-tile { width: 330px; flex: none; border-radius: var(--radius-md); padding: 12px 14px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 8px; --c: var(--muted); }
.event-tile.free { --c: var(--free); } .event-tile.saving { --c: var(--saving); } .event-tile.cheap { --c: var(--export); }
.event-tile.active.free { background: linear-gradient(135deg, var(--free), var(--free-2)); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px var(--free); }
.event-tile.active.saving { background: var(--saving); border-color: transparent; color: #00262c; }
.ev-head { display: flex; align-items: center; gap: 12px; }
.ev-icon { position: relative; width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: var(--c); }
.ev-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: .15; }
.ev-icon .ico { position: relative; width: 24px; height: 24px; }
.event-tile.active .ev-icon { color: inherit; }
.event-tile.active .ev-icon::before { background: #fff; opacity: .22; }
.event-tile.active.free .ev-icon .ico { animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-6deg); } }
.ev-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ev-title b { font-size: 17px; font-weight: 500; white-space: nowrap; }
.ev-title span { font-size: 15px; opacity: .8; white-space: nowrap; }
.ev-status { font-size: 13px; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; color: var(--c); background: var(--card-3); }
.event-tile.active .ev-status { background: rgba(255, 255, 255, .22); color: inherit; }
.event-tile.done .ev-status { color: var(--muted); }
.ev-progress { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.ev-progress i { display: block; height: 100%; border-radius: 3px; background: #fff; }
.ev-foot { font-size: 14px; opacity: .85; }
.event-tile:not(.active) .ev-foot { color: var(--muted); opacity: 1; }
.ev-result { font-size: 15px; color: var(--muted); }
.ev-result b { color: var(--c); font-weight: 600; font-size: 17px; }

.timeline { position: relative; height: 24px; margin-top: 12px; display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; flex: none; }
.timeline .seg { display: block; height: 100%; border-radius: 3px; background: var(--seg-none); }
.timeline .seg:first-child { border-radius: 7px 3px 3px 7px; } .timeline .seg:last-of-type { border-radius: 3px 7px 7px 3px; }
.seg-standard { background: var(--seg-standard) !important; }
.seg-cheap { background: var(--export) !important; }
.seg-peak { background: var(--import) !important; }
.seg-free { background: linear-gradient(180deg, var(--free), var(--free-2)) !important; }
.seg-saving { background: var(--saving) !important; }
.timeline .seg.past { opacity: .38; }
.timeline .seg.current { transform: scaleY(1.22); }
.timeline .now-mark { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px var(--card); }
.timeline-labels { position: relative; height: 16px; margin-top: 6px; font-size: 13px; color: var(--muted); flex: none; }
.timeline-labels span { position: absolute; transform: translateX(-50%); }
.timeline-labels span:first-child { transform: none; } .timeline-labels span:last-child { transform: translateX(-100%); }

/* ----- battery ----- */
.battery-card { --c: var(--battery); display: flex; flex-direction: column; gap: 6px; }
.bat-cover { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.bat-cover span { overflow: hidden; text-overflow: ellipsis; }
.bat-cover .ico { width: 20px; height: 20px; }
.bat-cover.ok { color: var(--good); }
.bat-cover.low { color: var(--warn); }
.bat-eta { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 17px; }
.soc-chart { position: relative; flex: 1; min-height: 56px; margin: 18px 0 16px; }
.soc-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.soc-grid { stroke: var(--grid-line); stroke-width: 1; stroke-dasharray: 3 4; }
.soc-area { fill: var(--battery); opacity: .14; }
.soc-line { fill: none; stroke: var(--battery); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.soc-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--battery); box-shadow: 0 0 0 4px color-mix(in srgb, var(--battery) 25%, transparent); }
.soc-axis { position: absolute; left: 0; right: 0; bottom: -17px; display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
.soc-cap { position: absolute; top: -18px; right: 0; font-size: 12px; color: var(--muted); }
.battery-card .inv-meter { flex: none; font-size: 14px; color: var(--muted); }
.inv-note { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-note[data-state="near"] { color: var(--warn); }
.inv-note[data-state="over"] { color: var(--bad); font-weight: 500; }
.inv-note:empty { display: none; }
.battery-card > :not(.soc-chart) { flex: none; }
@media (max-height: 760px) { .soc-chart { display: none; } .battery-card .inv-meter { margin-top: auto; } }
/* ----- today ----- */
.today-card { display: flex; flex-direction: column; }
.td-hero { display: flex; align-items: baseline; gap: 8px; }
.td-hero .big { font-size: 46px; line-height: 1; }
.td-hero .unit { font-size: 16px; color: var(--muted); }
.progress { flex: none; height: 6px; border-radius: 3px; background: var(--card-3); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--solar), #ffd88a); transition: width 1s var(--ease); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.stat { min-width: 0; }
.stat b { display: block; font-size: 25px; line-height: 1.1; white-space: nowrap; }
.stat b small { font-size: 13px; color: var(--muted); -webkit-text-stroke: 0; font-weight: 400; margin-left: 3px; }
.stat span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.free b { color: var(--free); }
.stat.free span { color: var(--free); opacity: .85; }
.stat.saving b { color: var(--saving); }

/* ----- plan ahead ----- */
.plan-card { grid-column: 2 / span 2; display: grid; grid-template-columns: 1fr 1px 330px; gap: 0 18px; padding-bottom: 14px; }
.plan-card::after { content: ""; grid-column: 2; grid-row: 1; background: var(--line); margin: 2px 0; }
.plan-forecast { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
.plan-events { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
.fc-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; }
.fc-day { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.fc-top { display: flex; align-items: center; justify-content: space-between; }
.fc-day .d { font-size: 15px; font-weight: 500; }
.fc-day .ico { width: 24px; height: 24px; color: var(--solar); }
.fc-day .pv { font-size: 24px; line-height: 1.1; }
.fc-day .pv small { font-size: 13px; color: var(--muted); margin-left: 3px; -webkit-text-stroke: 0; font-weight: 400; }
.fc-day .t { font-size: 14px; }
.fc-bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--card-3); overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 2px; background: var(--solar); }
.up-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-height: 0; overflow: hidden; }
.up { display: flex; align-items: center; gap: 10px; font-size: 14px; --c: var(--muted); }
.up.free { --c: var(--free); } .up.saving { --c: var(--saving); }
.up-icon { position: relative; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--c); flex: none; }
.up-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: .15; }
.up-icon .ico { position: relative; width: 16px; height: 16px; }
.up-main { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.up-main b { font-weight: 500; font-size: 14px; }
.up-main span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.up em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--c); white-space: nowrap; }
.up.active .up-icon { background: var(--c); color: #fff; }
.up-empty { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.4; }
.up-empty .ico { width: 20px; height: 20px; color: var(--faint); margin-top: 1px; }

/* ================= Period panels ================= */
.period-grid { display: grid; height: 100%; gap: 12px var(--gap); grid-template-columns: 1fr 360px; grid-template-rows: 46px 106px 1fr; }
.period-head { grid-column: 1 / span 2; display: flex; align-items: center; gap: 10px; }
.period-head h1 { margin: 0 0 0 8px; font-size: 34px; letter-spacing: -.3px; white-space: nowrap; }
.period-head .sub { color: var(--muted); font-size: 16px; margin-left: 6px; white-space: nowrap; }
.period-head .spacer { flex: 1; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); flex: none; transition: opacity .3s; }
.icon-btn:disabled { opacity: .3; box-shadow: none; }
.icon-btn:active:not(:disabled) { transform: scale(.94); }
.text-btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 18px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 15px; font-weight: 500; }
.kpis { grid-column: 1 / span 2; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: var(--gap); }
.kpi { padding: 14px 18px 13px; display: flex; flex-direction: column; justify-content: space-between; --c: var(--muted); }
.kpi::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); opacity: .9; }
.kpi.skeleton::before { display: none; }
.kpi .k-label { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.kpi .k-label .ico { width: 16px; height: 16px; color: var(--c); }
.kpi .k-value { font-size: 38px; line-height: 1; white-space: nowrap; letter-spacing: -.5px; }
.kpi .k-value small { font-size: 16px; color: var(--muted); margin-left: 4px; -webkit-text-stroke: 0; font-weight: 400; letter-spacing: 0; }
.kpi .k-delta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-free { border-color: rgba(244, 92, 224, .35); background: linear-gradient(135deg, rgba(244, 92, 224, .14), rgba(155, 107, 255, .07)) , var(--card); }
.kpi-free::before { background: linear-gradient(180deg, var(--free), var(--free-2)); }
.kpi-free .k-value { color: var(--free); }
.kpi-free .k-delta { color: var(--free); }
.kpi-saving { border-color: rgba(47, 208, 230, .35); }
.kpi-saving .k-value { color: var(--saving); }
.kpi-error { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 16px; }
.kpi-error::before { display: none; }
.kpi-error .ico { color: var(--warn); }
.chart-card { display: flex; flex-direction: column; padding-bottom: 12px; }
.chart-box { position: relative; flex: 1; min-height: 0; }
.expand-hint { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--card-2); margin-left: 4px; }
.expand-hint .ico { transform: rotate(45deg); width: 14px; height: 14px; }
.balance { flex: none; display: grid; grid-template-columns: 1.55fr repeat(var(--cells, 5), 1fr); gap: 14px; align-items: start; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.bal-home { min-width: 0; }
.bal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.bal-head span { display: inline-flex; align-items: center; gap: 6px; }
.bal-head b { font-size: 17px; font-weight: 500; color: var(--text); }
.bal-head b small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.bal-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--card-3); gap: 2px; margin-top: 6px; }
.bal-bar i, .bal-legend i { display: block; height: 100%; background: var(--c); }
.b-self { --c: var(--good); } .b-cheap { --c: var(--forecast); } .b-full { --c: var(--import); } .b-grid { --c: var(--import); }
.bal-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.bal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.bal-legend i { width: 8px; height: 8px; border-radius: 50%; }
.bal-cell { min-width: 0; padding-left: 10px; border-left: 2px solid var(--c); }
.bal-cell span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; }
.bal-cell b { display: block; font-size: 19px; font-weight: 500; line-height: 1.25; white-space: nowrap; }
.bal-cell b small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.bal-cell em { display: block; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-cell.saved b, .bal-cell.saved em { color: var(--good); }
.insights-card { min-height: 0; }
.insights-card .insights { overflow-y: auto; touch-action: pan-y; scrollbar-width: none; }
.insights-card .insights::-webkit-scrollbar { display: none; }
.insights-card { display: flex; flex-direction: column; padding: 14px 14px 12px; }
.insights-card .card-title { margin-bottom: 8px; }
.insights { display: flex; flex-direction: column; gap: 6px; overflow: hidden; flex: 1; min-height: 0; }
.insight { display: flex; gap: 11px; align-items: center; font-size: 14px; line-height: 1.28; min-height: 48px; flex: none; padding: 6px 10px 6px 8px; border-radius: var(--radius-sm); background: var(--card-2); animation: rise .5s var(--ease) both; --c: var(--muted); }
.insight.good { --c: var(--good); } .insight.bad { --c: var(--bad); } .insight.warn { --c: var(--warn); }
.insight.free { --c: var(--free); } .insight.saving { --c: var(--saving); }
.insight.free { background: linear-gradient(135deg, rgba(244, 92, 224, .16), rgba(155, 107, 255, .08)), var(--card-2); }
.ins-icon { position: relative; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--c); flex: none; }
.ins-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: .14; }
.ins-icon .ico { position: relative; width: 18px; height: 18px; }
.insight > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insight:nth-child(2) { animation-delay: .05s; } .insight:nth-child(3) { animation-delay: .1s; } .insight:nth-child(4) { animation-delay: .15s; } .insight:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ================= Bottom bar ================= */
.bottombar { height: var(--bottom); display: flex; align-items: center; gap: 14px; padding: 0 var(--pad-x) 10px; position: relative; z-index: 6; }
.hp-chip { position: relative; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px 0 7px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 560px; flex: none; touch-action: none; }
.hp-chip-grab { position: absolute; left: 50%; top: 5px; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px; background: var(--faint); opacity: .6; }
.hp-chip-icon { position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.hp-chip-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .14; }
.hp-chip-icon .ico { position: relative; width: 18px; height: 18px; }
.hp-chip[data-activity="heating"] .hp-chip-icon { color: var(--heat); }
.hp-chip[data-activity="hot_water"] .hp-chip-icon { color: var(--house); }
.hp-chip[data-activity="defrost"] .hp-chip-icon { color: #8fd3ff; }
.hp-chip[data-activity="offline"] .hp-chip-icon { color: var(--faint); }
.hp-chip[data-activity="heating"] .hp-chip-icon, .hp-chip[data-activity="hot_water"] .hp-chip-icon { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 14px -2px currentColor; } }
.hp-chip-body { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
.hp-chip-body b { font-weight: 600; }
.hp-chip-body .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); flex: none; }
.hp-chip-chev { width: 18px; height: 18px; color: var(--muted); }
.hint { flex: 1; min-width: 0; height: 48px; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: 99px; --c: var(--muted); }
.hint:empty { padding: 0; }
.hint span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
.hint .ico { width: 19px; height: 19px; color: var(--c); }
.hint.good { --c: var(--good); color: var(--text); background: rgba(52, 211, 153, .10); }
.hint.bad, .hint.warn { --c: var(--warn); color: var(--text); background: rgba(255, 181, 71, .10); }
.hint.free { --c: #fff; color: #fff; background: linear-gradient(100deg, var(--free), var(--free-2)); font-weight: 500; box-shadow: 0 8px 24px -10px var(--free); }
.hint.saving { --c: #00262c; color: #00262c; background: var(--saving); font-weight: 500; }
.status-dots { display: flex; gap: 8px; flex: none; }
.status-dots:empty { display: none; }
.feed-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14px; white-space: nowrap; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.feed-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.feed-chip.down i { background: var(--bad); }

/* ================= Overlays ================= */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 20; opacity: 0; transition: opacity .3s; }
.scrim.show { opacity: 1; }

.drawer { position: absolute; left: 16px; right: 16px; bottom: 0; height: calc(var(--h) - 80px); z-index: 30; border-radius: 30px 30px 0 0; background: var(--bg); background-image: var(--bg-glow); border: 1px solid var(--line-strong); border-bottom: 0; box-shadow: 0 -24px 60px rgba(0, 0, 0, .35); transform: translateY(100%); visibility: hidden; transition: transform .42s var(--ease), visibility 0s .42s; display: flex; flex-direction: column; touch-action: none; }
.drawer.open { transform: translateY(0); visibility: visible; transition: transform .42s var(--ease); }
.drawer.dragging, .sheet.dragging { transition: none; visibility: visible; }
.drawer-handle { height: 26px; display: grid; place-items: center; flex: none; cursor: grab; }
.drawer-handle span { width: 56px; height: 5px; border-radius: 3px; background: var(--faint); opacity: .7; }
.drawer-content { flex: 1; min-height: 0; padding: 0 22px 16px; display: grid; gap: var(--gap); grid-template-columns: 1fr 1fr 350px; grid-template-rows: auto 1fr auto; touch-action: pan-y; }
.hp-head { grid-column: 1 / span 3; display: flex; align-items: center; gap: 18px; }
.hp-head-icon { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--heat); flex: none; }
.hp-head-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: .15; }
.hp-head-icon .ico { position: relative; width: 28px; height: 28px; }
.drawer[data-activity="hot_water"] .hp-head-icon { color: var(--house); }
.drawer[data-activity="offline"] .hp-head-icon, .drawer[data-activity="idle"] .hp-head-icon { color: var(--muted); }
.hp-title { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.hp-title h2 { margin: 0; font-size: 28px; line-height: 1; }
.hp-head .spacer { flex: 1; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.seg button { height: 38px; padding: 0 16px; border-radius: 99px; font-size: 15px; color: var(--muted); }
.seg button.active { background: var(--card-3); color: var(--text); }
[data-theme="light"] .seg button.active { background: #0c111d; color: #fff; }
.hp-live { display: flex; gap: 26px; margin-left: 10px; }
.hp-live .stat b { font-size: 30px; }
.hp-live .stat b small { font-size: 14px; }
.hp-chart { grid-column: 1 / span 2; display: flex; flex-direction: column; }
.hp-totals { font-size: 15px; color: var(--muted); margin: -2px 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.hp-totals b { color: var(--text); font-weight: 500; }
.hp-totals .sep { color: var(--faint); }
.hp-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 10px; flex: none; }
.hp-insights[hidden] { display: none; }
.hp-insights .insight { font-size: 13.5px; min-height: 46px; }
.hp-insights .insight > span:last-child { -webkit-line-clamp: 3; }
.hp-side { display: flex; flex-direction: column; gap: var(--gap); overflow: hidden; min-height: 0; }
.rooms-card { flex: 1; min-height: 0; }
.hp-zones { display: grid; gap: 8px; }
.zone { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; border-radius: var(--radius-sm); background: var(--card-2); font-size: 15px; --c: var(--heat); }
.zone.water { --c: var(--house); }
.z-icon { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); flex: none; }
.z-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: .14; }
.z-icon .ico { position: relative; width: 19px; height: 19px; }
.zone .name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.zone .name b { font-weight: 500; }
.zone .name span { font-size: 13px; color: var(--muted); }
.zone .temp { font-size: 28px; }
.zone .badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--card-3); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.zone .badge.on { color: var(--c); }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.room { padding: 9px 11px; border-radius: var(--radius-sm); background: var(--card-2); }
.room b { display: block; font-size: 26px; line-height: 1.1; }
.room span { font-size: 13px; color: var(--muted); }
.hp-foot { grid-column: 1 / span 3; display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.hp-title .chip { padding: 3px 10px; font-size: 13px; font-weight: 500; }
.chip.ok::before, .chip.bad::before, .chip.warn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.chip.bad::before { background: var(--bad); } .chip.warn::before { background: var(--warn); }

.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: 460px; z-index: 30; background: var(--bg); background-image: var(--bg-glow); border-left: 1px solid var(--line-strong); box-shadow: -24px 0 60px rgba(0, 0, 0, .3); transform: translateX(100%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; display: flex; flex-direction: column; }
.sheet.open { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.sheet header, .modal header { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; }
.sheet h2, .modal h2 { margin: 0; font-size: 30px; line-height: 1; }
.sheet-sub, .modal-sub { flex: 1; font-size: 15px; color: var(--muted); }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.alert-item { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); --c: var(--muted); }
.alert-item.critical { --c: var(--bad); border-color: rgba(255, 107, 94, .4); } .alert-item.warning { --c: var(--warn); } .alert-item.info { --c: var(--house); }
.al-icon { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--c); flex: none; }
.al-icon::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: .14; }
.al-icon .ico { position: relative; }
.alert-item b { display: block; font-weight: 500; font-size: 17px; margin-bottom: 3px; }
.alert-item span { display: block; font-size: 15px; color: var(--muted); line-height: 1.35; }
.alert-item em { display: inline-block; margin-top: 8px; font-style: normal; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 2px 8px; border-radius: 99px; background: var(--card-2); }
.all-clear { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 20px; color: var(--muted); text-align: center; font-size: 15px; }
.all-clear b { color: var(--text); font-size: 20px; font-weight: 500; }
.ac-icon { position: relative; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: var(--good); margin-bottom: 8px; }
.ac-icon::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor; opacity: .14; }
.ac-icon .ico { position: relative; width: 34px; height: 34px; }
.muted-state .ac-icon { color: var(--warn); }

.modal { position: absolute; inset: 26px 40px; z-index: 40; background: var(--bg); background-image: var(--bg-glow); border: 1px solid var(--line-strong); border-radius: 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: flex; flex-direction: column; opacity: 0; transform: scale(.97); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s; }
.modal.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .25s, transform .3s var(--ease); }
.modal-body { flex: 1; min-height: 0; padding: 0 22px 22px; display: grid; grid-template-rows: 1fr auto; gap: 14px; }
.modal-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; }
.modal-table { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 10px; }
.modal-table div { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px 10px 16px; box-shadow: var(--shadow); overflow: hidden; }
.modal-table div::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.modal-table span { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.modal-table b { display: block; font-size: 26px; white-space: nowrap; }
.modal-table b small { font-size: 14px; color: var(--muted); margin-left: 3px; -webkit-text-stroke: 0; font-weight: 400; }
.modal-table b em { font-style: normal; font-size: 14px; color: var(--free); margin-left: 6px; -webkit-text-stroke: 0; font-weight: 500; }
.modal-table i { display: block; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.toast { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 50; padding: 11px 20px; border-radius: 99px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); font-size: 15px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .pager { scroll-behavior: auto; }
}
