/* 被安排：像 iPhone 锁屏一样的一扇窗。壁纸是主角，功能收进玻璃小组件里，用到时再从按钮里长出来 */

:root {
  --ink: #1b2a3a;
  --ink2: rgba(27, 42, 58, 0.64);
  --ink3: rgba(27, 42, 58, 0.42);
  --sep: rgba(27, 42, 58, 0.09);
  --fill: rgba(27, 42, 58, 0.055);
  --solid: rgba(255, 255, 255, 0.78);
  /* 玻璃：上亮下透，边上一圈渐变高光，里面带一点蓝粉的极光 */
  --glass: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
  --aurora: radial-gradient(120% 85% at 0% 0%, rgba(130, 178, 255, 0.34), transparent 58%),
    radial-gradient(110% 90% at 100% 100%, rgba(255, 160, 206, 0.24), transparent 62%);
  --rim: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.3) 28%, rgba(255, 255, 255, 0.06) 56%, rgba(255, 255, 255, 0.42) 82%, rgba(255, 255, 255, 0.85));
  /* 压在壁纸上的深色玻璃（角落按钮、主页图标条） */
  --smoke: linear-gradient(160deg, rgba(44, 54, 78, 0.44), rgba(16, 22, 36, 0.32));
  --smoke-rim: linear-gradient(150deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.16) 32%, rgba(255, 255, 255, 0.04) 62%, rgba(255, 255, 255, 0.38));
  --blue: #3a7bff;
  --blue-text: #2865e8;
  --blue-soft: rgba(58, 123, 255, 0.14);
  --blue-grad: linear-gradient(135deg, #67a3ff, #3a7bff 52%, #5b5dff);
  --red: #ff5e6c;
  --red-text: #e23d4e;
  --mint: #19c59a;
  --mint-grad: linear-gradient(135deg, #48e0b6, #19c59a);
  --routine: linear-gradient(160deg, #8091ad, #63769a);
  --item-bg: linear-gradient(160deg, rgba(232, 240, 255, 0.96), rgba(214, 228, 255, 0.92));
  --item-done: linear-gradient(160deg, rgba(226, 248, 240, 0.95), rgba(208, 242, 230, 0.9));
  --scrim: rgba(10, 18, 32, 0.22);
  --lift: 0 12px 40px rgba(16, 24, 40, 0.18), 0 2px 8px rgba(16, 24, 40, 0.08);
  --blur: blur(30px) saturate(1.9);
  --sky: linear-gradient(180deg, #3f7dea 0%, #8db8ff 45%, #e6f0ff 100%);
  /* iOS 的弹层曲线：起步快、收尾很轻 */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --round: ui-rounded, 'SF Pro Rounded', -apple-system, 'PingFang SC', system-ui, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --dock: max(14px, calc(var(--bottom) - 4px));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f5fa;
    --ink2: rgba(242, 245, 250, 0.66);
    --ink3: rgba(242, 245, 250, 0.42);
    --sep: rgba(255, 255, 255, 0.1);
    --fill: rgba(255, 255, 255, 0.07);
    --solid: rgba(255, 255, 255, 0.07);
    --glass: linear-gradient(160deg, rgba(58, 70, 96, 0.62), rgba(26, 34, 52, 0.52));
    --aurora: radial-gradient(120% 85% at 0% 0%, rgba(110, 150, 255, 0.24), transparent 58%),
      radial-gradient(110% 90% at 100% 100%, rgba(220, 120, 190, 0.16), transparent 62%);
    --rim: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0.03) 56%, rgba(255, 255, 255, 0.18) 82%, rgba(255, 255, 255, 0.4));
    --blue: #5c93ff;
    --blue-text: #8db4ff;
    --blue-soft: rgba(92, 147, 255, 0.22);
    --red: #ff7280;
    --red-text: #ff8d98;
    --mint: #2fd6a8;
    --routine: linear-gradient(160deg, #5d6f8f, #485a7a);
    --item-bg: linear-gradient(160deg, rgba(62, 88, 140, 0.92), rgba(48, 72, 120, 0.88));
    --item-done: linear-gradient(160deg, rgba(38, 86, 78, 0.9), rgba(30, 72, 66, 0.86));
    --scrim: rgba(0, 4, 12, 0.36);
    --lift: 0 12px 40px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    --sky: linear-gradient(180deg, #1d2b45 0%, #2c4064 55%, #3a5279 100%);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* html 不设背景：body 的天空渐变落到最底层画布，不会盖住 z-index 为 -1 的壁纸 */
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font: 17px/1.47 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  background: var(--sky);
  background-attachment: fixed;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.num,
.row-time,
.lock-time,
.wx-temp,
.wx-time,
.wx-hour b,
.tl-hour,
.tl-bubble,
.now-tag,
.day b,
.range-bar b {
  font-family: var(--round);
  font-variant-numeric: tabular-nums;
}

/* 界面上的标题、按钮条不需要能选中文字，拖过去不会冒出蓝色选区 */
.lock,
.head,
.tabs,
.corner,
.week,
.plan-bar,
.range-bar,
.section-title,
.timeline,
.dial-stage,
.set-row {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* ---------- 玻璃 ---------- */
.glass,
.smoke {
  position: relative;
  isolation: isolate;
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--lift);
}

.glass {
  background: var(--glass);
}

.glass.aurora {
  background: var(--aurora), var(--glass);
}

.smoke {
  color: #fff;
  background: var(--smoke);
}

/* 边上一圈渐变高光：左上亮、中段透、右下又亮一点，像玻璃边缘反光 */
.glass::after,
.smoke::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1px;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.smoke::after {
  background: var(--smoke-rim);
}

/* ---------- 壁纸 ---------- */
.wall {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--sky);
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
}

.wall img,
.wall video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease-out;
}

.wall img.on,
.wall video.on {
  opacity: 1;
}

/* 原图还没到时先放缩略图：模糊着显示，原图到了再变清楚 */
.wall img {
  transition: opacity 0.7s ease-out, filter 0.6s ease-out;
}

.wall img.soft {
  filter: blur(10px);
}

@media (prefers-color-scheme: dark) {
  .wall img.soft {
    filter: blur(10px) brightness(0.8) saturate(0.95);
  }
}

.wall::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 20, 40, 0.34), rgba(10, 20, 40, 0.04) 28%, transparent 55%, rgba(10, 20, 40, 0.22));
}

