:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  background-color: #0b0d14;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

html,
body,
#root {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}
:root {
  color: #f6f1e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  border: 1px solid rgba(236, 205, 143, 0.24);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(31, 25, 36, 0.82);
  color: inherit;
  font: inherit;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: rgba(255, 216, 143, 0.72);
  background: rgba(66, 49, 58, 0.9);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.mvp-shell {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(152, 93, 214, 0.24), transparent 34%),
    radial-gradient(circle at 80% 12%, rgba(235, 171, 82, 0.18), transparent 28%),
    linear-gradient(180deg, #121018 0%, #08070d 100%);
}

.hero-panel,
.case-title-card,
.panel {
  border: 1px solid rgba(236, 205, 143, 0.18);
  border-radius: 26px;
  background: rgba(16, 15, 24, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
}

.eyebrow,
.label {
  display: block;
  margin: 0 0 8px;
  color: #d4aa70;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 8px;
}

h3 {
  margin-bottom: 10px;
  color: #f1d3a0;
  font-size: 1rem;
}

.subtitle,
.room-mood,
.empty-state,
.discovered-list p,
.journal-panel li,
.accusation-panel p,
.case-title-card p {
  color: #c9c0b6;
  line-height: 1.65;
}

.phase-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border-radius: 22px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(71, 55, 82, 0.9), rgba(23, 20, 31, 0.96));
}

.phase-card span,
.phase-card small,
.room-count,
.discovered-list span,
.evidence-card span,
.evidence-card small,
.companion-card span,
.companion-card small {
  color: #aa9da5;
}

.phase-card strong {
  font-size: 1.7rem;
}

.phase-card.escaped,
.ending-card.escaped {
  border-color: rgba(117, 224, 169, 0.5);
  background: linear-gradient(160deg, rgba(37, 91, 67, 0.92), rgba(12, 35, 30, 0.96));
}

.phase-card.collapsed,
.ending-card.collapsed {
  border-color: rgba(244, 112, 112, 0.55);
  background: linear-gradient(160deg, rgba(97, 41, 50, 0.95), rgba(31, 15, 22, 0.98));
}

.case-title-card {
  margin-top: 18px;
  padding: 22px 24px;
}

.case-title-card h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.mvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 18px;
  margin-top: 18px;
}

.lower-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head.compact {
  margin-bottom: 12px;
}

.room-actions + .room-actions {
  margin-top: 22px;
}

.button-grid,
.evidence-grid,
.companion-list,
.accuse-list {
  display: grid;
  gap: 10px;
}

.button-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.evidence-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.evidence-card,
.companion-card {
  display: grid;
  gap: 6px;
}

.evidence-card strong,
.companion-card strong {
  color: #fff3d6;
}

.evidence-card.found,
.companion-card.heard {
  border-color: rgba(117, 224, 169, 0.45);
  background: rgba(32, 73, 57, 0.64);
}

.discovered-list {
  display: grid;
  gap: 12px;
}

.discovered-list article {
  border: 1px solid rgba(236, 205, 143, 0.15);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.discovered-list strong {
  display: block;
  margin: 4px 0 6px;
  color: #fff3d6;
}

.discovered-list p {
  margin-bottom: 0;
}

.accuse-list button {
  text-align: center;
  font-weight: 800;
}

.journal-panel {
  margin-top: 18px;
}

.journal-panel ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.ending-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.64);
  z-index: 20;
}

.ending-card {
  width: min(680px, 100%);
  border: 1px solid rgba(236, 205, 143, 0.32);
  border-radius: 28px;
  padding: 28px;
  background: #16121d;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

.ending-card h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.ending-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.ending-actions button {
  flex: 1 1 180px;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 920px) {
  .mvp-shell {
    padding: 16px;
  }

  .hero-panel,
  .mvp-layout,
  .lower-layout {
    grid-template-columns: 1fr;
  }
}
