/* Trash-TV studio look: hot pink + tabloid yellow on deep purple. */
:root {
  --bg: #170b22;
  --panel: #241133;
  --panel2: #321a45;
  --line: #4b2a63;
  --text: #fbefff;
  --muted: #c4a8d6;
  --gold: #ff4fa3;      /* main accent (hot pink) */
  --yellow: #ffd23f;
  --order: #4fd6ff;
  --regime: #ffd23f;
  --ok: #5ff2a0;
  --bad: #ff6b6b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  background: radial-gradient(circle at 50% -10%, #3d1457 0%, var(--bg) 55%) fixed;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 12px 14px 90px; }
h1, h2, h3 { font-weight: 800; letter-spacing: .01em; margin: 0 0 8px; }
h1 { font-size: 28px; color: var(--gold); text-transform: uppercase; }
h2 { font-size: 21px; color: var(--yellow); }
.logo { font-weight: 900; font-size: 30px; color: var(--yellow); text-shadow: 3px 3px 0 var(--gold); text-transform: uppercase; letter-spacing: .02em; }
.act { background: var(--yellow); color: #1a0d24; border-radius: var(--radius); padding: 22px 16px; text-align: center; margin: 12px 0; }
.act .big { font-size: 26px; font-weight: 900; line-height: 1.25; }
.envelope { border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px; margin: 8px 0; text-align: center; font-size: 19px; }
.envelope.not { border-color: var(--muted); color: var(--muted); }
.envelope.yes { border: 3px solid var(--yellow); color: var(--yellow); font-size: 24px; font-weight: 900; background: #3a1f00; }
h3 { font-size: 16px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 12px 0;
}
input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 4px 0 10px;
}
textarea { min-height: 70px; font-size: 14px; font-family: inherit; }
button, .btn {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  margin: 8px 0;
  text-align: left;
  cursor: pointer;
}
button:active { transform: scale(.99); }
button.primary { background: var(--gold); color: #1a1408; border-color: var(--gold); text-align: center; font-weight: bold; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.ghost { background: transparent; text-align: center; }
button.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
button:disabled { opacity: .5; }
button .sub { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.err { color: var(--bad); min-height: 1.2em; font-size: 15px; }

/* header */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.top .k { color: var(--gold); font-size: 20px; }
.crown { margin: 8px 0 2px; }
.crown .bar { position: relative; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, var(--regime), #3b3540 50%, var(--order)); }
.crown .pin { position: absolute; top: -4px; width: 4px; height: 18px; background: #fff; border-radius: 2px; transform: translateX(-2px); }
.crown .labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.mood { font-style: italic; color: var(--muted); font-size: 15px; }

/* tabs */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #0d0b0f; border-top: 1px solid var(--line); z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.tabs button { margin: 0; border: 0; border-radius: 0; background: transparent; text-align: center; padding: 14px 4px; font-size: 15px; color: var(--muted); }
.tabs button.on { color: var(--gold); }
.tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 4px; vertical-align: middle; }

/* misc */
.timer { font-size: 28px; text-align: center; color: var(--gold); font-variant-numeric: tabular-nums; }
.timer.late { color: var(--bad); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 13px; border: 1px solid var(--line); color: var(--muted); }
.pill.order { color: var(--order); border-color: var(--order); }
.pill.regime { color: var(--regime); border-color: var(--regime); }
.pill.bad { color: var(--bad); border-color: var(--bad); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.log .t { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 12px; }
.log .e { padding: 8px 0; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stats div { background: var(--panel2); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; }
.stats b { color: var(--gold); }
.secret { position: relative; }
.secret.hidden .inner { filter: blur(9px); opacity: .35; user-select: none; pointer-events: none; }
.secret.hidden .inner * { color: var(--muted) !important; }
.secret .veil { display: none; }
.secret.hidden .veil { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--gold); font-size: 15px; cursor: pointer; }
.result { font-size: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.result:last-child { border-bottom: 0; }
.reveal { text-align: center; padding: 30px 6px; animation: fade .6s ease; }
.reveal .big { font-size: 34px; color: var(--gold); margin: 8px 0; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.quizq { font-size: 22px; margin: 18px 0; font-style: italic; }
.progress { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress div { height: 100%; background: var(--gold); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
pre { white-space: pre-wrap; font-size: 13px; }
