/* ============================================================
   电子香炉 · 暖阳陶土
   陶土暖橙 / 手工质感 / 柔和阴影 / 自然肌理
   ============================================================ */

:root {
  /* —— 核心配色（严格按规范）—— */
  --c-primary: #37a97a;
  --c-accent: #b050b9;
  --c-cta: #32c1cd;
  --c-bg: #f8fbfa;
  --c-card: #ffffff;
  --c-text: #1b2c25;
  --c-muted: #5c7a6e;
  --c-line: #dbe6e1;

  /* —— 衍生色（同族深浅 / 柔和阴影）—— */
  --c-primary-soft: rgba(55, 169, 122, 0.13);
  --c-accent-soft: rgba(176, 80, 185, 0.11);
  --c-cta-soft: rgba(50, 193, 205, 0.13);
  --c-clay: #c98d5a;                 /* 手作陶土点缀 */
  --c-clay-deep: #a96f42;
  --c-clay-soft: rgba(201, 141, 90, 0.16);
  --c-ink-08: rgba(27, 44, 37, 0.08);
  --c-ink-16: rgba(27, 44, 37, 0.16);

  /* —— 字体 —— */
  --font-head: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Noto Serif SC', 'Songti SC', 'STSong', Georgia, 'Times New Roman', serif;

  /* —— 圆角 / 阴影 —— */
  --radius: 16px;
  --shadow-hand: 0 2px 0 rgba(27, 44, 37, 0.05), 0 14px 30px -14px rgba(27, 44, 37, 0.28);
  --shadow-soft: 0 18px 40px -18px rgba(27, 44, 37, 0.3), 0 4px 12px -4px rgba(27, 44, 37, 0.08);
  --shadow-lift: 0 3px 0 rgba(27, 44, 37, 0.07), 0 24px 48px -20px rgba(27, 44, 37, 0.36);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  color: var(--c-text);
  font-family: var(--font-body);
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(55, 169, 122, 0.11), transparent 56%),
    radial-gradient(100% 46% at 50% 112%, rgba(50, 193, 205, 0.1), transparent 58%),
    radial-gradient(70% 36% at 14% 24%, rgba(201, 141, 90, 0.08), transparent 62%),
    var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* —— 纸张颗粒肌理 —— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 18px 16px calc(104px + env(safe-area-inset-bottom));
}

/* ============================================================
   头部
   ============================================================ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 14px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-seal {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(80% 80% at 30% 22%, rgba(255, 255, 255, 0.35), transparent 52%),
    linear-gradient(150deg, var(--c-primary), #2c8a62);
  box-shadow: 0 2px 0 rgba(27, 44, 37, 0.16), 0 10px 20px -8px rgba(55, 169, 122, 0.55);
  transform: rotate(-6deg);
}
.brand-seal::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-clay);
  box-shadow: 0 1px 2px rgba(27, 44, 37, 0.2);
  margin: -30px 0 0 34px;
}
.brand-seal { position: relative; }

.brand-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--c-muted);
  letter-spacing: 1px;
}

.header-chip {
  flex: none;
  padding: 8px 12px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  color: var(--c-primary);
  background: var(--c-primary-soft);
  border: 1px solid rgba(55, 169, 122, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================
   视图切换
   ============================================================ */
.view { display: none; }
.view.is-active { display: block; animation: viewIn 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-head { padding: 6px 4px 16px; }
.section-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.4px;
}
.section-sub { margin: 4px 0 0; font-size: 13px; color: var(--c-muted); }

/* 陶土小圆点（手作感装饰） */
.pinch {
  display: inline-flex;
  margin-top: 10px;
}
.pinch i {
  width: 10px;
  height: 10px;
  margin-right: -3px;
  border-radius: 50%;
  border: 1px solid rgba(27, 44, 37, 0.08);
}
.pinch i:nth-child(1) { background: var(--c-primary); }
.pinch i:nth-child(2) { background: var(--c-accent); opacity: 0.92; }
.pinch i:nth-child(3) { background: var(--c-cta); opacity: 0.85; }

/* ============================================================
   燃香舞台
   ============================================================ */
.stage {
  position: relative;
  overflow: hidden;
  padding: 40px 16px 16px;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-hand);
  background:
    radial-gradient(90% 62% at 50% 26%, rgba(255, 255, 255, 0.95), rgba(233, 243, 238, 0.45) 58%, transparent 100%),
    radial-gradient(rgba(55, 169, 122, 0.1) 1.1px, transparent 1.5px),
    #edf6f1;
  background-size: auto, 15px 15px, auto;
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 6px 18px -12px rgba(27, 44, 37, 0.25);
}

.halo {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 280px;
  height: 200px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 55% at 50% 45%, rgba(255, 196, 128, 0.35), rgba(201, 141, 90, 0.12) 52%, transparent 72%);
  transition: opacity 1s;
  opacity: 0.6;
}
.stage.lit .halo { opacity: 1; }

