/* gachaplan main styles */
:root {
  --bg:        #0b0b11;
  --bg-elev:   #14141c;
  --bg-card:   #1a1a24;
  --bg-cell:   #14141c;
  --bg-cell-2: #0f0f17;
  --border:    #23232f;
  --border-soft: #1c1c26;
  --text:      #ECECF1;
  --text-dim:  #8a8a9a;
  --text-mute: #5a5a6a;
  --accent:    #7c6af7;
  --accent-2:  #a394ff;

  --cat-ingame:    #7c6af7;
  --cat-offline:   #f7886a;
  --cat-broadcast: #6ab4f7;
  --cat-release:   #6af7a0;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 24px rgba(0,0,0,0.35);

  /* hero card surface — pulled out so light mode can override */
  --hcard-bg-top:    #1a1a24;
  --hcard-bg-bot:    #15151e;
  --cell-bg:         #14141c;
  --cell-bg-dim:     #0f0f17;
  --nav-bg:          rgba(11,11,17,0.85);
  --month-grid-bg:   #11111a;
  --filter-bg-top:   #13131c;
  --filter-bg-bot:   #10101a;
  --pill-bg:         #16161e;
  --btn-bg:          #16161e;
  --chip-active-bg:  #1d1d2a;
  --evt-cell-bg:     #14141c;
  --img-stripe:      rgba(255,255,255,0.05);
  --img-label:       rgba(255,255,255,0.32);
  --scrollbar:       #2a2a36;
  --scrollbar-hover: #353544;
  --color-scheme:    dark;
}

:root[data-theme="light"] {
  --bg:        #f6f6f9;
  --bg-elev:   #ffffff;
  --bg-card:   #ffffff;
  --bg-cell:   #ffffff;
  --bg-cell-2: #f1f1f6;
  --border:    #dcdce3;
  --border-soft: #e7e7ee;
  --text:      #15151c;
  --text-dim:  #5d5d6a;
  --text-mute: #95959f;
  --accent:    #6a55e8;
  --accent-2:  #8c7afc;

  --cat-ingame:    #6a55e8;
  --cat-offline:   #e8714e;
  --cat-broadcast: #4f9be8;
  --cat-release:   #2da66d;

  --hcard-bg-top:    #ffffff;
  --hcard-bg-bot:    #fbfbfd;
  --cell-bg:         #ffffff;
  --cell-bg-dim:     #f4f4f8;
  --nav-bg:          rgba(246,246,249,0.85);
  --month-grid-bg:   #fbfbfd;
  --filter-bg-top:   #fbfbfd;
  --filter-bg-bot:   #f3f3f8;
  --pill-bg:         #ffffff;
  --btn-bg:          #ffffff;
  --chip-active-bg:  #f0edff;
  --evt-cell-bg:     #ffffff;
  --img-stripe:      rgba(0,0,0,0.04);
  --img-label:       rgba(0,0,0,0.35);
  --scrollbar:       #d0d0d8;
  --scrollbar-hover: #b8b8c2;
  --color-scheme:    light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }

button { font-family: inherit; cursor: pointer; }

.mono {
  font-family: "Oxanium", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.display {
  font-family: "Oxanium", "Pretendard", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== App shell ===== */
.app {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -200px, rgba(124,106,247,0.10), transparent 60%),
    radial-gradient(800px 400px at -10% 10%, rgba(106,180,247,0.05), transparent 60%),
    var(--bg);
}

/* ===== 공지 바 ===== */
.notice-bar {
  width: 100%;
  padding: 7px 32px;
  background: color-mix(in oklab, var(--accent) 15%, var(--bg-card));
  border-bottom: none;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s;
}
.notice-bar:hover {
  background: color-mix(in oklab, var(--accent) 22%, var(--bg-card));
  color: var(--text);
}

/* ===== 업데이트 내역 모달 ===== */
.changelog-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  width: 480px;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.changelog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.changelog-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.changelog-body {
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scrollbar-width: none;
}
.changelog-body::-webkit-scrollbar { display: none; }
.changelog-entry-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.changelog-date {
  font-size: 11.5px;
  color: var(--text-mute);
  flex: 0 0 auto;
}
.changelog-entry-title {
  font-size: 14px;
  font-weight: 600;
}
.changelog-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.changelog-list li {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.changelog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--border-soft);
  flex: 0 0 auto;
}

/* ===== 검색 모달 ===== */
.search-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  width: 860px;
  max-width: 96vw;
  height: 420px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.search-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.search-icon { color: var(--text-mute); flex: 0 0 auto; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-mute); }
.search-close { position: static; }
.search-results-wrap {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}
.search-result-count {
  padding: 10px 18px 6px;
  font-size: 11.5px;
  color: var(--text-mute);
}
.search-result-count--mute {
  padding: 20px 18px;
  text-align: center;
  font-size: 13px;
}
.search-results { display: flex; flex-direction: column; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  height: 56px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.1s;
  box-sizing: border-box;
}
.search-result-item:hover { background: var(--bg-hover); }
.sri--no-link { cursor: default; opacity: 0.45; }
.sri--no-link:hover { background: none; }
.search-result-filler {
  height: 56px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.search-result-filler:last-child { border-bottom: none; }
.search-result-filler--blank { border-bottom: none; }
.sri-left { flex: 0 0 auto; }
.sri-gico { width: 32px !important; height: 32px !important; border-radius: 8px !important; }
.sri-body { flex: 1; min-width: 0; }
.sri-title { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.sri-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.sri-type {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: var(--accent);
}
.sri-tag { font-size: 11px; color: var(--text-mute); }
.sri-date { font-size: 11px; color: var(--text-mute); }
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--border-soft);
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.pg-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
}
.pg-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
.pg-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.search-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px 14px;
  flex: 0 0 auto;
  min-height: 52px;
}
.search-pagination--visible {
  border-top: 1px solid var(--border-soft);
}