@media (prefers-color-scheme: dark) {
  .wall img,
  .wall video {
    filter: brightness(0.8) saturate(0.95);
  }
}

/* 打开面板时，壁纸往后退一点、轻轻虚掉：前后有了层次 */
.receded .wall {
  transform: scale(1.06);
  filter: blur(8px) brightness(0.9);
}

.shade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--top) + 14px);
  z-index: 15;
  pointer-events: none;
  background: linear-gradient(rgba(10, 20, 40, 0.3), transparent);
}

.netbar {
  position: fixed;
  z-index: 16;
  top: calc(var(--top) + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  width: max-content;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.netbar:empty {
  display: none;
}

/* ---------- 底部：中间一条图标，左右两个圆按钮（像锁屏的手电筒和相机） ---------- */
.tabs {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: var(--dock);
  transform: translateX(-50%);
  height: 56px;
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 28px;
  transition: transform 0.45s var(--ease), opacity 0.3s;
}

.tabs button {
  width: 52px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  color: var(--ink2);
  transition: background-color 0.25s, color 0.25s, transform 0.15s;
}

.tabs.smoke button {
  color: rgba(255, 255, 255, 0.86);
}

.tabs button:active,
.corner:active {
  transform: scale(0.9);
}

.tabs button.on {
  color: var(--blue-text);
  background: var(--blue-soft);
}

.tabs button svg {
  width: 23px;
  height: 23px;
}

.corner {
  position: fixed;
  z-index: 10;
  bottom: var(--dock);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform 0.2s var(--ease), opacity 0.3s;
}

.corner.left {
  left: max(20px, calc(50% - 170px));
}

.corner.right {
  right: max(20px, calc(50% - 170px));
}

.corner svg {
  width: 25px;
  height: 25px;
}

.pop-open .corner,
.pop-open .tabs {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 主页：锁屏 ---------- */
.lock {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--top) + 14px) 20px calc(var(--dock) + 84px);
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 2px 20px rgba(0, 0, 0, 0.25);
  touch-action: none;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.pop-open .lock,
.receded .lock {
  opacity: 0;
  transform: scale(0.96);
}

/* 左上日期、右上天气，中间整块留给壁纸 */
.lock-top {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.lock-date {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.94;
}

.lock-date b {
  display: block;
  font-family: var(--round);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.widget {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-shadow: none;
}

.widget svg {
  width: 22px;
  height: 22px;
}

.widget .wx-temp {
  font-size: 19px;
}

.widget small {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.82;
}

.lock-quote {
  margin-top: auto;
  max-width: 330px;
}

.lock-quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  opacity: 0.92;
}

.lock-quote figcaption {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.72;
}

/* ---------- 从按钮里长出来的面板（记一件事、今天） ---------- */
.pop-scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.pop-scrim.on {
  opacity: 1;
}

.pop {
  position: fixed;
  z-index: 31;
  left: 12px;
  right: 12px;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 32px;
  transform-origin: 0 0;
  overflow: hidden;
}

.pop-in {
  position: relative;
  z-index: 1;
}

.add-pop {
  top: calc(var(--top) + 64px);
  padding: 16px;
}

.add-pop .seg {
  margin-bottom: 12px;
}

.add-pop textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--solid);
  font-size: 19px;
  line-height: 1.45;
  outline: 0;
  resize: none;
}

.add-pop textarea::placeholder {
  color: var(--ink3);
}

.add-hint {
  min-height: 22px;
  margin: 8px 4px 12px;
  font-size: 14px;
  color: var(--blue-text);
}

.glance {
  bottom: calc(var(--dock) + 4px);
  max-height: min(78vh, calc(100vh - var(--top) - 60px));
  display: flex;
  flex-direction: column;
}

.glance-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 8px;
}

