:root {
  --ink: #121417;
  --muted: #6b7280;
  --line: #e6e8ec;
  --bg: #f4f6f8;
  --card: #ffffff;
  --blue: #155eef;
  --blue-press: #1248c4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #dfe3e8;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}
.phone {
  position: relative;
  width: min(390px, 100%);
  height: 100vh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  scrollbar-width: none;
}
.phone::-webkit-scrollbar { display: none; }
.screen { padding: 18px 20px 28px; }
#loginForm { align-content: start; }
.dock { display: grid; gap: 8px; }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 18px;
  font-weight: 650;
}
.avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 42%;
  background: #e7eaee;
  display: block;
}
.logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font-size: 16px;
}
.account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.hello {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  margin: 0;
  min-width: 0;
  transform: translateY(-6px);
}
.hello span {
  position: absolute;
  left: 0;
  bottom: calc(50% + 10px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.hello strong {
  font-size: 16px;
  font-weight: 720;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#avatarButton {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #e7eaee;
  line-height: 0;
  transform: translateY(-14px);
}
#avatarButton.letter {
  display: grid;
  place-items: center;
  background: #121417;
  line-height: 1;
}
.avatar-letter {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.avatar[hidden],
.avatar-letter[hidden] { display: none; }
.account-menu[hidden] { display: none; }
.sheet-menu {
  position: absolute;
  inset: 0;
  z-index: 6;
  visibility: hidden;
  pointer-events: none;
}
.sheet-menu.is-shown { visibility: visible; }
.sheet-menu.is-open { pointer-events: auto; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(18, 20, 23, 0.32);
  opacity: 0;
  transition: opacity 0.55s ease;
}
.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px 16px;
  border-radius: 22px 22px 0 0;
  background: #fff;
  transform: translateY(110%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.sheet-menu.is-open .sheet-backdrop { opacity: 1; }
.sheet-menu.is-open .sheet-panel { transform: translateY(0); }
.sheet-grab {
  width: 36px;
  height: 4px;
  margin: 4px auto 6px;
  border-radius: 999px;
  background: #e1e4e8;
}
.sheet-panel h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.sheet-account {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.sheet-panel h3 {
  margin: 14px 0 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.sheet-panel ul { overflow: auto; min-height: 0; flex: 1; align-content: start; }
.sheet-panel li {
  padding: 2px 0 0;
  border-top: 0;
  font-size: 12px;
  font-weight: 500;
}
.sheet-panel li b { font-size: 12px; font-weight: 500; }
.device-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.copy-code {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b919a;
  display: grid;
  place-items: center;
}
.copy-code svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#logout {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: auto;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background: #f3f5f7;
  color: var(--ink);
  font: inherit;
  font-weight: 680;
  touch-action: manipulation;
}
#logout.is-hold {
  background-image: linear-gradient(#e1e5ea, #e1e5ea);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  animation: logout-hold 5s linear forwards;
}
@keyframes logout-hold {
  to { background-size: 100% 100%; }
}
.sheet-panel.is-lab { height: 84%; }
.sheet-panel.is-lab ul {
  flex: 0 1 auto;
  max-height: 52px;
}
.lab-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  flex: 1;
  scrollbar-width: none;
}
.lab-box[hidden] { display: none; }
.lab-box::-webkit-scrollbar { display: none; }
.lab-box h3 { margin: 4px 0 0; }
.lab-note,
.lab-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.lab-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lab-choices button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: #f3f5f7;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
}
.lab-choices button.is-on {
  background: #121417;
  color: #fff;
}
.lab-choices button.lab-go {
  background: #e8ecf1;
  color: #4b5560;
}
.gate {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  color: var(--ink);
}
.gate[hidden] { display: none; }
.gate-note {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  margin: 0;
  transform: translateY(calc(-100% - 20px));
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.gate-dots {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0;
  transform: translateY(-50%);
}
.gate-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d5d9de;
}
.gate-dots i.is-on { background: #121417; }
.gate-dots.is-bad { animation: gate-shake 0.28s ease; }
@keyframes gate-shake {
  20% { transform: translate(-6px, -50%); }
  40% { transform: translate(6px, -50%); }
  60% { transform: translate(-4px, -50%); }
  80% { transform: translate(4px, -50%); }
}
.gate-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding: 0 24px 28px;
}
.gate-pad button {
  height: 64px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: 650;
}
.gate-pad button[data-digit="del"] {
  background: transparent;
  font-size: 15px;
  font-weight: 680;
}
h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
  font-weight: 720;
}
.lede, .fine { color: var(--muted); line-height: 1.45; }
.fine { font-size: 13px; margin: 0; }
.sheet { display: grid; gap: 10px; margin-top: 16px; align-content: start; }
label { display: grid; gap: 6px; }
label > span, .card h2, .stats span, .balance > span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
input, select {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: #f3f5f7;
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  box-shadow: none;
}
input:focus, select:focus {
  outline: none;
  box-shadow: none;
}
.field { position: relative; display: block; }
.field input { padding-right: 72px; }
.eye {
  position: absolute;
  right: 8px;
  top: 8px;
  height: 36px;
  border: 0;
  background: #eef2ff;
  color: var(--blue);
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
}
.primary {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border: 0;
  border-radius: 16px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
}
.primary:active { background: var(--blue-press); }
.primary:disabled { opacity: 0.6; }
.ghost {
  width: 100%;
  margin-top: 0;
  background: white;
  color: var(--ink);
  border: 0;
}
.error {
  margin: 0;
  color: #b42318;
  background: #fef3f2;
  border-radius: 12px;
  padding: 10px 12px;
}
#home {
  position: relative;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #f4f6f8;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
}
#home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  background: #111;
  opacity: 0;
  pointer-events: none;
}
.hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  overflow: hidden;
}
.hero > img {
  position: relative;
  z-index: 0;
  width: 138%;
  max-width: none;
  height: auto;
  margin-left: -30%;
  display: block;
}
#home.is-night .hero { background: #182e55; }
#home.is-night .hero > img,
#home.is-night .house-wires,
#home.is-night .house-veil img,
#home.is-night .rain-layer {
  /* kéo cao thêm để mép trên không hở dải nền */
  transform: translateY(18px) scaleY(1.045);
  transform-origin: 50% 100%;
}
.rain-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(244, 246, 248, 0) 0%,
    rgba(244, 246, 248, 0.4) 46%,
    rgba(244, 246, 248, 0.86) 74%,
    #f4f6f8 100%
  );
}
.house-wires {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 138%;
  height: auto;
  margin-left: -30%;
  pointer-events: none;
  overflow: visible;
}
.house-flow { opacity: 0; }
#houseBatFlowNight { display: none; }
#home.is-night #houseBatFlow { display: none; }
#home.is-night #houseBatFlowNight { display: inline; }
.house-flow.is-shown { opacity: 1; }
.wire-body,
.led {
  fill: none;
  stroke: #161616;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wire-body {
  stroke-width: 1.7;
  opacity: 1;
}
.house-flow.is-live .wire-body {
  stroke: #FFD766;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 1.4px #FFE28F);
}
.led { opacity: 0; }
.house-flow.is-run .led.y.a,
.house-flow.is-run .led.y.b,
.house-flow.is-run .led.y.c { opacity: 1; }
.house-flow.is-run .led.y.a {
  stroke: #FFE28F;
  stroke-width: 4.8;
  stroke-dasharray: 78 42;
  filter: blur(0.35px);
  animation: led-tail 2.2s linear infinite;
}
.house-flow.is-run .led.y.b {
  stroke: #FFF6D9;
  stroke-width: 3.4;
  stroke-dasharray: 36 84;
  filter: blur(0.2px);
  animation: led-mid 2.2s linear infinite;
}
.house-flow.is-run .led.y.c {
  stroke: #FFFFFF;
  stroke-width: 2.6;
  stroke-dasharray: 16 104;
  filter: none;
  animation: led-head 2.2s linear infinite;
}
.house-flow.back .led.y.a,
.house-flow.back .led.y.b,
.house-flow.back .led.y.c { animation-direction: reverse; }
@keyframes led-tail {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -120; }
}
@keyframes led-mid {
  from { stroke-dashoffset: -40; }
  to { stroke-dashoffset: -160; }
}
@keyframes led-head {
  from { stroke-dashoffset: -62; }
  to { stroke-dashoffset: -182; }
}
.house-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}
.house-veil img {
  position: absolute;
  left: 0;
  top: 0;
  width: 138%;
  max-width: none;
  height: auto;
  margin: 0 0 0 -30%;
  filter: blur(8px);
}
.house-veil-near img { filter: blur(18px); }
#home .nav {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 36px 20px 0;
  justify-content: space-between;
  pointer-events: none;
}
#home .account { pointer-events: auto; }
.weather {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transform: translateY(-6px);
  pointer-events: auto;
  cursor: pointer;
}
.weather[hidden] { display: none; }
.weather-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.weather-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.weather-copy {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
}
.weather-copy span {
  position: absolute;
  right: 0;
  bottom: calc(50% + 10px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.weather-copy strong {
  font-size: 16px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}
#home.is-night .hello span,
#home.is-night .hello strong,
#home.is-night .weather,
#home.is-night .weather-copy span,
#home.is-night .weather-copy strong { color: #fff; }
#home.is-night #avatarButton.letter { background: #fff; }
#home.is-night .avatar-letter { color: #121417; }
.forecast {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  color: var(--ink);
  overflow: hidden;
  backface-visibility: hidden;
}
.forecast[hidden] { display: none; }
.phone.is-push,
.phone.is-pop { pointer-events: none; }
.phone.is-push #home,
.phone.is-pop #home,
.phone.is-push #forecast,
.phone.is-pop #forecast,
.phone.is-push #forecast .forecast-bar,
.phone.is-push #forecast .forecast-body,
.phone.is-pop #forecast .forecast-bar,
.phone.is-pop #forecast .forecast-body { transition: none; animation: none; filter: none; }
.phone.is-push #forecast,
.phone.is-pop #forecast,
.phone.is-push #home,
.phone.is-pop #home { opacity: 1; transform: none; }
.phone.is-push #forecast .forecast-bar,
.phone.is-push #forecast .forecast-body { opacity: 0; transform: translate3d(0, 6px, 0); }
.phone.is-run.is-push #forecast .forecast-bar,
.phone.is-run.is-push #forecast .forecast-body {
  animation: scene-fade-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.phone.is-run.is-pop #forecast .forecast-bar,
.phone.is-run.is-pop #forecast .forecast-body {
  animation: scene-fade-away 0.22s ease forwards;
}
.phone.is-run.is-pop #forecast {
  animation: scene-shell-away 0.18s ease 0.16s forwards;
}
@keyframes scene-fade-in {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes scene-fade-away {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: none; }
}
@keyframes scene-shell-away {
  from { opacity: 1; }
  to { opacity: 0; }
}
.forecast-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 22px 16px 10px;
}
.forecast-bar button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}
.forecast-bar button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.forecast-title { min-width: 0; }
.forecast-bar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.03em;
}
.forecast-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.forecast-title p:empty { display: none; }
.forecast-body {
  overflow: auto;
  padding: 0 16px 24px;
  scrollbar-width: none;
}
.forecast-body::-webkit-scrollbar { display: none; }
.forecast-wait {
  margin: 2px 0 0 32px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
.forecast-now {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 0 14px;
}
.forecast-now img { width: 64px; height: 64px; }
.forecast-now b { font-size: 42px; letter-spacing: -0.04em; line-height: 1; }
.forecast-now p { margin: 4px 0 0; font-size: 15px; }
.forecast-now small { color: var(--muted); font-size: 13px; }
.forecast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.forecast-meta span b { color: var(--ink); font-weight: 650; }
.forecast-summary { margin: 14px 0 0; font-size: 15px; }
.forecast-body h2 {
  margin: 18px 0 8px;
  font-size: 16px;
}
.forecast-hours {
  display: flex;
  gap: 8px;
  overflow: auto;
  scrollbar-width: none;
}
.forecast-hours::-webkit-scrollbar { display: none; }
.forecast-hour {
  flex: 0 0 64px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 0;
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
}
.forecast-hour img { width: 28px; height: 28px; }
.forecast-hour small { color: var(--muted); }
.forecast-day {
  display: grid;
  grid-template-columns: 64px 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.forecast-day:first-of-type { border-top: 0; }
.forecast-day b { font-size: 14px; }
.forecast-day small { display: block; color: var(--muted); font-size: 12px; }
.forecast-day img { width: 28px; height: 28px; }
.forecast-day p { margin: 0; font-size: 13px; }
.forecast-temps { text-align: right; font-size: 14px; font-weight: 700; }
.forecast-temps span { color: var(--muted); font-weight: 600; }
.forecast-source {
  margin: 0;
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.forecast-source::before {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  margin: 0 auto 10px;
  background: var(--line);
}
.front {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 0 16px 24px;
  scrollbar-width: none;
}
.front > * { flex: 0 0 auto; }
.front::-webkit-scrollbar { display: none; }
#home h1 { margin: 0; }
.pill {
  display: inline-flex;
  justify-self: start;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #067647;
  font-size: 13px;
  font-weight: 700;
}
.balance, .stats article, .card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: none;
}
.balance { padding: 18px 18px 16px; }
.amount { display: flex; align-items: flex-end; gap: 8px; }
.amount strong {
  font-size: 48px;
  letter-spacing: -0.05em;
  line-height: 1;
}
.flip-row {
  display: inline-flex;
  align-items: flex-end;
  height: 1em;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.flip-char { white-space: pre; letter-spacing: 0; }
.odigit {
  display: inline-block;
  width: 1ch;
  height: 1em;
  overflow: hidden;
  line-height: 1;
  letter-spacing: 0;
}
.odigit-roll {
  display: block;
  will-change: transform;
}
.odigit-roll span {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
}
.amount small { color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stats article { padding: 12px; }
.stats b { display: block; margin-top: 6px; font-size: 14px; }
.card { padding: 16px; }
.card h2 { margin: 0; }
.flow-card h2 { margin-bottom: 16px; }
.flow-map {
  position: relative;
  overflow: visible;
}
.flow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  align-items: start;
  align-content: start;
  row-gap: 34px;
}
.flow-grid [data-wire="pv"] { grid-column: 1; grid-row: 1; justify-self: start; }
.flow-grid [data-wire="hub"] { grid-column: 2; grid-row: 1; }
.flow-grid [data-wire="grid"] { grid-column: 3; grid-row: 1; justify-self: end; }
.flow-grid [data-wire="bat"] { grid-column: 1; grid-row: 2; justify-self: start; }
.flow-grid [data-wire="gen"] { grid-column: 2; grid-row: 2; }
.flow-grid [data-wire="home"] { grid-column: 3; grid-row: 2; justify-self: end; }
.flow-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.flow-wires path {
  fill: none;
  stroke: #d5dbe3;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-wires path.is-live { stroke: #12b76a; }
.flow-chevron {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent #12b76a;
  offset-rotate: auto;
  opacity: 0;
  pointer-events: none;
}
.flow-chevron.is-live {
  opacity: 1;
  animation: wire-run 1.2s linear infinite;
}
.flow-chevron.back {
  offset-rotate: auto 180deg;
  animation-direction: reverse;
}
@keyframes wire-run {
  from { offset-distance: 6%; }
  to { offset-distance: 94%; }
}
.flow-node, .flow-hub {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 3px;
  min-width: 0;
}
.flow-node b {
  font-size: 13px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.flow-node span {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f5f7;
  color: #3f4854;
}
.flow-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-icon.sun { background: #fff6e8; color: #b76e00; }
.flow-icon.hub {
  width: 42px;
  height: 58px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  border: 0;
}
.flow-icon.hub img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.flow-icon.grid { background: #eef2f6; color: #526072; }
.flow-icon.bat { background: #eaf7ef; color: #067647; }
.flow-icon.gen { background: #f4f1ea; color: #8a5a12; }
.flow-icon.home { background: #eef2ff; color: #155eef; }
.compare-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.legend { display: flex; gap: 10px; margin: 0; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend i.old { background: #c8c8c8; }
.legend i.now { background: #121417; }
.chart-box { position: relative; padding-top: 62px; }
.chart-tip {
  position: absolute;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 1px;
  padding: 6px 8px 7px;
  border-radius: 8px;
  background: #121417;
  color: #fff;
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
}
.chart-tip[hidden] { display: none; }
.chart-tip b { font-size: 12px; }
.chart-tip .qua { color: #d4d4d4; }
.chart-tip.is-summary {
  left: 0;
  transform: none;
}
.chart-tip.is-summary::after { display: none; }
.chart-tip::after {
  content: "";
  position: absolute;
  left: var(--arrow, 50%);
  bottom: -5px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #121417;
  border-bottom: 0;
}
.chart.compare { display: flex; align-items: stretch; gap: 2px; height: 120px; touch-action: pan-y; }
.chart.compare .slot { flex: 1; display: flex; flex-direction: column; min-width: 0; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; border-radius: 4px; }
.chart.compare .slot.active { background: rgba(18, 20, 23, 0.06); }
.chart.compare .pair { flex: 1; display: flex; align-items: flex-end; gap: 1px; }
.chart.compare .pair i {
  flex: 1;
  display: block;
  min-height: 0;
  border-radius: 3px 3px 1px 1px;
  background: #c8c8c8;
}
.chart.compare .pair i.now { background: #121417; }
.chart.compare em {
  height: 14px;
  margin-top: 4px;
  font-style: normal;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  color: var(--muted);
}
.chart.compare > span { color: var(--muted); font-size: 13px; align-self: center; }
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
li:first-child { border-top: 0; padding-top: 0; }
.sn { color: var(--muted); font-size: 12px; margin-top: 2px; }
.dialog {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(18, 20, 23, 0.46);
}
.dialog[hidden] { display: none; }
.dialog-card {
  width: min(320px, 100%);
  padding: 28px 22px 22px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
}
.dialog-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fde8e6;
  color: #c2412d;
  font-weight: 750;
  font-size: 22px;
}
.dialog-card h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.03em; }
.dialog-card p { margin: 0 0 18px; color: var(--muted); line-height: 1.45; }
.dialog-card button {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 700;
}
@media (min-width: 520px) {
  body { display: grid; place-items: center; padding: 24px 0; }
  .phone {
    width: 390px;
    height: min(844px, calc(100vh - 48px));
    min-height: 0;
    overflow: hidden;
    border-radius: 36px;
    box-shadow: none;
  }
}