/* 검색 모달 게임 필터 사이드바 */
.search-game-sidebar {
  width: 196px;
  flex: 0 0 196px;
  border-left: 1px solid var(--border-soft);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
}
.sgs-scroll {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 264px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
.sgs-heading {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 4px 8px 8px;
}
.sgame-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background .1s, color .1s;
  width: 100%;
}
.sgame-chip:hover {
  background: color-mix(in oklab, var(--text) 6%, transparent);
  color: var(--text);
}
.sgame-chip.active {
  background: color-mix(in oklab, var(--gc, var(--accent)) 14%, var(--bg-card));
  border-color: color-mix(in oklab, var(--gc, var(--accent)) 40%, transparent);
  color: var(--text);
}
.sgs-gico {
  width: 26px !important;
  height: 26px !important;
  border-radius: 7px !important;
  flex: 0 0 auto;
}
.sgs-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 20px 0 22px;
  margin-top: 48px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mute);
}
.footer-disclaimer {
  font-size: 11.5px;
  color: var(--text-mute);
  opacity: 0.7;
}
.footer-logo {
  font-family: "Oxanium", monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.footer-divider { opacity: 0.4; }

.fchip-new-gico {
  display: flex; align-items: center; justify-content: center;
  font-family: "Oxanium", monospace; font-size: 8px; font-weight: 800;
  color: #6af7a0; letter-spacing: 0.03em;
}

/* ===== Header ===== */
.nav {
  height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 30;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: "Oxanium", sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.logo-mark {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 11px;
}
.logo .dot { color: var(--accent); }

.nav-menu { display: flex; gap: 4px; }
.nav-menu a {
  color: var(--text-dim); text-decoration: none;
  font-size: 15px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px;
  white-space: nowrap;
}
.nav-menu a.active { color: var(--text); background: color-mix(in oklab, var(--text) 8%, transparent); }
.nav-menu a:hover { color: var(--text); }

.nav-right { display: flex; gap: 8px; align-items: center; }

.btn {
  height: 36px; padding: 0 14px;
  border-radius: 9px;
  border: 2.5px solid var(--border);
  background: var(--btn-bg);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.btn:hover { background: color-mix(in oklab, var(--text) 8%, transparent); border-color: var(--border); }
.btn.primary {
  background: var(--accent); border-color: transparent; color: #0b0b11;
  font-weight: 600;
}
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; }

/* ===== Nav user (logged-in) ===== */
.nav-user {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 9px; border: 2.5px solid var(--border);
  background: transparent; cursor: default;
  transition: background 0.15s;
}
.nav-avatar {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #0b0b11;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-family: "Oxanium", monospace;
  flex: 0 0 auto;
}
.nav-avatar--img { border-radius: 7px; width: 26px; height: 26px; object-fit: cover; }
.nav-logout-btn { font-size: 13px; }

/* ===== Login modal ===== */
.fm--narrow { width: 250px; }
.login-body {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 24px 24px 28px;
}
.login-desc {
  font-size: 13.5px; color: var(--text-dim); text-align: center; line-height: 1.7;
  margin: 0;
}
.login-feature-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  width: 100%;
}
.login-feature-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text);
  background: color-mix(in oklab, var(--text) 4%, transparent);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.login-google-btn { display: flex; justify-content: center; }
.login-auto {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim); cursor: pointer; user-select: none;
}
.login-auto input[type="checkbox"] {
  appearance: none; width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--border-soft); background: transparent;
  cursor: pointer; flex-shrink: 0; position: relative; transition: all .15s;
}
.login-auto input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.login-auto input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 3px; top: 1px;
  width: 5px; height: 8px; border: 2px solid #fff;
  border-top: none; border-left: none; transform: rotate(40deg);
}

/* ===== Theme toggle ===== */
.theme-toggle {
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0 4px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center;
}
.tt-track {
  position: relative;
  width: 56px; height: 28px;
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex; align-items: center;
  transition: background .18s, border-color .18s;
}
.theme-toggle:hover .tt-track { border-color: color-mix(in oklab, var(--accent) 50%, var(--border)); }
.tt-icon {
  position: absolute;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--text-mute);
  pointer-events: none;
  transition: color .2s;
}
.tt-moon { left: 4px; }
.tt-sun  { right: 4px; }
.tt-track[data-state="dark"]  .tt-moon { color: var(--accent); }
.tt-track[data-state="light"] .tt-sun  { color: var(--accent); }
.tt-thumb {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  top: 50%;
  left: 3px;
  transform: translate(0, -50%);
  transition: left .22s cubic-bezier(.4,.0,.2,1), background .18s, border-color .18s;
  pointer-events: none;
}
.tt-track[data-state="light"] .tt-thumb { left: calc(100% - 22px - 3px); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4a4658, #2a2832);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #cdc6e0;
  border: 1px solid var(--border);
}

