:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen {
  width: 100%; height: 100%; position: absolute; top: 0; left: 0;
  display: flex; flex-direction: column;
}
.screen.hidden { display: none; }
.focusable {
  transition: all 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer; outline: none;
}
.focusable:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
.hidden { display: none !important; }

/* ---- shared scroll region ---- */
.scroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 20px 24px 28px;
}
.scroll::-webkit-scrollbar { width: 4px; }
.scroll::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 4px; }
.divider { height: 1px; background: #26263a; margin: 20px 0; }
.muted { color: var(--text-muted); }

/* ---- top bar ---- */
.bar {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid #1c1c2a;
}
.bar h2 { font-size: 22px; font-weight: 600; }
.bar-head { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bar-head h2 { font-size: 21px; line-height: 1.2; }
.bar-back {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* ---- category badge ---- */
.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c, var(--accent));
  border: 1px solid var(--c, var(--accent));
  border-radius: 6px;
  padding: 3px 9px;
}
.cat-ethics    { --c: #ff6b81; }
.cat-identity  { --c: #b197fc; }
.cat-knowledge { --c: #4dd4ff; }
.cat-mind      { --c: #69db7c; }
.cat-justice   { --c: #ffd43b; }
.cat-value     { --c: #ff8cc8; }
.cat-decision  { --c: #ffa94d; }

/* ---- HOME ---- */
#home { justify-content: space-between; padding: 30px 26px 22px; }
.home-top { text-align: center; padding-top: 14px; }
.mark {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(140deg, #142a33, #0d1a22);
  border: 1px solid #1f4150;
  color: var(--accent);
  font-size: 38px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.18);
}
#home h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.01em; }
.tagline { color: var(--text-secondary); font-size: 15px; margin-top: 8px; }
.menu { display: flex; flex-direction: column; gap: 12px; }
.menu-item {
  display: flex; flex-direction: column; gap: 3px;
  min-height: 78px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: left;
  position: relative;
}
.menu-item::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 4px; border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.mi-title { color: var(--text-primary); font-size: 19px; font-weight: 600; }
.mi-sub { color: var(--text-secondary); font-size: 13px; }
.home-foot { text-align: center; color: var(--text-muted); font-size: 13px; }
#answered-count { color: var(--accent); font-weight: 700; }

/* ---- BROWSE list ---- */
#browse-list { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 72px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: left;
}
.list-row .row-top { display: flex; align-items: center; gap: 10px; }
.list-row .row-title { color: var(--text-primary); font-size: 18px; font-weight: 600; line-height: 1.2; }
.done-tag {
  margin-left: auto;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--accent-secondary);
  white-space: nowrap;
}

/* ---- SCENARIO ---- */
.scenario-text {
  font-size: 17px; line-height: 1.5;
  color: #cfd2dc;
}
.question {
  font-size: 19px; font-weight: 700; line-height: 1.35;
  color: var(--text-primary);
  margin: 22px 0 16px;
}
.options { display: flex; flex-direction: column; gap: 12px; }
.opt {
  min-height: 64px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px; font-weight: 500; line-height: 1.3;
  text-align: left;
}

/* ---- REFLECTION ---- */
.chosen {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
}
.chosen-label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 5px;
}
.chosen-text { font-size: 17px; font-weight: 600; line-height: 1.3; }
.react {
  font-size: 16px; line-height: 1.45;
  color: var(--accent);
  margin-top: 16px; font-style: italic;
}
.reflection-text { font-size: 16px; line-height: 1.55; color: #cfd2dc; }
.thinkers {
  margin-top: 18px;
  font-size: 14px; color: var(--text-secondary);
  font-weight: 600;
}
.thinkers::before {
  content: "EXPLORED BY ";
  color: var(--text-muted); font-weight: 700; letter-spacing: 0.1em; font-size: 11px;
}
.actions {
  display: flex; gap: 10px;
  padding: 14px 20px 18px;
  background: var(--bg-primary);
  border-top: 1px solid #1c1c2a;
}
.act {
  flex: 1; min-height: 56px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px; font-weight: 600;
}

/* ---- ABOUT ---- */
.about-body p { font-size: 16px; line-height: 1.55; color: #cfd2dc; margin-bottom: 14px; }

/* ---- fade-in ---- */
.screen:not(.hidden) .scroll,
.screen:not(.hidden) .home-top,
.screen:not(.hidden) .menu { animation: fade 0.22s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
