:root {
  --bg-a: #0c1218;
  --bg-b: #26120d;
  --panel: rgba(11, 15, 20, 0.9);
  --panel-strong: rgba(8, 11, 16, 0.96);
  --line: rgba(220, 196, 157, 0.16);
  --text: #f4efe5;
  --muted: #c9bda8;
  --accent: #daab70;
  --danger: #d36b57;
  --safe: #88bda7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top, rgba(218, 171, 112, 0.14), transparent 28%),
    linear-gradient(180deg, var(--bg-a), var(--bg-b));
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(218, 171, 112, 0.16), transparent 30%),
    rgba(5, 8, 12, 0.78);
  backdrop-filter: blur(10px);
}

.intro-overlay.hidden {
  display: none;
}

.intro-card {
  width: min(720px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(10, 14, 19, 0.95);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.intro-copy,
.intro-list {
  color: var(--muted);
  line-height: 1.6;
}

.intro-list {
  margin: 18px 0 0;
}

.start-button {
  margin-top: 22px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(218, 171, 112, 0.34);
  background: linear-gradient(180deg, #c58f56, #8f6035);
  color: #fff7eb;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 310px minmax(620px, 1fr) 310px;
  gap: 18px;
  padding: 18px;
}

.panel,
.stage-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
.event-title {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", serif;
}

h1 {
  font-size: 2.45rem;
  line-height: 0.95;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.deck,
.plain-list,
.event-body,
#sceneText {
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.plain-list li {
  margin-bottom: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px;
}

.stat span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.25rem;
}

.stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.stage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 8px 4px;
}

.objective {
  color: var(--muted);
  max-width: 460px;
  text-align: right;
}

.stage-card {
  position: relative;
  padding: 16px;
  overflow: hidden;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background: linear-gradient(180deg, #544133 0%, #2f2b2d 30%, #11161a 100%);
}

.pickup-hint {
  position: absolute;
  left: 36px;
  bottom: 34px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 10, 14, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-wrap {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 18px;
}

.progress-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c58f56, #f1c786);
}

.touch-controls {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: none;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}

.touch-button {
  pointer-events: auto;
  min-width: 92px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 12, 18, 0.85);
  color: var(--text);
  font-weight: 700;
}

.touch-button-strong {
  background: rgba(197, 143, 86, 0.88);
  color: #fff8ef;
}

.hidden {
  display: none;
}

.event-choices {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.event-choice {
  padding: 12px 14px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.event-choice:hover {
  border-color: rgba(218, 171, 112, 0.5);
}

kbd {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .stage-topbar {
    flex-direction: column;
    align-items: start;
  }

  .objective {
    text-align: left;
  }

  .touch-controls {
    display: flex;
  }
}
