:root {
  --ink: #141414;
  --muted: #67625b;
  --line: #d8d0c4;
  --paper: #f5f0e8;
  --paper-strong: #fffaf2;
  --accent: #c2362c;
  --accent-dark: #8f241d;
  --olive: #3d4b38;
  --steel: #283b45;
  --shadow: 0 24px 60px rgba(28, 25, 20, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Noto Sans KR", system-ui, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a.button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  align-items: center;
  background: rgba(245, 240, 232, 0.88);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  left: 0;
  padding: 18px clamp(18px, 5vw, 64px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 800;
  line-height: 0.9;
  text-transform: lowercase;
}

.header-nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.language-toggle {
  justify-self: end;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-width: 48px;
  padding: 10px 13px;
}

main {
  padding: 0 clamp(18px, 5vw, 64px) 80px;
}

.hero {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 34px;
  min-height: 42vh;
  padding: clamp(54px, 9vw, 112px) 0 42px;
}

.hero h1 {
  font-size: clamp(58px, 10vw, 148px);
  letter-spacing: 0;
  line-height: 0.86;
  margin: 0;
  max-width: 920px;
  text-transform: lowercase;
}

.hero p:last-child {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.45;
  margin: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.section {
  padding: 58px 0 0;
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.92;
  margin: 0;
}

.section-heading p:last-child {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  max-width: 360px;
}

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

.party-card {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  min-height: 250px;
  padding: 18px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.party-card:hover {
  border-color: var(--ink);
  box-shadow: 0 16px 32px rgba(42, 36, 27, 0.12);
  transform: translateY(-2px);
}

.card-topline,
.card-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.date-block {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  line-height: 0.95;
}

.date-block .month {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.date-block .day {
  font-size: 44px;
}

.status-pill {
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 800;
  padding: 7px 10px;
  text-transform: uppercase;
}

.status-pill.closed {
  color: var(--steel);
}

.party-card h3 {
  align-self: end;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 0.98;
  margin: 34px 0 18px;
}

.card-brand,
.card-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.more-button {
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 22px auto 0;
  min-width: 132px;
  padding: 13px 20px;
  text-transform: uppercase;
}

.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.detail-shell {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 50;
}

.detail-shell.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-backdrop {
  background: rgba(20, 20, 20, 0.36);
  inset: 0;
  position: absolute;
}

.detail-panel {
  background: var(--paper-strong);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  height: 100%;
  margin-left: auto;
  max-width: 620px;
  overflow-y: auto;
  padding: 34px;
  position: relative;
  transform: translateX(28px);
  transition: transform 180ms ease;
  width: min(100%, 620px);
}

.detail-shell.open .detail-panel {
  transform: translateX(0);
}

.close-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  font-size: 30px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 24px;
  top: 24px;
  width: 44px;
}

.close-button span {
  transform: translateY(-1px);
}

.detail-panel h2 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.9;
  margin: 38px 52px 18px 0;
}

.detail-intro {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 28px;
}

.detail-meta {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 24px;
}

.detail-meta div {
  border-bottom: 1px solid var(--line);
  min-height: 88px;
  padding: 16px 12px 16px 0;
}

.detail-meta div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-meta dt {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.detail-meta dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 34px;
}

.button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 50px;
  padding: 13px 16px;
  text-align: center;
}

.button.primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper-strong);
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.button.disabled,
.button[aria-disabled="true"],
.button:disabled {
  border-color: var(--line);
  color: #9d958a;
  cursor: not-allowed;
  pointer-events: none;
}

.button.primary:disabled {
  background: #d6cfc4;
}

.ticket-shell {
  align-items: center;
  background: rgba(20, 20, 20, 0.42);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 80;
}

.ticket-shell.open {
  display: flex;
}

.ticket-dialog {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: min(92vh, 820px);
  max-width: 680px;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  width: min(100%, 680px);
}

.ticket-dialog h2 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.95;
  margin: 32px 52px 12px 0;
}

.ticket-summary {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 18px;
}

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

.ticket-form label,
.payment-methods {
  display: grid;
  gap: 8px;
}

.ticket-form label span,
.payment-methods legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ticket-form input {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 11px 12px;
  width: 100%;
}

.payment-methods,
.ticket-total,
.ticket-form .button,
.ticket-result {
  grid-column: 1 / -1;
}

.payment-methods {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 2px 0 0;
  padding: 14px;
}

#paymentMethodList {
  display: grid;
  gap: 10px;
}