/* ===== Hero — 진행 중 ===== */
.hero {
  padding: 28px 32px 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.hero-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
}
.hero-title {
  font-size: 13px; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600;
}
.hero-title b {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--cat-ingame);
  margin-right: 8px; vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(124,106,247,0.25);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(124,106,247,0.25); }
  50%     { box-shadow: 0 0 0 6px rgba(124,106,247,0.05); }
}
.hero-sub { color: var(--text-mute); font-size: 12.5px; }

.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.hcard {
  position: relative;
  background: linear-gradient(180deg, var(--hcard-bg-top) 0%, var(--hcard-bg-bot) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 16px 16px 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    "top    img"
    "name   img"
    "period img"
    "count  img";
  column-gap: 14px;
  row-gap: 8px;
  min-height: 176px;
  word-break: keep-all;
  transition: border-color .15s, transform .15s;
}
.hcard-top    { grid-area: top; min-width: 0; }
.hcard-name   { grid-area: name; align-self: start; min-width: 0; }
.hcard-period { grid-area: period; align-self: start; min-width: 0; }
.hcard .countdown { grid-area: count; align-self: start; min-width: 0; }

.hcard-top {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}
.hcard-tag {
  flex: 0 0 auto;
  font-size: 10.5px; font-weight: 600;
  padding: 3px 7px; border-radius: 5px;
  background: color-mix(in oklab, var(--c) 22%, transparent);
  color: var(--c);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.hcard-game {
  font-size: 12px; color: var(--text-dim); font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.hcard-name {
  font-size: 16.5px; font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hcard-period {
  font-size: 11.5px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hcard-period .tilde { color: var(--text-mute); margin: 0 3px; }

/* Countdown — compact, no labels */
.countdown {
  display: flex; align-items: baseline; gap: 4px;
  white-space: nowrap;
}
.cd-unit { display: inline-flex; align-items: baseline; gap: 2px; }
.cd-num  { font-family: "Oxanium", sans-serif; font-weight: 700;
           font-size: 19px; line-height: 1; color: var(--text);
           letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cd-lbl  { font-size: 9.5px; color: var(--text-mute); font-family: "Pretendard"; font-weight: 500; }
.cd-sep  { color: var(--text-mute); font-size: 14px; margin: 0 1px; transform: translateY(-2px); }

.hcard-img {
  grid-area: img;
  position: relative;
  align-self: center;
  justify-self: end;
  width: 144px;
  height: 144px;
  border-radius: 10px;
  background:
    linear-gradient(135deg,
      color-mix(in oklab, var(--gc) 18%, var(--cell-bg)) 0%,
      color-mix(in oklab, var(--c)  10%, var(--cell-bg)) 100%);
  border: 1px solid color-mix(in oklab, var(--gc) 22%, var(--border));
  overflow: hidden;
  display: grid; place-items: center;
  z-index: 1;
}
.hcard-img .img-stripes { position: absolute; inset: 0; }
.hcard-img .img-label {
  font-size: 9.5px;
  color: var(--img-label);
  letter-spacing: 0.22em;
  font-weight: 500;
  z-index: 1;
}
.hcard:hover { border-color: var(--text-mute); transform: translateY(-1px); }
.hcard::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c, var(--accent));
}
.hcard-blob {
  position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c, var(--accent)) 0%, transparent 65%);
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}
.hcard-top { display: flex; align-items: center; gap: 10px; }
.hcard-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
  background: color-mix(in oklab, var(--c) 22%, transparent);
  color: var(--c);
  letter-spacing: 0.02em;
}
.hcard-game {
  font-size: 12.5px; color: var(--text-dim); font-weight: 500;
}
.countdown {
  display: flex; align-items: end; gap: 8px;
  font-family: "Oxanium", sans-serif;
  font-weight: 700;
}
.cd-unit { display: flex; align-items: baseline; gap: 3px; }
.cd-num { font-size: 22px; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.cd-lbl { font-size: 11px; color: var(--text-dim); font-weight: 500; font-family: "Pretendard"; }
.cd-sep { color: var(--text-mute); font-size: 18px; transform: translateY(-2px); }
.cd-end {
  margin-left: auto;
  font-size: 11.5px; color: var(--text-mute);
  font-family: "Oxanium", monospace;
}

/* ===== Year / Month ===== */
.controls {
  padding: 24px 0 8px;
  display: grid; gap: 14px;
}
.year-row {
  display: flex; align-items: center; gap: 16px;
}
.year-nav { display: flex; align-items: center; gap: 6px; }
.year-nav button {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: grid; place-items: center;
}
.year-nav button:hover { background: color-mix(in oklab, var(--text) 8%, transparent); color: var(--text); }
.year-label {
  font-family: "Oxanium", sans-serif;
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 110px; text-align: center;
}
.today-pill {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px;
  border-radius: 8px;
  background: var(--btn-bg);
  border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-dim);
  white-space: nowrap;
}
.today-pill .pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.month-tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.month-tabs::-webkit-scrollbar { display: none; }
.month-tab {
  flex: 1; min-width: 64px;
  height: 38px;
  background: transparent;
  border: none; color: var(--text-dim);
  font-size: 13.5px; font-weight: 500;
  position: relative;
}
.month-tab:hover { color: var(--text); }
.month-tab.active { color: var(--text); font-weight: 600; }
.month-tab.active::after {
  content: ""; position: absolute;
  bottom: -3px; left: 16px; right: 16px;
  height: 2px; background: var(--accent);
  border-radius: 2px;
}
.month-tab .has-event {
  position: absolute; top: 8px; right: 18px;
  width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent);
}

