/* 工坊样板 · 页面骨架样式
   只做配色令牌 + 四屏布局 + 同一张工作台的镜头平移占位；正式画面由 view/ 两个任务接。
   颜色照美术定调：暖色金匠工作台、象牙珐琅方钮、翡翠绿主钮、黄铜边。 */

:root {
  --bench-1: #24170f;
  --bench-2: #3a2416;
  --bench-3: #17100b;
  --ivory: #f4ead4;
  --ivory-soft: rgba(244, 234, 212, 0.72);
  --ivory-faint: rgba(244, 234, 212, 0.14);
  --brass: #c39a52;
  --brass-dim: rgba(195, 154, 82, 0.55);
  --jade: #1f7a5a;
  --jade-deep: #14523e;
  --ink: #2a2018;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --topbar-h: 54px;
  --bottombar-h: 40px;
  --radius: 14px;
  --transition: 420ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bench-3);
  color: var(--ivory);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; }

.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 202, 128, 0.16), transparent 60%),
    radial-gradient(90% 70% at 20% 100%, rgba(155, 89, 45, 0.22), transparent 65%),
    linear-gradient(180deg, var(--bench-1) 0%, var(--bench-2) 48%, var(--bench-3) 100%);
}

/* 台面的一道横向高光，让「同一张工作台」有个底 */
.app::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--topbar-h) + 46%);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 160, 0.22), transparent);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(20, 13, 9, 0.88), rgba(20, 13, 9, 0.55));
  border-bottom: 1px solid var(--brass-dim);
  backdrop-filter: blur(4px);
}

.topbar-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ivory);
  white-space: nowrap;
}

.shot-label {
  font-size: 10px;
  color: var(--brass);
  letter-spacing: 1px;
  white-space: nowrap;
}

.hud {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 11px;
  color: var(--ivory-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.handoff {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--brass);
  background: rgba(31, 122, 90, 0.28);
  color: var(--ivory);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.handoff:active { background: rgba(31, 122, 90, 0.55); }
.handoff-icon { color: #a8e6c6; font-size: 12px; }

.stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.bench {
  display: flex;
  width: 400%;
  height: 100%;
  will-change: transform;
  transition: transform var(--transition);
}

.stage.no-anim .bench { transition: none; }

.screen {
  flex: 0 0 25%;
  width: 25%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  overflow: hidden;
}

.screen-inner {
  width: 100%;
  max-width: 430px;
  max-height: 100%;
  display: flex;
  justify-content: center;
}

.panel {
  width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--brass-dim);
  background:
    linear-gradient(180deg, rgba(244, 234, 212, 0.1), rgba(244, 234, 212, 0.04)),
    rgba(26, 17, 11, 0.72);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 240, 210, 0.12);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-step {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--brass);
}

.panel-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.28;
  font-weight: 600;
  color: var(--ivory);
}

.panel-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ivory-soft);
}

.placeholder {
  margin-top: 2px;
  min-height: 118px;
  flex: 1 1 auto;
  border-radius: 10px;
  border: 1px dashed rgba(244, 234, 212, 0.28);
  background:
    repeating-linear-gradient(135deg, rgba(244, 234, 212, 0.035) 0 8px, transparent 8px 16px),
    rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 12px;
  color: var(--ivory-soft);
  font-size: 11px;
  line-height: 1.5;
}

.placeholder-icon {
  font-size: 26px;
  color: var(--brass);
  opacity: 0.85;
}

.phase-chip {
  margin-top: 2px;
  font-size: 11px;
  color: var(--ivory-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-height: 16px;
}

.phase-chip b {
  color: #a8e6c6;
  font-weight: 600;
}

.tools {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.tool {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 6px;
  border-radius: 9px;
  border: 1px solid rgba(244, 234, 212, 0.22);
  background: rgba(244, 234, 212, 0.07);
  color: var(--ivory-soft);
  font-size: 10px;
  white-space: nowrap;
  cursor: default;
}

.tool-icon {
  color: var(--brass);
  font-size: 13px;
}

.card-panel .placeholder {
  border-style: solid;
  border-color: rgba(195, 154, 82, 0.3);
  background: linear-gradient(160deg, rgba(31, 122, 90, 0.18), rgba(0, 0, 0, 0.28));
}

.bottombar {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  height: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 12px env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(195, 154, 82, 0.28);
  background: linear-gradient(0deg, rgba(15, 10, 7, 0.9), rgba(15, 10, 7, 0.35));
}

/* 底栏：四段进度（同一张工作台从左到右），走过的打勾、当前的亮 */
.steps {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: space-between;
  gap: 4px;
}
.steps li {
  flex: 1 1 0;
  position: relative;
  text-align: center;
  font-size: 11px;
  line-height: 22px;
  color: rgba(244, 234, 212, 0.38);
  white-space: nowrap;
  border-radius: 11px;
  transition: color var(--transition), background-color var(--transition);
}
.steps li.is-done { color: rgba(214, 178, 104, 0.75); }
.steps li.is-done::before { content: '✓ '; }
.steps li.is-on {
  color: var(--ivory);
  background: rgba(195, 154, 82, 0.22);
  box-shadow: inset 0 0 0 1px rgba(195, 154, 82, 0.5);
}

.toast {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%);
  max-width: min(82vw, 360px);
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--brass-dim);
  background: rgba(20, 13, 9, 0.92);
  color: var(--ivory);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow);
}

.toast[hidden] { display: none; }

/* 矮一点的手机（360×780）把占位块压一点，保证不出框 */
@media (max-height: 740px) {
  .panel { gap: 6px; padding: 12px 12px 10px; }
  .panel-title { font-size: 17px; }
  .panel-text { font-size: 11px; }
  .placeholder { min-height: 92px; }
  .tool { height: 30px; }
}
