/* ================= 电视时间管家 ================= */
:root {
  --bg: #0d0f16;
  --bg-2: #141826;
  --card: rgba(255, 255, 255, .045);
  --card-line: rgba(255, 255, 255, .09);
  --text: #eef1f8;
  --muted: #98a2b8;
  --accent: #46d8a4;
  --accent-2: #2fb3ff;
  --warn: #f5b544;
  --danger: #f4685f;
  --radius: 20px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 18% -12%, rgba(70, 216, 164, .18), transparent 62%),
    radial-gradient(760px 460px at 108% 6%, rgba(47, 179, 255, .18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ---------------- 布局 ---------------- */
.app {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(70, 216, 164, .12);
  border: 1px solid rgba(70, 216, 164, .25);
}
.brand-icon svg { width: 21px; height: 21px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .01em; }
.brand-text small { font-size: 12px; color: var(--muted); }

.icon-btn {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--card-line);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(255, 255, 255, .09); }
.icon-btn:active { transform: scale(.94); }

.main { display: flex; flex-direction: column; gap: 14px; flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(12px);
}

/* ---------------- 环形进度 ---------------- */
.ring-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 18px 18px; }

.ring { position: relative; width: min(72vw, 272px); aspect-ratio: 1 / 1; }

.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-bg { stroke: rgba(255, 255, 255, .08); stroke-width: 14; }
.ring-fg {
  stroke: var(--accent);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 552.9;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .45s linear, stroke .35s ease;
  filter: drop-shadow(0 0 10px rgba(70, 216, 164, .45));
}

.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
}
.ring-cap { font-size: 13px; color: var(--muted); letter-spacing: .08em; }
.ring-time {
  font-size: clamp(38px, 13vw, 52px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  line-height: 1.1;
}
.ring-sub { font-size: 12px; color: var(--muted); }

.ring-foot { margin: 2px 0 0; font-size: 13px; color: var(--muted); text-align: center; min-height: 18px; }

/* ---------------- 本次观看 ---------------- */
.session-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 13px; color: var(--muted);
  margin-bottom: 10px;
}
.session-head .mono { color: var(--text); font-size: 14px; }

.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i {
  display: block; height: 100%; width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  /* width 每 0.5s 刷新一次，不做过渡，避免动画被反复打断 */
  transition: background .3s ease;
}
.bar > i.hot { background: linear-gradient(90deg, var(--warn), var(--danger)); }

