* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: -apple-system, "PingFang SC", "Songti SC", "Helvetica Neue", sans-serif;
  background: #0F0F10;
  color: #e8e3d8;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
  line-height: 1.8;
  overscroll-behavior: none;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(64px, env(safe-area-inset-top))
    28px
    max(48px, env(safe-area-inset-bottom));
}

.view {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.view[hidden] { display: none; }

/* ===== 首页 ===== */
h1 {
  font-size: 22px;
  font-weight: 200;
  letter-spacing: 14px;
  padding-left: 14px;
  color: #d8d2c2;
  margin-bottom: 64px;
}

.prompt {
  font-size: 14px;
  letter-spacing: 5px;
  padding-left: 5px;
  color: #6a6458;
  font-weight: 300;
  margin-bottom: 36px;
}

.home-hint {
  font-size: 12px;
  color: #3f3c34;
  letter-spacing: 4px;
  padding-left: 4px;
  font-weight: 300;
  margin-top: 56px;
}

.yesterday-hint {
  font-size: 11px;
  color: #4a463c;
  letter-spacing: 2px;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 280px;
}

.streak {
  font-size: 11px;
  color: #3a3730;
  letter-spacing: 3px;
  padding-left: 3px;
  font-weight: 300;
  margin-top: 14px;
}

/* ===== 状态选项（不要"按钮感"） ===== */
.states {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.states button {
  padding: 24px 0;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 8px;
  padding-left: 8px;
  color: #b8b2a4;
  border-radius: 14px;
  transition: background 0.4s ease, color 0.4s ease, transform 0.15s ease;
}

.states button:active {
  background: rgba(245, 208, 111, 0.06);
  color: #f5d06f;
  transform: scale(0.97);
}

.states button.selected {
  background: rgba(245, 208, 111, 0.10);
  color: #f5d06f;
  box-shadow: 0 0 30px rgba(245, 208, 111, 0.18);
}

/* ===== 仪式页：圆点为视觉中心 ===== */
.dot {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #fde9a6 0%,
    #f5d06f 55%,
    #d8ad48 100%);
  box-shadow:
    0 0 80px rgba(245, 208, 111, 0.20),
    0 0 40px rgba(245, 208, 111, 0.40);
  margin: 24px 0 48px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.dot:active { transform: scale(0.95); }
.dot.breathing { animation: breathe 4s ease-in-out infinite; }
.dot.holding   { animation: breathe 3s ease-in-out infinite; cursor: default; }

@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.18); opacity: 1; }
}

.ritual-prompt {
  margin-bottom: 0;
  margin-top: 0;
  letter-spacing: 6px;
  padding-left: 6px;
}

/* 进入 holding 后，提示词让位给 hint */
[data-view="ritual"]:has(.dot.holding) .ritual-prompt { opacity: 0; }
.ritual-prompt { transition: opacity 0.4s ease; }

.holding-hint {
  font-size: 14px;
  color: #7a7468;
  letter-spacing: 4px;
  padding-left: 4px;
  font-weight: 300;
  min-height: 1.6em;
  margin-top: 24px;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.holding-hint.visible { opacity: 1; }

/* ===== 结果页：句子化、不再"字段+冒号" ===== */
.dot-mini {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #fde9a6 0%,
    #f5d06f 55%,
    #b89240 100%);
  box-shadow:
    0 0 28px rgba(245, 208, 111, 0.18),
    0 0 12px rgba(245, 208, 111, 0.30);
  opacity: 0.5;
  margin-bottom: 36px;
  animation: breathe-slow 6s ease-in-out infinite;
}

@keyframes breathe-slow {
  0%, 100% { transform: scale(1);    opacity: 0.45; }
  50%      { transform: scale(1.06); opacity: 0.65; }
}

.result {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-theme {
  font-size: 28px;
  font-weight: 200;
  letter-spacing: 10px;
  padding-left: 10px;
  color: #f0eadc;
  line-height: 1.4;
  margin-bottom: 36px;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.result-text {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 1.5px;
  color: #cdc7b8;
  padding: 0 8px;
  max-width: 280px;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.result-text + .result-text { margin-top: 28px; }
.result-advice { color: #e8e3d8; }

.result-theme.visible,
.result-text.visible { opacity: 1; }

.future {
  font-size: 12px;
  color: #4a463c;
  line-height: 1.9;
  letter-spacing: 2px;
  font-weight: 300;
  text-align: center;
  padding: 0 16px;
  margin-top: 40px;
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.future.visible { opacity: 1; }

.source-hint {
  font-size: 11px;
  color: #3f3c34;
  letter-spacing: 2px;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
  margin-top: 16px;
  padding: 0 16px;
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.source-hint.visible { opacity: 1; }

/* ===== 每日限制：替代体验 ===== */
.limit-message {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  text-align: center;
}

.limit-line {
  font-size: 19px;
  font-weight: 300;
  color: #e8e3d8;
  letter-spacing: 1.5px;
  line-height: 1.8;
  padding: 0 8px;
  max-width: 280px;
  margin-bottom: 36px;
}

.limit-line-soft {
  font-size: 14px;
  font-weight: 300;
  color: #6a6458;
  letter-spacing: 3px;
  padding-left: 3px;
  line-height: 1.7;
  max-width: 280px;
}

/* ===== 结果页操作 ===== */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 48px;
}

.primary {
  width: 100%;
  padding: 18px 0;
  background: transparent;
  color: #e8e3d8;
  border: 1px solid rgba(232, 227, 216, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 6px;
  padding-left: 6px;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.3s ease;
}

.primary:active {
  background: rgba(245, 208, 111, 0.08);
  border-color: rgba(245, 208, 111, 0.45);
  color: #f5d06f;
}

.ghost {
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 6px;
  padding-left: 6px;
  color: #4a463c;
  transition: color 0.3s ease;
}

.ghost:active { color: #b8b2a4; }
.ghost:disabled { opacity: 0.3; cursor: not-allowed; }

/* ===== 轻反馈 toast（双行） ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(56px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: rgba(232, 227, 216, 0.95);
  color: #1a1a1a;
  padding: 14px 22px;
  border-radius: 18px;
  font-size: 13px;
  letter-spacing: 1.5px;
  padding-left: 24px;
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  max-width: calc(100% - 48px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.toast.show {
  opacity: 0.96;
  transform: translateX(-50%) translateY(0);
}