.glance-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.glance-head small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
}

.glance-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 12px 16px;
}

.ai-line {
  margin: 0 8px 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink2);
}

.ai-line b {
  color: var(--ink);
  font-weight: 600;
}

/* 记事簿面板里：头部固定，下面的清单自己滚 */
.glance .pop-in {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

/* 面板里的小卡片（开始使用、教练） */
.card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 24px;
  background: var(--solid);
}

.card > :last-child {
  margin-bottom: 0;
}

.card .label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-text);
}

.card .label span {
  font-weight: 400;
  color: var(--ink3);
}

.card.coach .label {
  color: var(--red-text);
}

.card .summary {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 2px;
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink2);
}

.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.steps {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--sep);
  font-size: 16px;
}

.steps li .dot {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.8px var(--ink3);
  display: grid;
  place-items: center;
  color: transparent;
}

.steps li.done .dot {
  background: var(--mint-grad);
  box-shadow: none;
  color: #fff;
}

.steps li.done .what {
  color: var(--ink3);
  text-decoration: line-through;
}

.steps li .dot svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.steps li .what {
  flex: 1;
  min-width: 0;
}

.steps li .how {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink2);
}

/* ---------- 其他页面 ---------- */
.view {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(var(--top) + 18px) 14px calc(var(--dock) + 96px);
}

.head {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin: 0 8px 14px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 2px 18px rgba(0, 0, 0, 0.28);
}

.head h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.head .date {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.92;
}

.footnote {
  margin: 8px 18px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink2);
}

/* 压在壁纸上的小字，垫一层淡淡的烟色玻璃，壁纸再花也看得清 */
.view .footnote {
  margin: 12px 4px 0;
  padding: 9px 14px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(12, 20, 36, 0.3);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 18px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
}

.section-title small {
  font-size: 13px;
  color: var(--ink3);
}