/* —— 香炉组合 —— */
.burner-wrap {
  position: relative;
  width: 250px;
  height: 286px;
  margin: 0 auto;
}

/* 香炉主体（可点击） */
.burner {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 210px;
  height: 128px;
  margin-left: -105px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  transition: transform 0.18s ease;
  z-index: 2;
}
.burner:active { transform: translateY(3px) scale(0.985); }
.burner:focus-visible { filter: drop-shadow(0 0 0 3px var(--c-cta-soft)); }

.burner-echo {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 176px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(27, 44, 37, 0.22), transparent 72%);
  filter: blur(3px);
}

/* 炉盖（陶土圆盖，微微歪斜显手作感） */
.burner-lid {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 116px;
  height: 34px;
  margin-left: -58px;
  border-radius: 48% 52% 30% 30% / 60% 60% 30% 30%;
  background:
    radial-gradient(70% 70% at 30% 26%, rgba(255, 255, 255, 0.4), transparent 55%),
    linear-gradient(180deg, var(--c-clay), var(--c-clay-deep));
  border: 1px solid rgba(27, 44, 37, 0.12);
  box-shadow: 0 4px 8px -3px rgba(27, 44, 37, 0.3);
  z-index: 4;
}
.burner-lid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a2c20, #241a12 62%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 炉身（陶土大肚，釉面绿带） */
.burner-belly {
  position: absolute;
  top: 26px;
  left: 0;
  width: 210px;
  height: 96px;
  border-radius: 30% 30% 44% 44% / 16% 16% 28% 28%;
  background:
    radial-gradient(60% 55% at 28% 20%, rgba(255, 255, 255, 0.38), transparent 58%),
    linear-gradient(180deg, #d29a63, var(--c-clay) 48%, #b57744);
  border: 1px solid rgba(27, 44, 37, 0.14);
  box-shadow: inset 0 8px 16px -8px rgba(255, 255, 255, 0.5), inset 0 -10px 18px -12px rgba(27, 44, 37, 0.35), 0 10px 18px -8px rgba(27, 44, 37, 0.28);
}
.burner-belly::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(rgba(169, 111, 66, 0.5) 1px, transparent 1.4px);
  background-size: 9px 9px;
  opacity: 0.35;
}

/* 釉面腰带宽 */
.burner-band {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 40%;
  height: 16px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 7px),
    linear-gradient(90deg, var(--c-primary), #2c8a62);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 1px 2px rgba(27, 44, 37, 0.2);
  opacity: 0.95;
}

/* 釉面高光 */
.burner-glaze {
  position: absolute;
  left: 22px;
  top: 14px;
  width: 22px;
  height: 62%;
  border-radius: 30px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent 70%);
  filter: blur(2px);
  transform: rotate(9deg);
}

/* 炉足 */
.burner-foot {
  position: absolute;
  left: 50%;
  top: 116px;
  width: 92px;
  height: 16px;
  margin-left: -46px;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(180deg, #a96f42, #8f5c35);
  border: 1px solid rgba(27, 44, 37, 0.16);
  box-shadow: 0 4px 6px -2px rgba(27, 44, 37, 0.3);
  z-index: 1;
}

/* 香（木杆 + 香灰 + 香头） */
.incense-stick {
  position: absolute;
  left: 50%;
  bottom: 118px;
  width: 6px;
  height: 148px;
  margin-left: -3px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f0dcc2, #c9a475 34%, #8a6748 100%);
  box-shadow: 0 2px 4px rgba(27, 44, 37, 0.2);
  z-index: 3;
  transition: height 0.6s ease, bottom 0.6s ease;
}
.stage.lit .incense-stick { height: 96px; bottom: 118px; }

.ash {
  position: absolute;
  left: -1px;
  right: -1px;
  top: 10px;
  height: 6px;
  border-radius: 4px;
  background: #d8d3c8;
  opacity: 0.9;
}

.ember {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 13px;
  height: 13px;
  margin-left: -6.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff7e2, #ffb066 42%, #ff7a45 72%, rgba(255, 90, 40, 0.2) 76%);
  box-shadow: 0 0 6px 1px rgba(255, 150, 80, 0.45);
  transition: box-shadow 0.5s;
}
.stage.lit .ember { animation: emberGlow 2.2s ease-in-out infinite; }
@keyframes emberGlow {
  0%, 100% { box-shadow: 0 0 10px 2px rgba(255, 160, 80, 0.7), 0 0 30px 8px rgba(255, 120, 60, 0.4); }
  50% { box-shadow: 0 0 16px 5px rgba(255, 200, 115, 0.95), 0 0 46px 14px rgba(255, 130, 60, 0.6); }
}

/* 燃香光晕 */
.glow {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 104px;
  height: 104px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 195, 125, 0.55), rgba(255, 140, 70, 0.18) 45%, transparent 70%);
  opacity: 0;
  transition: opacity 1s;
  z-index: 0;
}
.stage.lit .glow { opacity: 1; animation: glowPulse 3.4s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.12); }
}