/* ===== Game filter banner ===== */
.filter-row {
  margin: 14px 0 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--filter-bg-top) 0%, var(--filter-bg-bot) 100%);
  padding: 12px 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.filter-divider {
  width: 1px;
  align-self: stretch;
  margin: 4px 2px;
  background: var(--border-soft);
  flex: 0 0 auto;
}
.fchip.pinned {
  flex: 0 0 auto;
  /* visually identical otherwise — divider tells it apart */
}
.filter-viewport {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  /* exactly 8 chips: 8 × 76 + 7 × 4 = 636 */
  max-width: 636px;
  overflow: hidden;
}
.filter-row--wide .filter-viewport {
  /* 10 chips: 10 × 76 + 9 × 4 = 796 */
  max-width: 796px;
}
.filter-scroll {
  display: flex; gap: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: none;
}
.filter-scroll.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.filter-scroll.dragging .fchip { pointer-events: none; }
.filter-scroll .fchip { scroll-snap-align: start; }
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-nav {
  width: 32px; height: 56px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: grid; place-items: center;
  flex: 0 0 auto;
  transition: color .12s, background .12s, opacity .12s;
}
.filter-nav:hover:not(:disabled) {
  background: color-mix(in oklab, var(--text) 8%, transparent);
  color: var(--text);
}
.filter-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.fchip {
  flex: 0 0 auto;
  width: 76px;
  padding: 6px 4px 8px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-dim);
  transition: all .15s;
}
.fchip:hover { background: color-mix(in oklab, var(--text) 5%, transparent); color: var(--text); }
.fchip.active {
  background: var(--chip-active-bg);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(124,106,247,0.10);
}
.fchip.active .gico { transform: scale(1.04); }
.fchip--release.active { border-color: #6af7a0; box-shadow: 0 0 0 3px rgba(106,247,160,0.12); }
.fchip--release.active .gico { transform: scale(1.04); }

.gico img, .evt-dot img {
  width: 100%; height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.gico {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--gc, #333);
  display: grid; place-items: center;
  font-family: "Oxanium", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #0b0b11;
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 4px 12px rgba(0,0,0,0.3);
  transition: transform .15s;
}
.gico.all {
  background: linear-gradient(135deg, color-mix(in oklab, var(--text) 18%, var(--bg)) 0%, var(--bg-card) 100%);
  color: var(--text);
  border: 1px solid var(--border);
}
.gico.all svg { width: 22px; height: 22px; }
.fchip .fname {
  font-size: 11.5px; font-weight: 500;
  max-width: 70px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.filter-fade-l, .filter-fade-r {
  position: absolute; top: 0; bottom: 0; width: 24px;
  pointer-events: none;
  display: none; /* visibility no longer needed; mask handles fade */
}

.filter-active-count {
  display: none;
}


/* ===== Calendar grid ===== */
.cal-wrap {
  margin: 10px 0 40px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-cell-2);
}
.cal-head {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-soft);
  background: var(--month-grid-bg);
}
.cal-head > div {
  padding: 10px 12px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-mute);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(72px, auto);
}
.cell {
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 8px 6px;
  position: relative;
  background: var(--bg-cell);
  display: flex; flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.cell:nth-child(7n) { border-right: none; }
.cal-grid > .cell:nth-last-child(-n+7) { border-bottom: none; }
.cell.dim { background: var(--bg-cell-2); }
.cell.dim .cnum { color: var(--text-mute); }
.cell.today .cnum-wrap { color: var(--bg); }
.cell.today .cnum-wrap .cnum-bubble {
  background: var(--accent);
  color: #0b0b11;
}
.cnum-wrap {
  display: flex; align-items: center; gap: 6px;
  font-family: "Oxanium", sans-serif; font-weight: 600;
  font-size: 13px;
  margin-bottom: 2px;
}
.cnum-bubble {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
}
.cnum { padding-left: 2px; }
.cell.sun .cnum { color: #e25c5c; }
.cell.sat .cnum { color: #6ab4f7; }
.cell.dim.sun .cnum, .cell.dim.sat .cnum { opacity: 0.5; }

.evt-list { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: hidden; }
.evt {
  display: flex; align-items: center; gap: 6px;
  flex-direction: row-reverse;
  font-size: 11.5px;
  padding: 3px 6px;
  border-radius: 5px;
  background: color-mix(in oklab, var(--c) 14%, var(--cell-bg));
  color: var(--text);
  text-align: left;
  border: none;
  width: 100%;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 2px solid var(--c);
  transition: background .12s;
}
.evt:hover { background: color-mix(in oklab, var(--c) 26%, var(--cell-bg)); }
.evt .evt-dot {
  width: 14px; height: 14px; border-radius: 4px;
  background: var(--gc, #444);
  display: inline-grid; place-items: center;
  font-family: "Oxanium", sans-serif;
  font-size: 8.5px; font-weight: 800; color: #0b0b11;
  flex: 0 0 auto;
}
.evt .evt-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.evt--offline {
  border-top-style: dashed;
}


.evt-more {
  font-size: 10.5px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  padding: 1px 6px;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.1);
  border: none; text-align: left;
  cursor: pointer; border-radius: 4px;
  width: 100%;
}
.evt-more:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.18);
}
:root[data-theme="light"] .evt-more {
  color: var(--text-dim);
  background: color-mix(in oklab, var(--text-dim) 12%, transparent);
}
:root[data-theme="light"] .evt-more:hover {
  color: var(--text-base);
  background: color-mix(in oklab, var(--text-dim) 22%, transparent);
}

/* Selected day spotlight */
.cell.selected {
  background: linear-gradient(180deg, rgba(124,106,247,0.10) 0%, var(--bg-cell) 60%);
  outline: 1px solid rgba(124,106,247,0.5);
  outline-offset: -1px;
  z-index: 1;
}

/* ===== Legend + bottom row ===== */
.bottom-row {
  margin: 18px 32px 40px;
}

/* ===== Upcoming list ===== */
.upcoming {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--month-grid-bg);
  overflow: hidden;
}
.upcoming h3 {
  margin: 0; padding: 14px 18px 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.up-list { max-height: calc(100vh - 220px); overflow-y: auto; scrollbar-width: none; }
.up-list::-webkit-scrollbar { display: none; }
.up-item {
  display: grid;
  grid-template-columns: 56px 4px 1fr;
  gap: 10px; padding: 12px 18px;
  align-items: start;
  border-bottom: 1px solid var(--border-soft);
}
.up-item:last-child { border-bottom: none; }
.up-item:hover { background: var(--cell-bg); cursor: pointer; }
.up-date {
  font-family: "Oxanium", sans-serif;
  font-weight: 600;
}
.up-date .d { font-size: 18px; line-height: 1; }
.up-date .m { font-size: 10.5px; color: var(--text-mute); margin-top: 2px; }
.up-bar { width: 3px; border-radius: 2px; background: var(--c); height: 36px; align-self: center; }
.up-body { min-width: 0; }
.up-title {
  font-size: 13.5px; font-weight: 500;
  line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11.5px; color: var(--text-dim); }
.up-game { font-weight: 500; }
.up-tag {
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: color-mix(in oklab, var(--c) 22%, transparent);
  color: var(--c); font-weight: 600;
}
.up-dday {
  font-family: "Oxanium", monospace;
  font-size: 11px; color: var(--text-mute);
  margin-left: auto;
}
.anniv-item {
  display: grid;
  grid-template-columns: 30px 3px 1fr;
  gap: 10px;
  padding: 9px 14px;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.anniv-item:last-child { border-bottom: none; }
.anniv-item:hover { background: var(--cell-bg); }
.anniv-ico { display: flex; align-items: center; }

/* ===== Event detail popover ===== */
.popover-mask {
  position: fixed; inset: 0;
  background: rgba(5,5,10,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: grid; place-items: center;
  padding: 24px;
}
.popover {
  width: 540px; max-width: 100%;
  background: var(--cell-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.popover-head {
  padding: 18px 22px; position: relative;
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 22%, var(--bg-card)), var(--bg-card));
}
.popover-head::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c);
}
.popover h4 { margin: 8px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.popover-tagrow { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.popover-meta {
  padding: 16px 22px 20px;
  display: grid; gap: 8px;
  font-size: 13px; color: var(--text-dim);
}
.popover-meta .row { display: flex; gap: 12px; }
.popover-meta .k { width: 60px; color: var(--text-mute); font-size: 12px; }
.popover-meta .v { color: var(--text); }
/* 배너 이미지 */
.pop-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-cell-2);
  cursor: zoom-in;
}
.pop-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* YouTube 임베드 */
.pop-yt-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.pop-yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 오프라인 행사 전용 전체폭 버튼 */
.pop-offline-btn-wrap {
  padding: 12px 22px 16px;
  border-top: 1px solid var(--border-soft);
}
.pop-offline-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--c, var(--accent));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}
.pop-offline-btn:hover { opacity: 0.85; }