.view .section-title,
.view .section-title small {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.muted {
  color: var(--ink3);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- 分组列表（iOS 设置那种） ---------- */
.list {
  border-radius: 26px;
  overflow: hidden;
}

.glance .list,
.sheet .list {
  background: var(--solid);
  box-shadow: none;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 11px 16px;
  position: relative;
  background: transparent;
  transition: background-color 0.15s;
}

.row::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--sep);
}

.row:last-child::after {
  display: none;
}

.row:active {
  background: var(--fill);
}

.row-time {
  flex: none;
  width: 50px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
}

.row-time small {
  display: block;
  margin-top: 3px;
  font: 400 12px/1.3 var(--sans);
  color: var(--ink3);
}

.row-time.none {
  font: 400 13px/1.3 var(--sans);
  color: var(--ink3);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-size: 17px;
  line-height: 1.38;
  word-break: break-word;
}

.row-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink3);
}

.tag {
  padding: 0 7px;
  border-radius: 7px;
  background: var(--fill);
  color: var(--ink2);
  font-size: 12px;
  line-height: 20px;
}

.tag.warn {
  background: rgba(255, 94, 108, 0.14);
  color: var(--red-text);
}

.tag.accent {
  background: var(--blue-grad);
  color: #fff;
  font-weight: 600;
}

.tag.fixed {
  background: var(--routine);
  color: #fff;
}

.row.current .row-time,
.row.due .row-time {
  color: var(--blue-text);
}

.row.due .row-time {
  color: var(--red-text);
}

.row.done .row-title {
  color: var(--ink3);
  text-decoration: line-through;
  text-decoration-color: var(--mint);
  text-decoration-thickness: 2px;
}

.row.done .row-time {
  color: var(--ink3);
}

.row.routine .row-title {
  color: var(--ink2);
}

/* 像「提醒事项」的圆圈 */
.check {
  flex: none;
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.8px var(--ink3);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.check:active {
  transform: scale(0.85);
}

.check::after {
  content: '';
  position: absolute;
  inset: -10px;
}

.check svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.check.on {
  background: var(--mint-grad);
  box-shadow: none;
  color: #fff;
}

.more {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 17px;
  color: var(--blue-text);
  padding: 14px 16px;
}

.more:disabled {
  color: var(--ink3);
}

.empty {
  text-align: center;
  color: var(--ink2);
  font-size: 15px;
  line-height: 1.6;
  padding: 26px 22px;
}

/* 银色的"现在"：中间粗、两头尖，横跨整屏 */
.now-rule {
  position: relative;
  height: 4px;
  margin: 6px -12px;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)) drop-shadow(0 1px 1px rgba(16, 24, 40, 0.35));
  pointer-events: none;
}

.now-rule i {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff 0%, #d9e0e9 40%, #9eabbd 60%, #eef2f7 100%);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.now-tag {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
  background: var(--solid);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 6px rgba(16, 24, 40, 0.15);
  filter: none;
}

@media (prefers-color-scheme: dark) {
  .now-tag {
    color: var(--ink);
    background: rgba(70, 84, 112, 0.95);
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--solid);
  box-shadow: inset 0 0 0 1px var(--sep);
  font-size: 17px;
  font-weight: 500;
  transition: transform 0.15s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.95);
}

.btn.primary {
  background: var(--blue-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(58, 123, 255, 0.3);
  color: #fff;
  font-weight: 600;
}

.btn.ok {
  background: var(--mint-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(25, 197, 154, 0.3);
  color: #fff;
  font-weight: 600;
}

.btn.ghost {
  background: transparent;
  box-shadow: none;
  color: var(--blue-text);
}

.btn.danger {
  background: transparent;
  box-shadow: none;
  color: var(--red-text);
}

.btn.small {
  min-height: 34px;
  padding: 0 14px;
  font-size: 15px;
}

.btn.big {
  min-height: 52px;
}

.btn:disabled {
  opacity: 0.5;
  transform: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 15px;
}

.chip.on {
  background: var(--blue-grad);
  color: #fff;
}

/* 事项详情里的三个圆按钮（像控制中心） */
.acts {
  display: flex;
  justify-content: space-around;
  margin: 6px 0 18px;
}

.act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink2);
}

