/* ===== 全局重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== 主题变量：白天宣纸 ===== */
:root {
  --bg: #f5f1e8;
  --bg-card: rgba(255, 253, 247, 0.72);
  --bg-btn: #fffbf3;
  --text: #2c2824;
  --text-soft: #6b5f51;
  --text-faint: #9a8d7c;
  --line: #d3c5b1;
  --line-soft: #e6dcc9;
  --accent: #8c4e35;
  --accent-soft: rgba(140, 78, 53, 0.08);
  --tip: #7a6f60;
  --paper: rgba(184, 169, 150, 0.04);
  --radius: 10px;
}

/* ===== 主题变量：夜晚墨色 ===== */
body.dark {
  --bg: #1e221f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-btn: #2a2f2b;
  --text: #e8e2d6;
  --text-soft: #b8a996;
  --text-faint: #7d7264;
  --line: #5a5148;
  --line-soft: #3a403b;
  --accent: #c9a063;
  --accent-soft: rgba(201, 160, 99, 0.1);
  --tip: #9a8f80;
  --paper: rgba(201, 160, 99, 0.03);
}

body {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", SimSun, serif;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 22%, var(--paper) 0, transparent 42%),
    radial-gradient(circle at 82% 78%, var(--paper) 0, transparent 46%),
    repeating-linear-gradient(45deg, rgba(184, 169, 150, 0.025) 0, rgba(184, 169, 150, 0.025) 1px, transparent 1px, transparent 16px);
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
}

/* ===== 页面容器：居中窄栏，贴合手机微信 ===== */
.stage {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

/* ===== 顶部 ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
}
.seat-name {
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--text);
}
.meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  align-self: center;
}
.meta-period {
  color: var(--text-faint);
}
.seat-count {
  color: var(--text-faint);
  font-size: 13px;
}
.seat-count b {
  font-weight: 500;
  color: var(--text-soft);
}

.btn-theme {
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--text-soft);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.btn-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 倒计时主视觉 ===== */
.countdown-card {
  text-align: center;
  padding: 34px 20px 26px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  margin-bottom: 22px;
}
.timer {
  font-size: 56px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.timer-status {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-faint);
  letter-spacing: 0.2em;
}

.duration {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.dur {
  padding: 7px 16px;
  border: 1px solid var(--line);
  background: var(--bg-btn);
  color: var(--text-soft);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.dur:hover {
  border-color: var(--accent);
}
.dur.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 茶修短句 ===== */
.sentence-block {
  position: relative;
  padding: 20px 22px;
  border-left: 3px solid var(--line);
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 22px;
}
.sentence-title {
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.sentence-content {
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--text);
  min-height: 2.2em;
}
.btn-sentence {
  margin-top: 10px;
  padding: 3px 12px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text-faint);
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.btn-sentence:hover {
  color: var(--accent);
  border-color: var(--line);
}

/* ===== 行茶时序 ===== */
.flow-steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.step {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--bg-btn);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}
.step:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.step:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.step.done {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  opacity: 0.85;
}
.step.current {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== 同修剪影 ===== */
.seats {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 28px;
}
.seat-box {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px dashed var(--line);
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.seat-box:hover {
  border-color: var(--text-faint);
}
.seat-box.active {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.seat-silhouette {
  display: block;
  width: 22px;
  height: 30px;
  opacity: 0;
  transition: opacity 0.35s ease;
  position: relative;
}
.seat-box:hover .seat-silhouette {
  opacity: 0.3;
}
.seat-box.active .seat-silhouette {
  opacity: 0.55;
}
.seat-silhouette::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-soft);
}
.seat-silhouette::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 19px;
  height: 17px;
  border-radius: 9px 9px 3px 3px;
  background: var(--text-soft);
}

/* ===== 底部控制区 ===== */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.ctl {
  padding: 8px 15px;
  border: 1px solid var(--line);
  background: var(--bg-btn);
  color: var(--text-soft);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
}
.ctl:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ctl-leave {
  border-color: var(--line-soft);
  color: var(--text-faint);
}
.ctl-leave:hover {
  border-color: var(--text-faint);
  color: var(--text-soft);
}

.tip-text {
  text-align: center;
  font-size: 13px;
  color: var(--tip);
  letter-spacing: 0.05em;
}

/* ===== 动效：短句淡入 ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sentence-content.fade {
  animation: fadeIn 0.6s ease;
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .stage { padding: 20px 16px 32px; }
  .timer { font-size: 44px; }
  .sentence-content { font-size: 17px; }
  .step { padding: 8px 13px; font-size: 13px; }
  .seat-box { width: 48px; height: 48px; }
  .ctl { padding: 7px 12px; font-size: 12px; }
}