/* 하단 버튼 영역 */
.pop-foot {
  border-top: 1px solid var(--border-soft);
  padding: 12px 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pop-url-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--r);
  background: transparent;
  border: 1.5px solid var(--c, var(--accent));
  color: var(--c, var(--accent));
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.12s;
}
.pop-url-btn:hover { background: var(--c, var(--accent)); color: #fff; }
.pop-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r);
  background: #ff0000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.12s;
}
.pop-yt-btn:hover { background: #cc0000; }
.pop-prepay-btn { background: var(--accent); }
.pop-prepay-btn:hover { background: color-mix(in oklab, var(--accent) 80%, #000); }

/* D-day 뱃지 */
.pop-dday {
  margin-left: 10px;
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* 이벤트 설명 */
.pop-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.65;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 4px;
}
.pop-note {
  font-size: 13px;
  color: var(--text);
  line-height: 1.75;
  white-space: pre-line;
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.popover-close {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 8px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
  border: 1px solid transparent;
  color: var(--text-dim);
  display: grid; place-items: center;
}
.popover-close:hover { background: color-mix(in oklab, var(--text) 18%, transparent); color: var(--text); }

/* ===== density variants (tweak) ===== */
.app.dense .cal-grid { grid-auto-rows: minmax(96px, 1fr); }
.app.dense .hcard { min-height: 132px; padding: 14px 16px; }
.app.dense .filter-row { padding: 10px 8px; }
.app.dense .gico { width: 40px; height: 40px; }

/* ===== Page layout (행사 부스) ===== */
.page-header {
  padding: 36px 32px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.page-title {
  font-family: "Oxanium", sans-serif;
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.page-sub { font-size: 13px; color: var(--text-dim); margin: 0; }


/* 사이드바 공통 */
.sidebar-heading {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-mute);
  padding: 16px 16px 10px;
}

/* 신작 사이드바 */
.releases-sidebar {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--month-grid-bg);
  overflow: hidden;
}
.releases-list { display: flex; flex-direction: column; }
.release-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .12s;
}
.release-item:last-child { border-bottom: none; }
.release-item:hover { background: var(--bg-cell); }
.release-item.past { opacity: 0.45; }
.release-body { min-width: 0; flex: 1; }
.release-title {
  font-size: 12px; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.release-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; color: var(--text-mute); margin-top: 3px;
}
.release-dday { font-size: 10px; font-weight: 700; color: var(--accent); }

/* 행사 종류 사이드바 */
.booth-type-sidebar {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--month-grid-bg);
  overflow: hidden;
}
.booth-type-list { display: flex; flex-direction: column; padding: 6px 8px 10px; gap: 2px; }
.booth-type-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px;
  background: transparent; border: none;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
}
.booth-type-item:hover { background: color-mix(in oklab, var(--text) 8%, transparent); color: var(--text); }
.booth-type-item.active { background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.booth-type-name { flex: 1; }
.booth-type-count {
  font-size: 11px; font-weight: 600; color: var(--text-mute);
  background: color-mix(in oklab, var(--text) 8%, transparent);
  padding: 1px 7px; border-radius: 4px;
  font-family: "Oxanium", monospace;
}
.booth-type-item.active .booth-type-count {
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 15%, transparent);
}


/* 정렬 선택기 */
.sort-selector {
  display: flex;
  gap: 4px;
}
.sort-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-family: "Pretendard", sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.sort-btn:hover { background: var(--bg-cell); color: var(--text); }
.sort-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.sort-btn--bookmark {
  display: flex; align-items: center; gap: 4px;
  padding: 0 10px;
}
.sort-btn--bookmark.active {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  font-weight: 600;
}

/* 행사 부스 */
.booth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 10px 0 40px;
}
.booth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.booth-card { cursor: pointer; }
.booth-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.booth-card-accent { height: 4px; background: var(--gc); }
.booth-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.booth-top { display: flex; align-items: center; gap: 12px; }
.booth-info { flex: 1; min-width: 0; }
.booth-game { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.booth-live {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px;
  background: color-mix(in oklab, var(--cat-offline) 22%, transparent);
  color: var(--cat-offline);
  margin-top: 3px;
}
.booth-dday { font-size: 13px; font-weight: 700; color: var(--text-mute); }
.booth-ext-icon { color: var(--text-mute); flex: 0 0 auto; }
.booth-card--link:hover .booth-ext-icon { color: var(--accent); }
.booth-title { font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.booth-meta { display: flex; flex-direction: column; gap: 5px; }
.booth-meta-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); }
.booth-meta-row svg { flex: 0 0 auto; opacity: 0.6; }