.act span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--solid);
  box-shadow: inset 0 0 0 1px var(--sep), 0 4px 14px rgba(16, 24, 40, 0.08);
  transition: transform 0.15s;
}

.act:active span {
  transform: scale(0.9);
}

.act.go span {
  color: #fff;
  background: var(--blue-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(58, 123, 255, 0.32);
}

.act.done span {
  color: #fff;
  background: var(--mint-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(25, 197, 154, 0.32);
}

.act:disabled {
  opacity: 0.45;
}

/* ---------- 设置：一行一个入口 ---------- */
.set-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 9px 14px 9px 14px;
  position: relative;
  text-align: left;
  font-size: 17px;
}

.set-row::after {
  content: '';
  position: absolute;
  left: 58px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--sep);
}

.set-row:last-child::after {
  display: none;
}

.set-row:active {
  background: var(--fill);
}

.set-ico {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.set-ico svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.set-title {
  flex: 1;
  min-width: 0;
}

.set-val {
  max-width: 45%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  color: var(--ink3);
}

.chev {
  flex: none;
  color: var(--ink3);
}

.chev svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.set-row.danger {
  justify-content: center;
  color: var(--red-text);
}

.set-row .switch {
  margin-left: auto;
}

.list + .list,
.list + .footnote + .list {
  margin-top: 18px;
}

/* ---------- 底部弹层 ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: transparent;
  transition: background-color 0.35s var(--ease);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.backdrop.open {
  background: var(--scrim);
}

.sheet {
  width: calc(100% - 12px);
  max-width: 560px;
  max-height: 88vh;
  max-height: 88dvh;
  margin-bottom: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 34px;
  padding: 10px 18px calc(var(--bottom) + 18px);
  transform: translateY(105%);
  transition: transform 0.45s var(--ease);
  box-shadow: var(--lift), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

/* 弹层自己会滚，高光边改用内阴影画，不然会跟着内容滚走 */
.sheet.glass::after {
  display: none;
}

.backdrop.open .sheet {
  transform: none;
}

.sheet::before {
  content: '';
  display: block;
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink3);
  opacity: 0.5;
  margin: 0 auto 14px;
}

.sheet h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  word-break: break-word;
}

.sheet .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink2);
  font-size: 14px;
  margin-bottom: 18px;
}

.sheet .meta span {
  padding: 2px 10px;
  border-radius: 9px;
  background: var(--fill);
}

.sheet .meta div {
  flex-basis: 100%;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet .grid2 {
  margin-bottom: 10px;
}

.sheet .stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet p {
  color: var(--ink2);
  margin: 0 0 14px;
}

.sheet .ai-msg {
  background: var(--blue-soft);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--ink);
  margin-bottom: 14px;
}

.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink2);
  padding: 28px 0;
}

.spinner::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--sep);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 换壁纸 ---------- */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wall-pick {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--fill);
}

.wall-pick img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wall-pick span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 7px 5px;
  font-size: 12px;
  text-align: left;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.wall-pick.on {
  box-shadow: 0 0 0 3px var(--blue);
}

.sheet .wall-credit {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.wall-credit b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.wall-credit a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sep);
  text-underline-offset: 3px;
  word-break: break-all;
}

.wall-grid,
.wall-credit {
  transition: opacity 0.2s;
}

.sheet.busy .wall-grid,
.sheet.busy .wall-credit {
  opacity: 0.4;
  pointer-events: none;
}

.sheet.busy .btn.primary {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- 表单 ---------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  margin: 0 4px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
}

.field small {
  display: block;
  margin: 6px 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink3);
}

.input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--solid);
  font-size: 17px;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 0 0 1px var(--sep);
  transition: box-shadow 0.15s;
}

.input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink3);
}

.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238797aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}

