:root {
  --bg: #050505;
  --surface: #111111;
  --surface-soft: #1a1a1a;
  --surface-raised: #222222;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --line: #2d2d2d;
  --line-strong: #4a4a4a;
  --gold: #d7b66f;
  --gold-soft: rgba(215, 182, 111, 0.14);
  --green: #82c783;
  --red: #f08080;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 182, 111, 0.1), transparent 36rem),
    var(--bg);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    "Noto Sans KR",
    Arial,
    sans-serif;
  line-height: 1.7;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.page {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: 38px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.34fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.live-panel,
.notice,
.group-card,
.closing-banner {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(26px, 5vw, 48px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  word-break: keep-all;
}

h1,
h2,
p {
  margin-top: 0;
  word-break: keep-all;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.intro {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.live-panel {
  display: flex;
  min-height: 100%;
  padding: 24px;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.live-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
}

.live-dot {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-soft);
}

.live-panel[data-state="connected"] .live-dot {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(130, 199, 131, 0.12);
}

.live-panel[data-state="error"] .live-dot,
.live-panel[data-state="offline"] .live-dot {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(240, 128, 128, 0.12);
}

.live-panel p {
  margin: 0;
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 900;
}

.notice {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 44px;
  padding: 20px 24px;
}

.notice h2 {
  margin: 0;
  font-size: 1.08rem;
}

.notice ul {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 6px 24px;
  color: var(--muted);
  list-style-position: inside;
}

.notice li::marker {
  color: var(--gold);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.2;
}

.seating-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.group-card {
  min-width: 0;
  padding: 16px;
}

.seat-map {
  display: grid;
  grid-template-columns: minmax(76px, 0.78fr) minmax(0, 1fr) minmax(0, 1fr) minmax(76px, 0.78fr);
  grid-template-rows: auto minmax(72px, 1fr) minmax(72px, 1fr) auto;
  gap: 8px;
  min-height: 330px;
}

.table {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
}

.table-top {
  grid-column: 2 / 4;
  grid-row: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-right {
  grid-column: 4;
  grid-row: 2 / 4;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.table-bottom {
  grid-column: 2 / 4;
  grid-row: 4;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-left {
  grid-column: 1;
  grid-row: 2 / 4;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.group-center {
  display: flex;
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed rgba(215, 182, 111, 0.42);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(215, 182, 111, 0.05);
}

.group-center strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.group-center span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.seat-field {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: stretch;
}

.seat-number {
  position: absolute;
  top: 3px;
  left: 5px;
  z-index: 1;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.seat-input {
  width: 100%;
  min-width: 0;
  border: 1px solid #555555;
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: var(--surface-raised);
  padding: 15px 7px 7px;
  font-size: clamp(0.76rem, 1.4vw, 0.92rem);
  font-weight: 800;
  text-align: center;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.seat-input::placeholder {
  color: #808080;
  font-weight: 600;
}

.seat-input:hover {
  border-color: #777777;
}

.seat-input:focus {
  border-color: var(--gold);
  background: #28251e;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.seat-field[data-state="saving"] .seat-input {
  border-color: var(--gold);
}

.seat-field[data-state="saved"] .seat-input {
  border-color: rgba(130, 199, 131, 0.72);
}

.seat-field[data-state="error"] .seat-input {
  border-color: var(--red);
}

.closing-banner {
  display: flex;
  margin-top: 44px;
  padding: 22px 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.closing-banner strong,
.closing-banner a {
  color: var(--gold);
}

.closing-banner a {
  font-weight: 900;
  text-decoration: none;
}

.closing-banner a:hover,
.closing-banner a:focus-visible {
  color: var(--text);
  outline: none;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .live-panel {
    min-height: auto;
    flex-direction: row;
    align-items: center;
  }

  .seating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 22px;
  }

  .hero-copy,
  .live-panel,
  .notice,
  .closing-banner {
    padding-right: 18px;
    padding-left: 18px;
  }

  .live-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .notice {
    grid-template-columns: 1fr;
  }

  .notice ul {
    display: grid;
    gap: 6px;
  }

  .seating-grid {
    grid-template-columns: 1fr;
  }

  .group-card {
    padding: 13px;
  }

  .seat-map {
    min-height: 320px;
  }

  .seat-input {
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  .seat-map {
    grid-template-columns: minmax(70px, 0.78fr) minmax(0, 1fr) minmax(0, 1fr) minmax(70px, 0.78fr);
    gap: 6px;
  }

  .table {
    gap: 5px;
    padding: 6px;
  }
}
