/* ===========================================================================
   dezhou-pottery.css — 德州关卡《补一窑黑陶》
   1200 × 675 的定尺舞台，用 transform: scale(--k) 适配视口。
   配色取自参考图：深青 #12292c / 宣纸 #efe6d1 / 朱红 #a8412c / 描金 #c8a45c
   =========================================================================== */

@import url('./presentation.css');
.craft-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background:
    radial-gradient(130% 105% at 50% 42%, #16302f 0%, #0b1a1c 46%, #060c0e 100%);
  font-family: "Songti SC", "Noto Serif SC", "SimSun", "STSong", serif;
  color: #241f18;
  -webkit-font-smoothing: antialiased;
}
.craft-stage[hidden] { display: none !important; }

.craft-screen {
  position: relative;
  width: 1200px;
  height: 675px;
  transform: scale(var(--k, 1));
  transform-origin: center center;
  background: #0d1b1c;
  overflow: hidden;
  box-shadow: 0 30px 90px #000b;
  user-select: none;
}

.craft-scene { position: absolute; inset: 0; display: none; }
.craft-scene.is-on { display: block; }

/* ---------- 整屏美术底 ---------- */
.craft-bleed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 热区压在参考图绘制的按钮上：hover 只给一圈柔和的外发光，
   不能画整块矩形色块或描边——参考图上的按钮是带花边的匾，方框会明显错位。 */
