:root {
  --bg: #faf8f5; --card: #ffffff; --ink: #1f1b16; --sub: #6b645b; --line: #e7e1d8;
  --brand: #b3261e; --brand-ink: #ffffff; --ok: #1f7a4d; --warn: #b26a00;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.55; }
a { color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 14px; font-size: .92rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--sub); }
.nav a:hover { color: var(--ink); }
.nav form { margin: 0; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 0; list-style: none; margin: 0; }
.perf { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.perf:hover { border-color: var(--brand); }
.poster { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #efe9df; display: block; }
.poster-empty { display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: .9rem; }
.perf .body { padding: 10px 12px 14px; }
.perf .title { font-weight: 700; margin: 0 0 4px; }
.meta { color: var(--sub); font-size: .88rem; margin: 2px 0; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #f1e9de; color: var(--sub); margin-right: 4px; }
.badge.ok { background: #e3f3ea; color: var(--ok); }
.badge.off { background: #eee; color: #888; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.filters select { width: auto; min-width: 120px; }
label { display: block; font-weight: 600; margin: 14px 0 4px; font-size: .92rem; }
.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
.check input { margin-top: 5px; }
.btn { display: inline-block; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn[disabled], .btn.disabled { background: #cfc8bd; cursor: not-allowed; }
.btn.block { width: 100%; margin-top: 18px; }
.form { max-width: 420px; margin: 0 auto; }
.error { color: var(--brand); font-size: .88rem; margin: 4px 0 0; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert.err { background: #fdeceb; color: var(--brand); }
.alert.ok { background: #e3f3ea; color: var(--ok); }
.detail { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .detail { grid-template-columns: 280px 1fr; } }
.rounds { list-style: none; padding: 0; margin: 0; }
.round { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.round:last-child { border-bottom: 0; }
.pager { display: flex; justify-content: center; gap: 12px; margin-top: 24px; align-items: center; }
.empty { text-align: center; color: var(--sub); padding: 48px 0; }
.site-footer { border-top: 1px solid var(--line); color: var(--sub); font-size: .82rem; padding: 20px 0; }
.pre { white-space: pre-wrap; }

/* ---- 관리 화면 ---- */
textarea { min-height: 110px; resize: vertical; }
.form.wide { max-width: 720px; }
.cols { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cols { grid-template-columns: 1fr 1fr; } }
.hint { color: var(--sub); font-size: .82rem; margin: 3px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.actions form { margin: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; background: #fff; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: #f6f1e9; font-weight: 700; white-space: nowrap; }
.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
.inline input[type=text] { width: 150px; padding: 5px 8px; }
.section { margin-top: 26px; }
.badge.warn { background: #fff1d6; color: var(--warn); }
.badge.bad { background: #fdeceb; color: var(--brand); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h1 { margin: 0; }

/* ---- 모바일(폭 600px 이하) ---- */
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
@media (max-width: 600px) {
  .wrap { padding: 0 14px; }
  main.wrap { padding-top: 16px; padding-bottom: 36px; }
  h1 { font-size: 1.3rem; }
  /* 머리말: 로고 한 줄, 메뉴는 아래 줄에서 가로 스크롤 */
  .site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding-bottom: 4px; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .nav .btn.small, .nav a { padding-top: 6px; padding-bottom: 6px; }
  /* 손가락으로 누르기 쉬운 크기 */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn.small { min-height: 40px; padding: 8px 14px; }
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=datetime-local], select, textarea {
    min-height: 44px; font-size: 16px; }   /* 16px 미만이면 아이폰이 입력 시 화면을 확대함 */
  .filters select { flex: 1 1 140px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .perf .body { padding: 8px 10px 12px; }
  .perf .title { font-size: .95rem; }
  .card { padding: 14px; }
  .round > div:last-child, .round > form { width: 100%; }
  .round .btn { width: 100%; }
  .actions > .btn, .actions > form > .btn { flex: 1 1 auto; }
  .actions input[type=datetime-local], .actions input[type=number] { width: 100% !important; }
  .inline { flex-wrap: wrap; }
  .inline input[type=text] { width: 100%; }
  table.list { font-size: .84rem; min-width: 640px; }
}

/* ---- 공연 영상(16:9 반응형) ---- */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- 푸터·약관 ---- */
.site-footer p { margin: 2px 0; }
.footer-info, .footer-links { font-size: 13px; color: #666; }
.legal h2 { margin-top: 24px; font-size: 17px; }
.legal p, .legal li { line-height: 1.7; }
.legal .draft { background: #fff7e0; border: 1px solid #f0d58a; border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* ---- 게시판 ---- */
.posts { list-style: none; padding: 0; margin: 16px 0 0; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.post.notice { border-color: var(--brand); }
.post-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.post .pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
.card textarea, .card select { width: 100%; box-sizing: border-box; }

/* ---- 탭(전체/내 선호) ---- */
.tabs { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; }
.tabs a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tabs a.small { border: 0; background: none; font-size: .88rem; margin-left: auto; }
.form select { margin-bottom: 8px; }

/* 네이버 지도 */
.map-box { margin: 10px 0; }
.map-canvas { width: 100%; height: 280px; border-radius: 10px; border: 1px solid var(--line); }