/* ===== 3-column main layout ===== */
.main-body {
  display: grid;
  grid-template-columns: 260px 1fr 180px;
  gap: 0 20px;
  padding: 0 20px;
  align-items: start;
}
.main-center { min-width: 0; }
.sidebar-left {
  position: sticky;
  top: 76px;
  padding-top: 24px;
}
.sidebar-right {
  position: sticky;
  top: 76px;
  padding-top: 24px;
}
.side-card {
  position: relative;
  width: 180px;
  height: 270px;
  border-radius: var(--r);
  overflow: hidden;
  clip-path: inset(0 0 0 0 round var(--r));
  border: 1.5px solid rgb(231, 231, 238);
  cursor: pointer;
}
[data-theme="dark"] .side-card {
  border-color: rgb(28, 28, 28);
}
.side-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-card-img--dark { display: none; }
[data-theme="dark"] .side-card-img--light { display: none; }
[data-theme="dark"] .side-card-img--dark { display: block; }

.side-card-account {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 8, 20, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s;
}
.side-card--open .side-card-account {
  transform: translateY(0);
  opacity: 1;
}
.sca-bank {
  font-size: 11px;
  font-weight: 600;
  color: #f9e000;
  letter-spacing: 0.04em;
  font-family: "Pretendard", sans-serif;
}
.sca-number {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  font-family: "Oxanium", monospace;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
  text-align: center;
}
.sca-number:hover {
  background: rgba(255,255,255,0.16);
}
.sca-number--copied {
  background: rgba(106, 247, 160, 0.18) !important;
  border-color: rgba(106, 247, 160, 0.4) !important;
  color: #6af7a0 !important;
}
.sca-name {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  font-family: "Pretendard", sans-serif;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  width: 180px;
}
.sidebar-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  height: 60px;
  padding: 0 20px;
  border-radius: var(--r);
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 19px;
  font-weight: 500;
  font-family: "Pretendard", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.sidebar-action-btn:hover {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}