/* —— 烟雾 —— */
.smoke-layer {
  position: absolute;
  left: 50%;
  bottom: 256px;
  width: 1px;
  height: 230px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 1s;
  z-index: 5;
  pointer-events: none;
}
.stage.lit .smoke-layer { opacity: 1; }

.smoke-haze {
  position: absolute;
  left: 50%;
  bottom: 196px;
  width: 180px;
  height: 150px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(50% 55% at 50% 100%, var(--wisp-color, rgba(255, 255, 255, 0.5)), transparent 72%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 1.4s;
  z-index: 0;
}
.stage.lit .smoke-haze { opacity: 0.7; }

.wisp {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, var(--wisp-color, rgba(255, 255, 255, 0.55)), transparent 68%);
  filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.stage.lit .wisp { animation: wispRise var(--dur, 6s) var(--delay, 0s) linear infinite; }
@keyframes wispRise {
  0% { transform: translate3d(0, 0, 0) scale(0.58); opacity: 0; }
  10% { opacity: var(--peak, 0.5); }
  45% { transform: translate3d(var(--drift, 18px), -120px, 0) scale(1.02); opacity: calc(var(--peak, 0.5) * 0.82); }
  100% { transform: translate3d(calc(var(--drift, 18px) * 1.5), -235px, 0) scale(1.3); opacity: 0; }
}

/* 提示文字 */
.hint {
  margin: 6px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--c-muted);
  letter-spacing: 0.5px;
  transition: opacity 0.6s;
}
.stage.lit .hint { opacity: 0.28; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  position: relative;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hand);
  padding: 16px;
}

/* 手工裁切：一角微圆角变化 */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius) var(--radius) 12px var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.now-card { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.now-info { display: flex; align-items: center; gap: 11px; min-width: 128px; }

.dot {
  width: 13px;
  height: 13px;
  flex: none;
  border-radius: 50%;
  background: var(--c-line);
  border: 1px solid rgba(27, 44, 37, 0.12);
  transition: background 0.4s, box-shadow 0.4s;
}
.dot.is-lit {
  background: linear-gradient(135deg, #ffd9a0, #ff9a5c);
  box-shadow: 0 0 0 4px rgba(255, 160, 90, 0.18), 0 0 12px 2px rgba(255, 150, 80, 0.5);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 160, 90, 0.16), 0 0 10px 1px rgba(255, 150, 80, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(255, 160, 90, 0.1), 0 0 16px 3px rgba(255, 150, 80, 0.6); }
}

.now-label { margin: 0; font-size: 11px; color: var(--c-muted); letter-spacing: 1px; }
.now-name { margin: 2px 0 0; font-family: var(--font-head); font-weight: 600; font-size: 15px; }

.now-actions { margin-left: auto; display: flex; gap: 8px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  padding: 11px 16px;
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: 3px solid var(--c-cta-soft); outline-offset: 2px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary), #2c8a62);
  box-shadow: 0 3px 0 rgba(27, 44, 37, 0.14), 0 10px 20px -8px rgba(55, 169, 122, 0.55);
}
.btn-primary:hover { box-shadow: 0 4px 0 rgba(27, 44, 37, 0.14), 0 14px 26px -8px rgba(55, 169, 122, 0.65); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  color: var(--c-muted);
  background: #f2f7f4;
  border: 1px solid var(--c-line);
}
.btn-ghost:hover { color: var(--c-text); background: #eaf3ee; }

.btn-lg { flex: 1; padding: 14px; font-size: 15px; border-radius: 16px; }

.btn-ico { display: inline-block; margin-right: 6px; font-style: normal; }
.btn.is-playing .btn-ico { animation: spinIco 1.2s linear infinite; }
@keyframes spinIco { to { transform: rotate(360deg); } }

.vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 4px;
}
.vol-label { font-size: 12px; color: var(--c-muted); font-family: var(--font-head); }
.vol {
  flex: 1;
  appearance: none;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-cta));
  outline: none;
  cursor: pointer;
}
.vol::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-primary);
  box-shadow: 0 2px 6px rgba(27, 44, 37, 0.25);
}
.vol::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-primary);
  box-shadow: 0 2px 6px rgba(27, 44, 37, 0.25);
}

/* ============================================================
   香型选择
   ============================================================ */
