/* 好餸分幕式指南 — 深色舞台 · 品牌橙點綴（風格參考 jkdcoding.com/bizpulse） */
:root {
  --bg: #05080d;
  --bg-soft: #0b1119;
  --card: #101823;
  --line: #1e2a3a;
  --text: #f4f6f9;
  --text-dim: #9aa7b8;
  --brand: #ea580c;
  --brand-soft: rgba(234, 88, 12, 0.14);
  --green: #22c55e;
  --blue: #3b82f6;
  --gold: #f59e0b;
  --violet: #8b5cf6;
  --teal: #14b8a6;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, "Segoe UI", sans-serif;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.9); backdrop-filter: blur(8px);
  z-index: 10; flex-shrink: 0;
}
.brand { display: flex; align-items: baseline; gap: 10px; background: none; border: none; cursor: pointer; color: inherit; }
.brand-mark { font-size: 22px; font-weight: 900; color: var(--brand); letter-spacing: 2px; }
.brand-sub { font-size: 13px; color: var(--text-dim); letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.track-chip {
  font-size: 13px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-dim);
}
.act-counter { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- Stage ---------- */
.stage { flex: 1; position: relative; overflow: hidden; }
.scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 34px 22px 26px;
  opacity: 0; transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease;
  overflow-y: auto;
}
.scene.active { opacity: 1; transform: none; }
.scene.leaving { opacity: 0; transform: translateY(-14px); }

.scene-inner { width: min(1120px, 100%); margin: auto; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 3px; color: var(--text-dim);
  margin-bottom: 14px; text-transform: uppercase;
}
.kicker .act { color: var(--brand); font-weight: 800; }
h1.scene-title {
  font-size: clamp(28px, 5vw, 46px); font-weight: 900; line-height: 1.25;
  margin-bottom: 14px; letter-spacing: 0.5px;
}
.scene-body { color: var(--text-dim); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.8; max-width: 760px; }
.scene-body strong { color: var(--text); }

/* ---------- Layout blocks ---------- */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 26px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 20px; } }

.shot {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 10px; box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.shot img { width: 100%; height: auto; display: block; border-radius: 12px; }
.shot figcaption { font-size: 12px; color: var(--text-dim); padding: 10px 6px 4px; text-align: center; }
.shot.mobile { max-width: 330px; margin: 0 auto; }

.points { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.points li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  padding: 13px 16px; border-radius: 12px; font-size: 15px; line-height: 1.65; color: var(--text-dim);
}
.points li b { color: var(--text); }
.points .tick { color: var(--brand); font-weight: 900; flex-shrink: 0; }

.note {
  margin-top: 16px; padding: 12px 16px; border-left: 3px solid var(--brand);
  background: var(--brand-soft); border-radius: 8px;
  font-size: 14px; color: var(--text-dim); line-height: 1.7;
}
.note.warn { border-left-color: var(--gold); background: rgba(245, 158, 11, 0.1); }
.note.good { border-left-color: var(--green); background: rgba(34, 197, 94, 0.1); }

/* ---------- Role picker ---------- */
.hero-title { font-size: clamp(30px, 6vw, 54px); font-weight: 900; line-height: 1.2; margin-bottom: 10px; }
.hero-sub { color: var(--text-dim); font-size: clamp(15px, 2vw, 18px); margin-bottom: 30px; line-height: 1.8; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.role-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; cursor: pointer; text-align: left; color: inherit;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.role-card:hover, .role-card:focus-visible { transform: translateY(-4px); border-color: var(--accent, var(--brand)); box-shadow: 0 14px 40px rgba(0,0,0,.5); outline: none; }
.role-emoji { font-size: 30px; }
.role-name { font-size: 19px; font-weight: 800; }
.role-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.role-cta { margin-top: auto; font-size: 13px; color: var(--accent, var(--brand)); font-weight: 700; padding-top: 8px; }

/* ---------- Flow diagram (intro) ---------- */
.flow { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-top: 24px; }
.flow-node {
  flex: 1 1 150px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; text-align: center;
}
.flow-node .emoji { font-size: 24px; }
.flow-node .name { font-weight: 800; margin-top: 6px; font-size: 15px; }
.flow-node .role-tag { font-size: 12px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.flow-arrow { align-self: center; color: var(--brand); font-size: 20px; font-weight: 900; flex: 0 0 auto; }

.journey { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 24px; counter-reset: step; }
.journey .step {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 10px; text-align: center; counter-increment: step; position: relative;
}
.journey .step::before {
  content: counter(step); display: inline-block; width: 24px; height: 24px; line-height: 24px;
  border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 8px;
}
.journey .step div { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); }
.journey .step b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 3px; }

/* ---------- Controls ---------- */
.controls {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px 16px; border-top: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.9); backdrop-filter: blur(8px); flex-shrink: 0;
}
.ctrl-btn {
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.ctrl-btn:hover:not(:disabled) { border-color: var(--brand); }
.ctrl-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ctrl-btn.primary:hover:not(:disabled) { background: #c2410c; }
.ctrl-btn:disabled { opacity: 0.35; cursor: default; }
.dots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--line);
  border: none; cursor: pointer; padding: 0; transition: all .2s ease;
}
.dot:hover { background: var(--text-dim); }
.dot.current { background: var(--brand); transform: scale(1.35); }
.dot.done { background: #7c3a12; }

/* ---------- Do / Don't ---------- */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 820px) { .dodont { grid-template-columns: 1fr; } }
.dodont .card { border-radius: 14px; padding: 18px; border: 1px solid var(--line); background: var(--card); }
.dodont h3 { font-size: 16px; margin-bottom: 10px; }
.dodont .do h3 { color: var(--green); }
.dodont .dont h3 { color: #f87171; }
.dodont ul { list-style: none; display: grid; gap: 8px; }
.dodont li { font-size: 14.5px; color: var(--text-dim); line-height: 1.6; display: flex; gap: 8px; }
.dodont li::before { content: "•"; color: var(--text-dim); }

/* ---------- End scene ---------- */
.end-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.end-actions .ctrl-btn { font-size: 15px; padding: 12px 22px; }

.hint { margin-top: 20px; font-size: 12.5px; color: #5c6b7f; letter-spacing: 0.5px; }

@media (prefers-reduced-motion: reduce) {
  .scene { transition: none; }
  .role-card:hover { transform: none; }
}
