:root {
  --bg: #f4efe6;
  --paper: #fffdf8;
  --ink: #2c2416;
  --gold: #9a7b3f;
  --gold-light: #d4b87a;
  --accent: #5c3d2e;
  --success: #3d6b4f;
  --error: #8b3a3a;
  --shadow: 0 18px 50px rgba(44, 36, 22, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(212, 184, 122, 0.35), transparent 30%),
    linear-gradient(180deg, #ebe3d4 0%, var(--bg) 100%);
}

.app {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.header__eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
}

.header__stats {
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
}

.dot { margin: 0 8px; opacity: 0.5; }

.card {
  background: var(--paper);
  border: 1px solid rgba(154, 123, 63, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card--start {
  padding: 56px 32px;
}

.novel-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(154, 123, 63, 0.12);
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.novel-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 16px;
  line-height: 1.25;
}

.novel-desc {
  color: #6b5d4a;
  margin-bottom: 28px;
  line-height: 1.6;
}

.rank-badge {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #7a6130);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.rank-desc {
  color: #6b5d4a;
  margin: 0 0 20px;
  line-height: 1.5;
}

.card--hero {
  text-align: center;
  padding: 48px 28px;
}

.card h2 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.card p {
  margin: 0 0 16px;
  line-height: 1.65;
  color: #4a4032;
}

.round-list {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.round-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(154, 123, 63, 0.08);
  border: 1px solid rgba(154, 123, 63, 0.15);
}

.round-item__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

.round-item__title {
  font-weight: 600;
}

.round-item__desc {
  font-size: 0.85rem;
  color: #6b5d4a;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--gold), #7a6130);
  color: white;
  box-shadow: 0 10px 24px rgba(154, 123, 63, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(92, 61, 46, 0.25);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: #6b5d4a;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(154, 123, 63, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--error);
}

.prompt {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 20px;
}

.quote {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  line-height: 1.55;
  padding: 18px 20px;
  border-left: 4px solid var(--gold-light);
  background: rgba(154, 123, 63, 0.07);
  border-radius: 0 12px 12px 0;
  margin-bottom: 20px;
}

.quote em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}

.image-box {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf6ef, #efe7da);
  border: 1px dashed rgba(154, 123, 63, 0.35);
}

.image-box img {
  max-width: min(100%, 320px);
  max-height: 220px;
}

.image-box--svg svg {
  width: min(100%, 320px);
  height: auto;
  display: block;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(92, 61, 46, 0.18);
  background: white;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.option:hover {
  border-color: var(--gold);
  background: rgba(212, 184, 122, 0.12);
}

.option--correct {
  border-color: var(--success);
  background: rgba(61, 107, 79, 0.12);
}

.option--wrong {
  border-color: var(--error);
  background: rgba(139, 58, 58, 0.1);
}

.option:disabled { cursor: default; }

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.match-col {
  display: grid;
  gap: 10px;
}

.match-col h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.match-btn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(92, 61, 46, 0.18);
  background: white;
  cursor: pointer;
  font: inherit;
}

.match-btn.selected {
  border-color: var(--gold);
  background: rgba(212, 184, 122, 0.18);
}

.match-btn.matched {
  border-color: var(--success);
  background: rgba(61, 107, 79, 0.12);
  cursor: default;
}

.feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.5;
}

.feedback--ok {
  background: rgba(61, 107, 79, 0.12);
  color: var(--success);
}

.feedback--bad {
  background: rgba(139, 58, 58, 0.1);
  color: var(--error);
}

.passport {
  border: 2px solid var(--gold-light);
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,253,248,0.98)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(154, 123, 63, 0.08) 28px
    );
}

.passport__title {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  margin: 0 0 8px;
}

.passport__subtitle {
  text-align: center;
  margin-bottom: 24px;
  color: #6b5d4a;
}

.word-pick {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.word-pick label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(154, 123, 63, 0.06);
  cursor: pointer;
}

.passport-field {
  margin-bottom: 16px;
}

.passport-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent);
}

.passport-field input,
.passport-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(92, 61, 46, 0.2);
  font: inherit;
  background: white;
}

.passport-field textarea {
  min-height: 72px;
  resize: vertical;
}

@media (max-width: 640px) {
  .match-grid { grid-template-columns: 1fr; }
  .header { flex-direction: column; align-items: flex-start; }
}

@media print {
  body { background: white; }
  .header, .btn-row { display: none !important; }
  .card { box-shadow: none; border: none; padding: 0; }
}
