/* ===== 티켓팅 캘박 ===== */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #121624;
  --muted: #6b7183;
  --line: #e4e7ef;
  --brand: #ff3366;
  --brand-ink: #ffffff;
  --brand-soft: #ffe8ee;
  --navy: #13172b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 4px 16px rgba(17, 24, 39, .05);

  --c-auth: #64748b;    --c-auth-bg: #eef1f5;
  --c-pre: #e38a00;     --c-pre-bg: #fff3dc;
  --c-gen: #e5244f;     --c-gen-bg: #ffe6ec;
  --c-show: #6d3fe0;    --c-show-bg: #efe8ff;
  --c-period: #0c8fd0;  --c-period-bg: #e1f3fd;
  --c-etc: #2f9e6b;     --c-etc-bg: #e2f6ec;

  --live: #e5244f;
  --sun: #e5244f;
  --sat: #2f6fe0;
}
/* 다크모드: 기기 설정을 따르되, 사용자가 고른 값(data-theme)이 우선 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1120;
    --surface: #171b2e;
    --surface-2: #1f2440;
    --text: #eceef6;
    --muted: #979db4;
    --line: #2a3050;
    --brand-soft: #3a1626;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --c-auth: #9aa6b8;   --c-auth-bg: #263045;
    --c-pre: #ffb84a;    --c-pre-bg: #3b2c12;
    --c-gen: #ff5a7e;    --c-gen-bg: #3d1724;
    --c-show: #a888ff;   --c-show-bg: #2b2150;
    --c-period: #52bdf2; --c-period-bg: #12324a;
    --c-etc: #5fd29d;    --c-etc-bg: #143627;
    --sun: #ff6b8b; --sat: #6f9dff;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1120;
  --surface: #171b2e;
  --surface-2: #1f2440;
  --text: #eceef6;
  --muted: #979db4;
  --line: #2a3050;
  --brand-soft: #3a1626;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --c-auth: #9aa6b8;   --c-auth-bg: #263045;
  --c-pre: #ffb84a;    --c-pre-bg: #3b2c12;
  --c-gen: #ff5a7e;    --c-gen-bg: #3d1724;
  --c-show: #a888ff;   --c-show-bg: #2b2150;
  --c-period: #52bdf2; --c-period-bg: #12324a;
  --c-etc: #5fd29d;    --c-etc-bg: #143627;
  --sun: #ff6b8b; --sat: #6f9dff;
  }


* { box-sizing: border-box; }
/* hidden 속성은 언제나 숨김 (display 를 준 클래스가 덮어써서 안 숨겨지는 일이 없게 — 예: 다른 탭에 '오늘 업데이트' 제목이 보이던 문제) */
[hidden] { display: none !important; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.25; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.04em; }
.logo-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); transform: rotate(-8deg); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.site-nav a:hover, .site-nav a.active { color: var(--text); background: var(--surface-2); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* ----- Hero ----- */
.hero { background: var(--navy); color: #fff; padding: 36px 0 40px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -140px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,51,102,.45), transparent 65%); pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.hero .eyebrow { color: #ff8fab; }
.hero-sub { color: #b9bdd3; margin: 12px 0 0; }
.hero-next { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #fff; padding: 20px; box-shadow: none; }
.hero-next .eyebrow { color: #ff8fab; }
.hero-next .muted { color: #aab0c8; }
.hero-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; }
.hero-link:hover strong { text-decoration: underline; }
.hero-time { margin: 6px 0 0; color: #d4d7e6; font-size: 14px; }
.hero-cd { margin: 12px 0 0; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ----- Ads ----- */
.ad-slot {
  display: grid; place-items: center; margin: 20px 0;
  border: 1px dashed var(--line); border-radius: 10px; color: var(--muted);
  font-size: 12px; letter-spacing: .1em; background: repeating-linear-gradient(45deg, transparent 0 10px, var(--surface-2) 10px 11px);
}
.ad-leaderboard { min-height: 90px; }
.ad-infeed { min-height: 120px; }
.ad-side { min-height: 250px; margin: 16px 0 0; }

/* ----- Toolbar ----- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 8px 0 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px;
}
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-n { font-size: 12px; opacity: .6; }
.chip.zero:not(.on), .tchip.zero { opacity: .45; }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 40px; min-width: 280px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
}
.search:focus-within { border-color: var(--brand); }
.search input { border: 0; outline: 0; background: none; flex: 1; font: inherit; color: var(--text); min-width: 0; }
/* 첫 화면(분야 고르기): 제목 왼쪽, 검색창 오른쪽 끝 (좁은 화면은 제목 아래로) */
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 0 0 16px; }
.pick-head .pick-title { margin: 0; }
.pick-search { display: flex; gap: 8px; flex: 0 1 440px; min-width: 0; margin-left: auto; }
.pick-search .search { flex: 1; min-width: 0; height: 42px; font-size: 14.5px; }
@media (max-width: 720px) { .pick-search { flex-basis: 100%; margin-left: 0; } }
.pick-search-btn { flex: none; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 800; cursor: pointer; }
.pick-search-btn:hover { filter: brightness(1.05); }
.pick-search-btn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
/* 첫 화면 TOP 10 (주목할 공연 / 방문자 인기) — 히어로 오른쪽 '다음 티켓 오픈' 자리 (어두운 배경) */
.hero-next[hidden], .hot-rank[hidden] { display: none; }
.hot-rank { padding: 16px 16px 10px; }
.hot-rank-head { margin-bottom: 6px; }
.hot-rank-head h2 { font-size: 16px; font-weight: 800; margin: 0; color: #fff; }
.hot-rank-head p { margin: 2px 0 0; color: #aab0c8; }
/* 순위가 보이면 히어로 오른쪽 칸을 넓히고 1~5위 / 6~10위를 나란히 */
.hero-inner.has-rank { grid-template-columns: 1fr 580px; }
.hot-rank-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 14px; }
.hot-rank-item { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 9px; color: #fff; min-width: 0; }
.hot-rank-item:hover { background: rgba(255,255,255,.08); }
.hot-rank-no { flex: none; width: 20px; text-align: center; font-size: 15px; font-weight: 900; color: #aab0c8; font-variant-numeric: tabular-nums; }
.hot-rank-no.top { color: #ff8fab; }
.hot-rank-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hot-rank-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-rank-name small { font-size: 11.5px; font-weight: 600; color: #aab0c8; }
.hot-rank-sub { display: none; } /* 히어로 칸이 좁아 이름만 (예매 일정은 상세에서) */
@media (max-width: 960px) { .hero-inner.has-rank { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .hot-rank-list { column-gap: 6px; }
  .hot-rank-item { gap: 6px; padding: 5px 4px; }
  .hot-rank-src { display: none; } /* 폰: 두 줄로 두려면 이름 칸이 좁아 오른쪽 표시(D-n·내한 등)는 숨김 */
}
.hot-rank-src { flex: none; font-size: 11px; font-weight: 700; color: #d4d7e6; background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 8px; }

/* 검색창 아래 연관 예매 정보 (첫 화면 + 탭 안 검색창) */
.pick-search, .search-wrap { position: relative; }
.search-wrap .suggest { min-width: 340px; left: auto; }
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .18); max-height: min(70vh, 520px); overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.suggest-item:hover, .suggest-item[aria-selected="true"] { background: var(--surface-2); }
.suggest-icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); font-size: 17px; }
.suggest-item:hover .suggest-icon, .suggest-item[aria-selected="true"] .suggest-icon { background: var(--surface); }
.suggest-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.suggest-name { font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text); }
.suggest mark { background: none; color: var(--brand); font-weight: 900; }
.suggest-all { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 800; text-align: center; cursor: pointer; }
.suggest-all:hover { background: var(--brand-soft); }
.suggest-empty { margin: 0; padding: 14px 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* ----- 태그·지역·규모 필터 ----- */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: -4px 0 16px; }
.tag-group, .seg-group { display: flex; gap: 6px; flex-wrap: wrap; }
.tchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px;
  border: 1px dashed var(--line); background: transparent; font-size: 13px; font-weight: 700; color: var(--muted);
}
.tchip:hover { border-color: var(--muted); color: var(--text); }
.tchip.on { border-style: solid; border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.tchip.is-overseas.on { border-color: var(--c-period); background: var(--c-period-bg); color: var(--c-period); }
.seg-group { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg { border: 0; background: none; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg.on { background: var(--text); color: var(--bg); }
.seg.on .chip-n { opacity: .7; }
.small-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; margin-left: auto; }
.small-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.small-toggle .switch { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.small-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.small-toggle input:checked + .switch { background: var(--brand); }
.small-toggle input:checked + .switch::after { transform: translateX(14px); }

/* ----- 메인 달력 칸 (home.js renderCalendarAlt): 종류·이름 3줄 + '+N개 더', 모바일은 건수 배지 ----- */
.cal-layout > * { min-width: 0; }
.cv-scope { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); max-width: 100%; overflow-x: auto; }
.cv-scope .seg {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: none;
  color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.cv-scope .seg span { font-size: 12px; opacity: .7; margin-left: 2px; }
.cv-scope .seg.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.cv-scope .seg:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.cv-grid .cal-cell { min-height: 112px; gap: 4px; }
.cv-rows { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cv-row {
  display: flex; align-items: baseline; gap: 4px; min-width: 0; padding: 2px 5px;
  border-left: 3px solid currentColor; border-radius: 4px; font-size: 12px; line-height: 1.35;
}
.cv-row.t-auth { background: var(--c-auth-bg); } .cv-row.t-pre { background: var(--c-pre-bg); }
.cv-row.t-gen { background: var(--c-gen-bg); }   .cv-row.t-show { background: var(--c-show-bg); }
.cv-row.t-period { background: var(--c-period-bg); } .cv-row.t-etc { background: var(--c-etc-bg); }
.cv-row i { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; }
.cv-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 700; }
.cv-more { padding-left: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cv-n {
  display: none; align-items: baseline; gap: 1px; padding: 1px 5px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); font-variant-numeric: tabular-nums;
}
.cv-n small { display: none; }
.cv-n.lv3, .cv-n.lv4 { background: var(--brand); color: var(--brand-ink); }
.cv-grid .cal-cell.past:not(.today) { opacity: .5; }
.cv-grid .cal-cell.past.out { opacity: .3; }
@media (max-width: 720px) {
  .cv-scope .seg { padding: 0 10px; font-size: 13px; }
  .cv-rows { display: none; }
  .cv-n { display: inline-flex; align-self: center; }
  .cv-grid .cal-cell { min-height: 58px; align-items: center; justify-content: flex-start; gap: 4px; }
}

/* ----- 필터 탭: 장르(탭, 그림) · 테마(작은 탭, 아이콘) · 지역(구간 탭) -----
   탭마다 --gc(장르·테마 색)를 받아 아이콘 칸을 옅게 칠하고, 고르면 탭 전체를 그 색으로 */
.ftabs { display: flex; gap: 8px; flex-wrap: wrap; }
.ftab {
  --gc: var(--brand);
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s, transform .15s;
}
.ftab:hover { border-color: var(--gc); transform: translateY(-1px); }
.ftab:focus-visible, .ttab:focus-visible, .rtab:focus-visible { outline: 3px solid var(--gc, var(--brand)); outline-offset: 2px; }
.ft-ico {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: color-mix(in srgb, var(--gc) 13%, transparent); color: var(--gc);
  transition: background-color .15s, color .15s;
}
.ft-svg { width: 20px; height: 20px; }
.ft-n { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ftab.on { background: var(--gc); border-color: var(--gc); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--gc) 28%, transparent); }
.ftab.on .ft-ico { background: rgba(255,255,255,.2); color: #fff; }
.ftab.on .ft-n { color: rgba(255,255,255,.85); }
.ftab.zero:not(.on), .ttab.zero:not(.on) { opacity: .45; }

.filter-row { gap: 10px 20px; margin: 0 0 18px; }
.ft-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ft-label { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.ft-label .ft-ico { width: 22px; height: 22px; background: none; color: var(--muted); }
.ft-label .ft-svg { width: 16px; height: 16px; }
.ttabs, .rtabs { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ttab {
  --gc: var(--brand);
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 3px 12px 3px 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}
.ttab .ft-ico { width: 30px; height: 30px; border-radius: 50%; }
.ttab .ft-svg { width: 17px; height: 17px; }
.ttab:hover { border-color: var(--gc); }
.ttab.on { background: color-mix(in srgb, var(--gc) 12%, var(--surface)); border-color: var(--gc); color: var(--gc); }
.ttab.on .ft-ico { background: var(--gc); color: #fff; }
.ttab.on .ft-n { color: var(--gc); }
.rtabs { gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.rtab {
  min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none;
  font-size: 13.5px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: background-color .15s, color .15s;
}
.rtab:hover { color: var(--text); }
.rtab.on { background: var(--text); color: var(--bg); }
.rtab.on .ft-n { color: inherit; opacity: .7; }
@media (max-width: 720px) {
  .ftabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding: 2px 2px 6px; margin: -2px -2px 0; scrollbar-width: none; }
  .ftabs::-webkit-scrollbar { display: none; }
  .ftab { flex: none; min-height: 38px; font-size: 13.5px; }
  .ft-group { width: 100%; }
  .ttabs, .rtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ttabs::-webkit-scrollbar, .rtabs::-webkit-scrollbar { display: none; }
  .ttab, .rtab { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .ftab, .ttab, .rtab, .ft-ico { transition: none; } .ftab:hover { transform: none; } }
.small-toggle input:focus-visible + .switch { outline: 2px solid var(--brand); outline-offset: 2px; }
.small-toggle em { font-style: normal; color: var(--text); font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags.inline { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag-overseas { background: var(--c-period-bg); color: var(--c-period); }
.cat-badge.region { color: var(--muted); background: var(--surface-2); margin-left: 4px; }

/* ----- Calendar ----- */
.cal-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: stretch; scroll-margin-top: 80px; }
.cal-card { padding: 20px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head h2 { font-size: 22px; font-weight: 800; }
.cal-nav { display: flex; gap: 6px; }
.btn-icon, .btn-ghost {
  height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600;
}
.btn-icon { width: 36px; font-size: 20px; line-height: 1; }
.btn-ghost { padding: 0 14px; display: inline-flex; align-items: center; font-size: 14px; }
.btn-icon:hover, .btn-ghost:hover { background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow div { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-dow .sun { color: var(--sun); } .cal-dow .sat { color: var(--sat); }
.cal-cell {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; text-align: left;
  min-height: 104px; padding: 6px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2);
  transition: border-color .12s, background .12s;
}
.cal-cell:hover { border-color: var(--line); background: var(--surface); }
.cal-cell.out { opacity: .38; }
.cal-cell.past:not(.has) .num { color: var(--muted); }
.cal-cell .num { font-size: 13px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.sun .num { color: var(--sun); } .cal-cell.sat .num { color: var(--sat); }
.cal-cell.today .num { background: var(--brand); color: #fff; }
.cal-cell.selected { border-color: var(--text); background: var(--surface); }
.evs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* 헤드라인 1개 */
.ev-head {
  display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; border-radius: 7px;
  border-left: 3px solid currentColor; min-width: 0;
}
.ev-head b { font-size: 10.5px; font-weight: 700; line-height: 1.2; }
.ev-head .ev-name {
  color: var(--text); font-size: 12.5px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all;
}
.ev-head.t-auth    { background: var(--c-auth-bg); }
.ev-head.t-pre     { background: var(--c-pre-bg); }
.ev-head.t-gen     { background: var(--c-gen-bg); }
.ev-head.t-show    { background: var(--c-show-bg); }
.ev-head.t-period  { background: var(--c-period-bg); }
.ev-head.t-etc     { background: var(--c-etc-bg); }
/* 나머지: 점 + 개수 */
.ev-rest { display: flex; align-items: center; gap: 3px; padding-left: 4px; flex-wrap: wrap; }
.ev-rest .dot { width: 6px; height: 6px; }
.ev-rest em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.dots { display: none; gap: 3px; justify-content: center; align-items: center; }
.dots em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted); line-height: 1; }

/* 타입 색상 */
.t-auth    { color: var(--c-auth);   } .ev.t-auth,    .type-badge.t-auth    { background: var(--c-auth-bg); }
.t-pre     { color: var(--c-pre);    } .ev.t-pre,     .type-badge.t-pre     { background: var(--c-pre-bg); }
.t-gen     { color: var(--c-gen);    } .ev.t-gen,     .type-badge.t-gen     { background: var(--c-gen-bg); }
.t-show    { color: var(--c-show);   } .ev.t-show,    .type-badge.t-show    { background: var(--c-show-bg); }
.t-period  { color: var(--c-period); } .ev.t-period,  .type-badge.t-period  { background: var(--c-period-bg); }
.t-etc     { color: var(--c-etc);    } .ev.t-etc,     .type-badge.t-etc     { background: var(--c-etc-bg); }
.dot.t-auth { background: var(--c-auth); } .dot.t-pre { background: var(--c-pre); } .dot.t-gen { background: var(--c-gen); }
.dot.t-show { background: var(--c-show); } .dot.t-period { background: var(--c-period); } .dot.t-etc { background: var(--c-etc); }

.type-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status.s-live { background: var(--c-gen-bg); color: var(--live); }
.status.s-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
.status.s-open { background: var(--c-etc-bg); color: var(--c-etc); }
.status.s-upcoming { background: var(--c-pre-bg); color: var(--c-pre); }
@keyframes pulse { 50% { opacity: .25; } }
.cd { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--brand); white-space: nowrap; }
.cd.big { font-size: 20px; font-weight: 800; }

/* ----- Day panel ----- */
/* 달력 높이에 맞추고 안쪽만 스크롤 */
.day-panel { position: relative; padding: 0; overflow: hidden; scroll-margin-top: 76px; min-height: 420px; }
.day-inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.day-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding: 20px 20px 12px; border-bottom: 1px solid var(--line); flex: none;
}
.day-head h3 { font-size: 22px; font-weight: 800; }
.day-count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.day-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.day-scroll::-webkit-scrollbar { width: 6px; }
.day-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.headline {
  display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #1a0b3d 0%, #6d3fe0 60%, #ff3366 100%); margin-bottom: 4px;
  transition: transform .15s;
}
.headline:hover { transform: translateY(-1px); }
/* 헤드라인 카드의 장르 그림 (오른쪽 아래, 글자 뒤) */
.headline { position: relative; overflow: hidden; }
.headline > :not(.poster-art) { position: relative; }
.headline .poster-art { width: 92px; max-width: none; right: 12px; bottom: 10px; opacity: .45; }
.headline:hover .poster-art { transform: rotate(-6deg) scale(1.06); }
.headline.cat-fanmeeting { background: linear-gradient(135deg, #b8336a, #ff3366); }
.headline.cat-musical    { background: linear-gradient(135deg, #3a0d0d, #c23b22); }
.headline.cat-play       { background: linear-gradient(135deg, #1f2a1a, #5d7a3a); }
.headline.cat-classic    { background: linear-gradient(135deg, #1b1f3a, #8a6d3b); }
.headline.cat-family     { background: linear-gradient(135deg, #d9731f, #e6a800); }
.headline.cat-popup      { background: linear-gradient(135deg, #0c6fa0, #2bb7a3); }
.headline.cat-festival   { background: linear-gradient(135deg, #b85e00, #e8a400); }
.headline.cat-exhibition { background: linear-gradient(135deg, #232526, #555b6e); }
.hl-top { display: flex; gap: 6px; align-items: center; }
.hl-tag { font-size: 11px; font-weight: 800; background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 999px; }
.hl-cat { font-size: 12px; font-weight: 600; opacity: .8; }
.hl-title { font-size: 17px; font-weight: 800; line-height: 1.3; margin-top: 4px; }
.hl-sub { font-size: 13px; opacity: .85; }
.hl-bottom { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.hl-cd { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hl-bottom small { font-size: 12px; opacity: .8; }
.hl-status { font-size: 13px; font-weight: 800; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 999px; }

.list-label { margin: 16px 2px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.list-label span, .ongoing summary span { color: var(--text); }
.ongoing { margin-top: 16px; }
.ongoing summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 2px; list-style: none;
}
.ongoing summary::-webkit-details-marker { display: none; }
.ongoing summary::before { content: "▸ "; }
.ongoing[open] summary::before { content: "▾ "; }
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .12s, transform .12s;
}
.day-scroll .item-title { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-row:hover { border-color: var(--text); }
.item-row.is-ended { opacity: .55; }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-title { font-weight: 700; font-size: 15px; }
.item-sub { font-size: 13px; color: var(--muted); }
.item-right { padding-top: 1px; }
.empty { padding: 28px 8px; text-align: center; }
.empty p { margin: 4px 0; }

/* ----- Sections ----- */
.section { margin-top: 40px; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { margin: 0; font-size: 14px; }

.open-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.open-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow); transition: border-color .12s;
}
.open-row:hover { border-color: var(--text); }
.date-box { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 12px; background: var(--surface-2); line-height: 1.1; }
.date-box .m { font-size: 12px; color: var(--muted); font-weight: 600; }
.date-box .d { font-size: 24px; font-weight: 800; }
.date-box .w { font-size: 12px; color: var(--muted); }
.date-box.live { background: var(--brand); color: #fff; }
.date-box.live .m, .date-box.live .w { color: rgba(255,255,255,.85); }
.open-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-top { display: flex; gap: 8px; align-items: center; }
.cat { font-size: 12px; color: var(--muted); font-weight: 600; }
.open-cd { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.open-cd small { font-size: 12px; color: var(--muted); }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.event-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.event-card:hover { transform: translateY(-2px); border-color: var(--text); }
.poster {
  position: relative; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  color: #fff; background: linear-gradient(135deg, #2b1055, #7597de); overflow: hidden;
}
.poster::before {
  content: ""; position: absolute; inset: 0; opacity: .25;
  background: radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px) 0 0 / 22px 22px;
}
.poster.cat-concert    { background: linear-gradient(var(--ang, 135deg), #1a0b3d 0%, #6d3fe0 55%, #ff3366 100%); }
.poster.cat-fanmeeting { background: linear-gradient(var(--ang, 135deg), #ff7eb3, #ff3366); }
.poster.cat-popup      { background: linear-gradient(var(--ang, 135deg), #0c8fd0, #3fe0c5); }
.poster.cat-musical    { background: linear-gradient(var(--ang, 135deg), #3a0d0d, #c23b22); }
.poster.cat-play       { background: linear-gradient(var(--ang, 135deg), #1f2a1a, #5d7a3a); }
.poster.cat-classic    { background: linear-gradient(var(--ang, 135deg), #1b1f3a, #8a6d3b); }
.poster.cat-family     { background: linear-gradient(var(--ang, 135deg), #ff9a3c, #ffd23c); color: #2a1a00; }
.poster.cat-festival   { background: linear-gradient(var(--ang, 135deg), #f7971e, #ffd200); color: #1a1a1a; }
.poster.cat-exhibition { background: linear-gradient(var(--ang, 135deg), #232526, #6b7183); }
.poster-cat { position: relative; font-size: 12px; font-weight: 700; opacity: .85; }
.poster-title { position: relative; font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.event-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-body h3 { font-size: 17px; font-weight: 800; }
.event-body .meta { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.event-body .next { margin: auto 0 0; display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; }

/* ----- Detail ----- */
.detail { padding-top: 16px; padding-bottom: 8px; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.crumbs a:hover { color: var(--text); }
.detail-hero { display: grid; grid-template-columns: 340px 1fr; overflow: hidden; }
.poster.big { aspect-ratio: auto; min-height: 100%; padding: 24px; }
.poster.big .poster-title { font-size: 30px; }
.detail-head { padding: 24px 28px; }
.cat-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }
.cat-badge.overseas { color: var(--c-period); background: var(--c-period-bg); margin-left: 4px; }
.detail-head h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin-top: 10px; }
.subtitle { margin: 4px 0 0; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.info { margin: 18px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.info div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; font-size: 14px; }
.info dt { color: var(--muted); font-weight: 600; }
.info dd { margin: 0; font-weight: 600; }
.actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px;
  border-radius: 12px; background: var(--brand); color: var(--brand-ink); font-weight: 700; border: 0;
}
.btn-primary:hover { filter: brightness(.95); }
.actions .btn-ghost { height: 46px; padding: 0 18px; border-radius: 12px; }
.next-box {
  margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.next-box strong { font-size: 15px; }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 16px; }
.detail-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 0; }
.block { padding: 22px; }
.block h2 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.block p { margin: 0 0 6px; }

.timeline { list-style: none; margin: 0 0 12px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 20px 28px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--surface); }
.tl-item.st-ended { opacity: .5; }
.tl-item.st-live .tl-dot { animation: pulse 1.2s infinite; }
.tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-top strong { font-size: 16px; }
.tl-time { margin: 4px 0 2px !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-cd { font-size: 13px; color: var(--muted); }
.link-sm { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--brand); }
.link-sm:hover { text-decoration: underline; }

.price-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.price-table th, .price-table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-table th { text-align: left; font-weight: 600; color: var(--muted); }
.price-table td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.notes li + li { margin-top: 4px; }
.disclaimer { margin: 16px 4px 0; line-height: 1.6; }
.back-row { margin: 28px 0 8px; }
.empty-page { text-align: center; padding: 60px 20px; }
.empty-page h1 { font-size: 24px; margin-bottom: 8px; }
.empty-page .btn-primary { margin-top: 16px; }

/* ----- Static pages ----- */
.page { max-width: 760px; padding-top: 32px; padding-bottom: 16px; }
.page h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.page h2 { font-size: 19px; font-weight: 800; margin: 32px 0 10px; scroll-margin-top: 80px; }
.page p, .page li { color: var(--text); font-size: 15.5px; line-height: 1.75; }
.page ul { padding-left: 20px; }
.page .card { padding: 24px 28px; }

/* ----- Footer ----- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: start; }
.footer-inner p { margin: 6px 0 0; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-weight: 600; }
.footer-nav a:hover { color: var(--text); }
.copy { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; }

/* ----- Toast ----- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: opacity .2s, transform .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .cal-layout, .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .day-panel { min-height: 0; }
  .day-inner { position: static; }
  .day-scroll { max-height: 70vh; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .detail-hero { grid-template-columns: 1fr; }
  .poster.big { aspect-ratio: 16 / 7; min-height: 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 14px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { border-radius: 10px; padding: 12px; }
  .search { min-width: 0; width: 100%; }
  .search-wrap { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .filter-row { gap: 8px; }
  .tag-group { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tchip { flex: none; }
  .seg-group { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .seg { flex: none; }
  .small-toggle { margin-left: 0; }
  .cal-card { padding: 14px 10px; }
  .cal-head { padding: 0 4px; }
  .legend { padding: 0 4px; gap: 10px; }
  .cal-grid { gap: 2px; }
  .cal-cell { min-height: 58px; align-items: center; padding: 6px 2px; }
  .evs { display: none; }
  .dots { display: flex; gap: 2px; max-width: 100%; overflow: hidden; }
  .dots .dot { width: 6px; height: 6px; }
  .open-row { grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 14px; }
  .open-cd { grid-column: 2; flex-direction: row; align-items: center; gap: 8px; justify-content: flex-start; }
  .info { grid-template-columns: 1fr; }
  .detail-head { padding: 20px; }
  .hero { padding: 28px 0 30px; }
  .hero-cd { font-size: 28px; }
  .footer-inner { grid-template-columns: 1fr; }
  .page .card { padding: 20px; }
}

/* =====================================================================
   기능 추가 (찜·내 일정·모아보기·체크리스트·정렬·다크모드 버튼 등)
   ===================================================================== */

/* ----- 헤더: 다크모드 버튼, 찜 개수 ----- */
.header-inner { gap: 8px; }
.site-nav { margin-left: auto; order: 1; }
.theme-btn {
  order: 2; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; line-height: 1; color: var(--text); flex: none;
}
.theme-btn:hover { background: var(--surface-2); }
.nav-toggle { order: 3; }
.nav-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; vertical-align: 1px;
}
.nav-badge[hidden] { display: none; }

/* ----- 히어로 버튼 ----- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px;
}
.hero-btn.ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.hero-btn .nav-badge { background: #fff; color: var(--brand); }
#todayLabel b { color: #fff; font-variant-numeric: tabular-nums; }

/* ----- 범례 = 누른 일정 종류만 보기 (버튼처럼 보이게 테두리) ----- */
.legend { gap: 6px; align-items: center; }
.legend-item {
  border: 1px solid var(--line); background: var(--surface); padding: 4px 11px; border-radius: 999px;
  font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s, color .12s;
}
.legend-item:hover { border-color: var(--muted); color: var(--text); }
.legend-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.legend-item.on { border-color: var(--text); background: var(--text); color: var(--bg); font-weight: 700; }
.legend-item.dim { opacity: .5; }
.legend-reset {
  border: 1px dashed var(--brand); background: none; color: var(--brand); font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}

/* ----- 섹션 머리 ----- */
.h-count { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.sort-sel { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.sort-sel select {
  height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0 10px; font: inherit; font-weight: 600;
}

/* ----- 다가오는 오픈: 묶음 제목 ----- */
.open-group { display: flex; align-items: baseline; gap: 8px; margin: 10px 2px 2px; font-size: 15px; font-weight: 800; }
.open-group:first-child { margin-top: 0; }
.open-group em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ----- 더보기 ----- */
.more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.more-wrap:empty { display: none; }
.more-btn {
  height: 42px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 700; color: var(--text);
}
.more-btn span { color: var(--muted); font-weight: 600; margin-left: 4px; }
.more-btn:hover { border-color: var(--text); }

/* ----- 카드: 찜 버튼, 포스터 ----- */
.card-wrap { position: relative; display: flex; }
.card-wrap > .event-card { flex: 1; min-width: 0; }
.fav-btn.on-card {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.32); color: #fff; font-size: 18px; line-height: 1; backdrop-filter: blur(4px); z-index: 2;
}
.fav-btn.on-card:hover { background: rgba(0,0,0,.5); }
.fav-btn.on-card.on { background: #fff; color: var(--brand); }
.fav-btn.labelled.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.poster { justify-content: space-between; }
/* 장르 그림 (오른쪽 아래, 글자 뒤) */
.poster-art { position: absolute; right: 10px; bottom: 8px; width: 34%; max-width: 116px; height: auto; aspect-ratio: 1; opacity: .55; pointer-events: none; transition: transform .2s; }
.event-card:hover .poster-art { transform: rotate(-6deg) scale(1.06); }
.poster.big .poster-art { width: 30%; max-width: 190px; right: 18px; bottom: 14px; }
.event-grid.compact .poster-art { width: 30%; }
.poster-top { position: relative; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; opacity: .9; padding-right: 40px; }
.poster-icon { font-size: 16px; }
.poster-name {
  position: relative; font-size: 26px; font-weight: 900; line-height: 1.1; letter-spacing: -0.04em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all;
}
.poster-sub { position: relative; font-size: 12px; font-weight: 600; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.poster.big { gap: 8px; }
.poster.big .poster-top { padding-right: 0; }
.poster.big .poster-name { font-size: 38px; }
.event-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.event-grid.compact .poster { aspect-ratio: 16 / 8; padding: 14px; }
.event-grid.compact .poster-name { font-size: 22px; }
.alert-chip { margin: 0; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; align-self: flex-start; }
.alert-chip.danger { background: var(--c-gen-bg); color: var(--c-gen); }
.alert-chip.warn { background: var(--c-pre-bg); color: var(--c-pre); }
.tag-extra { background: var(--c-etc-bg); color: var(--c-etc); }

/* ----- 상세: 변경 알림, 예매처 버튼, 시계, 체크리스트 ----- */
.change-banner { border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px; }
.change-banner strong { margin-right: 8px; }
.change-banner.danger { background: var(--c-gen-bg); color: var(--c-gen); }
.change-banner.warn { background: var(--c-pre-bg); color: var(--c-pre); }
.updated-chip { display: inline-block; margin-left: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--c-etc-bg); color: var(--c-etc); }
.actions.sub { margin-top: 8px; }
.actions.sub .btn-ghost { height: 38px; font-size: 13px; }
.link-plain { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.link-plain:hover { text-decoration-color: var(--text); }
.past-show { color: var(--muted); text-decoration: line-through; }
.kst-clock { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kst-clock b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.block-head h2 { margin-bottom: 0; }
.checklist { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.checklist label:hover { border-color: var(--muted); }
.checklist input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.checklist span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checklist strong { font-size: 14px; }
.checklist small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.checklist li.done strong { text-decoration: line-through; color: var(--muted); }
.checklist li.warn label { border-color: var(--c-gen); }
.warn-tag { align-self: flex-start; font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--c-gen-bg); color: var(--c-gen); }
.side-links { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0 !important; }
.related { margin-top: 32px; }
.related .section-head h2 { font-size: 19px; }

/* ----- 공용 페이지 (내 일정·모아보기·404) ----- */
.page-wide { padding-top: 24px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 16px; }
.page-wide .related { margin-top: 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; }
.page-head p { margin: 6px 0 0; }
.page-head .actions { margin: 0; }
.notice-line { margin: 0; font-size: 14px; color: var(--muted); }
.as-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.my-layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.my-timeline { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.my-date { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 800; color: var(--muted); }
.my-date:first-child { margin-top: 0; }
.my-date em { font-style: normal; font-size: 11px; color: #fff; background: var(--brand); padding: 1px 7px; border-radius: 999px; }
.item-row.is-show { background: var(--surface-2); border-style: dashed; }
.dir-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dir-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 14px; font-weight: 600;
}
.dir-chip span { font-size: 12px; color: var(--muted); font-weight: 700; }
.dir-chip.multi { border-color: var(--text); font-weight: 800; }
.dir-chip:hover { background: var(--surface-2); }
.nf-search { display: flex; gap: 8px; justify-content: center; margin: 18px auto 8px; max-width: 460px; }
.nf-search input {
  flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: 0 14px; font: inherit;
}

@media (max-width: 960px) {
  .my-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .site-nav { margin-left: 0; }
  .theme-btn { margin-left: auto; }
  .legend { gap: 5px; }
  .legend-item { padding: 4px 9px; font-size: 12px; }
  .section-head { align-items: center; }
  .poster-name { font-size: 24px; }
  .poster.big .poster-name { font-size: 30px; }
  .event-grid.compact { grid-template-columns: 1fr; }
  .kst-clock { margin-left: 0; width: 100%; }
  .actions .btn-primary, .actions .btn-ghost { flex: 1 1 auto; justify-content: center; }
  .hero-actions { margin-top: 14px; }
}

/* ----- 분야 탭 (로고 옆): 아이돌 / 스포츠 / 내한·해외팝업 / 공연 ----- */
.mode-tabs { display: flex; gap: 6px; margin-left: 8px; margin-right: auto; min-width: 0; }
.mode-switch {
  --mt: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; padding: 0 13px;
  border-radius: 999px; border: 1.5px solid var(--mt); color: var(--mt); background: transparent;
  font-size: 13.5px; font-weight: 800; white-space: nowrap; flex: none; transition: background .12s, color .12s;
}
.mode-switch:hover, .mode-switch.on { background: var(--mt); color: #fff; }
.mt-idol     { --mt: #b83cf0; }
.mt-sports   { --mt: #1f9d55; }
.mt-overseas { --mt: #2f6fe0; }
.mt-concert  { --mt: #e8552a; }
.mt-stage    { --mt: #c2186b; }
.mt-anime    { --mt: #5145e0; }
.mt-expo     { --mt: #0f8f84; }
.mt-today     { --mt: #2f6fe0; }
:root[data-theme="dark"] .mt-idol { --mt: #d07bff; }
:root[data-theme="dark"] .mt-sports { --mt: #3ccf7f; }
:root[data-theme="dark"] .mt-overseas { --mt: #6f9dff; }
:root[data-theme="dark"] .mt-concert { --mt: #ff8a5c; }
:root[data-theme="dark"] .mt-stage { --mt: #ff6fae; }
:root[data-theme="dark"] .mt-anime { --mt: #9b93ff; }
:root[data-theme="dark"] .mt-expo { --mt: #3fd1c2; }
:root[data-theme="dark"] .mt-today { --mt: #6f9dff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mt-idol { --mt: #d07bff; }
  :root:not([data-theme="light"]) .mt-sports { --mt: #3ccf7f; }
  :root:not([data-theme="light"]) .mt-overseas { --mt: #6f9dff; }
  :root:not([data-theme="light"]) .mt-concert { --mt: #ff8a5c; }
  :root:not([data-theme="light"]) .mt-stage { --mt: #ff6fae; }
  :root:not([data-theme="light"]) .mt-anime { --mt: #9b93ff; }
  :root:not([data-theme="light"]) .mt-expo { --mt: #3fd1c2; }
  :root:not([data-theme="light"]) .mt-today { --mt: #6f9dff; }
}
/* 분야 탭은 화면 너비와 상관없이 항상 머리글 두 번째 줄 (PC 6칸 한 줄, 폰 3칸 두 줄).
   탭 이름이 길어서(콘서트·페스티벌 등) 로고·메뉴와 한 줄에 넣으면 겹치거나 '내 일정'이 줄바꿈됨 */
.header-inner { flex-wrap: wrap; height: auto; min-height: 60px; row-gap: 0; }
.mode-tabs { order: 10; width: 100%; margin: 0 0 10px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mode-switch { padding: 0 4px; font-size: 12.5px; gap: 3px; min-width: 0; }
.site-nav { flex: none; }
.site-nav a { white-space: nowrap; }
@media (max-width: 600px) {
  .mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
}
@media (max-width: 440px) {
  .mode-switch > span[aria-hidden] { display: none; } /* 좁은 폰: 아이콘 빼고 글자만 (긴 탭 이름이 잘리지 않게) */
}

/* 스포츠 페이지: 히어로 빛 번짐만 초록으로 (나머지 양식은 공연과 동일) */
.mode-sports .hero::after { background: radial-gradient(circle, rgba(31,157,85,.5), transparent 65%); }
.mode-sports .hero .eyebrow, .mode-sports .hero-next .eyebrow { color: #7ee2a8; }

/* 스포츠 종목 카드 색 */
.poster.cat-soccer     { background: linear-gradient(var(--ang, 135deg), #0b3d2e, #1f9d55); }
.poster.cat-baseball   { background: linear-gradient(var(--ang, 135deg), #3b1f0e, #c2410c); }
.poster.cat-basketball { background: linear-gradient(var(--ang, 135deg), #431407, #ea580c); }
.poster.cat-volleyball { background: linear-gradient(var(--ang, 135deg), #0c2d48, #0e7ac4); }
.poster.cat-esports    { background: linear-gradient(var(--ang, 135deg), #1e1b4b, #7c3aed 60%, #06b6d4); }
.poster.cat-fight      { background: linear-gradient(var(--ang, 135deg), #1c1917, #b91c1c); }
.poster.cat-sportsetc  { background: linear-gradient(var(--ang, 135deg), #14213d, #4b5563); }
.headline.cat-soccer     { background: linear-gradient(135deg, #0b3d2e, #1f9d55); }
.headline.cat-baseball   { background: linear-gradient(135deg, #3b1f0e, #c2410c); }
.headline.cat-basketball { background: linear-gradient(135deg, #431407, #ea580c); }
.headline.cat-volleyball { background: linear-gradient(135deg, #0c2d48, #0e7ac4); }
.headline.cat-esports    { background: linear-gradient(135deg, #1e1b4b, #7c3aed); }
.headline.cat-fight      { background: linear-gradient(135deg, #1c1917, #b91c1c); }
.headline.cat-sportsetc  { background: linear-gradient(135deg, #14213d, #4b5563); }

@media (max-width: 720px) {
  .mode-switch { height: 32px; }
  .logo { font-size: 17px; }
}
@media (max-width: 380px) {
  .mode-switch { font-size: 11.5px; }
  .logo { font-size: 16px; }
}

/* ---------- 스포츠: 정규시즌 구단별 예매 안내 (teams.js) ---------- */
.tg .tg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.team-next small { display: block; margin-top: 2px; font-size: 12px; }
.tg-my .who small { font-weight: 600; font-size: 12px; margin-left: 4px; }
.team-home-link { align-self: flex-start; margin-top: auto; }
.team-home-link + .team-go { margin-top: 0; }
.tg .notice-line { margin-bottom: 12px; }
.tg-my { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 16px; border-color: var(--brand); }
.tg-my .who { font-weight: 800; font-size: 17px; }
.tg-my .when { font-size: 15px; }
.tg-my .cd.big { margin-left: auto; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.team { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.team.is-my { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow); }
.team-head { display: flex; align-items: center; gap: 10px; }
.team-id { min-width: 0; }
.team-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.team-name { font-weight: 800; font-size: 16px; }
.team-home { font-size: 13px; color: var(--muted); }
.fav-team { margin-left: auto; flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.fav-team:hover { border-color: var(--muted); }
.fav-team.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.team dl { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 5px 8px; font-size: 13px; }
.team dt { color: var(--muted); }
.team dd { margin: 0; min-width: 0; }
.team-next { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.team-next b { font-size: 14px; }
.team-go { display: flex; justify-content: center; align-items: center; height: 38px; margin-top: auto; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; }
.team-go.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
.team-go.ghost:hover { border-color: var(--muted); }
.tg-foot { margin-top: 14px; font-size: 13px; }
@media (max-width: 600px) { .tg-my .cd.big { margin-left: 0; width: 100%; } }
.team-name a:hover, .tg-vs a:hover { text-decoration: underline; }
.team-sched-link { align-self: flex-start; }

/* ---------- 스포츠 달력: 인증·선예매 강조 + 정규시즌 경기 개수 (home.js, sports 모드) ---------- */
.cal-cell.has-key { box-shadow: inset 0 0 0 2px var(--c-pre); }
.cal-cell.has-key.selected { box-shadow: inset 0 0 0 2px var(--c-pre), 0 0 0 1px var(--text); }
.ev-head.is-key { border-left-width: 4px; box-shadow: 0 0 0 1px var(--c-pre) inset; }
.ev-head.is-key b { color: var(--c-pre); font-weight: 800; }
.ev-head.t-auth.is-key { box-shadow: 0 0 0 1px var(--c-auth) inset; }
.ev-head.t-auth.is-key b { color: var(--c-auth); }
.ev-key { display: block; padding: 2px 6px; border-radius: 6px; background: var(--c-pre-bg); color: var(--c-pre); font-size: 10.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcount { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; padding-top: 2px; }
.gcount span { display: inline-flex; align-items: center; gap: 1px; padding: 0 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 10.5px; font-weight: 700; line-height: 17px; color: var(--muted); }
.cal-cell.selected .gcount span, .cal-cell:hover .gcount span { background: var(--surface-2); }
.gcount .g-my { background: var(--brand) !important; border-color: var(--brand); color: #fff; }
.gcount .g-myopen { background: var(--c-gen-bg) !important; border-color: var(--c-gen); color: var(--c-gen); }
.gdots { display: none; }
.gtix { margin-top: 2px; padding-top: 0; }
.gcount .g-pre { background: var(--c-pre-bg); border-color: var(--c-pre); color: var(--c-pre); font-weight: 800; }
.gcount .g-open { background: var(--c-gen-bg); border-color: transparent; color: var(--c-gen); }
.gcount .g-pre.mine { background: var(--c-pre) !important; color: #fff; }
.gcount .g-open.mine { background: var(--c-gen) !important; color: #fff; }
.cal-cell.my-pre { box-shadow: inset 0 0 0 2px var(--c-pre); }
.cal-cell.my-open { box-shadow: inset 0 0 0 2px var(--c-gen); }
.key-label { color: var(--c-pre); }
.key-label small { font-weight: 600; color: var(--muted); margin-left: 4px; }
.item-row.is-key { border-color: var(--c-pre); background: var(--c-pre-bg); }
.key-note { font-size: 11px; font-weight: 800; color: var(--c-pre); }
.hl-tag.hl-key { background: #ffb84a; color: #3b2c12; }
.game-row .g-badge { background: var(--surface-2); color: var(--muted); }
.game-row.is-my { border-color: var(--brand); }
.game-row.is-my .item-title { color: var(--brand); }
.list-label .list-more { float: right; margin: 0; font-size: 12px; }
.day-nobig { margin: 2px 2px 0; }
@media (max-width: 720px) {
  .gdots { display: flex; justify-content: center; gap: 0; font-size: 9px; line-height: 1; max-width: 100%; overflow: hidden; }
  .gdots b { color: var(--brand); font-size: 10px; margin-left: 1px; }
  .gdots-tix i { font-style: normal; opacity: .75; }
  .gdots-tix i.mine { opacity: 1; }
  .cal-cell.has-key { box-shadow: inset 0 0 0 2px var(--c-pre); }
}

/* ---------- 구단 페이지 (team.html / team.js) ---------- */
.tp-missing { margin-bottom: 10px; color: var(--c-gen); }
.tp-my { margin-top: 18px; color: var(--text); }
.tp-my .tp-go { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.tp-jump { margin-top: 18px; }
.tp-league { margin-top: 28px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tp-team { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-width: 0; transition: border-color .15s; }
.tp-team:hover { border-color: var(--muted); }
.tp-team.is-my { border-color: var(--brand); }
.tp-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.tp-home { font-size: 13px; }
.tp-next { font-size: 13px; font-weight: 600; margin-top: 4px; }
.tp-hero h1 { display: flex; align-items: center; gap: 10px; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin: 10px 0 4px; }
.tp-hero h1 .team-dot { width: 16px; height: 16px; }
.tp-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-hero-top .fav-team { margin-left: 0; font-size: 13px; padding: 5px 12px; }
.tp-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.tp-info div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.tp-info dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.tp-info dd { margin: 0; font-size: 14px; font-weight: 600; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tp-actions .btn-primary, .tp-actions .btn-ghost { height: 42px; }
.tp-next-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tp-next p { margin: 0 0 4px; }
.tp-big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 20px; font-weight: 800; }
.tp-schedule { margin-top: 12px; }
.tg-filter { display: inline-flex; margin-bottom: 6px; }
.tg-month { font-size: 15px; font-weight: 800; margin: 18px 0 6px; }
.tg-games { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tg-game { display: grid; grid-template-columns: 120px 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tg-when b { font-weight: 800; }
.tg-ha { display: inline-flex; justify-content: center; padding: 2px 0; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tg-game.is-home .tg-ha { background: var(--brand-soft); color: var(--brand); }
.tg-vs { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.tg-vs small { font-weight: 500; font-size: 12px; }
.tg-ticket { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; text-align: right; }
.tg-open { font-weight: 600; white-space: nowrap; }
.tg-pre { font-weight: 800; color: var(--c-pre); white-space: nowrap; }
.tg-pre small { font-weight: 600; }
.tp-pre { margin-top: 10px !important; padding: 8px 10px; border-radius: 10px; background: var(--c-pre-bg); color: var(--c-pre); font-size: 13px; font-weight: 600; }
.tp-pre small { color: var(--muted); font-weight: 500; }
.tp-foot { margin-top: 14px; }
@media (max-width: 720px) {
  .tp-info { grid-template-columns: 1fr; }
  .tp-next-row { grid-template-columns: 1fr; }
  .tg-game { grid-template-columns: 1fr auto; grid-template-areas: "when ha" "vs ticket"; gap: 4px 10px; }
  .tg-when { grid-area: when; }
  .tg-ha { grid-area: ha; padding: 2px 8px; }
  .tg-vs { grid-area: vs; }
  .tg-ticket { grid-area: ticket; }
}

/* ---------- 팝업·전시 페이지 (popup.html) ---------- */
.pop-reserve { margin: 18px 0; }
.pop-chips { align-items: center; }
.pop-chip-label { font-size: 12px; font-weight: 700; color: var(--muted); width: 34px; flex: none; }
.pop-filters { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 22px; }
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pop-card { position: relative; padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pop-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-right: 40px; }
.pop-icon { font-size: 18px; line-height: 1; }
.pop-area { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 8px; border-radius: 999px; }
.pop-area:hover { color: var(--text); }
.pop-sts { display: inline-flex; gap: 4px; }
.pop-st { font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.pop-st.now { background: var(--c-etc-bg); color: var(--c-etc); }
.pop-st.soon { background: var(--c-period-bg); color: var(--c-period); }
.pop-st.end { background: var(--c-gen-bg); color: var(--c-gen); }
.tag-hot { background: var(--c-pre-bg); color: var(--c-pre); }
.pop-card h3 { font-size: 16px; font-weight: 800; line-height: 1.35; margin: 2px 0; overflow-wrap: anywhere; }
.pop-title:hover { text-decoration: underline; }
.pop-line { margin: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.pop-open { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pop-open .cd { font-weight: 800; color: var(--c-pre); font-variant-numeric: tabular-nums; }
.pop-rel { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--c-show); background: var(--c-show-bg); padding: 7px 10px; border-radius: 10px; overflow-wrap: anywhere; }
.pop-rel:hover { filter: brightness(.97); }
.pop-card .fav-btn.on-card { top: 12px; right: 12px; background: var(--surface-2); color: var(--muted); }
.pop-card .fav-btn.on-card.on { background: var(--brand-soft); color: var(--brand); }
.pop-foot { margin-top: 20px; }

/* ---------- 공연날 같이 들르기 (event.html) ---------- */
.route { margin-top: 18px; }
.route-days { margin-bottom: 10px; }
.route-list { list-style: none; margin: 12px 0; padding: 0; position: relative; }
.route-list::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 18px; border-left: 2px dashed var(--line); }
.route-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.route-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 2px; background: var(--surface-2); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); position: relative; z-index: 1; }
.route-dot.before { background: var(--c-etc); }
.route-dot.after { background: var(--c-period); }
.route-dot.tight { background: var(--c-pre); }
.route-dot.off { background: var(--line); }
.route-dot.goal { background: var(--brand); box-shadow: 0 0 0 2px var(--brand); font-size: 10px; display: grid; place-items: center; }
.route-item.goal { padding-bottom: 0; align-items: center; }
.route-body { min-width: 0; flex: 1; }
.route-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.route-title { font-weight: 800; overflow-wrap: anywhere; }
.route-title:hover { text-decoration: underline; }
.route-body p { margin: 2px 0; }
.route-time { font-size: 13.5px; font-weight: 700; }
.route-time.before { color: var(--c-etc); }
.route-time.after { color: var(--c-period); }
.route-time.tight { color: var(--c-pre); }
.route-time.off { color: var(--muted); font-weight: 600; }
.tag-rel { background: var(--c-show-bg); color: var(--c-show); }
@media (max-width: 720px) {
  .pop-grid { grid-template-columns: 1fr; }
}

/* ---------- 팝업 달력 (popup.html) ---------- */
.pop-cal { margin: 4px 0 28px; }
.pop-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.pop-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pc-close { font-size: 10.5px; font-weight: 800; color: var(--c-gen); padding-left: 4px; }

/* ---------- 운영 기간 달력 (popup.html) ---------- */
.pop-tl { margin: 0 0 28px; --tl-name: 210px; }
.pop-tl .block-head { margin-bottom: 8px; }
.tl-legend { margin-bottom: 14px; }
.tl-key { display: inline-block; width: 18px; height: 8px; border-radius: 4px; }
.tl-key.pop { background: var(--c-period); }
.tl-key.exh { background: var(--c-show); }
.tl-key.ending { background: var(--c-gen); }
.tl-key.soon { background: var(--c-period-bg); box-shadow: inset 0 0 0 1.5px var(--c-period); }
.tl-key.today { width: 2px; height: 12px; background: var(--brand); border-radius: 1px; }
.tl-head-row, .tl-row { display: grid; grid-template-columns: var(--tl-name) 1fr; gap: 0 12px; align-items: center; }
.tl-days, .tl-track, .tl-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.tl-days span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; line-height: 20px; }
.tl-days .sun { color: var(--sun); } .tl-days .sat { color: var(--sat); }
.tl-days .today { color: #fff; background: var(--brand); border-radius: 6px; }
.tl-body { position: relative; }
.tl-cols { position: absolute; top: 0; bottom: 0; left: calc(var(--tl-name) + 12px); right: 0; pointer-events: none; }
.tl-cols span { border-left: 1px solid var(--line); }
.tl-cols span:first-child { border-left: 0; }
.tl-cols .sun, .tl-cols .sat { background: var(--surface-2); }
.tl-cols .today { background: linear-gradient(var(--brand), var(--brand)) center / 2px 100% no-repeat; }
.tl-row { position: relative; padding: 7px 0; border-top: 1px solid var(--line); min-width: 0; }
.tl-row:hover .tl-name b { text-decoration: underline; }
.tl-name { display: flex; flex-direction: column; min-width: 0; }
.tl-name b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; z-index: 1; }
.tl-bar { height: 22px; border-radius: 11px; font-size: 11px; font-weight: 800; line-height: 22px; padding: 0 8px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-bar.pop { background: var(--c-period); }
.tl-bar.exh { background: var(--c-show); }
.tl-bar.ending { background: var(--c-gen); }
.tl-bar.soon { background: var(--c-period-bg); color: var(--c-period); box-shadow: inset 0 0 0 1.5px var(--c-period); }
.tl-bar.exh.soon { background: var(--c-show-bg); color: var(--c-show); box-shadow: inset 0 0 0 1.5px var(--c-show); }
.tl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%); padding-left: 12px; }
.tl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.tl-bar.cut-l.cut-r { clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.pop-tl .empty { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .pop-tl { --tl-name: 0px; }
  .tl-head-row, .tl-row { grid-template-columns: 1fr; gap: 3px; }
  .tl-head-row .tl-name { display: none; }
  .tl-cols { left: 0; }
  .tl-cols span { border-left: 0; }
  .tl-name { flex-direction: row; align-items: baseline; gap: 6px; position: relative; z-index: 1; }
  .tl-name small { flex: 1; }
  .tl-bar { height: 18px; line-height: 18px; font-size: 10.5px; padding: 0 6px; }
}

/* ===== 첫 화면: 분야 고르기 + 분야 탭 ===== */
#pick[hidden], #tabView[hidden], .hero-btn[hidden], .period-tl[hidden], .section-head[hidden] { display: none; }
.period-tl { margin-top: 20px; margin-bottom: 0; }
.pick { padding-top: 32px; padding-bottom: 56px; }
.pick-title { font-size: 20px; font-weight: 800; margin: 0 0 16px; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pick-tile {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 190px; padding: 24px; border-radius: 20px; color: #fff;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.pick-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(17, 24, 39, .18); }
.pick-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.pt-idol     { background: linear-gradient(135deg, #ff4f9a 0%, #9b3cff 100%); }
.pt-sports   { background: linear-gradient(135deg, #1fbf75 0%, #0f7a5a 100%); }
.pt-overseas { background: linear-gradient(135deg, #3a8dff 0%, #2546c9 100%); }
.pt-show     { background: linear-gradient(135deg, #ff8a3d 0%, #e0482a 100%); }
.pt-anime    { background: linear-gradient(135deg, #6366f1 0%, #312e81 100%); }
.pt-expo     { background: linear-gradient(135deg, #14b8a6 0%, #0f5c66 100%); }
.pt-today    { background: linear-gradient(135deg, #3a8dff 0%, #2546c9 100%); }
.pt-stage    { background: linear-gradient(135deg, #e11d74 0%, #7e1d4f 100%); }
.pick-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; z-index: 1; }
.pick-text strong { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.pick-desc { font-size: 14px; opacity: .92; }
.pick-stat { margin-top: 8px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; align-self: flex-start; }
.pick-stat:empty { display: none; }
.pick-art { width: 130px; height: 130px; flex: none; transition: transform .2s; }
.pick-tile:hover .pick-art { transform: rotate(-4deg) scale(1.05); }

@media (max-width: 720px) {
  .pick { padding-top: 20px; padding-bottom: 40px; }
  .pick-grid { gap: 10px; }
  .pick-tile { min-height: 150px; padding: 16px; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; border-radius: 16px; }
  .pick-text strong { font-size: 22px; }
  .pick-desc { font-size: 12px; }
  .pick-stat { font-size: 11.5px; padding: 3px 9px; margin-top: 4px; }
  .pick-art { width: 64px; height: 64px; }
}

/* 모아보기 검색 */
.dir-search { width: 100%; max-width: 560px; height: 46px; }
.dir-search input { font-size: 16px; }
.dir-results { display: flex; flex-direction: column; gap: 16px; }
.dir-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.dir-top .crumbs { margin: 0; }
.dir-top .dir-search { max-width: 320px; height: 40px; }
.dir-top .dir-search input { font-size: 14px; }
@media (max-width: 720px) {
  .dir-top .dir-search { max-width: none; }
}

/* ===== 제보·문의 게시판 (board.html) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.board-page { max-width: 1080px; }
.bd-banner { padding: 10px 14px; border-radius: 12px; background: var(--c-period-bg); color: var(--text); font-size: 14px; }
.bd-banner.warn { background: var(--c-pre-bg); }
.bd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bd-head h1 { font-size: 28px; font-weight: 800; margin: 0 0 6px; }
.bd-head p { margin: 0; }
.bd-head .btn-primary { flex: none; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.bd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.bd-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bd-filters { display: flex; flex-direction: column; gap: 10px; }
.bd-filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bd-search { min-width: 0; flex: 1; max-width: 320px; }
.bd-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.bd-post + .bd-post { border-top: 1px solid var(--line); }
.bd-post-head { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; padding: 14px 18px; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.bd-post-head:hover, .bd-post.open .bd-post-head { background: var(--surface-2); }
.bd-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.bd-cat, .bd-status, .bd-admin { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bd-cat { background: var(--surface-2); color: var(--muted); }
.bd-post.open .bd-cat { background: var(--surface); }
.st-open { background: var(--c-auth-bg); color: var(--c-auth); }
.st-checking { background: var(--c-pre-bg); color: var(--c-pre); }
.st-done { background: var(--c-etc-bg); color: var(--c-etc); }
.st-rejected { background: var(--surface-2); color: var(--muted); }
.bd-admin { background: var(--brand-soft); color: var(--brand); }
.bd-title { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.bd-meta { overflow-wrap: anywhere; }
.bd-replied { color: var(--brand); font-weight: 700; }
.bd-detail { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.bd-detail p { margin: 0; }
.bd-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 15px; }
.bd-event { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: inherit; max-width: 100%; overflow-wrap: anywhere; }
.bd-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bd-del { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); }
.bd-delform { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bd-delform input { width: 120px; }
.bd-reply { padding: 12px 14px; border-radius: 12px; background: var(--surface); border-left: 3px solid var(--brand); }
.bd-reply-head, .bd-c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.bd-c-head .bd-del, .bd-c-head .bd-delform { margin-left: auto; }
.bd-comments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bd-comments:empty { display: none; }
.bd-comments li { padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.bd-comments .bd-body { font-size: 14px; }
.bd-form input:not([type=radio]), .bd-form textarea, .bd-cform input, .bd-cform textarea, .bd-delform input {
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; min-width: 0; width: 100%;
}
.bd-form input:focus, .bd-form textarea:focus, .bd-cform input:focus, .bd-cform textarea:focus, .bd-delform input:focus { outline: 0; border-color: var(--brand); }
.bd-form textarea, .bd-cform textarea { resize: vertical; line-height: 1.6; }
.bd-cform { display: flex; flex-direction: column; gap: 8px; }
.bd-cform .btn-ghost, .bd-delform .btn-ghost { height: 40px; border-radius: 10px; flex: none; }
.bd-form { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.bd-form-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bd-form-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.bd-form p { margin: 0; }
.bd-cats { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.bd-cat-opt { cursor: pointer; }
.bd-cat-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bd-cat-opt:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }
.bd-cat-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.bd-field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 700; min-width: 0; }
.bd-field em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }
.bd-row { display: flex; gap: 10px; }
.bd-row > * { flex: 1; min-width: 0; }
.bd-cform .bd-row > .btn-ghost { flex: none; }
.bd-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bd-error { color: var(--live); font-weight: 700; font-size: 14px; }
.bd-actions { display: flex; justify-content: flex-end; }
.bd-more { display: flex; justify-content: center; }
.bd-more .btn-ghost { height: 40px; border-radius: 10px; }
.bd-guide { padding: 18px 20px; position: sticky; top: 140px; }
.bd-guide h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.bd-guide ol { margin: 0 0 10px; padding-left: 18px; line-height: 1.7; }
.bd-guide p { margin: 0; line-height: 1.6; }
@media (max-width: 860px) {
  .bd-layout { grid-template-columns: 1fr; }
  .bd-guide { position: static; order: -1; }
}
@media (max-width: 560px) {
  .bd-head h1 { font-size: 23px; }
  .bd-head .btn-primary { width: 100%; }
  .bd-row { flex-direction: column; }
  .bd-cform .bd-row { flex-direction: row; flex-wrap: wrap; }
  .bd-cform .bd-row > input { flex: 1 1 40%; }
  .bd-search { max-width: none; flex-basis: 100%; }
  .bd-post-head { padding: 13px 14px; }
  .bd-detail { padding: 4px 14px 14px; }
  .bd-form { padding: 16px; }
}

/* 오늘 티켓 오픈 탭: 시각 칸·이미 열린 예매·내일 미리 보기 */
.date-box.time-box .d { font-size: 19px; letter-spacing: -.02em; }
.open-row.done { opacity: .72; }
.open-row.done:hover { opacity: 1; }
.today-next { margin-top: 28px; }
.today-next-title { margin: 0 2px 10px; font-size: 17px; font-weight: 800; }
@media (max-width: 720px) {
  .date-box.time-box .d { font-size: 16px; }
}
/* 오늘 탭: 업데이트 머리 (제목 + 전체/새로 추가/정보 수정) */
.upd-head { margin: 8px 0 12px; align-items: flex-end; flex-wrap: wrap; gap: 10px; } /* 바로 아래 필터와 붙여 둠 */
.upd-head h2 { margin: 0 0 4px; }
.upd-head p { margin: 0; }
.upd-kinds .seg span { font-size: 12px; opacity: .7; }
.upd-kinds .seg:disabled { opacity: .4; cursor: default; }

/* ----- 공연 상세: 장소 지도 카드 (직접 그린 지도 그림 + 장소 이름 → 네이버 지도) ----- */
.map-card {
  --m-land: #eef1e8; --m-park: #d6ebc9; --m-water: #c6e2f5; --m-block: #e2e5dc; --m-road: #ffffff; --m-main: #ffe08a;
  display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.map-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.map-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.map-art { display: block; aspect-ratio: 320 / 150; background: var(--m-land); }
.map-art svg { display: block; width: 100%; height: 100%; }
.m-land { fill: var(--m-land); } .m-park { fill: var(--m-park); } .m-water { fill: var(--m-water); } .m-block { fill: var(--m-block); }
.m-road { fill: none; stroke: var(--m-road); stroke-width: 7; }
.m-road.m-main { stroke: var(--m-main); stroke-width: 9; }
.m-pin path { fill: var(--brand); stroke: #fff; stroke-width: 3; }
.m-pin .m-dot { fill: #fff; }
.m-pin .m-shadow { fill: rgba(0,0,0,.18); }
.map-card:hover .m-pin { transform: translate(189px, 26px); }
.m-pin { transition: transform .2s; }
.map-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.map-info strong { font-size: 15px; font-weight: 800; color: var(--text); }
.map-addr { font-size: 12.5px; color: var(--muted); }
.map-go { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand); }
.map-card + .side-links { margin-top: 12px !important; }
:root[data-theme="dark"] .map-card { --m-land: #1d2433; --m-park: #1f3a2c; --m-water: #173350; --m-block: #262e40; --m-road: #39425a; --m-main: #6b5a2a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-card { --m-land: #1d2433; --m-park: #1f3a2c; --m-water: #173350; --m-block: #262e40; --m-road: #39425a; --m-main: #6b5a2a; }
}
@media (prefers-reduced-motion: reduce) { .m-pin, .map-card { transition: none; } .map-card:hover .m-pin { transform: translate(189px, 30px); } }