.payment-option {
  align-items: center;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: auto 1fr auto;
  padding: 12px;
}

.payment-option input {
  min-height: auto;
  width: auto;
}

.payment-option strong {
  font-size: 13px;
}

.ticket-total {
  border-top: 1px solid var(--line);
  font-size: 20px;
  font-weight: 800;
  padding-top: 14px;
}

.ticket-result {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-weight: 700;
  line-height: 1.55;
  margin: 0;
  min-height: 24px;
  white-space: pre-line;
}

.ticket-result .ticket-continue {
  justify-self: start;
  margin-top: 6px;
}

.ticket-result.success {
  color: var(--olive);
}

.ticket-result.error {
  color: var(--accent);
}

.checkout-notice {
  background: var(--ink);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: var(--paper-strong);
  font-weight: 800;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  padding: 14px 18px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 100;
}

.checkout-notice.success {
  background: var(--olive);
}

.checkout-notice.error {
  background: var(--accent-dark);
}

.checkout-notice.leaving {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.reviews {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.reviews-heading {
  margin-bottom: 16px;
}

.reviews h3 {
  font-size: 32px;
  margin: 0;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-card {
  background: #f0e7da;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.review-card header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.review-card strong {
  font-size: 14px;
}

.review-card time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.answer {
  border-top: 1px solid rgba(20, 20, 20, 0.12);
  padding: 13px 0 0;
}

.answer + .answer {
  margin-top: 13px;
}

.answer dt {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.answer dd {
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.answer.rating dd {
  font-size: 22px;
  font-weight: 800;
}

.language-modal {
  align-items: center;
  background: rgba(20, 20, 20, 0.42);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 90;
}

.language-modal.open {
  display: flex;
}

.language-dialog {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 460px;
  padding: 30px;
  width: 100%;
}

.language-dialog h1 {
  font-size: 42px;
  line-height: 0.95;
  margin: 0 0 16px;
}

.dialog-copy {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 22px;
}

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

.admin-page {
  background: var(--paper);
}

.admin-shell {
  margin: 0 auto;
  max-width: 1040px;
  padding: 48px clamp(18px, 5vw, 56px) 80px;
}

.admin-header {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.admin-header h1 {
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.9;
  margin: 0;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding-top: 24px;
}

.admin-section {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.admin-section h2 {
  font-size: 20px;
  margin: 0;
}

.admin-section-title {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.admin-section-title p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
}

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

.check-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form label {
  display: grid;
  gap: 8px;
}

.admin-form label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 11px 12px;
  width: 100%;
}

.admin-form input:disabled {
  background: #eee8dc;
  color: #928a80;
  cursor: not-allowed;
}

.admin-preview {
  align-items: center;
  background: #f0e7da;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  font-weight: 800;
  justify-content: space-between;
  margin: 0;
  padding: 12px 14px;
}

.admin-preview code {
  color: var(--ink);
  font: inherit;
  overflow-wrap: anywhere;
}

.admin-preview span {
  min-width: 0;
}

.inline-copy {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #fffaf2;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  padding: 8px 14px;
}

.inline-copy:disabled {
  background: #c7bcae;
  cursor: not-allowed;
}

.muted-field span {
  color: #9a9288;
}

.admin-form textarea {
  line-height: 1.5;
  resize: vertical;
}

.check-row {
  align-items: center;
  display: flex !important;
  gap: 10px !important;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.admin-actions {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: flex-start;
}

.admin-result {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

.admin-result.success {
  color: var(--olive);
}

.admin-result.error {
  color: var(--accent);
}

.admin-result a {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .header-nav {
    justify-content: center;
  }

  .hero {
    align-items: start;
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .party-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
    padding: 14px 16px;
  }

  .header-nav {
    display: none;
  }

  main {
    padding: 0 16px 56px;
  }

  .hero {
    padding-top: 44px;
  }

  .hero h1 {
    font-size: 62px;
  }

  .party-grid,
  .detail-actions,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .party-card {
    min-height: 220px;
  }

  .detail-panel {
    border-left: 0;
    padding: 24px 18px;
  }

  .ticket-dialog {
    padding: 24px 18px;
  }

  .ticket-form {
    grid-template-columns: 1fr;
  }

  .detail-panel h2 {
    font-size: 44px;
    margin-right: 48px;
  }

  .detail-meta div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .detail-meta div:last-child {
    border-bottom: 0;
  }

  .language-actions {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .admin-section-title,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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