:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #111111;
  --muted: #5d5d5d;
  --line: #ececec;
  --accent: #f7cf3b;        /* yellow */
  --accent-ink: #111111;
  --accent-soft: #fff7d6;
  --btn: #111111;           /* black copy button */
  --btn-ink: #f7cf3b;
  --box: #f6f6f6;           /* grey prompt box */
  --danger: #c0392b;
  --live: #4cc26e;
  --radius: 22px;
  --fs: 17px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --card: #181818; --ink: #f2f2f2; --muted: #a8a8a8; --line: #2c2c2c;
    --accent-soft: #3a3214; --btn: #f7cf3b; --btn-ink: #111111; --box: #222222; --danger: #ef7064;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--fs); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 80px; }

/* ---------- page header ---------- */
.hero { padding: 44px 0 10px; }
.classname { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #555; font-size: .95rem; }
.classname::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
@media (prefers-color-scheme: dark) { .classname { color: var(--muted); } }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 6px; line-height: 1.15; }
.subtitle { color: var(--muted); margin: 0 0 6px; font-size: 1rem; }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.live i { width: 9px; height: 9px; border-radius: 50%; background: #bbb; display: inline-block; }
.live.on i { background: var(--live); }
.live.off i { background: var(--danger); }
.fontctl { float: right; display: flex; gap: 4px; margin-top: -4px; }

/* ---------- buttons ---------- */
button, .btn {
  font: inherit; font-size: .82rem; cursor: pointer; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 7px 12px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500;
}
button:hover, .btn:hover { border-color: var(--muted); }
button.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); font-weight: 700; }
button.danger { color: var(--danger); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--ink); border-color: var(--line); }

/* ---------- steps ---------- */
#steps { display: flex; flex-direction: column; gap: 28px; margin-top: 34px; }
.step {
  background: var(--card); border: 3px solid var(--accent); border-radius: var(--radius);
  padding: 24px 28px 28px; transition: box-shadow .6s ease, background 1.5s ease;
}
.step.fresh { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.num {
  flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #111;
  display: grid; place-items: center; font-weight: 800; font-size: 1.05rem;
}
.step-title { font-size: 1.3rem; font-weight: 700; margin: 0; flex: 1; min-width: 0; line-height: 1.3; }
.step-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.step-time { color: var(--muted); font-size: .74rem; }
.step-text {
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
  font-family: inherit; font-size: 1rem; line-height: 1.85;
  background: var(--box); border-radius: 18px; padding: 22px 26px; margin: 0;
}
.copybig {
  display: flex; width: 100%; justify-content: center; margin-top: 18px;
  background: var(--btn); color: var(--btn-ink); border: 0; border-radius: 16px;
  padding: 20px; font-size: 1.15rem; font-weight: 700; letter-spacing: .01em;
}
.copybig:hover { filter: brightness(1.15); }
.copybig.done { background: var(--live); color: #fff; }

.files { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.file { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--box); }
.file-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: .82rem; flex-wrap: wrap; }
.file-bar .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-bar .fsize { color: var(--muted); }
.file img { display: block; max-width: 100%; max-height: 640px; margin: 0 auto; background: #fff; cursor: zoom-in; }
.file iframe { display: block; width: 100%; height: 620px; border: 0; background: #fff; }
.file video, .file audio { display: block; width: 100%; }
.file pre { margin: 0; padding: 14px 16px; max-height: 420px; overflow: auto; font-size: .82rem; border-top: 1px solid var(--line); white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; }
.note { font-size: .8rem; color: var(--muted); padding: 0 14px 12px; }

.empty { text-align: center; color: var(--muted); padding: 70px 20px; border: 3px dashed var(--accent); border-radius: var(--radius); }

#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 100; cursor: zoom-out; padding: 16px; }
#lightbox img { max-width: 100%; max-height: 100%; }
#lightbox.show { display: flex; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: var(--accent); padding: 11px 18px; border-radius: 12px; font-size: .88rem; font-weight: 600; z-index: 200; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* admin top bar */
header.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
header.top h1 { font-size: 1rem; margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
header.top h1::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

@media (max-width: 600px) {
  .hero { padding-top: 28px; }
  .step { padding: 18px 16px 18px; border-radius: 18px; }
  .step-text { padding: 16px 18px; }
  .num { width: 38px; height: 38px; }
  .step-title { font-size: 1.1rem; }
  .file iframe { height: 460px; }
}
