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

html, body {
  width: 100%; height: 100%;
  background: #1a1712;
  overflow: hidden;
  font-family: KaiTi, "楷体", STKaiti, "Noto Serif CJK SC", serif;
  user-select: none;
}

body { display: flex; align-items: center; justify-content: center; }

#stage { position: relative; }

#game {
  display: block;
  background: #f2ede3;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0,0,0,0.55);
}

#overlay {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(28, 24, 18, 0.55);
  backdrop-filter: blur(3px);
  border-radius: 4px;
  z-index: 10;
}
#overlay.on { display: flex; }

.panel {
  background: #f7f2e6;
  border: 2px solid #c9bfa8;
  border-radius: 14px;
  padding: 34px 54px;
  text-align: center;
  color: #26221b;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  max-width: 760px;
}

/* ===== 开始界面 ===== */
.title-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
h1 { font-size: 58px; letter-spacing: 14px; font-weight: 700; text-indent: 14px; }
.seal-mini {
  display: inline-flex; align-items: center; justify-content: center;
  background: #b3342e; color: #f7f2e6;
  font-size: 18px; letter-spacing: 2px;
  padding: 6px 8px; border-radius: 6px;
  transform: rotate(6deg);
  box-shadow: 2px 3px 0 rgba(0,0,0,0.15);
}
.sub { margin-top: 10px; font-size: 20px; letter-spacing: 6px; color: #6b6353; }
.howto { margin: 26px 0 8px; font-size: 17px; line-height: 2; color: #3a352b; }
.howto b { color: #b3342e; font-weight: 700; }
.recipes { font-size: 19px; letter-spacing: 1px; }
.recipes span { color: #b3342e; }

.btn {
  margin-top: 22px;
  font-family: inherit;
  font-size: 26px; letter-spacing: 8px; text-indent: 8px;
  color: #26221b;
  background: transparent;
  border: 2px solid #26221b;
  border-radius: 10px;
  padding: 12px 46px;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { background: #26221b; color: #f7f2e6; }

.tiny { margin-top: 20px; font-size: 13px; color: #8d8471; letter-spacing: 1px; }

/* ===== 落款三选一 ===== */
.seal-wrap h2 { font-size: 30px; letter-spacing: 6px; margin-bottom: 6px; }
.seal-wrap .hint { font-size: 15px; color: #6b6353; margin-bottom: 22px; }
.cards { display: flex; gap: 22px; justify-content: center; }
.card {
  position: relative;
  width: 190px;
  background: #faf6ec;
  border: 2px solid #d5cbb4;
  border-radius: 12px;
  padding: 20px 12px 16px;
  cursor: pointer;
  text-align: center;
  transition: all .15s ease;
}
.card .badge {
  position: absolute; top: 9px; right: 9px;
  font-size: 11px; letter-spacing: 1px;
  padding: 1px 5px; border-radius: 4px;
}
.badge.keep  { color: #3f7d5a; border: 1px solid #3f7d5a; background: rgba(63,125,90,0.08); }
.badge.oneof { color: #b3342e; border: 1px solid #b3342e; background: rgba(179,52,46,0.08); }
.badge.cur   { color: #f7f2e6; border: 1px solid #b3342e; background: #b3342e; }

/* 呆/困之间的墨锁分隔（定稿） */
.lock-divider {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; margin: 0 -4px;
}
.lock-divider::before, .lock-divider::after {
  content: '';
  position: absolute; top: 38%;
  width: 30px;
  border-top: 2px dashed rgba(31,28,23,0.45);
}
.lock-divider::before { right: calc(100% - 8px); }
.lock-divider::after  { left: calc(100% - 8px); }
.lock-label {
  font-size: 12px; letter-spacing: 2px;
  color: #b3342e;
  border: 1px solid #b3342e;
  border-radius: 4px;
  padding: 1px 6px;
  background: rgba(179,52,46,0.06);
  transform: rotate(-3deg);
}
.card:hover { transform: translateY(-6px); border-color: #b3342e; box-shadow: 0 10px 24px rgba(179,52,46,0.18); }
.card .num { font-size: 13px; color: #b3342e; }
.card .big {
  font-size: 84px; line-height: 1.15;
  color: #26221b;
}
.card .py { font-size: 14px; color: #8d8471; letter-spacing: 2px; }
.card .t { font-size: 18px; margin-top: 8px; color: #b3342e; letter-spacing: 2px; }
.card .d { font-size: 14px; margin-top: 6px; color: #55503f; line-height: 1.5; }

/* ===== 结算 ===== */
.end-seal {
  width: 130px; height: 130px;
  margin: 0 auto 18px;
  background: #b3342e;
  color: #f7f2e6;
  font-size: 92px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  transform: rotate(-4deg);
  box-shadow: 3px 5px 0 rgba(0,0,0,0.18);
}
.stats { font-size: 20px; line-height: 2.1; color: #3a352b; }
.stats b { color: #b3342e; font-size: 24px; }
.formed { margin-top: 14px; }
.formed .label { font-size: 15px; color: #8d8471; margin-bottom: 10px; letter-spacing: 4px; }
.formed-row { display: flex; gap: 10px; justify-content: center; min-height: 56px; }
.formed-row .s {
  width: 52px; height: 52px;
  background: #b3342e; color: #f7f2e6;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transform: rotate(3deg);
  box-shadow: 2px 3px 0 rgba(0,0,0,0.12);
}
.formed-row .empty { color: #b7ae99; font-size: 15px; align-self: center; }

.pause-seal {
  width: 96px; height: 96px; margin: 0 auto 14px;
  border: 3px solid #26221b; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: #26221b;
}

/* ===== 组词界面 ===== */
.word-panel { min-width: 560px; }
.wseq {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin: 18px 0 6px; min-height: 56px;
}
.wslot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 2px solid #b3342e; border-radius: 10px;
  font-size: 30px; color: #26221b;
  background: #faf6ec;
  cursor: pointer;
  transform: rotate(-2deg);
}
.warrow { color: #b7ae99; font-size: 18px; }
.wempty { color: #b7ae99; font-size: 14px; }
.wladder { margin-bottom: 14px; }
.wladder-row { font-size: 15px; color: #55503f; line-height: 1.9; }
.wladder-row b { color: #b3342e; font-size: 18px; letter-spacing: 2px; }
.wstep {
  display: inline-flex; flex-direction: column; align-items: center;
  margin: 0 8px; font-size: 17px; color: #26221b;
}
.wstep i { font-style: normal; font-size: 11px; color: #8d8471; }
.wchars {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  max-width: 480px; margin: 0 auto;
}
.wchar {
  font-family: inherit;
  width: 52px; height: 60px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 26px;
  border: 2px solid #d5cbb4; border-radius: 10px;
  background: #faf6ec; color: #26221b;
  cursor: pointer; transition: all .12s ease;
}
.wchar i { font-style: normal; font-size: 10px; margin-top: 2px; color: #8d8471; }
.wchar.ok { border-color: #3f7d5a; }
.wchar.ok:hover { background: #3f7d5a; color: #f7f2e6; transform: translateY(-3px); }
.wchar.no { opacity: 0.45; }
.wchar.no i { color: #b3342e; }
.wmsg { min-height: 22px; margin: 12px 0 0; font-size: 14px; color: #b3342e; }
.wbtns { display: flex; gap: 16px; justify-content: center; margin-top: 4px; }
.btn.small { font-size: 18px; letter-spacing: 4px; padding: 8px 26px; }