.field input::-webkit-date-and-time-value {
  text-align: left;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  margin-bottom: 4px;
}

.switch-row .txt small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink3);
}

.switch {
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--sep);
  transition: background 0.25s;
  pointer-events: none;
}

.switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s var(--ease);
}

.switch input:checked + span {
  background: var(--mint-grad);
  box-shadow: none;
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.seg {
  display: flex;
  background: var(--fill);
  border-radius: 999px;
  padding: 3px;
}

.seg button {
  flex: 1;
  min-height: 36px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--ink2);
  transition: background-color 0.25s, color 0.25s;
}

.seg button.on {
  background: var(--solid);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12);
}

.status-line {
  font-size: 14px;
  color: var(--ink2);
  margin: 10px 4px 0;
}

.status-line.ok {
  color: var(--mint);
}

.status-line.bad {
  color: var(--red-text);
}

.log-row {
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sep);
  color: var(--ink2);
  word-break: break-word;
}

.log-row b {
  color: var(--ink3);
  font-weight: 400;
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

.log-row.err {
  color: var(--red-text);
}

/* ---------- 每日一句、天气（详情） ---------- */
.poem {
  margin: 0;
}

.poem blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.wx {
  padding: 14px 16px;
  border-radius: 24px;
  margin-bottom: 12px;
  background: var(--solid);
}

.wx-now {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.wx-now svg {
  width: 28px;
  height: 28px;
}

.wx-now .wx-temp {
  font-size: 30px;
  line-height: 1;
}

.wx-day {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink2);
}

.wx-city {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink3);
}

.wx-rain {
  margin-top: 6px;
  font-size: 14px;
  color: var(--blue-text);
}

.wx-hours {
  display: flex;
  gap: 2px;
  margin: 12px -16px 0;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.wx-hours::-webkit-scrollbar {
  display: none;
}

.wx-hour {
  flex: none;
  width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wx-time {
  font-size: 12px;
  color: var(--ink3);
}

.wx-hour svg {
  width: 22px;
  height: 22px;
}

.wx-hour b {
  font-size: 16px;
  font-weight: 600;
}

.wx-pop {
  min-height: 15px;
  font-size: 11px;
  line-height: 15px;
  color: var(--blue-text);
}

/* ---------- 长按拿起、拖进垃圾桶 ---------- */
.lifted {
  position: fixed;
  z-index: 60;
  margin: 0;
  pointer-events: none;
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.32), 0 4px 12px rgba(16, 24, 40, 0.18);
  transition: transform 0.18s var(--ease), opacity 0.2s;
}

.lift-origin {
  opacity: 0.25;
}

.trash {
  position: fixed;
  z-index: 59;
  left: 50%;
  bottom: calc(var(--dock) + 72px);
  width: 66px;
  height: 66px;
  margin-left: -33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(160deg, rgba(255, 120, 132, 0.85), rgba(226, 61, 78, 0.85));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 10px 30px rgba(226, 61, 78, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: scale(0.4);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}

.trash.on {
  transform: scale(1);
  opacity: 1;
}

.trash.hot {
  transform: scale(1.25);
}

.trash svg {
  width: 28px;
  height: 28px;
}

/* ---------- 日程 ---------- */
.week {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 26px;
}

.week-nav {
  flex: none;
  width: 26px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink2);
}

.week-nav svg {
  width: 18px;
  height: 18px;
}

.day {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 0 7px;
  border-radius: 18px;
  font-size: 11px;
  color: var(--ink2);
  position: relative;
  transition: background 0.25s, color 0.25s;
}

.day b {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.day.today b {
  color: var(--red-text);
}

.day.has::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink3);
}

.day.on {
  background: var(--blue-grad);
  color: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px rgba(58, 123, 255, 0.3);
}

.day.on b {
  color: #fff;
}

.day.on::after {
  background: #fff;
}

.plan-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.plan-bar .btn {
  flex: 1;
  padding: 0 10px;
  font-size: 15px;
}

