/* THE WARD — v4 CSS */

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: #050810;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Desktop wrapper ────────────────────────────────── */
#desktop-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #050810;
}

#app {
  background: #0d0d0d;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  max-height: 860px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
}

/* On desktop — show phone-like border */
@media (min-width: 500px) {
  #app {
    border-radius: 16px;
    height: 90vh;
    max-height: 800px;
  }
  #desktop-wrap {
    background: radial-gradient(ellipse at center, #0d1a2a 0%, #050810 70%);
  }
}

/* ── HUD ─────────────────────────────────────────────── */
#hud {
  display: none;
  padding: 10px 16px 8px;
  background: rgba(13,13,13,0.95);
  flex-shrink: 0;
  border-bottom: 1px solid #1a1a1a;
  backdrop-filter: blur(4px);
}
.hud-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.hud-label { font-size: 9px; letter-spacing: 2px; color: #4b5563; width: 52px; flex-shrink: 0; font-weight: 700; }
.hud-bar { flex: 1; height: 4px; background: #1a1a1a; border-radius: 999px; overflow: hidden; }
.hud-fill { height: 100%; border-radius: 999px; transition: width .7s ease; }
#trust-fill { background: linear-gradient(90deg, #d97706, #f59e0b); width: 50%; }
#budget-fill { background: linear-gradient(90deg, #2563eb, #60a5fa); width: 100%; }
.hud-val { font-size: 11px; min-width: 30px; text-align: right; font-weight: 700; }
#trust-val { color: #f59e0b; }
#budget-val { color: #60a5fa; }

/* ── CANVAS ──────────────────────────────────────────── */
#canvas-wrap { position: relative; flex-shrink: 0; }
canvas { display: block; width: 100%; height: 200px; }
#day-badge {
  position: absolute; top: 10px; left: 12px;
  font-size: 9px; letter-spacing: 2px; color: #f59e0b;
  font-weight: 700; background: rgba(0,0,0,0.6);
  padding: 3px 8px; border-radius: 4px;
}
#role-badge {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  color: #f59e0b;
  font-weight: 800;
  background: rgba(0,0,0,0.7);
  padding: 5px 0;
}
#mute-btn {
  position: absolute; top: 10px; right: 12px;
  font-size: 16px; cursor: pointer;
  background: rgba(0,0,0,0.5); border: none;
  padding: 3px 7px; border-radius: 4px; color: #9ca3af;
}
#ward-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background 3s ease;
}

/* ── DOTS ────────────────────────────────────────────── */
#dots {
  display: none; flex-direction: row; gap: 7px;
  justify-content: center; padding: 7px 0 5px; flex-shrink: 0;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #1e1e1e; border: 1px solid #2a2a2a; transition: all .3s; }
.dot.on { background: #f59e0b; border-color: #f59e0b; box-shadow: 0 0 6px #f59e0b66; }
.dot.dn { background: #2a2a2a; border-color: #333; }

/* ── STORY ───────────────────────────────────────────── */
#story {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
#scene-eyebrow {
  font-size: 9px; letter-spacing: 2px; color: #f59e0b;
  padding: 10px 18px 0; font-weight: 700; min-height: 22px;
  text-transform: uppercase;
}
#scene-text {
  font-size: 14px; color: #d1d5db;
  line-height: 1.8; padding: 8px 18px 12px;
  white-space: pre-line; flex-shrink: 0;
}
#wdyd {
  font-size: 10px; letter-spacing: 1px; color: #6b7280;
  padding: 0 18px 8px; font-weight: 600;
}
#choices {
  padding: 0 14px 14px;
  display: flex; flex-direction: column; gap: 9px;
}
.choice {
  background: #141414; border: 1px solid #252525;
  color: #e5e7eb; font-size: 13px; padding: 13px 15px;
  border-radius: 10px; cursor: pointer; text-align: left;
  line-height: 1.65; transition: all .15s; width: 100%;
  font-family: inherit;
}
.choice:hover { background: #1c1c1c; border-color: #3a3a3a; }
.choice:active { transform: scale(.99); background: #1e1e1e; }
.choice-label {
  font-size: 9px; letter-spacing: 2px; display: block;
  margin-bottom: 4px; font-weight: 700; opacity: 0.7;
}
.choice-sub {
  font-size: 11px; color: #6b7280; display: block; margin-top: 3px;
}

/* ── SCREENS ─────────────────────────────────────────── */
.screen {
  position: absolute; inset: 0;
  background: #0d0d0d; z-index: 20;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px; text-align: center;
  overflow-y: auto;
}
.screen.active { display: flex; }

/* ── SPLASH ──────────────────────────────────────────── */
#splash-title {
  font-size: 52px; font-weight: 900;
  letter-spacing: 8px; color: #fff;
  line-height: 1.05; margin-bottom: 8px;
}
.ward-pill {
  font-size: 10px; letter-spacing: 2px; color: #f59e0b;
  border: 1px solid #f59e0b33; padding: 6px 16px;
  border-radius: 999px; margin: 8px 0 32px;
}
#splash-intro {
  font-size: 14px; color: #6b7280;
  line-height: 2; margin-bottom: 44px; max-width: 260px;
}
.tap-btn {
  font-size: 13px; letter-spacing: 3px; color: #f59e0b;
  animation: blink 1.6s infinite; background: none; border: none;
  cursor: pointer; font-family: inherit; font-weight: 700; padding: 10px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

/* ── DAY 0 CONSEQUENCE ───────────────────────────────── */
.screen-eyebrow { font-size: 13px; letter-spacing: 3px; color: #fc3e21; margin-bottom: 20px; font-weight: 700; }
#d0-main {
  font-size: 15px; color: #9ca3af;
  line-height: 1.8; margin-bottom: 14px;
  max-width: 290px; white-space: pre-line; text-align: left;
}
#d0-ward {
  font-size: 14px; color: #6b7280;
  line-height: 1.8; margin-bottom: 14px;
  max-width: 290px; white-space: pre-line;
  border-left: 2px solid #ef4444; padding-left: 14px; text-align: left;
}
#d0-punch {
  font-size: 17px; color: #fff; font-weight: 700;
  margin-bottom: 28px; max-width: 290px; line-height: 1.6;
}