.hot {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  cursor: pointer;
  transition: background .18s;
}
.hot:hover {
  background: radial-gradient(56% 66% at 50% 52%, #ffe2a33d 0%, #ffe2a31c 50%, #ffe2a300 78%);
}
.hot:active {
  background: radial-gradient(58% 68% at 50% 52%, #00000022 0%, #00000000 70%);
}
.hot:focus-visible {
  outline: 2px solid #f0c97999;
  outline-offset: 8px;
}

/* ---------- 顶栏 ---------- */
.craft-bar {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: linear-gradient(180deg, #1b4145 0%, #123034 55%, #0d2427 100%);
  border-bottom: 1px solid #c8a45c55;
  color: #f2e8d2;
}
.craft-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, #c8a45c 0%, #c8a45c00 62%, #c8a45c00 100%);
  opacity: .55;
}
.craft-bar h2 {
  margin: 0;
  font-family: "KaiTi", "STKaiti", "Songti SC", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .16em;
}
.craft-bar .bar-step {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d8cbae;
  letter-spacing: .1em;
}
.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #c8a45c88;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #d8cbae;
}
.step-dot.on { background: #f0e3c6; color: #1c2a2a; border-color: #f0e3c6; box-shadow: 0 0 0 3px #f0e3c61f; }
.step-dot.done { background: #3f6b52; color: #f4ead2; border-color: #7fae8b; }
.step-line { width: 54px; height: 1px; background: #c8a45c55; }

.craft-x {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  border-radius: 50%;
  border: 1px solid #e7dcc2aa;
  background: #f5eddc;
  color: #1b3a3d;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.craft-x:hover { background: #fff; }

/* ---------- 纸面 ---------- */
.paper {
  background: #efe6d1 url(../../public/reference/water-ink/T_Paper.webp) center / 320px repeat;
  border: 1px solid #cbbb98;
  box-shadow: 0 12px 28px #0006, inset 0 0 46px #b9a8872e;
  position: relative;
}
.paper::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid #c9b98f4d;
  pointer-events: none;
}

/* ===================== 第一段：拉坯 ===================== */
.pane-wheel-left {
  position: absolute;
  left: 14px;
  top: 60px;
  width: 730px;
  height: 506px;
  border-radius: 3px;
  overflow: hidden;
  background: #241a13;
  box-shadow: inset 0 0 90px #0008, 0 10px 26px #0006;
}
.pane-wheel-left canvas { display: block; width: 100%; height: 100%; }

.pane-wheel-right { position: absolute; left: 754px; top: 60px; width: 380px; height: 506px; }
.pane-wheel-right canvas { position: absolute; left: 0; top: 0; width: 380px; height: 506px; touch-action: none; cursor: crosshair; }

.attempt {
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  padding: 5px 16px;
  background: #1d3a3d;
  border: 1px solid #c8a45c99;
  color: #f1e7d0;
  font-size: 13px;
  letter-spacing: .1em;
  white-space: nowrap;
  box-shadow: 0 6px 14px #0006;
}
.attempt b { color: #f3b45f; font-size: 17px; padding: 0 3px; }

/* 相似度竖表 */
.meter-col {
  position: absolute;
  left: 1142px;
  top: 60px;
  width: 46px;
  height: 506px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.meter-track {
  position: relative;
  width: 22px;
  height: 300px;
  margin-top: 34px;
  border-radius: 12px;
  background: #0d1c1e;
  border: 1px solid #c8a45c66;
  box-shadow: inset 0 0 10px #000a;
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, #8fd7c4, #4f9d8b);
  transition: height .35s ease;
}
.meter-fill.perfect { background: linear-gradient(180deg, #ffd98a, #d9a13f); }
.meter-label {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: .3em;
  color: #cbbfa2;
}
.meter-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #c8a45c88;
  background: #12262a;
  color: #efe4ca;
  display: grid;
  place-items: center;
  font-size: 15px;
  letter-spacing: 0;
}

/* ---------- 底部托盘 ---------- */
.tray {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 92px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: #e9dfc7 url(../../public/reference/water-ink/T_Paper.webp) center / 320px repeat;
  border: 1px solid #cbbb98;
  box-shadow: 0 10px 24px #0005, inset 0 0 40px #b9a88726;
}
.tray-icon {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  background: #1d3234;
  border: 1px solid #c8a45c77;
  display: grid;
  place-items: center;
}
.tray-icon svg { width: 34px; height: 34px; }
.tray-copy { display: flex; flex-direction: column; gap: 4px; }
.tray-copy b {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 24px;
  letter-spacing: .12em;
  color: #23201a;
}
.tray-copy span { font-size: 13px; color: #6c6353; letter-spacing: .06em; }
.tray-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn-wood,
.btn-red {
  font-family: inherit;
  font-size: 17px;
  letter-spacing: .14em;
  padding: 11px 24px;
  cursor: pointer;
  border-radius: 2px;
}
.btn-wood {
  color: #efe6cf;
  background: linear-gradient(180deg, #45514e, #2a3634);
  border: 1px solid #7e6b4a;
  box-shadow: 0 3px 0 #1a2220, inset 0 1px 0 #ffffff22;
}
.btn-red {
  color: #f8e9cb;
  background: linear-gradient(180deg, #b8503a, #8d3223);
  border: 1px solid #d9b878;
  box-shadow: 0 4px 0 #5c2317, inset 0 1px 0 #f0cf9a66;
  min-width: 148px;
}
.btn-red:disabled,
.btn-wood:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-red:not(:disabled):hover { filter: brightness(1.08); }
.btn-wood:not(:disabled):hover { filter: brightness(1.12); }

/* ===================== 第二段：窑火 ===================== */
.pane-kiln-left {
  position: absolute;
  left: 10px;
  top: 60px;
  width: 700px;
  height: 496px;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: inset 0 0 80px #0008, 0 10px 26px #0007;
}
.pane-kiln-left img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kiln-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(46% 42% at 50% 62%, #ff9a3f 0%, #ff6a2133 46%, #0000 72%);
  opacity: .2;
  transition: opacity .3s;
}
.kiln-sparks { position: absolute; inset: 0; pointer-events: none; }

.kiln-panel {
  position: absolute;
  left: 720px;
  top: 60px;
  width: 470px;
  height: 496px;
  padding: 12px;
  background: #10312f;
  border: 1px solid #c8a45c4d;
  box-shadow: inset 0 0 60px #0007, 0 10px 26px #0007;
}
.kiln-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .18em;
  color: #d9cdae;
}
.kiln-gauge { position: absolute; left: 12px; top: 40px; width: 196px; height: 268px; }
.kiln-gauge canvas { display: block; width: 100%; height: 100%; }

.kiln-ctrl { position: absolute; left: 222px; top: 40px; width: 236px; display: grid; gap: 12px; }
.kiln-ctrl label { font-size: 12px; color: #cfc3a6; letter-spacing: .12em; }
.gate-slider {
  position: relative;
  height: 34px;
  border: 1px solid #7f6f4f;
  background: linear-gradient(180deg, #0b1f20, #143233);
  border-radius: 4px;
  box-shadow: inset 0 2px 6px #000a;
}
.gate-fill {
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 0%;
  background: linear-gradient(90deg, #2f6d5e, #7fc0a4);
  border-radius: 3px;
}
.gate-knob {
  position: absolute;
  top: -6px;
  width: 20px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: linear-gradient(180deg, #e6d2a4, #a98b52);
  border: 1px solid #f0e2bd;
  box-shadow: 0 2px 6px #000a;
  pointer-events: none;
}
.gate-ends { display: flex; justify-content: space-between; font-size: 11px; color: #a99d84; margin-top: -6px; }

.btn-feed {
  width: 100%;
  height: 66px;
  margin-top: 6px;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 25px;
  letter-spacing: .3em;
  color: #ffe9c4;
  background: linear-gradient(180deg, #a8412c, #79241a);
  border: 1px solid #d9b878;
  box-shadow: 0 4px 0 #4f1a11, inset 0 1px 0 #f0cf9a66;
  cursor: pointer;
}
.btn-feed:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-feed:not(:disabled):hover { filter: brightness(1.1); }

.kiln-curve { position: absolute; left: 12px; top: 322px; width: 446px; height: 162px; }
.kiln-curve canvas { display: block; width: 100%; height: 100%; }

/* 三灯 */
.lamp-row { position: absolute; left: 10px; right: 10px; bottom: 8px; height: 100px; display: flex; gap: 10px; }
.lamp {
  flex: 1;
  position: relative;
  padding: 10px 14px;
  background: #e9dfc7 url(../../public/reference/water-ink/T_Paper.webp) center / 320px repeat;
  border: 1px solid #cbbb98;
  box-shadow: 0 8px 18px #0005, inset 0 0 30px #b9a88722;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
}
.lamp .no {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #f6ecd4;
  background: #1c393b;
  border: 1px solid #c8a45c88;
}
.lamp.done .no { background: #3f6b52; border-color: #8fbd9b; }
.lamp .name {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 24px;
  letter-spacing: .16em;
  color: #23201a;
}
.lamp .cond { font-size: 11px; color: #6c6353; justify-self: end; white-space: nowrap; }
.lamp .bar {
  grid-column: 2;
  height: 12px;
  border-radius: 8px;
  background: #14312f;
  border: 1px solid #6b5c44;
  overflow: hidden;
}
.lamp .bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #4f9d8b, #8fd7c4); transition: width .2s; }
.lamp[data-k="feed"] .bar i { background: linear-gradient(90deg, #c96b33, #f0a45c); }
.lamp[data-k="cool"] .bar i { background: linear-gradient(90deg, #4a6f8f, #8fb4d6); }
.lamp .tick {
  grid-row: span 2;
  justify-self: end;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px dashed #8b7c5f;
  display: grid;
  place-items: center;
  color: #f4ecd6;
  font-size: 18px;
}
.lamp.done .tick { border: 1px solid #7fae8b; background: #3f6b52; }

/* ===================== 成品屏 ===================== */
.grade {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 27px;
  color: #f8ecd4;
  background:
    radial-gradient(circle at 46% 40%, #b24a33 0%, #8d2e1f 62%, #6f2115 100%);
  border: 2px solid #e8c98a;
  border-radius: 7px;
  box-shadow: 0 8px 22px #0007, inset 0 0 16px #00000055, inset 0 0 0 3px #7d2a1d;
  letter-spacing: .04em;
  transform: rotate(-2.5deg);
  text-shadow: 0 2px 4px #0006;
}
.result-x {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e7dcc2cc;
  background: #f5eddc;
  color: #1b3a3d;
  font-size: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px #0006;
}
.result-x:hover { background: #fff; }

/* ===================== 入窑前的规则弹窗 ===================== */
.craft-rules {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: #05100ecc;
  backdrop-filter: blur(3px);
}
.craft-rules[hidden] { display: none !important; }

.rules-card {
  width: 640px;
  padding: 26px 34px 24px;
  background: #efe6d1 url(../../public/reference/water-ink/T_Paper.webp) center / 320px repeat;
  border: 1px solid #cbbb98;
  box-shadow: 0 24px 60px #000b, inset 0 0 60px #b9a8872e;
}
.rules-card h3 {
  margin: 0 0 16px;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 30px;
  letter-spacing: .18em;
  color: #23201a;
  border-bottom: 1px solid #c9b98f66;
  padding-bottom: 10px;
}
.craft-rules ol { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 12px; }
.craft-rules li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #3c352b;
}
.craft-rules li b {
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #8d3223;
  white-space: nowrap;
}
.craft-rules em { font-style: normal; font-weight: 700; color: #8d3223; }
.rules-note {
  margin: 0 0 18px;
  padding-top: 12px;
  border-top: 1px dashed #c9b98f66;
  font-size: 12.5px;
  line-height: 1.9;
  color: #6c6353;
}
.craft-rules .btn-red { display: block; margin: 0 auto; min-width: 190px; }

/* ---------- 轻提示 ---------- */
.craft-toast {
  position: absolute;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(10px);
  padding: 10px 22px;
  background: #1b1a16ee;
  border: 1px solid #c8a45c77;
  color: #f0e6cf;
  font-size: 15px;
  letter-spacing: .08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
  z-index: 5;
}
.craft-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
