/* 小月亮 v2 · 柔和暖色（奶油、杏桃、陶土），不堆粉色 */

:root {
  --bg-1: #fdf8f2;
  --bg-2: #f9efe4;
  --cream: #fffdfa;
  --sand: #f6ece1;
  --peach: #e9a179;
  --peach-deep: #d97f56;
  --peach-soft: #f4d9c6;
  --amber: #e2b25e;
  --clay: #b5715b;
  --ink: #4a3a31;
  --ink-soft: #9a8478;
  --ink-faint: #c2ab9b;
  --line: #f0e0d2;
  --card: rgba(255, 252, 248, 0.86);
  --shadow: 0 14px 32px rgba(180, 130, 95, 0.14), 0 2px 8px rgba(180, 130, 95, 0.06);
  --shadow-soft: 0 6px 18px rgba(180, 130, 95, 0.12);
  --radius: 24px;
  --ring-len: 540.35;
}

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

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  overscroll-behavior-y: contain;
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI",
    "Microsoft YaHei", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 520px at 100% -6%, #fdeee2 0%, transparent 60%),
    radial-gradient(760px 460px at -10% 6%, #fff3e6 0%, transparent 55%),
    linear-gradient(168deg, var(--bg-1) 0%, #fdf6ef 45%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

h2,
h3,
p {
  margin: 0;
}

h3 {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: #6b5445;
}

/* ---------- 背景装饰 ---------- */

.deco {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.deco span {
  position: absolute;
  font-size: 18px;
  opacity: 0.35;
  filter: saturate(0.85);
  animation: floaty 11s ease-in-out infinite;
}

.deco span:nth-child(2n) { animation-duration: 14s; animation-delay: -4s; }
.deco span:nth-child(3n) { animation-duration: 17s; animation-delay: -8s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

/* ---------- 外壳 ---------- */

.app {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
  padding: 18px 16px calc(100px + env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 6px 16px;
}

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

.mascot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(150deg, #fffdfa, #fbe9d9 60%, #f9ddc8);
  box-shadow: var(--shadow-soft);
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hi {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.sub-date {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.6px;
}

.icon-btn {
  border: 0;
  background: rgba(255, 253, 250, 0.85);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 17px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.icon-btn:active { transform: scale(0.92); }

.icon-btn.small {
  width: 30px;
  height: 30px;
  font-size: 13px;
  box-shadow: none;
  background: var(--sand);
}

/* ---------- 视图 ---------- */

.view { display: none; }

.view.is-active {
  display: block;
  animation: fadeUp 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 卡片 ---------- */

.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  margin-bottom: 14px;
}

/* ---------- 提示条 ---------- */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: linear-gradient(120deg, #fdf1e6, #fbe8d9);
  border: 1px solid #f2d8c3;
  box-shadow: var(--shadow-soft);
  animation: fadeUp 0.3s ease both;
}

.alert p {
  flex: 1;
  font-size: 12.5px;
  line-height: 1.55;
  color: #7a5c49;
}

.alert-icon { font-size: 19px; }

.alert button {
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: var(--clay);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- 首页 hero ---------- */

.hero {
  text-align: center;
  padding: 20px 18px 18px;
  background: linear-gradient(168deg, rgba(255, 253, 250, 0.96), rgba(253, 241, 231, 0.86) 58%, rgba(250, 235, 221, 0.9));
}

.hero[data-state="period"] {
  background: linear-gradient(168deg, rgba(255, 253, 250, 0.97), rgba(252, 235, 224, 0.95) 60%, rgba(248, 226, 209, 0.95));
}

.ring-wrap {
  position: relative;
  width: 182px;
  height: 182px;
  margin: 0 auto 12px;
}

.ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  display: block;
}

.ring-track {
  fill: none;
  stroke: #f6e5d8;
  stroke-width: 12;
}

.ring-progress {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 0 var(--ring-len);
  transition: stroke-dasharray 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 8px;
}

.ring-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.5px;
  background: linear-gradient(125deg, #d97f56, #e9a179 45%, #c98e5e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ring-num.is-range {
  font-size: 30px;
  letter-spacing: -1px;
}

.ring-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--ink-soft);
}

.hero-title {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.hero-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 11px;
}

.chip {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fffdfa;
  color: #a3795f;
  box-shadow: inset 0 0 0 1px var(--line);
  letter-spacing: 0.3px;
}

.chip.warm {
  color: #9a7a45;
  background: #fdf5e6;
  box-shadow: inset 0 0 0 1px #f3e2c4;
}

.love-note {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: #b08a72;
}

/* ---------- 快捷操作 ---------- */

.quick-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.quick {
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: var(--card);
  border-radius: 20px;
  padding: 12px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.quick:active {
  transform: scale(0.96);
  box-shadow: 0 3px 10px rgba(180, 130, 95, 0.14);
}

.quick-icon { font-size: 21px; }

.quick-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #7b5f4d;
  letter-spacing: 0.3px;
}

/* ---------- 今天的感觉 ---------- */

.today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.today-head h3 { margin-bottom: 0; }

.today-text {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 10px;
}

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

.face {
  border: 1.5px solid var(--line);
  background: #fffdfa;
  border-radius: 16px;
  padding: 6px 10px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.face:active { transform: scale(0.94); }

.face .e { font-size: 21px; line-height: 1.25; }

.face .t { font-size: 10px; color: var(--ink-faint); }

.face.is-on {
  border-color: var(--peach);
  background: #fff3e9;
  box-shadow: 0 4px 12px rgba(217, 127, 86, 0.16);
}

.face.is-on .t { color: var(--clay); }

.today-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--sand);
  color: #8a6a55;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 周期洞察 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.stat-grid b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
}

.stat-grid span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-faint);
}

.bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 60px;
  margin: 14px 2px 4px;
}

.bar {
  flex: 1 1 0;
  max-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}

.bar i {
  width: 100%;
  max-width: 26px;
  min-height: 6px;
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, #f2c09b, #dd8a62);
}

.bar b {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- 异常提示 ---------- */

.anomaly {
  background: linear-gradient(150deg, #fffaf1, #fdf1df);
  border: 1px solid #f3dfc0;
}

.anomaly h3 { color: #9a7332; }

.anomaly p {
  font-size: 12.5px;
  line-height: 1.65;
  color: #7d6547;
  margin-bottom: 12px;
}

/* ---------- 按钮 ---------- */

.btn-primary {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fffdfa;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(118deg, #eda981 0%, #e08f65 55%, #d97f56 100%);
  box-shadow: 0 10px 24px rgba(217, 127, 86, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.975);
  box-shadow: 0 5px 14px rgba(217, 127, 86, 0.28);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.9);
  color: var(--clay);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-ghost:active { transform: scale(0.96); }

.btn-ghost.danger {
  color: #b4553f;
  border-color: #f1d3c9;
}

.link-btn {
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--peach-deep);
  cursor: pointer;
  padding: 2px 0;
}

.link-btn.danger { color: #b4553f; }

/* ---------- 日历 ---------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-head strong {
  font-size: 15px;
  letter-spacing: 1px;
  color: #6b5445;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-cell {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.cal-cell::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  z-index: -1;
  background: transparent;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cal-cell:active::before { transform: scale(0.94); }

.cal-cell.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.cal-cell.is-period {
  color: #fffdfa;
  font-weight: 800;
}

.cal-cell.is-period::before {
  background: linear-gradient(150deg, #e8a17b, #d97f56);
  box-shadow: 0 4px 10px rgba(217, 127, 86, 0.3);
}

.cal-cell.is-predicted {
  color: #c07a52;
  font-weight: 700;
}

.cal-cell.is-predicted::before {
  box-shadow: inset 0 0 0 2px var(--peach-soft);
}

.cal-cell.is-range::before {
  background: #fbe9dc;
}

.cal-cell.is-range {
  color: #b98a6d;
}

.cal-cell.is-today {
  outline: 2px solid var(--clay);
  outline-offset: -1px;
}

.cal-dot {
  position: absolute;
  bottom: 9%;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.cal-note {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.6;
  color: #a17f68;
  text-align: center;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--ink-soft);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.dot.period { background: linear-gradient(150deg, #e8a17b, #d97f56); }
.dot.predicted { box-shadow: inset 0 0 0 2px var(--peach-soft); background: #fff; }
.dot.ovulation { background: var(--amber); }

/* ---------- 表单 ---------- */

.form label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

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

.label-note {
  color: var(--ink-faint);
  font-size: 11px;
  margin-left: 2px;
}

button {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1.5px solid var(--line);
  background: #fffdfa;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 4px rgba(233, 161, 121, 0.16);
  background: #fff;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.form-actions .btn-primary { flex: 1; }

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

.file-btn { position: relative; }

.pin-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.pin-row input {
  margin-top: 0;
  flex: 1;
  letter-spacing: 6px;
  text-align: center;
}

/* ---------- 开关 ---------- */

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: 13.5px;
  color: #6f5748;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}

.switch-row:last-of-type { border-bottom: 0; }

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  display: inline-block;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #eddfd2;
  transition: background 0.2s ease;
  pointer-events: none;
}

.switch i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(120, 90, 70, 0.2);
  transition: transform 0.2s ease;
}

.switch input:checked + i { background: var(--peach); }
.switch input:checked + i::after { transform: translateX(19px); }

/* ---------- 记录列表 ---------- */

.record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.record-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.record-main strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.record-main > span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-faint);
}

.record-main strong span {
  display: inline;
  margin-left: 4px;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-faint);
}

.record-actions {
  display: flex;
  gap: 4px;
}

.record-actions button {
  border: 0;
  background: #fffdfa;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}

.empty-tip {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  padding: 8px 0 2px;
  line-height: 1.7;
}

.record-main .sym-summary {
  font-size: 15px;
  letter-spacing: 2px;
  margin-top: 3px;
  color: var(--ink);
}

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(470px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 7px;
  background: rgba(255, 253, 250, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  z-index: 20;
}

.tab {
  border: 0;
  background: transparent;
  font-family: inherit;
  color: var(--ink-faint);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 0 5px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.tab span {
  font-size: 18px;
  line-height: 1.25;
  filter: saturate(0.8);
}

.tab.is-active {
  color: var(--peach-deep);
  font-weight: 700;
  background: linear-gradient(160deg, #fdf0e6, #fbf3e8);
}

/* ---------- 底部弹层 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-veil {
  position: absolute;
  inset: 0;
  background: rgba(74, 58, 49, 0.32);
  backdrop-filter: blur(2px);
}

.sheet-panel {
  position: relative;
  width: min(500px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fffdfa;
  border-radius: 26px 26px 0 0;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(120, 80, 50, 0.2);
  animation: sheetUp 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes sheetUp {
  from { transform: translateY(34px); }
  to { transform: translateY(0); }
}

.sheet-grab {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #ead9cb;
  margin: 2px auto 8px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sheet-head strong {
  font-size: 15.5px;
  font-weight: 800;
  color: #6b5445;
}

.period-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.period-actions .btn-ghost {
  flex: 1;
  font-size: 12px;
}

.symptom-rows {
  margin: 6px 0 14px;
}

.sym-row {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.sym-row:last-child { border-bottom: 0; }

.sym-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.sym-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sym-opt {
  border: 1.5px solid var(--line);
  background: #fffdfa;
  border-radius: 14px;
  padding: 6px 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 58px;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.sym-opt:active { transform: scale(0.94); }

.sym-opt .e { font-size: 19px; line-height: 1.3; }

.sym-opt .t {
  font-size: 9.5px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.sym-opt.is-on {
  border-color: var(--peach);
  background: #fff3e9;
  box-shadow: 0 4px 12px rgba(217, 127, 86, 0.16);
}

.sym-opt.is-on .t { color: var(--clay); }

/* ---------- 密码锁 ---------- */

.lock {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 420px at 50% 0%, #fdf1e6 0%, transparent 70%),
    linear-gradient(170deg, #fefaf5, #f8ecdf);
}

.lock-inner {
  width: min(300px, 100%);
  text-align: center;
}

.lock-moon {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(150deg, #fffdfa, #fbe6d5);
  box-shadow: var(--shadow);
}

.lock-title {
  font-size: 17px;
  font-weight: 800;
  color: #6b5445;
}

.lock-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-faint);
}

.lock-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 18px 0 4px;
}

.lock-dots i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #eeddd0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lock-dots i.on {
  background: var(--peach-deep);
  transform: scale(1.12);
}

.lock-msg {
  height: 18px;
  font-size: 11.5px;
  color: #b4553f;
  margin-top: 6px;
}

.lock-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.lock-key {
  border: 0;
  background: rgba(255, 253, 250, 0.9);
  border-radius: 17px;
  padding: 13px 0;
  font: inherit;
  font-size: 19px;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(160, 120, 90, 0.12);
  cursor: pointer;
}

.lock-key:active { transform: scale(0.95); }

.lock-key.blank {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.lock-inner .link-btn { margin-top: 16px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 48px);
  padding: 11px 17px;
  border-radius: 999px;
  background: rgba(74, 58, 49, 0.95);
  color: #fffdfa;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 120;
  box-shadow: 0 12px 28px rgba(74, 58, 49, 0.26);
}

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

.toast button {
  border: 0;
  background: none;
  color: #f4c9a8;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

/* ---------- 文本 ---------- */

.hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.65;
  margin-top: 8px;
}

.disclaimer {
  font-size: 10.5px;
  color: #bda897;
  line-height: 1.7;
  text-align: center;
  margin: 14px 10px 4px;
}

.footnote {
  text-align: center;
  font-size: 10.5px;
  color: var(--ink-faint);
  margin: 16px 0 6px;
  letter-spacing: 0.8px;
}

/* ---------- 响应 ---------- */

@media (min-width: 520px) {
  .app { padding-top: 26px; }
  .ring-wrap { width: 196px; height: 196px; }
  .ring-num { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
