:root {
  --bg: #f6f7fb;
  --surface: #fff;
  --surface-soft: #f7f8fc;
  --ink: #172032;
  --muted: #778195;
  --line: #e9edf5;
  --brand: #4b5ff5;
  --brand-dark: #293bbf;
  --blue: #4b5ff5;
  --danger: #c44b55;
  --shadow: 0 14px 38px rgba(37, 49, 95, .055);
  --radius: 25px;
}
html { background: var(--bg); }
body {
  background: radial-gradient(circle at 89% 0, #e8ebff 0, transparent 32%), var(--bg);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: -.012em;
}
button { transition: transform .18s, background .18s, box-shadow .18s; }
button:not(:disabled):active { transform: scale(.97); }
.app { width: min(100%, 940px); padding: max(30px, env(safe-area-inset-top)) 22px max(52px, env(safe-area-inset-bottom)); }
.appbar { min-height: 66px; margin-bottom: 27px; }
.brand { gap: 13px; }
.logo {
  width: 48px; height: 48px; border-radius: 17px;
  background: #fff; color: var(--brand);
  box-shadow: 0 10px 24px rgba(53, 65, 128, .09);
}
.logo svg { width: 25px; height: 25px; stroke-width: 1.7; }
.brand p { margin: 0 0 4px; font-size: 12px; font-weight: 750; color: #8993a4; }
.brand h1 { font-size: 24px; line-height: 1; letter-spacing: -.045em; }
.top-actions { gap: 10px; }
.install {
  min-height: 38px; border-color: #e3e8f2; border-radius: 13px;
  padding: 0 14px; color: #4d5b74; font-weight: 750;
}
.connection {
  min-height: 38px; border: 1px solid #f4d8dc; border-radius: 999px;
  padding: 0 14px; background: #fff6f7; color: #b65560;
  font-size: 12px; box-shadow: 0 6px 18px rgba(37, 49, 95, .04);
}
.connection.ok { border-color: #d3eee2; background: #f0fbf5; color: #25865a; }
.connection.busy { border-color: #f4e2c1; background: #fffaf1; color: #a87929; }
.hero {
  min-height: 322px; padding: 36px 40px 29px;
  border: 1px solid #dde2ff; border-radius: 32px;
  background: radial-gradient(circle at 87% 24%, #cbd4ff 0, transparent 32%),
              linear-gradient(120deg, #fafaff 0%, #e9edff 100%);
  color: var(--ink);
  box-shadow: 0 22px 45px rgba(58, 73, 173, .08);
}
.hero:before {
  content: ""; position: absolute; width: 330px; height: 330px; right: -26px; top: -121px;
  border: 1px solid rgba(255,255,255,.65); border-radius: 50%;
}
.hero:after {
  content: ""; position: absolute; width: 250px; height: 250px; right: 21px; bottom: -145px;
  border: 1px solid rgba(255,255,255,.65); border-radius: 50%;
}
.hero-main { grid-template-columns: minmax(0,1fr) 176px; gap: 32px; min-height: 190px; }
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #dfe4ff; border-radius: 999px;
  padding: 7px 10px; background: rgba(255,255,255,.64);
  color: #5965a4; font-size: 12px; font-weight: 800;
}
.eyebrow-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: #6675ee; }
.hero-state {
  margin-top: 17px; font-size: clamp(36px,5vw,51px); line-height: 1.04;
  letter-spacing: -.06em; font-weight: 850;
}
.hero-note { margin: 11px 0 0; color: #5f6c85; font-size: 15px; font-weight: 620; }
.hero-clock { margin-top: 29px; color: #8993aa; font-size: 12px; font-weight: 620; }
.power {
  position: relative; width: 166px; place-self: center;
  border: 1px solid rgba(90,105,199,.15); border-radius: 48px;
  background: linear-gradient(155deg,#fff,#e9ecff); color: #6874c0;
  box-shadow: inset 0 2px 1px #fff, 0 17px 32px rgba(65,80,164,.13);
}
.power:before {
  content: ""; position: absolute; inset: -10px; border: 1px solid rgba(79,97,184,.13);
  border-radius: 56px; pointer-events: none;
}
.power svg { width: 62px; height: 62px; stroke-width: 1.55; }
.power.on {
  border-color: #6978f7;
  background: linear-gradient(155deg,#7381ff,#485cf0);
  color: #fff;
  box-shadow: inset 0 2px 1px rgba(255,255,255,.25),0 18px 34px rgba(75,95,245,.3);
}
.metrics { gap: 12px; margin-top: 23px; }
.metric {
  min-height: 69px; border: 1px solid rgba(255,255,255,.8); border-radius: 17px;
  padding: 13px 17px; background: rgba(255,255,255,.66);
  box-shadow: 0 6px 17px rgba(95,106,170,.035);
}
.metric span { color: #828da8; font-size: 11px; font-weight: 660; }
.metric b { margin-top: 5px; color: #273452; font-size: 14px; font-weight: 800; }
.section-title { margin: 33px 4px 13px; }
.section-title h2 { font-size: 19px; line-height: 1.2; letter-spacing: -.035em; }
.section-title p { color: #8c96a6; font-size: 12px; font-weight: 550; }
.card {
  border: 1px solid #e9edf5; border-radius: 25px;
  background: rgba(255,255,255,.96); box-shadow: var(--shadow);
}
.card-head { padding: 24px 24px 0; }
.card h3 { font-size: 17px; letter-spacing: -.025em; }
.sub { margin-top: 6px; color: #8993a4; font-size: 12px; }
.card-body { padding: 22px 24px 24px; }
.manual { gap: 13px; }
.btn {
  min-height: 52px; border-radius: 15px;
  background: #eef0f9; color: #45536e; font-size: 14px; font-weight: 780;
}
.btn.primary { background: #4b5ff5; color: #fff; box-shadow: 0 9px 18px rgba(75,95,245,.18); }
.btn.soft { border-color: #e5e9f3; background: #f7f8fc; color: #53617a; }
.btn.danger { border-color: #f7e1e3; background: #fff5f5; color: var(--danger); }
.btn:not(:disabled):hover { box-shadow: 0 9px 20px rgba(43,59,135,.1); }
.grid { gap: 15px; }
.fields { gap: 12px; }
.field label { margin-bottom: 9px; color: #69748c; font-size: 12px; font-weight: 700; }
.field input {
  height: 54px; border-color: #e6eaf3; border-radius: 15px;
  background: #f8f9fd; padding: 0 15px; font-size: 16px; font-weight: 700;
}
.field input:focus { border-color: #8996fc; box-shadow: 0 0 0 4px #e9ecff; }
.actions { gap: 11px; margin-top: 15px; }
.mode {
  margin-top: 17px; border-radius: 14px; padding: 13px 15px;
  background: #f7f8fc; color: #8590a2; font-size: 12px; font-weight: 650;
}
.mode.active { background: #eff1ff; color: #3e51ce; }
.schedule-card { margin-top: 15px; }
.day-tools { gap: 9px; margin-bottom: 16px; }
.mini {
  min-height: 36px; border-color: #e8ebf2; border-radius: 11px;
  background: #f7f8fc; color: #67728b; font-size: 12px; font-weight: 750;
}
.day span {
  height: 45px; border-color: #e8ebf2; border-radius: 13px;
  background: #f8f9fc; color: #7c879b; font-size: 12px;
}
.day input:checked + span { border-color: #8896ff; background: #eef0ff; color: #4154d0; }
.day input:focus-visible + span { outline: 3px solid #cfd6ff; outline-offset: 2px; }
.time-help { margin: 18px 2px 0; color: #78849c; font-size: 13px; font-weight: 650; }
.schedule-times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.time-choice {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%;
  border: 1px solid #e6eaf4; border-radius: 20px; padding: 17px 20px;
  background: #f9faff; color: #202c45; text-align: left; cursor: pointer;
}
.time-choice.on-time { border-color: #dfe4ff; background: #f7f8ff; }
.time-choice:hover { border-color: #b8c2ff; box-shadow: 0 7px 18px rgba(75,95,245,.08); }
.time-choice-label { display: flex; align-items: center; gap: 8px; color: #58657d; font-size: 13px; font-weight: 780; }
.time-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ba5ba; }
.on-time .time-dot { background: #586cf6; }
.time-choice strong { margin-top: 12px; font-size: 34px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.time-choice-action { margin-top: 10px; color: #7b89a6; font-size: 12px; font-weight: 700; }
.time-choice-action span { margin-left: 4px; font-size: 18px; vertical-align: -1px; }
[hidden] { display: none !important; }
body.picker-open { overflow: hidden; }
.picker-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.picker-backdrop { position: absolute; inset: 0; background: rgba(18,27,51,.49); }
.picker-sheet {
  position: relative; width: min(100%,430px); max-height: calc(100dvh - 24px); overflow-y: auto;
  border-radius: 28px; padding: 22px 25px 25px; background: #fff;
  box-shadow: 0 30px 80px rgba(10,20,51,.25);
}
.picker-handle { display: none; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-head span { color: #8a94a8; font-size: 12px; font-weight: 720; }
.picker-head h3 { margin: 4px 0 0; color: #202b45; font-size: 23px; letter-spacing: -.035em; }
.picker-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f2f4fa; color: #6e7990; font-size: 25px; line-height: 1; cursor: pointer; }
.picker-help { margin: 14px 0 0; color: #8792a6; font-size: 13px; }
.picker-preview { margin: 20px 0 8px; color: #4155dc; text-align: center; font-size: 44px; line-height: 1; font-weight: 820; font-variant-numeric: tabular-nums; }
.picker-wheel-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 16px; padding: 0 23px; color: #8f99ab; text-align: center; font-size: 12px; font-weight: 700; }
.picker-wheels { position: relative; display: flex; align-items: center; gap: 24px; height: 280px; margin: 3px 0 18px; padding: 0 20px; }
.picker-selection { position: absolute; z-index: 0; top: 112px; left: 0; right: 0; height: 56px; border: 1px solid #dce3ff; border-radius: 16px; background: #eef1ff; pointer-events: none; }
.picker-wheel {
  position: relative; z-index: 1; flex: 1; min-width: 0; height: 280px;
  overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: 112px 0; scroll-snap-type: y mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.picker-wheel::-webkit-scrollbar { display: none; }
.picker-wheel button {
  display: block; width: 100%; height: 56px; border: 0; padding: 0;
  background: transparent; color: #7e8ba4; text-align: center;
  font-size: 23px; font-weight: 680; font-variant-numeric: tabular-nums;
  scroll-snap-align: center; cursor: pointer;
}
.picker-wheel button.active { color: #2d40c1; font-size: 32px; font-weight: 830; }
.picker-separator { position: relative; z-index: 2; align-self: center; color: #5f6cc7; font-size: 30px; font-weight: 750; }
.picker-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.network-row { grid-template-columns: 1fr 80px 80px; gap: 8px; }
.network-name { font-size: 14px; }
.network-name small { font-size: 11px; line-height: 1.5; }
.message {
  margin-top: 19px; min-height: 42px; border: 0; background: transparent;
  color: #909bad; font-size: 12px; font-weight: 600;
}
.message:before { content: "●"; margin-right: 8px; color: #83a0ea; font-size: 8px; }
.toast {
  background: #222d46; font-size: 13px; box-shadow: 0 15px 34px rgba(31,43,85,.2);
}
:focus-visible { outline: 3px solid rgba(75,95,245,.3); outline-offset: 3px; }
@media (max-width: 620px) {
  .app { padding: max(22px,env(safe-area-inset-top)) 16px max(32px,env(safe-area-inset-bottom)); }
  .appbar { margin-bottom: 22px; }
  .brand h1 { font-size: 22px; }
  .hero { min-height: 0; padding: 26px 24px 22px; }
  .hero-main { grid-template-columns: minmax(0,1fr) 128px; gap: 18px; min-height: 152px; }
  .power { width: 122px; border-radius: 37px; }
  .power:before { inset: -7px; border-radius: 43px; }
  .power svg { width: 51px; height: 51px; }
  .hero-state { font-size: 39px; }
  .hero-clock { margin-top: 21px; }
  .metrics { margin-top: 18px; gap: 8px; }
  .metric { min-height: 66px; padding: 11px 12px; }
  .section-title { margin-top: 29px; }
  .grid { grid-template-columns: 1fr; }
  .schedule-card { margin-top: 15px; }
  .schedule-times { grid-template-columns: 1fr; gap: 11px; }
  .time-choice { padding: 16px 18px; }
  .picker-overlay { align-items: flex-end; padding: 0; }
  .picker-sheet { width: 100%; border-radius: 28px 28px 0 0; padding: 12px 23px max(25px,env(safe-area-inset-bottom)); }
  .picker-handle { display: block; width: 40px; height: 5px; margin: 0 auto 17px; border-radius: 5px; background: #d9deeb; }
}
@media (max-width: 410px) {
  .app { padding-left: 15px; padding-right: 15px; }
  .brand p { display: block; }
  .logo { width: 43px; height: 43px; border-radius: 14px; }
  .connection { padding: 0 11px; font-size: 11px; }
  .hero { padding: 24px 19px 19px; border-radius: 26px; }
  .hero-main { grid-template-columns: minmax(0,1fr) 106px; gap: 10px; min-height: 145px; }
  .hero-state { font-size: 35px; }
  .hero-note { font-size: 13px; }
  .hero-clock { font-size: 10px; }
  .power { width: 99px; border-radius: 31px; }
  .power:before { border-radius: 37px; }
  .power svg { width: 43px; height: 43px; }
  .metrics { gap: 7px; }
  .metric { min-height: 59px; padding: 10px 8px; }
  .metric b { font-size: 12px; }
  .card-head { padding: 21px 19px 0; }
  .card-body { padding: 19px; }
  .days { grid-template-columns: repeat(7,1fr); gap: 4px; }
  .day span { height: 39px; border-radius: 10px; font-size: 10px; }
  .network-row { grid-template-columns: 1fr 65px 65px; }
  .network-row .btn { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