/* ============== 제보/건의/부스 폼 모달 ============== */
.fm-mask {
  position: fixed; inset: 0;
  background: rgba(5,5,10,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: grid; place-items: center;
  padding: 16px 24px 24px;
  padding-top: calc(64px + 16px);
  align-content: center;
}
.fm {
  width: 520px; max-width: 100%;
  max-height: calc(100vh - 64px - 40px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}
.fm--split { width: 600px; }
.fm-split-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.fm-split-wrap .fm-body { flex: 1; }
.fm-sidebar {
  width: 160px;
  flex: 0 0 160px;
  border-left: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  overflow: hidden;
}
.fm-game-sidebar { display: flex; flex-direction: column; height: 100%; }
.fm-game-sidebar-title {
  padding: 12px 12px 8px;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.fm-game-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
.fm-game-sidebar-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background .1s, color .1s, border-color .1s;
}
.fm-game-sidebar-btn:hover { background: var(--bg-card); color: var(--text); }
.fm-game-sidebar-btn.active {
  background: color-mix(in oklab, var(--fc, var(--accent)) 14%, var(--bg-card));
  border-color: color-mix(in oklab, var(--fc, var(--accent)) 40%, transparent);
  color: var(--text);
}
.fm-game-sidebar-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-elev);
  flex: 0 0 auto;
}
.fm-head-icon { color: var(--accent); display: flex; }
.fm-head-title-wrap { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fm-head-title { font-size: 15px; font-weight: 700; color: var(--text); }
.fm-head-err { font-size: 12px; color: var(--cat-offline, #f7886a); font-weight: 500; }
.fm-head-note { font-size: 12px; color: var(--text-mute); margin-right: 4px; white-space: nowrap; }
.fm-close {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: transparent; border: none;
  color: var(--text-mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.fm-close:hover { background: color-mix(in oklab, var(--text) 10%, transparent); color: var(--text); }
.fm-body {
  flex: 1; overflow-y: auto;
  padding: 20px 20px 0;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent;
}
.fm-field { display: flex; flex-direction: column; gap: 5px; }
.fm-field--grow { flex: 1; min-width: 0; }
.fm-row { display: flex; gap: 12px; }
.fm-label { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: 0.02em; }
.fm-req { color: var(--accent); }
.fm-section {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  padding: 4px 0 6px; margin-top: 4px;
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 20%, transparent);
}
.fm-section--opt {
  color: var(--text-mute);
  border-bottom-color: var(--border-soft);
  margin-top: 8px;
}
.fm-err-msg { font-size: 11px; color: #f85149; margin-top: 5px; }
.fm-chip-row--err { outline: 1px solid #f85149; border-radius: 8px; padding: 4px; }
.fm-input, .fm-select, .fm-textarea {
  background: var(--bg-cell);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 13.5px;
  font-family: "Pretendard", sans-serif;
  color: var(--text);
  width: 100%;
  transition: border-color .15s;
  box-sizing: border-box;
}
.fm-input:focus, .fm-select:focus, .fm-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.fm-textarea { resize: vertical; min-height: 80px; }
.fm-select { cursor: pointer; }
.fm-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 5px;
  border-radius: 99px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-dim); font-size: 12px; font-weight: 500;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.fm-chip:hover { background: var(--bg-cell); color: var(--text); }
.fm-chip.active {
  background: color-mix(in oklab, var(--fc, var(--accent)) 14%, var(--bg-card));
  border-color: color-mix(in oklab, var(--fc, var(--accent)) 50%, transparent);
  color: var(--text);
}
.fm-chip-ico { width: 18px !important; height: 18px !important; border-radius: 4px !important; flex: 0 0 auto; }
.fm-chip--icon {
  padding: 5px;
  border-radius: var(--r-sm);
}
.fm-chip--icon .fm-chip-ico { width: 30px !important; height: 30px !important; border-radius: 7px !important; }
.fm-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-seg-btn {
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border-soft);
  background: transparent; color: var(--text-dim);
  font-size: 12.5px; font-weight: 500;
  font-family: "Pretendard", sans-serif;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.fm-seg-btn:hover { background: var(--bg-cell); color: var(--text); }
.fm-seg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.fm-actions {
  position: sticky; bottom: 0;
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.fm-btn {
  height: 36px; padding: 0 18px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  font-family: "Pretendard", sans-serif;
  cursor: pointer; border: none;
  transition: background .12s, opacity .12s;
}
.fm-btn--cancel { background: var(--bg-cell); color: var(--text-dim); border: 1px solid var(--border-soft); }
.fm-btn--cancel:hover { background: var(--bg-elev); color: var(--text); }
.fm-btn--submit { background: var(--accent); color: #fff; }
.fm-btn--submit:hover { opacity: 0.88; }
.fm-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 48px 24px; text-align: center;
  color: var(--text-dim); font-size: 15px; line-height: 1.6;
  font-family: "Pretendard", sans-serif;
}

/* ── 제출 완료 카드 ─────────────────────────────── */
.fm-done {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 36px 32px 28px;
  width: 280px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center;
  animation: pop-in .18s ease;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
.fm-done-img {
  width: 150px; height: 150px;
  object-fit: contain;
}
.fm-done-title {
  font-size: 18px; font-weight: 700;
  margin-top: 4px;
}
.fm-done-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.7;
  margin-top: -6px;
}
.fm-done-btn {
  margin-top: 10px; width: 100%;
  padding: 10px;
}
.fm-hint-inline {
  font-size: 10.5px;
  color: var(--text-mute);
  font-weight: 400;
  margin-left: 5px;
  letter-spacing: 0.01em;
}
.fm-char-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-mute);
  font-family: "Oxanium", monospace;
}
.fm-char-count--over { color: #ef4444; }
.fm-img-drop {
  border: 1.5px dashed var(--border-soft);
  border-radius: var(--r-sm);
  height: 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; cursor: pointer;
  color: var(--text-mute); font-size: 12px;
  font-family: "Pretendard", sans-serif;
  transition: border-color .15s, background .15s;
  position: relative; overflow: hidden;
}
.fm-img-drop:hover { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 5%, transparent); color: var(--text-dim); }
.fm-img-drop--filled { border-style: solid; border-color: var(--border-soft); }
.fm-img-preview {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  position: absolute; inset: 0;
}
.fm-img-change {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff; font-size: 12px; font-weight: 600;
  opacity: 0; transition: opacity .15s;
}
.fm-img-drop--filled:hover .fm-img-change { opacity: 1; }

@media (max-width: 1280px) {
  .main-body { grid-template-columns: 260px 1fr; }
  .sidebar-right { display: none; }
}
@media (max-width: 960px) {
  .main-body { grid-template-columns: 1fr; padding: 0; }
  .sidebar-left { display: none; }
  .controls { padding: 24px 32px 8px; }
  .filter-row { margin: 14px auto 0; max-width: 960px; width: calc(100% - 64px); }
  .cal-wrap { margin: 10px 32px 40px; }
}

/* 팬 부스 사이드바 날짜 */
.fan-event-date {
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.booth-type-item.active .fan-event-date { color: var(--accent); opacity: 0.7; }

/* 팬 이벤트 헤더 */
.fan-event-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.fan-event-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fan-event-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.fan-event-venue {
  font-size: 11.5px;
  color: var(--text-dim);
}
.fan-event-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* 팬 부스 카드 그리드 */
.fan-booth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 10px 0 40px;
}
.fbc {
  background: var(--bg-card);
  cursor: pointer;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.fbc:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

/* 이미지 영역 */
.fbc-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  flex: 0 0 auto;
}
.fbc-img > img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.fbc-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.fbc-ph-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  opacity: 0.85;
}
.fbc-no {
  position: absolute;
  top: 9px; left: 9px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: "Oxanium", monospace;
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  letter-spacing: 0.04em;
}

/* 카드 본문 */
.fbc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.fbc-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fbc-like-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-mute);
  transition: color .12s, background .12s;
  flex: 0 0 auto;
}
.fbc-like-btn:hover { color: #ef4444; background: rgba(239,68,68,0.08); }
.fbc-like-btn.active { color: #ef4444; }
.fbc-like-count {
  font-size: 11px;
  font-weight: 600;
  font-family: "Oxanium", monospace;
}
.fbc-circle {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.fbc-artist {
  font-size: 13px;
  color: var(--text-dim);
}
.fbc-games {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.fbc-desc-inline {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fbc-links {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  margin-top: auto;
}
.fbc-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 6px;
}
.fbc-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  font-family: "Oxanium", sans-serif;
  font-size: 12px;
  transition: color .15s, background .15s;
}
.fbc-bookmark:hover { color: #f87171; background: rgba(248,113,113,0.08); }
.fbc-bookmark.active { color: #f87171; }
.fbc-bookmark.active svg { fill: #f87171; }
.fbc-likes { font-size: 12px; }

/* SNS 링크 */
.fbc-game-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.booth-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-size: 11.5px;
  color: var(--text-mute);
  transition: color 0.1s;
  cursor: pointer;
}
.booth-link:hover { color: var(--text); }
.booth-link svg { flex: 0 0 auto; opacity: 0.7; }
.fbc-prepay {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in oklab, var(--accent) 14%, var(--bg-card));
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  color: var(--accent);
  font-size: 11px; font-weight: 600;
  font-family: "Pretendard", sans-serif;
  text-decoration: none;
  transition: background .12s;
}
.fbc-prepay:hover { background: color-mix(in oklab, var(--accent) 22%, var(--bg-card)); }

/* 빈 부스 상태 */
.booth-empty {
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
}

@media (max-width: 1280px) {
  .fan-booth-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 동인 카드 행사 날짜 */
.fbc-event-date {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.03em;
  margin-top: -2px;
}

/* 이미지 라이트박스 */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.img-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--r);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.img-lightbox-close {
  position: fixed;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.12s;
}
.img-lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