.hint { margin: 12px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ---------------- 按钮 ---------------- */
.actions { display: flex; gap: 10px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #06231a;
  background: linear-gradient(135deg, var(--accent), #37c8f0);
  cursor: pointer;
  transition: transform .14s ease, filter .16s ease, background .16s ease;
  width: 100%;
}
.btn.primary { box-shadow: 0 12px 26px rgba(70, 216, 164, .22); }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }

.btn.ghost {
  width: auto;
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  border-color: var(--card-line);
}

.btn.small { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 12px; }

/* ---------------- 统计 ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.stat {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  display: flex; flex-direction: column; gap: 3px;
}
.stat b { font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }

.foot { text-align: center; font-size: 11.5px; color: rgba(152, 162, 184, .8); line-height: 1.6; padding: 0 6px; }

/* ---------------- 锁屏 ---------------- */
.lock {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 22px;
  background:
    radial-gradient(700px 520px at 50% 0%, rgba(244, 104, 95, .20), transparent 62%),
    radial-gradient(700px 520px at 50% 100%, rgba(47, 179, 255, .16), transparent 60%),
    rgba(8, 10, 16, .94);
  backdrop-filter: blur(18px);
  animation: fade .3s ease both;
}
.lock[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lock-inner { width: 100%; max-width: 440px; }

.lock-card { text-align: center; display: flex; flex-direction: column; gap: 14px; }

.lock-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--warn);
}
.lock-title { margin: 0; font-size: 26px; line-height: 1.3; }
.lock-desc { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.lock-note { margin: 4px 0 0; font-size: 11.5px; color: rgba(152, 162, 184, .75); }

.lock-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.btn.big {
  padding: 17px 18px;
  font-size: 17px;
  border-radius: 18px;
  color: #06231a;
}
.btn.big.alt {
  color: #041c2b;
  background: linear-gradient(135deg, #8fa4ff, var(--accent-2));
  box-shadow: 0 12px 26px rgba(47, 179, 255, .22);
}

.big-clock {
  font-size: clamp(52px, 17vw, 76px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  letter-spacing: .02em;
  line-height: 1.05;
}

.rest-tips {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13.5px; color: var(--muted);
}
.rest-tips li {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 10px 12px;
}

/* 数学题 */
.quiz-q {
  font-size: clamp(34px, 11vw, 46px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  padding: 6px 0;
}
.quiz-input {
  width: 100%;
  text-align: center;
  font-family: inherit;
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 10px 12px;
  outline: none;
  caret-color: transparent;
}
.quiz-input::placeholder { color: rgba(255, 255, 255, .18); }
.quiz-input.shake { animation: shake .34s ease; border-color: var(--danger); }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.keypad button {
  appearance: none;
  height: 54px;
  font-family: inherit;
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  cursor: pointer;
  transition: background .14s ease, transform .12s ease;
}
.keypad button:active { transform: scale(.95); background: rgba(255, 255, 255, .13); }
.keypad button.fn { font-size: 15px; color: var(--muted); }
.keypad button.ok {
  color: #06231a;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #37c8f0);
  border-color: transparent;
}

.dots { display: flex; gap: 8px; justify-content: center; }
.dots i {
  width: 26px; height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  transition: background .3s ease;
}
.dots i.on { background: var(--accent); }

.quiz-err { margin: 0; min-height: 18px; font-size: 13px; color: var(--danger); }

/* ---------------- 弹层 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(5, 7, 12, .72);
  backdrop-filter: blur(10px);
  animation: fade .2s ease both;
}
.modal[hidden] { display: none; }

.dialog {
  width: 100%; max-width: 360px;
  background: #171b28;
  border: 1px solid var(--card-line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
}
.dialog h2 { margin: 0; font-size: 18px; }
.dialog-desc { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.dialog-actions { display: flex; gap: 10px; margin-top: 4px; }
.dialog-actions .btn { flex: 1; padding: 13px 16px; font-size: 15px; }

.pin-input {
  width: 100%;
  text-align: center;
  font-family: inherit;
  font-size: 26px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 12px;
  outline: none;
}
.pin-input:focus { border-color: rgba(70, 216, 164, .55); }
.err { margin: 0; min-height: 16px; font-size: 12.5px; color: var(--danger); }

.sheet-modal { align-items: end; padding: 0; }
@media (min-width: 560px) { .sheet-modal { align-items: center; padding: 24px; } }

.sheet {
  width: 100%; max-width: 520px;
  max-height: 90dvh;
  display: flex; flex-direction: column;
  background: #131722;
  border: 1px solid var(--card-line);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow);
  animation: slideUp .26s ease both;
}
@media (min-width: 560px) { .sheet { border-radius: 24px; } }

@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--card-line);
}
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-head .icon-btn { width: 36px; height: 36px; }

.sheet-body {
  padding: 16px 18px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
  -webkit-overflow-scrolling: touch;
}

.today-line {
  margin: 0;
  font-size: 12.5px;
  color: var(--accent);
  background: rgba(70, 216, 164, .1);
  border: 1px solid rgba(70, 216, 164, .22);
  border-radius: 12px;
  padding: 10px 12px;
}

.field { display: flex; flex-direction: column; gap: 9px; }
.field > label { font-size: 13.5px; color: var(--muted); }
.field > label b { color: var(--text); font-variant-numeric: tabular-nums; font-size: 15px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px;
  background: transparent;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #131722;
  box-shadow: 0 2px 10px rgba(70, 216, 164, .45);
  cursor: pointer;
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #131722; cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  transition: all .16s ease;
}
.chips button:active { transform: scale(.96); }
.chips button.on {
  color: #06231a;
  font-weight: 600;
  background: var(--accent);
  border-color: transparent;
}
.chips button.soft { border-radius: 12px; color: var(--text); background: rgba(255, 255, 255, .07); }
.chips button.soft.danger { color: var(--danger); border-color: rgba(244, 104, 95, .35); }

.inline { display: flex; gap: 10px; align-items: center; }
.text-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  padding: 11px 13px;
  outline: none;
}
.text-input:focus { border-color: rgba(70, 216, 164, .5); }

.panel-note { margin: 0; font-size: 11.5px; line-height: 1.7; color: rgba(152, 162, 184, .75); }

/* ---------------- 提示条 ---------------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text);
  background: rgba(30, 36, 52, .96);
  border: 1px solid var(--card-line);
  box-shadow: var(--shadow);
  animation: fade .18s ease both;
  max-width: 82vw;
  text-align: center;
}
.toast[hidden] { display: none; }

/* ---------------- 一分钟提醒条 ---------------- */
.warn {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 24px);
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(48, 38, 16, .96);
  border: 1px solid rgba(245, 181, 68, .45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  animation: warnIn .28s ease both;
}
.warn[hidden] { display: none; }
.warn.daily { background: rgba(52, 20, 20, .96); border-color: rgba(244, 104, 95, .5); }

.warn-dot {
  width: 10px; height: 10px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 0 rgba(245, 181, 68, .55);
  animation: warnPulse 1.6s ease-out infinite;
}
.warn.daily .warn-dot { background: var(--danger); box-shadow: 0 0 0 0 rgba(244, 104, 95, .55); }

.warn-text { display: flex; flex-direction: column; line-height: 1.28; min-width: 0; }
.warn-text strong { font-size: 15px; font-weight: 600; }
.warn-text small { font-size: 12px; color: var(--muted); }

.warn-ok {
  flex: 0 0 auto;
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.warn-ok:active { transform: scale(.96); }

@keyframes warnIn {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes warnPulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 181, 68, .55); }
  70% { box-shadow: 0 0 0 12px rgba(245, 181, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 181, 68, 0); }
}

/* 遥控器 / 键盘操作时的焦点环 */
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid rgba(70, 216, 164, .75);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================================================================
 * 横屏 / 电视大屏
 * 尺寸全部用 vmin + clamp，随视口等比缩放：
 * 1080P、4K、21:9 带鱼屏、平板横放都能自动适配，不需要读分辨率。
 * ================================================================ */
@media (min-width: 900px) and (orientation: landscape) {
  .app {
    max-width: min(1680px, 94vw);
    padding: 2.2vmin 2.6vmin;
    gap: 1.8vmin;
  }

  .topbar { padding: 0 .4vmin; }
  .brand { gap: 1.4vmin; }
  .brand-icon { width: 5.6vmin; height: 5.6vmin; border-radius: 1.6vmin; }
  .brand-icon svg { width: 3vmin; height: 3vmin; }
  .brand-text strong { font-size: clamp(17px, 1.9vmin, 34px); }
  .brand-text small { font-size: clamp(12px, 1.2vmin, 22px); }
  .icon-btn { width: 6.4vmin; height: 6.4vmin; border-radius: 1.8vmin; }
  .icon-btn svg { width: 3vmin; height: 3vmin; }

  /* 左侧大环形 + 右侧信息栏 */
  .main {
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1.8vmin;
    align-items: stretch;
    min-height: 0;
  }
  .ring-card {
    grid-column: 1; grid-row: 1 / span 3;
    justify-content: center;
    padding: 2.4vmin;
    border-radius: 2.4vmin;
  }
  .session-card { grid-column: 2; grid-row: 1; padding: 2.2vmin 2.4vmin; border-radius: 2.2vmin; }
  .actions { grid-column: 2; grid-row: 2; align-self: center; }
  .stats { grid-column: 2; grid-row: 3; align-self: end; gap: 1.4vmin; }

  .ring { width: min(64vmin, 56vw, 760px); }
  .ring-cap { font-size: clamp(13px, 1.5vmin, 26px); }
  .ring-time { font-size: clamp(60px, 11vmin, 210px); }
  .ring-sub { font-size: clamp(12px, 1.3vmin, 24px); }
  .ring-foot { font-size: clamp(13px, 1.45vmin, 26px); min-height: 2.4vmin; }

  .session-head { font-size: clamp(13px, 1.45vmin, 25px); margin-bottom: 1.6vmin; }
  .session-head .mono { font-size: clamp(15px, 1.75vmin, 30px); }
  .bar { height: clamp(10px, 1.3vmin, 22px); }
  .hint { font-size: clamp(12px, 1.35vmin, 23px); margin-top: 1.6vmin; }

  .btn { font-size: clamp(17px, 1.9vmin, 33px); padding: 1.8vmin 2.4vmin; border-radius: 1.6vmin; }
  .btn.small { font-size: clamp(13px, 1.4vmin, 24px); padding: 1vmin 1.6vmin; border-radius: 1.2vmin; }

  .stat { padding: 1.4vmin 1vmin; border-radius: 1.4vmin; }
  .stat b { font-size: clamp(20px, 2.4vmin, 46px); }
  .stat span { font-size: clamp(11px, 1.25vmin, 22px); }

  .foot { font-size: clamp(11px, 1.2vmin, 20px); }

  /* 锁屏：坐在沙发上也要看得清 */
  .lock { padding: 4vmin; }
  .lock-inner { max-width: min(1240px, 94vw); }
  .lock-card { gap: 2vmin; }
  .lock-kicker { font-size: clamp(13px, 1.5vmin, 26px); }
  .lock-title { font-size: clamp(28px, 4.4vmin, 82px); }
  .lock-desc { font-size: clamp(14px, 1.8vmin, 32px); }
  .lock-note { font-size: clamp(12px, 1.65vmin, 28px); }
  .lock-actions { max-width: min(1400px, 62vw); width: 100%; margin: 0 auto; gap: 1.6vmin; }
  .btn.big { font-size: clamp(17px, 2.2vmin, 40px); padding: 2.2vmin 2.6vmin; border-radius: 1.8vmin; }
  .big-clock { font-size: clamp(80px, 18vmin, 320px); }
  .rest-tips { font-size: clamp(14px, 1.75vmin, 30px); gap: 1.4vmin; }
  .rest-tips li { padding: 1.4vmin 1.8vmin; border-radius: 1.4vmin; }

  .quiz-q { font-size: clamp(44px, 8vmin, 140px); }
  .quiz-input { font-size: clamp(32px, 5vmin, 96px); padding: 1.4vmin; border-radius: 1.6vmin; }
  .keypad { max-width: min(1100px, 54vw); width: 100%; margin: 0 auto; gap: 1.4vmin; }
  .keypad button {
    height: clamp(60px, 9.5vmin, 140px);
    font-size: clamp(24px, 3.2vmin, 56px);
    border-radius: 1.6vmin;
  }
  .keypad button.fn { font-size: clamp(15px, 1.8vmin, 32px); }
  .dots { gap: 1vmin; }
  .dots i { width: clamp(26px, 3.2vmin, 64px); height: clamp(6px, .8vmin, 14px); }
  .quiz-err { font-size: clamp(13px, 1.5vmin, 28px); min-height: 2.4vmin; }

  /* 提醒条 */
  .warn { padding: 1.8vmin 2.6vmin; border-radius: 1.8vmin; gap: 1.8vmin; top: 2.4vmin; }
  .warn-dot { width: 1.6vmin; height: 1.6vmin; }
  .warn-text strong { font-size: clamp(18px, 2.5vmin, 44px); }
  .warn-text small { font-size: clamp(13px, 1.75vmin, 30px); }
  .warn-ok { font-size: clamp(14px, 1.75vmin, 30px); padding: 1.2vmin 2vmin; }

  /* 家长面板 */
  .sheet { max-width: min(860px, 78vw); }
  .sheet-head h2 { font-size: clamp(17px, 1.9vmin, 30px); }
  .sheet-body { gap: 1.8vmin; padding: 2vmin 2.4vmin 2.6vmin; }
  .field > label { font-size: clamp(13px, 1.4vmin, 24px); }
  .field > label b { font-size: clamp(15px, 1.5vmin, 26px); }
  .today-line, .panel-note { font-size: clamp(12px, 1.25vmin, 22px); }
  .chips button { font-size: clamp(13px, 1.35vmin, 24px); padding: 1vmin 1.6vmin; }
  .text-input, .pin-input { font-size: clamp(15px, 1.6vmin, 28px); }
  .dialog { max-width: min(520px, 60vw); }
  .dialog h2 { font-size: clamp(18px, 1.9vmin, 30px); }
  .toast { font-size: clamp(13px, 1.4vmin, 24px); }
}

/* 4K / 超大屏：字再放大一档 */
@media (min-width: 2200px) and (orientation: landscape) {
  .app { max-width: min(2600px, 94vw); }
  .lock-inner { max-width: min(1800px, 92vw); }
  .keypad { max-width: 1100px; }
  .lock-actions { max-width: 1300px; }
}