:root {
  --bg: #090909;
  --panel: #11100f;
  --panel2: #171513;
  --text: #f5eee4;
  --muted: #a59b90;
  --line: #2e2924;
  --copper: #bd7751;
  --copper2: #e1a27c;
  --blocked: #5b3d32;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
button:disabled { cursor: wait; opacity: .65; }
.seat:disabled { cursor: not-allowed; opacity: 1; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--copper2); outline-offset: 4px; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 82% 0%, #211711 0, transparent 29%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Pretendard", "Noto Sans KR", sans-serif;
  letter-spacing: -.02em;
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.noise {
  position: fixed; inset: 0; opacity: .035; pointer-events: none; z-index: 9;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.topbar {
  height: 78px; max-width: 1120px; margin: auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 11px; }
.brand-mark { font: 38px/1 Georgia, serif; letter-spacing: -.12em; }
.brand-logo { display:block;width:52px;height:52px;object-fit:cover;border-radius:50%;border:1px solid var(--line);flex-shrink:0; }
.brand-sub { font: 10px/1.2 Georgia, serif; color: var(--muted); letter-spacing: .08em; }
.ghost-btn, .back-btn {
  border: 1px solid var(--line); background: #111; color: var(--text);
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
}

.hero, .admin-hero { max-width: 980px; margin: auto; padding: 74px 24px 48px; }
.eyebrow { font-size: 11px; color: var(--copper2); letter-spacing: .19em; margin-bottom: 18px; }
.hero h1, .admin-hero h1 { font: 64px/.96 Georgia, "Times New Roman", serif; letter-spacing: -.055em; margin: 0; }
.hero h1 span { font-size: .72em; }
.hero-copy { color: #cfc5ba; line-height: 1.7; margin: 24px 0 36px; }
.hero-location { color: var(--muted); font-size: 13px; margin: -15px 0 30px; }
#heroTitle { font-size: clamp(34px, 5vw, 56px); line-height: 1.2; overflow-wrap: break-word; }
#heroTitle .party-title { display: block; font: 600 .68em/1.35 ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif; margin-top: 12px; }
.lookup-password-fields h3 { font-size: 14px; margin: 0 0 18px; }
#lookupForm { grid-template-columns: 1fr 1fr auto; }
.event-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.event-meta div { padding: 17px 18px; border-right: 1px solid var(--line); }
.event-meta div:last-child { border-right: 0; }
.event-meta small, .inventory-summary small, .checkout small, .admin-stats small {
  display: block; color: var(--muted); font-size: 10px; letter-spacing: .12em; margin-bottom: 7px;
}
.event-meta strong { font-size: 13px; }
.event-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.event-option { text-align: left; border: 1px solid var(--line); border-radius: 14px; background: #0d0d0d; color: var(--text); padding: 18px; cursor: pointer; }
.event-option small, .event-option span { display: block; color: var(--muted); }
.event-option strong { display: block; margin: 7px 0; font-size: 17px; }
.event-option.selected { border-color: var(--copper); background: #241812; box-shadow: inset 0 0 0 1px var(--copper); }
.selected-event-name { display: block; margin-top: 8px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: #0e0e0e; }

.panel {
  max-width: 980px; margin: 0 auto 20px; padding: 34px;
  background: linear-gradient(145deg, rgba(24,22,20,.96), rgba(13,13,13,.98));
  border: 1px solid var(--line); border-radius: 20px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.section-head > div { display: flex; align-items: center; gap: 13px; }
.section-head h2 { font-size: 20px; margin: 0; }
.step {
  display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%;
  border: 1px solid #6d4a37; color: var(--copper2); font: 13px Georgia, serif;
}
.live-pill { font-size: 11px; color: #bdb2a7; border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; }
.live-pill i { display: inline-block; width: 6px; height: 6px; background: #70a687; border-radius: 50%; margin-right: 5px; box-shadow: 0 0 0 4px #70a68718; }

.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guide-grid article { background: #0d0d0d; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.guide-grid small { color: var(--copper2); letter-spacing: .08em; }
.guide-grid h3 { font: 26px Georgia, serif; margin: 8px 0 18px; }
.guide-grid p { color: #b9afa5; font-size: 12px; line-height: 1.75; margin: 9px 0; }
.guide-grid b { color: #e6ded5; font-weight: 600; }

.inventory-summary { display: grid; gap: 10px; margin: 4px 0 24px; }
.inventory-summary.two-stat { grid-template-columns: repeat(2, 1fr); }
.inventory-summary > div { background: #0d0d0d; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.inventory-summary b { font: 27px Georgia, serif; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; color: #a79e94; font-size: 11px; margin-bottom: 14px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.dot.available { background: #e8dfd3; }
.dot.selected { background: var(--copper); }
.dot.sold { background: #34312e; }
.dot.blocked { background: var(--blocked); }
.seat-grid, .admin-seat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 9px; }
.seat {
  aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line);
  display: grid; place-items: center; font: 12px Georgia, serif;
  cursor: pointer; transition: .18s ease; color: #d5ccc2; background: #161513;
}
.seat:hover:not(:disabled) { transform: translateY(-2px); border-color: #846049; }
.seat.available { background: #e8dfd3; color: #141210; border-color: #e8dfd3; }
.seat.selected { background: var(--copper); border-color: var(--copper); color: #fff; box-shadow: 0 8px 26px #bd775133; }
.seat.sold { background: #242220; color: #645e58; cursor: not-allowed; }
.seat.blocked { background: #38251f; color: #d39878; border-color: #6c4738; }
.selected-line { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 13px; }
.selected-line strong { color: var(--copper2); margin-left: 5px; }

.required { font-size: 11px; color: var(--muted); }
form { display: grid; gap: 28px; }
.field-row { display: grid; gap: 14px; }
.field-row.two { grid-template-columns: 1fr 1fr; }
label, legend { font-size: 12px; color: #c9bfb5; }
label > input:not([type=radio]):not([type=checkbox]), label > select {
  display: block; width: 100%; margin-top: 9px; padding: 15px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #0e0e0e; color: var(--text); outline: none;
}
label > input:focus, label > select:focus { border-color: #936347; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: 10px; }
.field-help { display: block; margin: 10px 2px 0; color: #91877e; font-size: 11px; line-height: 1.65; }
.segmented { display: grid; gap: 8px; }
.segmented.four { grid-template-columns: repeat(4, 1fr); }
.segmented.five, .segmented.age-five { grid-template-columns: repeat(5, 1fr); }
.segmented input, .ticket-options input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 13px 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: #0e0e0e; }
.segmented input:checked + span { border-color: var(--copper); color: var(--copper2); background: #2a1b15; }
.self-care-guide { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #0e0e0e; }
.self-care-list { display: grid; gap: 9px; margin: 0; padding-left: 18px; color: #c9bfb5; font-size: 12px; line-height: 1.65; }
.self-care-list li::marker { color: var(--copper2); }
.self-care-guide .field-help { margin-top: 15px; }
.self-care-confirm { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.agree input { accent-color: var(--copper); }

.ticket-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ticket-options label > span { display: grid; min-height: 118px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #0e0e0e; cursor: pointer; }
.ticket-options b { font-size: 14px; }
.ticket-options em { font-style: normal; color: var(--muted); font-size: 11px; margin-top: 7px; }
.ticket-options strong { font-size: 15px; align-self: end; margin-top: 14px; }
.ticket-options input:checked + span { border-color: var(--copper); background: #241812; }
.payment-guide, .notice-box { margin-top: 11px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #0d0d0d; }
.payment-guide p, .notice-box p { color: #a99f95; font-size: 11px; line-height: 1.7; margin: 5px 0; }
.payment-guide b { color: var(--text); }
.notice-box h3 { margin: 0 0 9px; font-size: 13px; color: #ded5cb; }
.agreements { display: grid; gap: 11px; }
.agree { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); line-height: 1.55; }
.agree input { margin-top: 3px; flex: 0 0 auto; }
.checkout { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 24px; }
.checkout strong { font-size: 22px; }
.primary-btn { border: 0; border-radius: 12px; background: var(--copper); color: white; padding: 16px 28px; font-weight: 700; cursor: pointer; }
.primary-btn:hover { background: #cc855e; }

.admin-hero { padding-bottom: 28px; }
.admin-hero .back-btn { margin-bottom: 48px; }
.admin-hero h1 { font-size: 48px; }
.admin-hero p, .admin-control > p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.admin-stats { max-width: 980px; margin: 0 auto 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.admin-stats article { padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.admin-stats strong { font: 30px Georgia, serif; }
.admin-stats span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.admin-legend { margin-top: 22px; }
.event-form { display: grid; gap: 18px; margin-top: 24px; }
.event-form textarea { width: 100%; margin-top: 9px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 10px; background: #0e0e0e; color: var(--text); resize: vertical; min-height: 120px; font: inherit; }
.time-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.modal { position: fixed; inset: 0; z-index: 20; background: #000c; display: none; place-items: center; padding: 22px; }
.modal.show { display: grid; }
.modal-card { position: relative; width: min(420px, 100%); background: #141311; border: 1px solid #3a332d; border-radius: 20px; padding: 36px; text-align: center; box-shadow: 0 30px 100px #000; }
.modal-close { position: absolute; right: 16px; top: 13px; background: transparent; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.ticket-badge { display: inline-block; color: var(--copper2); border: 1px solid #704b36; border-radius: 99px; padding: 7px 10px; font-size: 9px; letter-spacing: .16em; }
.modal h2 { font: 36px/1.12 Georgia, serif; }
.modal p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.receipt { display: grid; gap: 10px; background: #0b0b0b; border: 1px dashed #56483e; border-radius: 12px; padding: 17px; margin: 23px 0; }
.receipt span { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.receipt b { color: var(--text); }
.modal .primary-btn { width: 100%; }
footer { max-width: 980px; margin: 40px auto 0; padding: 34px 24px 60px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); }
footer span { font: 16px Georgia, serif; }
footer small { font-size: 9px; letter-spacing: .14em; }

.top-nav { display: flex; gap: 18px; font-size: 12px; align-items: center; }
.top-nav a { text-decoration: none; color: var(--muted); padding: 10px 0; white-space: nowrap; }
.top-nav a.active, .top-nav a:hover { color: var(--copper2); }
.compact-hero { padding-top: 52px; padding-bottom: 24px; }
.compact-hero h1 { font-family: inherit; font-size: 40px; line-height: 1.25; }
.inline-message { min-height: 0; color: var(--copper2); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.inline-message:empty { display: none; }
.inline-message.error { color: #efb2a4; }
.lookup-form { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.secondary-btn { border: 1px solid #655043; color: #e6d8c9; background: #201914; border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.danger-btn { border: 1px solid #70443c; color: #e2b3a9; background: #241715; border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.action-row { display: flex; gap: 9px; flex-wrap: wrap; }
.lookup-code-box { border: 1px solid #62432f; background: #201712; border-radius: 14px; padding: 22px; }
.lookup-code-box small { display: block; color: var(--copper2); font-size: 12px; }
.lookup-code-box strong { display: block; margin-top: 12px; font: 19px/1.6 ui-monospace, monospace; letter-spacing: .035em; overflow-wrap: anywhere; user-select: all; }
.lookup-code-box p, .transfer-control p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.reservation-details { display: grid; grid-template-columns: 110px 1fr; gap: 15px; margin: 25px 0; font-size: 13px; }
.reservation-details dt { color: var(--muted); }
.reservation-details dd { margin: 0; overflow-wrap: anywhere; }
.ticket-image { display: block; width: 100%; max-width: 440px; height: auto; margin: 22px auto; border-radius: 9px; }
#issuedTicket { text-align: center; }
#pendingNotice .secondary-btn { margin-top: 12px; }
.transfer-control { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.transfer-control h3 { font-size: 17px; }
#transferLinkBox { margin-top: 18px; }
#transferLinkBox .secondary-btn { margin-top: 10px; }
#transferFields { display: grid; gap: 28px; }
.status { border-radius: 99px; display: inline-block; padding: 7px 11px; font-size: 11px; color: var(--muted); background: #282522; }
.status.pending { color: #e7c581; background: #352b1b; }
.status.paid { color: #b1dac7; background: #1d3329; }
.status.transferred { color: #b4adcd; background: #292334; }
.admin-counts { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.admin-counts b { color: var(--text); margin-left: 4px; }
.applicant-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.applicant-card { background: #0d0c0b; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.applicant-header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.applicant-header small { color: var(--copper2); font: 13px Georgia,serif; }
.applicant-header h3 { margin: 6px 0 9px; font-size: 18px; }
.applicant-card p, .applicant-card details { font-size: 12px; color: var(--muted); line-height: 1.65; }
.applicant-card .applicant-event { color: var(--copper2); margin: 0 0 14px; font-size: 14px; }
.admin-seat-groups { display: grid; gap: 22px; }
.bank-account { display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin:18px 0;padding:22px;background:#17130f;border:1px solid var(--copper2);border-radius:12px; }
.bank-account span { color:var(--muted);font-size:13px; }
.bank-account strong { color:var(--text);font-size:clamp(24px,6vw,32px);font-variant-numeric:tabular-nums;line-height:1.3;letter-spacing:0.02em;user-select:text; }
.bank-account .secondary-btn { width:100%;margin:4px 0 0; }
.bank-account .inline-message:empty { display:none; }
 .transfer-guide { color:var(--muted); line-height:1.9; padding-left:20px; }
 .move-seat-form { margin-top:16px; border-top:1px solid var(--line); padding-top:16px; }
.seat-group { border: 1px solid var(--line); background: #0e0d0c; border-radius: 14px; padding: 20px; }
.seat-group-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.seat-group h3 { margin: 0; font-size: 20px; color: var(--copper2); }
.seat-group-header span { font-size: 12px; color: var(--muted); }
.seat-group-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 15px; }
.seat-group-stats b { color: var(--text); margin-left: 4px; }
.seat-group .admin-seat-grid { grid-template-columns: repeat(8, minmax(0,1fr)); }
.seat-group .seat.mismatch { border: 1px solid #db9778; }
.seat-type-summary { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.seat-group-note { color: #d8a58a; font-size: 12px; line-height: 1.6; margin: 14px 0 0; }
.applicant-card details { padding: 12px 0; }
.applicant-card summary { cursor: pointer; color: #d6cabc; }
.applicant-card button { width: 100%; margin-top: 15px; }
.empty-state { color: var(--muted); font-size: 14px; padding: 20px 0; }
.modal-card { max-height: 92dvh; overflow-y: auto; }
.modal-card h2 { font-size: 24px; }
.modal-card .ticket-image { max-height: 65dvh; width: auto; max-width: 100%; }

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 18px; }
  .hero, .admin-hero { padding: 50px 18px 34px; }
  .hero h1 { font-size: 48px; }
  .hero-copy br { display: none; }
  .event-meta { grid-template-columns: 1fr; }
  .event-meta div { border-right: 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
  .event-meta div:last-child { border-bottom: 0; }
  .panel { border-left: 0; border-right: 0; border-radius: 0; padding: 26px 18px; margin-bottom: 10px; }
  .guide-grid { grid-template-columns: 1fr; }
  .inventory-summary > div { padding: 14px 10px; }
  .inventory-summary b { font-size: 24px; }
  .seat-grid, .admin-seat-grid { gap: 6px; }
  .seat { border-radius: 6px; font-size: 10px; }
  .field-row.two, .ticket-options { grid-template-columns: 1fr; }
  .event-picker { grid-template-columns: 1fr; }
  .time-grid, .field-row.three { grid-template-columns: 1fr 1fr; }
  .segmented.four { grid-template-columns: 1fr 1fr; }
  .segmented.five, .segmented.age-five { grid-template-columns: repeat(3, 1fr); }
  .checkout { position: sticky; bottom: 0; background: #111; padding: 15px 0 calc(15px + env(safe-area-inset-bottom)); z-index: 4; }
  .checkout .primary-btn { padding: 14px 18px; }
  .admin-stats { grid-template-columns: 1fr 1fr; padding: 0 18px; }
  .admin-stats article { padding: 17px; }
  .admin-hero h1 { font-size: 40px; }
  footer { padding: 28px 18px 50px; }
  .legend { gap: 12px; }
  .brand-sub { display: none; }
  .top-nav { gap: 14px; font-size: 11px; }
  .lookup-form, .applicant-list { grid-template-columns: 1fr; }
  #lookupForm { grid-template-columns: 1fr; }
  .compact-hero h1 { font-size: 33px; }
  .lookup-code-box { padding: 18px; }
  .lookup-code-box strong { font-size: 16px; }
  .reservation-details { grid-template-columns: 85px 1fr; }
}
