:root {
  --bg: #f2f6ff;
  --bg-soft: #eaf2ff;
  --surface: #ffffff;
  --text: #1f2a37;
  --text-muted: #4f627f;
  --primary: #3182f6;
  --primary-strong: #1b64da;
  --danger: #e5484d;
  --danger-strong: #cc3d42;
  --info: #2a7de1;
  --secondary: #edf2fa;
  --border: #dbe6f6;
  --shadow: 0 20px 40px rgba(31, 42, 55, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR",
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg) 0%, #f9fbff 40%, var(--bg-soft) 100%);
  min-height: 100vh;
  line-height: 1.62;
  font-size: 16px;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  margin-bottom: 18px;
  max-width: 760px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(49, 130, 246, 0.12);
  color: var(--primary-strong);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  margin-top: 10px;
  font-size: clamp(26px, 3.8vw, 36px);
  letter-spacing: -0.03em;
}

.lead {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: clamp(15px, 2.3vw, 17px);
  line-height: 1.68;
}

.notice-banner {
  margin: 14px 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid #f9e3a6;
  background: #fff8e8;
  color: #7d5b00;
  font-size: 15px;
  line-height: 1.64;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.card {
  grid-column: span 12;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: clamp(21px, 3vw, 25px);
  letter-spacing: -0.02em;
}

.card h3 {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 16px;
}

.muted {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.62;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(49, 130, 246, 0.25);
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  background: var(--secondary);
  color: #37455f;
}

.btn-secondary:hover {
  background: #e2e9f5;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 10px 20px rgba(229, 72, 77, 0.2);
}

.btn-danger:hover {
  background: var(--danger-strong);
}

.btn-info {
  background: var(--info);
  color: #fff;
  box-shadow: 0 10px 20px rgba(42, 125, 225, 0.22);
}

.btn-info:hover {
  background: #1d6ccc;
}

.status-message {
  margin-top: 12px;
  color: #cc3d42;
  font-weight: 700;
  font-size: 15px;
  min-height: 20px;
  line-height: 1.55;
}

.form-field {
  margin-top: 12px;
}

.form-field label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

.input-field {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(49, 130, 246, 0.14);
}

.options {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.options a {
  color: var(--primary-strong);
  text-decoration: none;
  font-weight: 700;
}

.info-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f7faff;
  border: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.5;
}

.info-item strong {
  color: #4e5f79;
  font-weight: 700;
  white-space: nowrap;
}

.info-item span {
  text-align: right;
  word-break: keep-all;
}

.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.half-card {
  background: #f7faff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.half-card h2 {
  font-size: 19px;
}

.half-card .btn {
  margin-top: 14px;
}

.favorites-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.seat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.seat-tag {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: #eef5ff;
  color: #2f4261;
  cursor: default;
}

.seat-tag.now {
  background: #e5f8ef;
  border-color: #b9eccc;
  color: #10703c;
  cursor: pointer;
}

.seat-tag.soon {
  background: #fff6df;
  border-color: #f6deb0;
  color: #8e5e00;
}

.qr-card {
  text-align: center;
}

#qrCode {
  margin-top: 10px;
  min-height: 180px;
  display: grid;
  place-items: center;
}

#statusBox {
  margin-bottom: 14px;
  background: #edf4ff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 15px;
  color: #3f5371;
  line-height: 1.68;
}

footer {
  margin-top: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(13, 25, 48, 0.72);
  padding: 24px;
}

.modal-inner {
  position: relative;
  width: min(960px, 100%);
  margin: 30px auto 0;
}

.modal-close {
  position: absolute;
  top: -14px;
  right: 0;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.modal img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

@media (max-width: 820px) {
  .app-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .seat-row {
    grid-template-columns: 1fr;
  }

  .notice-banner {
    font-size: 14px;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .info-item span {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .col-8 {
    grid-column: span 8;
  }

  .col-7 {
    grid-column: span 7;
  }

  .col-6 {
    grid-column: span 6;
  }

  .col-5 {
    grid-column: span 5;
  }

  .col-4 {
    grid-column: span 4;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111828;
    --bg-soft: #0f1c33;
    --surface: #161f32;
    --text: #f2f6ff;
    --text-muted: #afc1df;
    --primary: #4b97ff;
    --primary-strong: #63a8ff;
    --danger: #ff6268;
    --danger-strong: #ff4b52;
    --info: #5ea8ff;
    --secondary: #223252;
    --border: #2d3f63;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }

  .notice-banner {
    border-color: #5f4b1a;
    background: #2a220f;
    color: #f8de9f;
  }

  .info-item,
  .half-card,
  #statusBox {
    background: #1c2a45;
  }

  .seat-tag {
    background: #203356;
    color: #d8e7ff;
  }

  .seat-tag.now {
    background: #1e4c36;
    border-color: #3c7f61;
    color: #d3ffe8;
  }

  .seat-tag.soon {
    background: #4d3f1f;
    border-color: #6e5a2c;
    color: #ffe9b5;
  }
}