.pick-hint {
  margin: -2px 10px 10px;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.timeline {
  border-radius: 26px;
  padding: 16px 12px 16px 0;
}

/* 一分钟一像素，6:00 到 24:00 */
.tl {
  position: relative;
  height: 1080px;
  margin-left: 52px;
}

.tl-hour {
  position: absolute;
  left: -52px;
  width: 42px;
  transform: translateY(-50%);
  text-align: right;
  font-size: 12px;
  color: var(--ink3);
}

.tl-grid {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--sep);
}

/* 像「日历」里的事件块 */
.tl-block {
  position: absolute;
  left: 4px;
  right: 0;
  min-height: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px 10px;
  overflow: hidden;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

.tl-block small {
  display: block;
  font: 500 11px/1.3 var(--round);
  opacity: 0.75;
}

.tl-block.short {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
}

.tl-block.short small {
  flex: none;
}

.tl-block.routine {
  color: #fff;
  background: var(--routine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tl-block.item {
  z-index: 1;
  color: var(--ink);
  background: var(--item-bg);
  box-shadow: inset 3px 0 0 var(--blue), 0 2px 10px rgba(16, 24, 40, 0.12);
}

.tl-block.item.done {
  color: var(--ink3);
  text-decoration: line-through;
  background: var(--item-done);
  box-shadow: inset 3px 0 0 var(--mint);
}

.tl-block.landed {
  animation: land 0.7s var(--ease);
}

@keyframes land {
  0% {
    transform: scale(0.92);
    box-shadow: inset 3px 0 0 var(--blue), 0 0 0 8px var(--blue-soft);
  }
  100% {
    transform: none;
  }
}

/* 时间轴上的"现在"：银色细线，向两边伸出去盖满整个屏幕宽 */
.tl-now {
  position: absolute;
  z-index: 3;
  height: 4px;
  margin-top: -2px;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8)) drop-shadow(0 1px 1px rgba(16, 24, 40, 0.35));
}

.tl-now i {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff 0%, #d9e0e9 40%, #9eabbd 60%, #eef2f7 100%);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.tl-ticks {
  position: absolute;
  inset: 0 0 0 -52px;
  z-index: 4;
  touch-action: pan-y;
  cursor: crosshair;
}

.tick {
  position: absolute;
  left: 46px;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink3);
  opacity: 0.7;
  transform-origin: left center;
  transition: transform 0.15s var(--ease), background-color 0.12s, opacity 0.12s;
}

.tick.hour {
  width: 16px;
}

.tick.in {
  background: var(--blue);
  opacity: 1;
}

.tick.hot {
  background: var(--blue);
  opacity: 1;
  transform: scale(2.4, 2);
}

.tl-range {
  position: absolute;
  left: 4px;
  right: 0;
  z-index: 2;
  border-radius: 12px;
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 2px var(--blue);
  pointer-events: none;
}

.tl-bubble {
  position: absolute;
  right: 6px;
  z-index: 6;
  transform: translateY(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--blue-grad);
  box-shadow: var(--lift);
  pointer-events: none;
  white-space: nowrap;
}

.range-bar {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: calc(var(--dock) + 66px);
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 440px);
  padding: 14px;
  border-radius: 30px;
  animation: rise 0.4s var(--ease);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.96);
  }
}

.range-bar header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 6px 12px;
}

.range-bar b {
  font-size: 22px;
  font-weight: 700;
}

.range-bar span {
  font-size: 13px;
  color: var(--ink2);
}

.range-bar .grid2 {
  position: relative;
  z-index: 3;
}

.range-bar .grid2 .btn {
  width: 100%;
}

/* ---------- 我来选：大转盘 ---------- */
.dial-stage {
  position: relative;
  height: 236px;
  margin: 6px -18px 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  /* 两头渐隐 */
  -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}

.dial {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}

.sector {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 0;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(236, 242, 252, 0.88));
  transition: background 0.25s, color 0.25s;
}

.sector:nth-child(even) {
  background: linear-gradient(180deg, rgba(246, 249, 255, 0.95), rgba(222, 232, 250, 0.86));
}

