:root{--bg:#f6f3ee;--card:#fff;--ink:#1e1d1b;--muted:#706b62;--accent:#7b3ff2;--line:#e6e0d7;--danger:#b3261e}*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#f7f2ed,#eee8df);font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial;color:var(--ink)}.shell{width:min(1080px,100%);margin:0 auto;padding:20px}.card{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:22px;padding:22px;margin:16px 0;box-shadow:0 10px 30px rgba(40,30,10,.06)}.hero{padding:34px}.narrow{max-width:520px;margin:40px auto}.eyebrow{font-size:.8rem;text-transform:uppercase;letter-spacing:.12em;color:var(--accent);font-weight:800}h1{font-size:clamp(2rem,6vw,4rem);line-height:.98;margin:.3em 0}h2{margin:.2em 0 .7em}p{font-size:1.05rem;line-height:1.55}.small{font-size:.9rem;color:var(--muted)}.stack{display:grid;gap:14px}.inline{display:flex;gap:10px;flex-wrap:wrap}.row{display:flex;gap:12px;align-items:center}.grid2{display:grid;grid-template-columns:1fr 360px;gap:16px}.adminbar{display:flex;justify-content:space-between;align-items:center;gap:20px}.adminform textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}input,select,textarea{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font:inherit}button,.button{display:inline-block;border:0;border-radius:999px;background:#eee7df;color:var(--ink);padding:12px 18px;font-weight:800;text-decoration:none;cursor:pointer}.primary{background:var(--accent);color:white}.danger{background:var(--danger);color:#fff}.reveal{background:#17151f;color:#f8f4ff;border-radius:18px;padding:18px}.choices{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}.choices span,.pill{border:1px solid var(--line);border-radius:999px;padding:7px 11px;background:#faf8f5}.soft{background:#fbfaf7}table{width:100%;border-collapse:collapse;font-size:.92rem}th,td{text-align:left;border-bottom:1px solid var(--line);padding:10px;vertical-align:top}code{white-space:pre-wrap}.error{color:var(--danger);font-weight:800}.decision{border-top:1px solid var(--line);padding:12px 0}@media(max-width:780px){.grid2{grid-template-columns:1fr}.adminbar{align-items:flex-start;flex-direction:column}.shell{padding:12px}.card{border-radius:18px;padding:17px}.hero{padding:22px}table{display:block;overflow:auto}h1{font-size:2.2rem}}

.context-line {
  font-size: 1.18rem;
  line-height: 1.6;
  margin: 0 0 18px;
  color: var(--ink);
  font-weight: 400;
}

.clue-bank {
  margin: 22px 0 20px;
  padding: 20px 22px;
  border: 2px dashed #c8b99e;
  border-radius: 22px;
  background: #fffaf1;
}

.clue-list {
  margin: 8px 0 0;
  padding-left: 24px;
}

.clue-list li {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 6px 0;
}

.hint-text {
  font-size: 15px;
  color: #6b7280;
  margin-top: 12px;
}

.secondary-card {
  margin-top: 24px;
}

.invite-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.invite-form input {
  font-size: 20px;
  padding: 16px 20px;
  border: 1px solid #d5c8b5;
  border-radius: 20px;
  min-width: 260px;
}

.small-btn {
  border: none;
  border-radius: 999px;
  background: #142033;
  color: white;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 24px;
  cursor: pointer;
}

.help-notes{margin:14px 0 18px;padding-left:20px;display:grid;gap:9px}
.help-notes li{line-height:1.5;color:var(--ink)}
.invite-form-stack{display:grid;gap:16px;margin-top:6px}
.invite-form-stack .field{display:grid;gap:6px;font-weight:700;max-width:340px}
.invite-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.invite-row input{min-width:260px}

/* Play + result shared components */
.notice{background:#fff3d6;border:1px solid #e8cf8f;border-radius:14px;padding:12px 14px;font-weight:700;color:#6b4e00}
.story-block{margin:18px 0}
.lead{font-size:1.18rem;line-height:1.6;color:var(--ink);font-weight:400}
.section-label{font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:800;margin-bottom:8px}
.muted{color:var(--muted)}
.decision-form{display:flex;flex-direction:column;align-items:stretch;gap:14px;margin:18px 0}
.decision-box{width:100%;box-sizing:border-box;resize:vertical;min-height:120px;font-size:1.05rem;line-height:1.5;padding:14px;border:1px solid var(--line);border-radius:16px}
.decision-form .primary-btn{align-self:flex-start;margin-top:0}
.primary-btn{display:inline-block;border:0;border-radius:999px;background:var(--accent);color:#fff;padding:14px 22px;font-weight:800;font-size:1rem;cursor:pointer;margin-top:12px;text-decoration:none}
.secondary-btn{display:inline-block;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);padding:14px 22px;font-weight:800;text-decoration:none}
.inline-btn{margin-top:0}
.actions-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:22px}

/* History */
.history-block{margin:22px 0}
.history-list{display:grid;gap:10px}
.history-item{border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:#fbfaf7}
.history-step{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.history-text{margin-top:4px;line-height:1.45}
.history-step{display:flex;align-items:center;gap:8px}
.move-rating{font-size:.66rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;padding:2px 8px;border-radius:999px}
.move-rating.good{background:#dcfce7;color:#166534}
.move-rating.ok{background:#fef9c3;color:#854d0e}
.move-rating.warn{background:#ffedd5;color:#9a3412}
.move-rating.bad{background:#fee2e2;color:#991b1b}

/* Puzzle steps (Wordle / code-cracking) */
.puzzle{margin:18px 0}
.puzzle-hint,.puzzle-row{display:flex;gap:8px;margin:8px 0}
.puzzle-grid{margin:12px 0}
.ptile{width:52px;height:52px;display:flex;align-items:center;justify-content:center;font-size:1.6rem;font-weight:800;text-transform:uppercase;border-radius:12px;border:2px solid var(--line);background:#fff;color:var(--ink)}
.ptile.unknown{color:#c8bfb0;border-style:dashed}
.ptile.known{background:#efe9df;border-color:#d8cdbb}
.ptile.correct{background:#3aa757;border-color:#3aa757;color:#fff}
.ptile.present{background:#e2b33c;border-color:#e2b33c;color:#fff}
.ptile.absent{background:#8a8177;border-color:#8a8177;color:#fff}
.puzzle-form{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:14px}
.puzzle-input{font-size:1.5rem;letter-spacing:.3em;text-align:center;max-width:240px;padding:12px 14px;border:1px solid var(--line);border-radius:14px}
.puzzle-form .primary-btn{margin-top:0}

.tomorrow-note{font-size:1.1rem;line-height:1.5;font-weight:700;color:var(--ink);margin:0}
.result-title-sm{font-size:clamp(1.6rem,4.5vw,2.2rem);line-height:1.05;margin:.15em 0}
.loop-visual-wrap{display:flex;justify-content:center;margin:4px 0 8px}
.loop-visual{width:92px;height:92px}
.loop-caption{color:var(--muted);font-weight:600;margin:.1em 0 1.1em}

/* Beat header: quiet title + progress dots (replaces the STEP N badge) */
.beat-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}
.beat-title{font-size:.82rem;letter-spacing:.04em;color:var(--muted);font-weight:700}
.progress-dots{display:inline-flex;gap:7px;flex-shrink:0}
.progress-dots .dot{width:8px;height:8px;border-radius:50%;background:#ded6c8}
.progress-dots .dot.on{background:var(--accent)}

/* Waiting / drip view */
.waiting{margin:18px 0;padding:22px;border:1px dashed var(--line);border-radius:18px;background:#fbfaf7}
.waiting-eyebrow{font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:800;margin-bottom:10px}
.waiting-line{font-size:1.25rem;line-height:1.5;margin:0 0 8px}
.waiting .secondary-btn{margin-top:14px}

/* Admin danger zone */
.danger-zone{border-color:#f0c9c6;background:#fff8f7}
.danger-zone h2{color:var(--danger)}

/* Score meters */
.quirky-score-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:12px 0 6px}
.quirky-score-card{border:1px solid var(--line);border-radius:18px;padding:16px;background:#fff}
.score-title{font-weight:800;font-size:1.05rem;margin-bottom:10px}
.score-meter{height:12px;border-radius:999px;background:#ece6dc;overflow:hidden}
.score-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#7b3ff2,#b07bff)}
.score-caption{margin-top:8px;font-size:.9rem;color:var(--muted);font-weight:700}

/* Reception temperature gauge */
.gauge{margin:0 0 24px}
.gauge-label{font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:800;margin-bottom:10px}
.gauge-track{position:relative;height:16px;border-radius:999px;background:linear-gradient(90deg,#3b82f6 0%,#38bdf8 24%,#fcd34d 54%,#fb923c 78%,#ef4444 100%);box-shadow:inset 0 1px 3px rgba(0,0,0,.18)}
.gauge-marker{position:absolute;top:50%;width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid var(--ink);transform:translate(-50%,-50%);box-shadow:0 2px 6px rgba(0,0,0,.28);transition:left .4s ease}
.gauge-scale{display:flex;justify-content:space-between;margin-top:7px;font-size:.72rem;color:var(--muted);font-weight:700}
.gauge-caption{margin-top:10px;font-weight:700;color:var(--ink)}
.gauge-secondary{margin-top:26px;padding-top:20px;border-top:1px solid var(--line)}

/* Admin console: responsive tables that stay inside their card */
.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.card table{width:100%;table-layout:fixed}
.card th,.card td{overflow-wrap:anywhere;word-break:break-word;vertical-align:top}
.card td code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-size:.82rem;line-height:1.4}
table.activity td:nth-child(1),table.activity th:nth-child(1){width:20%}
table.activity td:nth-child(2),table.activity th:nth-child(2){width:22%}
table.activity td:nth-child(3),table.activity th:nth-child(3){width:18%}
table.activity td:nth-child(4),table.activity th:nth-child(4){width:40%}
table.games td:last-child,table.games th:last-child{width:64px}
@media(max-width:780px){.card table{display:table;table-layout:auto;min-width:560px}}