.incense-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.incense-item {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 15px 14px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: var(--shadow-hand);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.incense-item:active { transform: scale(0.965); }
.incense-item:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.incense-item:focus-visible { outline: 3px solid var(--c-cta-soft); outline-offset: 2px; }

.incense-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--swatch, var(--c-primary));
  opacity: 0.85;
}
.incense-item.is-active {
  border-color: var(--swatch, var(--c-primary));
  box-shadow: 0 0 0 2px var(--swatch-soft, var(--c-primary-soft)), var(--shadow-hand);
}

.incense-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.incense-swatch {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--swatch, var(--c-primary));
  box-shadow: inset 0 -6px 10px -6px rgba(0, 0, 0, 0.35), inset 0 4px 8px -4px rgba(255, 255, 255, 0.6);
  transform: rotate(-4deg);
}
.incense-name { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.incense-en { margin: 1px 0 0; font-family: var(--font-head); font-size: 10.5px; color: var(--c-muted); letter-spacing: 0.6px; text-transform: uppercase; }
.incense-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 10.5px;
  color: var(--c-text);
  background: var(--c-clay-soft);
  border-radius: 999px;
}
.incense-desc { margin: 0; font-size: 12px; line-height: 1.65; color: var(--c-muted); }

.incense-check {
  position: absolute;
  right: 10px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--swatch, var(--c-primary));
  font-family: var(--font-head);
  font-size: 12px;
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 10px -3px rgba(27, 44, 37, 0.4);
}
.incense-item.is-active .incense-check { transform: scale(1); }

/* ============================================================
   冥想计时
   ============================================================ */
.timer-card { padding: 22px 16px 18px; }

.ring-wrap {
  position: relative;
  width: 222px;
  height: 222px;
  margin: 0 auto 16px;
}
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track, .ring-progress {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}
.ring-track { stroke: var(--c-line); }
.ring-progress {
  stroke: url(#ringGrad);
  stroke-dasharray: 603.19;
  stroke-dashoffset: 603.19;
  transition: stroke-dashoffset 0.5s linear;
}

.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.ring-time {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 42px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  color: var(--c-text);
}
.ring-state { margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted); letter-spacing: 1.5px; }
.ring-state.is-running { color: var(--c-accent); }

.presets { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  appearance: none;
  border: 1px solid var(--c-line);
  background: #f6faf7;
  color: var(--c-muted);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.is-active {
  background: linear-gradient(135deg, var(--c-primary), #2c8a62);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(55, 169, 122, 0.6);
}
.chip:disabled { opacity: 0.45; cursor: not-allowed; }

.timer-controls { display: flex; gap: 10px; }

/* —— 记录 —— */
.history-card { margin-top: 14px; }
.history-head { display: flex; align-items: center; justify-content: space-between; }
.history-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.text-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--c-muted);
  font-family: var(--font-head);
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
}
.text-btn:hover { color: #c0524f; background: rgba(192, 82, 79, 0.08); }

.history-summary { margin: 10px 0 6px; font-size: 12.5px; color: var(--c-muted); }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-top: 1px dashed var(--c-line);
  animation: itemIn 0.4s ease both;
}
@keyframes itemIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.history-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--swatch, var(--c-primary)); }
.history-meta { flex: 1; min-width: 0; }
.history-name { font-family: var(--font-head); font-weight: 600; font-size: 13px; }
.history-date { font-size: 11px; color: var(--c-muted); margin-top: 1px; }
.history-mins { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--c-primary); }
.history-empty { text-align: center; padding: 18px 0 8px; font-size: 13px; color: var(--c-muted); }
.history-empty::before {
  content: "❋";
  display: block;
  font-size: 30px;
  margin-bottom: 8px;
  color: var(--c-line);
}

/* ============================================================
   底部导航
   ============================================================ */
.app-nav {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(100% - 28px, 480px);
  display: flex;
  gap: 6px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  z-index: 60;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 0 7px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--c-muted);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  position: relative;
}
.nav-item svg { width: 22px; height: 22px; transition: transform 0.2s ease; }
.nav-item:hover { color: var(--c-primary); }
.nav-item:active { transform: scale(0.95); }
.nav-item:focus-visible { outline: 3px solid var(--c-cta-soft); outline-offset: 1px; }
.nav-item.is-active {
  color: var(--c-primary);
  background: linear-gradient(135deg, var(--c-primary-soft), var(--c-cta-soft));
}
.nav-item.is-active svg { transform: translateY(-1px) scale(1.06); }
.nav-item.is-active::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0;
  animation: navDot 0.3s ease forwards;
}
@keyframes navDot { to { opacity: 0.9; } }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translate(-50%, -24px);
  max-width: min(84vw, 360px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--c-text);
  color: #f4fbf7;
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.4px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 80;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 380px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .incense-grid { grid-template-columns: 1fr; }
  .now-actions { width: 100%; }
  .now-actions .btn { flex: 1; justify-content: center; }
}

@media (min-width: 720px) {
  .app { padding-top: 26px; }
  .stage { padding: 48px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
