:root {
  color-scheme: dark;
  --bg: #171512;
  --panel: #1e1c18;
  --ink: #eee8dc;
  --muted: #b5afa3;
  --line: #413c34;
  --control-line: #81776a;
  --accent: #d9b97e;
  --red: #842f2b;
  --new-bg: #30291d;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); border-top: 7px solid var(--red); }
a { color: inherit; text-underline-offset: 5px; }
button, select, input { font: inherit; }
button, select { min-height: 44px; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select, .seats-filter { cursor: pointer; }
button { color: var(--ink); background: transparent; border: 1px solid var(--control-line); border-radius: 2px; padding: 10px 14px; font-size: .78rem; }
button:hover, select:hover { border-color: var(--ink); background: #2b2721; }
button:active { background: #3b3328; }
button:disabled, select:disabled { cursor: wait; opacity: .65; }
button[aria-pressed="false"] { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 14px; left: 16px; padding: 12px; background: var(--ink); color: var(--bg); z-index: 5; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.page-width { width: min(1280px, calc(100% - 40px)); margin-inline: auto; }
.masthead { min-height: 81px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 20px; }
.wordmark { text-decoration: none; font-family: Batang, "Songti SC", serif; font-size: 1.22rem; font-weight: 700; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; }
.wordmark span { font-family: "Malgun Gothic", sans-serif; color: var(--muted); font-weight: 400; font-size: .76rem; }
.source-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .76rem; min-height: 44px; }
.source-link span[aria-hidden] { font-size: 1rem; }
.layout { padding-top: 33px; display: grid; gap: 36px; }
.work-inner { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 14px; align-items: start; }
.work-heading { min-width: 0; grid-column: 1; grid-row: 1; padding-top: 5px; }
.artist { margin: 0 0 12px; color: var(--muted); font-size: .85rem; }
h1 { font-family: Batang, "Noto Serif KR", "Songti SC", serif; font-size: clamp(2.5rem, 7vw, 4.2rem); font-weight: 400; letter-spacing: -.07em; line-height: 1.3; margin: 0 0 12px; word-break: keep-all; }
.title-period { color: var(--accent); }
.work-subtitle { color: var(--muted); font-size: .65rem; margin: 0; line-height: 1.7; }
.poster { margin: 0; min-width: 0; grid-column: 2; grid-row: 1 / span 2; }
.poster img { display: block; width: 100%; height: auto; }
.poster figcaption { color: var(--muted); font-size: .58rem; line-height: 1.6; margin-top: 9px; }
.work-note { font-size: .75rem; color: var(--muted); line-height: 1.85; margin: 0; grid-column: 1; grid-row: 2; }
.schedule { min-width: 0; scroll-margin-top: 25px; }
.board-title { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 25px; }
.section-kicker { color: var(--muted); font-size: .75rem; margin: 0 0 12px; }
h2 { font-family: Batang, "Noto Serif KR", serif; font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.5; font-weight: 400; letter-spacing: -.035em; margin: 0; }
.edition { font-size: .64rem; color: var(--muted); white-space: nowrap; padding-bottom: 7px; display: none; }
.edition span { padding: 0 8px; color: var(--control-line); }
.sync-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 17px; border-top: 2px solid var(--ink); padding: 19px 0 12px; }
.sync-state { display: flex; align-items: center; gap: 9px; font-size: .82rem; margin: 0; }
.status-dot { width: 6px; height: 6px; background: var(--muted); flex-shrink: 0; }
.status-dot.active { background: var(--accent); }
.last-update { color: var(--muted); font-size: .67rem; margin: 9px 0 0 15px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.sync-actions { display: flex; gap: 8px; }
.server-label { color: var(--muted); font-size: .72rem; padding: 10px 0; }
.refresh { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }
.refresh:hover { background: #fff9ec; color: var(--bg); }
.refresh:active { background: var(--accent); }
.sync-footnote { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .65rem; padding-bottom: 17px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.notice { margin-top: 20px; padding: 14px 16px; font-size: .8rem; line-height: 1.8; border: 1px solid var(--control-line); }
.error-notice, .change-notice { color: var(--accent); background: var(--new-bg); }
.filter-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin: 22px 0 12px; }
.notification-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 15px 0; border-top: 1px solid var(--line); }
.notification-bar p { margin: 0; font-size: .75rem; }
.notification-bar .notification-note { margin-top: 7px; font-size: .66rem; color: var(--muted); line-height: 1.8; max-width: 420px; }
.notification-feedback { font-size: .75rem; line-height: 1.8; color: var(--accent); }
.notification-actions { display: flex; flex-wrap: wrap; gap: 8px; }
dialog { width: min(720px, calc(100% - 28px)); max-height: 88dvh; background: var(--panel); color: var(--ink); border: 1px solid var(--control-line); padding: 22px; border-radius: 2px; }
dialog::backdrop { background: #000b; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dialog-heading h2 { font-family: inherit; font-size: 1.2rem; }
.dialog-note { color: var(--muted); font-size: .77rem; line-height: 1.8; }
.theater-search input { width: 100%; min-height: 44px; background: var(--bg); color: var(--ink); border: 1px solid var(--control-line); border-radius: 2px; padding: 10px 12px; }
.dialog-controls, .dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 13px; }
.dialog-controls { color: var(--muted); font-size: .75rem; }
.theater-catalog { max-height: 44dvh; overflow: auto; padding-right: 8px; overscroll-behavior: contain; }
.catalog-region { padding-bottom: 12px; }
.catalog-region-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin: 5px 0 6px; }
.catalog-region-heading h3 { font-size: .85rem; font-weight: 500; }
.catalog-region-heading button { font-size: .7rem; border: 0; text-decoration: underline; text-underline-offset: 4px; }
.catalog-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.check-row { display: flex; align-items: center; min-height: 44px; gap: 9px; cursor: pointer; font-size: .77rem; line-height: 1.6; }
.check-row input { flex-shrink: 0; }
.catalog-options .check-row { overflow-wrap: anywhere; }
.dialog-footer { border-top: 1px solid var(--line); padding-bottom: 0; margin-top: 12px; }
.apply-button { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.apply-button:hover { background: #fff9ec; color: var(--bg); }
.select-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.select-label { display: flex; align-items: center; gap: 9px; font-size: .72rem; color: var(--muted); }
select { appearance: auto; max-width: 180px; color: var(--ink); background: var(--panel); border: 1px solid var(--control-line); border-radius: 2px; padding: 8px 10px; font-size: .72rem; }
.seats-filter { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .7rem; color: var(--muted); }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: .7rem; color: var(--muted); }
.results-heading p { margin: 0; }
.results-heading span { font-size: .6rem; }
.results-heading strong { font-weight: 400; color: var(--ink); }
.theater { margin-bottom: 33px; }
.theater-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 0 14px; border-top: 1px solid var(--control-line); }
.theater-heading h3 { font-size: 1.1rem; font-weight: 500; margin: 0; }
.theater-heading h3 small { font-size: .65rem; color: var(--muted); padding-right: 9px; font-weight: 400; }
.theater-region { color: var(--muted); font-size: .65rem; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 400; font-size: .63rem; color: var(--muted); padding: 10px 9px; background: var(--panel); }
th:first-child { width: 26%; }
th:last-child { width: 23%; text-align: right; }
td { border-bottom: 1px solid var(--line); padding: 15px 9px; font-size: .81rem; vertical-align: middle; }
.date-day { font-size: .68rem; color: var(--muted); padding-left: 5px; }
.time { font-weight: 500; white-space: nowrap; }
.time-end { color: var(--muted); font-size: .7rem; font-weight: 400; padding-left: 3px; }
.time-end::before { content: '– '; }
.screen-name { display: block; font-size: .61rem; color: var(--muted); margin-top: 5px; line-height: 1.5; overflow-wrap: anywhere; }
.seat-cell { text-align: right; }
.seat-number { color: var(--accent); font-size: 1.05rem; font-weight: 500; }
.seat-total { color: var(--muted); font-size: .63rem; margin-left: 3px; }
.seat-status { color: var(--muted); font-size: .72rem; }
.new-row { background: var(--new-bg); }
.new-label { display: block; margin-top: 5px; color: var(--accent); font-size: .6rem; }
.empty-state { padding: 44px 20px; background: var(--panel); border-top: 1px solid var(--control-line); text-align: center; }
.empty-state h3 { margin: 0 0 12px; font-size: .95rem; font-weight: 400; line-height: 1.7; }
.empty-state p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.8; }
.board-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .65rem; line-height: 1.8; }
.board-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 20px; border-top: 1px solid var(--line); padding: 22px 0 25px; margin-top: 48px; color: var(--muted); font-size: .65rem; line-height: 1.8; }
.footer p { margin: 0; min-height: 44px; display: flex; align-items: center; gap: 7px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 640px) {
  .page-width { width: min(1280px, calc(100% - 72px)); }
  .work-inner { grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 10px 28px; }
  .poster { grid-column: 1; }
  .work-heading, .work-note { grid-column: 2; }
  .work-note { align-self: start; }
  .poster figcaption { font-size: .6rem; }
  .edition { display: inline; }
  td { padding-block: 16px; }
  .time-end { padding-left: 8px; }
}
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.4fr); gap: clamp(35px, 5vw, 76px); padding-top: 46px; }
  .work-inner { display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 30px; }
  .work-heading { padding: 0 0 17px; }
  h1 { font-size: clamp(3rem, 5vw, 4.2rem); margin-bottom: 14px; }
  .artist { font-size: .85rem; margin-bottom: 15px; }
  .poster { margin: 0; }
  .poster img { width: 100%; }
  .poster figcaption { font-size: .6rem; margin-top: 12px; }
  .work-note { margin-top: 13px; font-size: .72rem; }
  .board-title { margin-top: 1px; margin-bottom: 32px; }
  .section-kicker { margin-bottom: 17px; }
  h2 { font-size: 1.9rem; }
  .masthead { min-height: 90px; }
  .sync-bar { gap: 12px; }
  .sync-actions { gap: 7px; }
  button { padding-inline: 11px; font-size: .72rem; }
  .filter-bar { gap: 8px; }
  .select-filters { gap: 10px; }
  .select-label { gap: 7px; }
  select { padding-inline: 8px; }
}
@media (max-width: 359px) {
  .page-width { width: calc(100% - 28px); }
  .sync-actions { width: 100%; }
  .sync-actions button { flex: 1; }
  .results-heading { flex-wrap: wrap; }
  .time-end { display: block; padding-left: 0; margin-top: 4px; }
  .time-end::before { content: '종료 '; }
  .screen-name { margin-top: 7px; }
  td, th { padding-inline: 6px; }
  .seat-total { display: block; margin-top: 3px; }
}