/* ── CONSEQUENCE ─────────────────────────────────────── */
.cons-eyebrow { font-size: 9px; letter-spacing: 3px; color: #4b5563; margin-bottom: 18px; font-weight: 700; }
#cons-text {
  font-size: 15px; color: #d1d5db;
  line-height: 1.85; margin-bottom: 16px;
  max-width: 300px; white-space: pre-line; text-align: left;
}
#cons-delta { font-size: 14px; letter-spacing: 1px; font-weight: 700; margin-bottom: 26px; }

/* ── BUTTONS ─────────────────────────────────────────── */
.next-btn {
  background: transparent; border: 1px solid #2a2a2a;
  color: #9ca3af; font-family: inherit;
  font-size: 12px; letter-spacing: 2px;
  padding: 12px 26px; border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.next-btn:hover { border-color: #f59e0b; color: #f59e0b; }

/* ── DAY 7 ───────────────────────────────────────────── */
#day7-text {
  font-size: 15px; color: #9ca3af;
  line-height: 1.85; margin-bottom: 20px;
  max-width: 290px; white-space: pre-line;
}

/* ── ENDING A ────────────────────────────────────────── */
#end-score-label { font-size: 9px; letter-spacing: 3px; color: #374151; margin-bottom: 6px; }
#end-score { font-size: 76px; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 4px; }
#end-label { display: inline-block; font-size: 10px; letter-spacing: 2px; font-weight: 700; padding: 6px 18px; border-radius: 999px; margin: 10px 0 22px; }
#end-verdict {
  font-size: 14px; color: #9ca3af;
  line-height: 1.85; max-width: 280px;
  white-space: pre-line; margin-bottom: 8px;
}

/* ── ENDING B ────────────────────────────────────────── */
#end-democracy {
  font-size: 14px; color: #9ca3af;
  line-height: 1.9; margin-bottom: 20px;
  max-width: 285px; white-space: pre-line;
}
#end-democracy-punch {
  font-size: 20px; color: #fff; font-weight: 800;
  margin-bottom: 24px; line-height: 1.4;
}
#end-praja {
  font-size: 13px; color: #6b7280;
  line-height: 1.9; max-width: 285px;
  white-space: pre-line; text-align: left;
  border-left: 2px solid #f59e0b33; padding-left: 14px;
  margin-bottom: 8px;
}
#end-praja-name { font-size: 18px; color: #f59e0b; font-weight: 800; letter-spacing: 2px; margin-bottom: 24px; }

/* ── ENDING C ────────────────────────────────────────── */
#end-questions { text-align: left; max-width: 290px; margin-bottom: 20px; }
.end-q { padding: 10px 0; border-bottom: 1px solid #1a1a1a; }
.end-q:last-child { border-bottom: none; }
.end-q strong { font-size: 16px; color: #e5e7eb; display: block; margin-bottom: 2px; }
.end-q span { font-size: 11px; color: #4b5563; }
#end-cta {
  font-size: 12px; color: #6b7280; line-height: 1.8;
  margin-bottom: 20px; max-width: 285px;
}
#end-cta em { color: #f59e0b; font-style: normal; font-weight: 700; }
#end-credit {
  font-size: 11px; color: #4c6383; letter-spacing: 2px; margin-bottom: 16px; font-weight:700;
}
#end-credit a { color: #ccced1; text-decoration: none; transition: color .15s; }
#end-credit a:hover { color: #f59e0b; }
.share-btn {
  background: #25d366; color: #000; border: none;
  border-radius: 10px; padding: 14px;
  font-family: inherit; font-size: 13px; font-weight: 800;
  letter-spacing: .5px; cursor: pointer; width: 260px;
  margin-bottom: 10px; transition: opacity .15s;
}
.share-btn:hover { opacity: 0.9; }
.replay-btn {
  background: transparent; color: #4b5563;
  border: 1px solid #1e1e1e; border-radius: 10px;
  padding: 12px; font-family: inherit; font-size: 11px;
  letter-spacing: 1px; cursor: pointer; width: 260px;
}

/* ── WARN ────────────────────────────────────────────── */
#warn {
  position: absolute; top: 0; left: 0; right: 0;
  background: #dc2626; color: #fff;
  font-size: 10px; letter-spacing: 1px; font-weight: 700;
  text-align: center; padding: 7px;
  display: none; z-index: 30;
}

/* ── TRANSITION OVERLAY ──────────────────────────────── */
#transition-overlay {
  position: fixed; inset: 0;
  background: #050810; z-index: 100;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 36px;
  font-family: inherit;
}
#transition-overlay.show { display: flex; }

.end-credit-sop {
  font-size: 11px;
  color: #4c6383;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.end-credit-sop a {
  color: #f59e0b;
  text-decoration: none;
}

.choice-a {
  border-left: 3px solid #a604f2;
}

.choice-b {
  border-left: 3px solid #a604f2;
  margin-bottom:60px;
}
