:root {
  --bg: #0b1220;
  --panel: #131c2e;
  --panel-border: #223049;
  --text: #e8edf7;
  --text-dim: #93a2bd;
  --accent: #3ba3ff;
  --accent-dark: #1f6fb8;
  --ok: #34c77b;
  --warn: #e8b339;
  --err: #ef5a6f;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, sans-serif;
  min-height: 100vh;
}

.offline-banner {
  background: #3a1420;
  color: var(--err);
  border-bottom: 1px solid #6b1f30;
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}
.offline-banner.hidden { display: none; }

.topbar {
  border-bottom: 1px solid var(--panel-border);
  padding: 14px 24px;
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-weight: 700; font-size: 18px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.logout-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.logout-btn:hover { color: var(--text); border-color: var(--text-dim); }
.mode-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #21324f;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.mode-badge.real { background: #4a2130; color: #ff9fb0; }

main { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }

.view.hidden { display: none; }

.hero-title { font-size: 34px; font-weight: 800; text-align: center; margin: 40px 0 8px; }
.hero-sub { text-align: center; color: var(--text-dim); margin-bottom: 32px; }

.nl-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nl-box textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 20px;
  resize: none;
  font-family: inherit;
}
.nl-box textarea::placeholder { color: #55688c; }

.primary-btn {
  align-self: flex-end;
  background: var(--accent);
  color: #06121f;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.primary-btn:hover { background: #57b3ff; }
.primary-btn:disabled { opacity: 0.5; cursor: default; }

.secondary-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.secondary-btn:hover { border-color: var(--accent); }
.secondary-btn:disabled { opacity: 0.5; cursor: default; }
.secondary-btn:disabled:hover { border-color: var(--panel-border); }

.examples { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.examples-label { color: var(--text-dim); font-size: 13px; margin-right: 4px; }
.example-chip {
  background: #17213540;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.example-chip:hover { color: var(--text); border-color: var(--accent); }
.example-chip:disabled { opacity: 0.5; cursor: default; }
.example-chip:disabled:hover { color: var(--text-dim); border-color: var(--panel-border); }

.error-text { color: var(--err); margin-top: 16px; text-align: center; }
.hidden { display: none !important; }

.section-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; text-align: center; }

.confirm-raw {
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  margin: 0 0 20px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.summary-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
}
.summary-arrow { color: var(--accent); }
.summary-details { color: var(--text-dim); font-size: 15px; }

.warning-list { margin: 16px 0 0; padding-left: 18px; color: var(--warn); font-size: 13px; text-align: left; }
.warning-list:empty { display: none; margin: 0; }

.button-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.status-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #17213c;
  border: 1px solid var(--panel-border);
  font-weight: 700;
  margin-bottom: 24px;
}
.status-badge.state-SOLD_OUT_WATCHING { background: #3a2f0f; color: var(--warn); border-color: #6b5417; animation: pulse 1.6s ease-in-out infinite; }
.status-badge.state-SEAT_FOUND, .status-badge.state-BOOKING { background: #10314f; color: var(--accent); border-color: var(--accent-dark); }
.status-badge.state-RESERVED, .status-badge.state-PAYMENT_REQUIRED { background: #123a26; color: var(--ok); border-color: #1e6b45; }
.status-badge.state-ERROR { background: #3a1420; color: var(--err); border-color: #6b1f30; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.timeline { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline li {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--accent-dark);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
}
.timeline li.state-ERROR { border-left-color: var(--err); }
.timeline li.state-RESERVED, .timeline li.state-PAYMENT_REQUIRED { border-left-color: var(--ok); }
.timeline li.state-SOLD_OUT_WATCHING { border-left-color: var(--warn); }
.timeline .tl-time { color: var(--text-dim); font-size: 12px; margin-right: 8px; }

.result-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.result-card h3 { margin-top: 0; }
.result-fields { display: grid; grid-template-columns: 120px 1fr; row-gap: 8px; column-gap: 12px; margin: 0 0 16px; }
.result-fields dt { color: var(--text-dim); font-size: 13px; }
.result-fields dd { margin: 0; font-weight: 600; }

.payment-info {
  margin-top: 16px;
  padding: 14px;
  background: #0d1524;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  font-size: 14px;
  white-space: pre-wrap;
}

.new-search-btn { margin-top: 8px; }