@media (prefers-color-scheme: dark) {
  .sector {
    background: linear-gradient(180deg, rgba(86, 100, 130, 0.95), rgba(58, 70, 96, 0.9));
  }
  .sector:nth-child(even) {
    background: linear-gradient(180deg, rgba(74, 88, 118, 0.95), rgba(50, 62, 88, 0.9));
  }
}

.sector b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.32;
}

.sector small {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink3);
}

.sector.mid {
  color: #fff;
  background: linear-gradient(180deg, #6aa5ff, #3a7bff 60%, #5b5dff);
}

.sector.mid small {
  color: rgba(255, 255, 255, 0.8);
}

/* 转盘中间的圆盘 */
.dial-hub {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 -6px 20px rgba(16, 24, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  .dial-hub {
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03) 60%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
}

/* 顶上的指针，每过一格被拨一下 */
.dial-pointer {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 2px;
  width: 22px;
  height: 26px;
  margin-left: -11px;
  transform-origin: 50% 4px;
  background: linear-gradient(180deg, #ffffff, #c9d2df);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 3px rgba(16, 24, 40, 0.35));
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.dial-pointer.flick {
  transform: rotate(-16deg);
  transition-duration: 0.04s;
}

.dial-hint {
  margin: 8px 0 12px;
  text-align: center;
  font-size: 13px;
  color: var(--ink3);
}

.flyer {
  position: fixed;
  z-index: 70;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: var(--blue-grad);
  box-shadow: var(--lift);
  pointer-events: none;
  transform-origin: 0 0;
}

/* ---------- 固定安排 ---------- */
.days {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.day-chip {
  flex: 1;
  height: 42px;
  border-radius: 50%;
  aspect-ratio: 1;
  background: var(--fill);
  font-size: 15px;
  color: var(--ink2);
  transition: background 0.2s, color 0.2s;
}

.day-chip.on {
  background: var(--routine);
  color: #fff;
  font-weight: 600;
}

/* ---------- 登录 ---------- */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  padding: calc(var(--top) + 24px) 20px calc(var(--bottom) + 24px);
}

.auth-card {
  padding: 28px 22px 22px;
  border-radius: 34px;
}

.auth-card > * {
  position: relative;
  z-index: 3;
}

.auth h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth p {
  color: var(--ink2);
  margin: 0 0 22px;
}

.auth .err {
  color: var(--red-text);
  font-size: 14px;
  min-height: 21px;
  margin: 6px 0 10px;
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--top) + 10px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, -20px) scale(0.92);
  opacity: 0;
  max-width: calc(100% - 28px);
  width: max-content;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.has-action {
  pointer-events: auto;
}

.toast button {
  position: relative;
  z-index: 3;
  font-weight: 600;
  color: var(--blue-text);
}

.completion-cheer {
  position: fixed;
  z-index: 45;
  left: 50%;
  top: 42%;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--mint-grad);
  box-shadow: 0 12px 30px rgba(25, 197, 154, 0.4);
  pointer-events: none;
  animation: cheer 0.36s ease-out forwards;
}

.completion-cheer svg {
  width: 30px;
  height: 30px;
  stroke-width: 3;
}

@keyframes cheer {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  45% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }

  .spinner::before {
    animation-duration: 1.6s !important;
  }

  .completion-cheer {
    display: none;
  }

  .receded .wall {
    transform: none;
  }
}

/* ---------- ChatGPT 顾问：可复制的钥匙、网址、指令 ---------- */
.copy-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 16px;
  background: var(--solid);
  box-shadow: inset 0 0 0 1px var(--sep);
}

.copy-box code {
  flex: 1;
  min-width: 0;
  max-height: 120px;
  overflow: auto;
  font: 13px/1.5 var(--sans);
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--ink2);
}

.copy-box.secret code {
  color: var(--ink);
  font-weight: 600;
}

.gpt-steps {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink2);
}

.gpt-steps li + li {
  margin-top: 6px;
}
