/* 프레임 시티: 도심 갤러리 웹사이트.
   흰 벽 같은 밝은 바탕에 검은 액자색 글씨, 강조는 사진 위 레일 조명의 호박색 하나.
   걸어 다니는 화면(캔버스)은 영상 플레이어처럼 늘 어두운 관람석에 놓는다.
   레이아웃: 위에 고정 메뉴 → 관람 화면 → 전시 카드 목록(로비) 또는 전시 정보·사진 목록(전시실) → 바닥글 */
@font-face { font-family: 'Galmuri11'; src: url('assets/fonts/v2/Galmuri11-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Galmuri11'; src: url('assets/fonts/v2/Galmuri11.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Galmuri9'; src: url('assets/fonts/v2/Galmuri9.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Galmuri14'; src: url('assets/fonts/v2/Galmuri14.woff2') format('woff2'); font-weight: 400; font-display: swap; }
/* 도트 글꼴은 원래 크기(갈무리11 = 12px, 갈무리9 = 10px)의 정수 배일 때 점이 또렷하다. 그래서 글자 크기를 12px(고해상도 화면은 6px도 됨) 단위로 맞춘다.
   round()를 모르는 브라우저는 바로 앞의 clamp() 크기를 쓴다.
   글꼴 파일은 assets/fonts/v2/ 에 둔다: 호스팅이 assets/** 를 7일 동안 캐시하므로 글자 묶음을 바꾸면 폴더 이름(v2 → v3)도 바꾼다 */

:root {
  --bg: #f5f4f1;          /* 갤러리 흰 벽 (살짝 따뜻한 회색) */
  --surface: #ffffff;
  --surface-2: #ecebe7;
  --line: #e0ded8;
  --line-2: #cfccc4;
  --fg: #16171b;          /* 액자 틀 검정 */
  --muted: #64636b;
  --accent: #d0902f;      /* 레일 조명 */
  --accent-ink: #8f5a12;  /* 밝은 바탕 위 강조 글씨 */
  --accent-soft: #f6e8d2;
  --on-fg: #fafaf7;       /* 검은 버튼 위 글씨 */
  --ok: #2f7d55; --ok-soft: #dff0e6;
  --warn: #9a6a10; --warn-soft: #f7ecd2;
  --bad: #b4453a; --bad-soft: #f8e1de;
  --chart: #b97a1f;       /* 통계 막대 (호박색 한 가지, 흰 바탕과 3:1 넘게) */
  --stage: #141519;       /* 관람 화면 바탕: 두 테마 모두 같은 어두운 관람석 */
  --stage-edge: #141519;
  --shadow: 0 1px 2px rgba(22, 23, 27, 0.06), 0 8px 24px rgba(22, 23, 27, 0.08);
  --scrim: rgba(14, 15, 18, 0.62);
  --pixel: 'Galmuri11', 'Apple SD Gothic Neo', 'Malgun Gothic', monospace;
  --body: 'Pretendard Variable', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1200px;
  --gnb-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121316; --surface: #1b1c21; --surface-2: #24252b; --line: #2c2e35; --line-2: #3a3c45;
    --fg: #f1f0ec; --muted: #a09fa8; --accent: #e3a64c; --accent-ink: #f0c070; --accent-soft: #3a2d1a; --on-fg: #16171b; --chart: #c88a2c;
    --ok: #6cc796; --ok-soft: #1c3328; --warn: #e8b85a; --warn-soft: #3a2f17; --bad: #ef8a7e; --bad-soft: #3d2120;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35); --scrim: rgba(6, 7, 9, 0.72); --stage-edge: #2c2e35;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121316; --surface: #1b1c21; --surface-2: #24252b; --line: #2c2e35; --line-2: #3a3c45;
  --fg: #f1f0ec; --muted: #a09fa8; --accent: #e3a64c; --accent-ink: #f0c070; --accent-soft: #3a2d1a; --on-fg: #16171b; --chart: #c88a2c;
  --ok: #6cc796; --ok-soft: #1c3328; --warn: #e8b85a; --warn-soft: #3a2f17; --bad: #ef8a7e; --bad-soft: #3d2120;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.35); --scrim: rgba(6, 7, 9, 0.72); --stage-edge: #2c2e35;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font: 15px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--surface); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px;
  font: 600 14px/1 var(--body); color: var(--on-fg); background: var(--fg); border: 1px solid var(--fg); border-radius: 10px;
  cursor: pointer; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: color-mix(in srgb, var(--fg) 86%, var(--bg)); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-fg); }
#btn-edit[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #16171b; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--fg);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }
.x-btn { flex: none; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; position: relative; color: var(--muted); }
.x-btn::before, .x-btn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.8px; background: currentColor; border-radius: 2px; }
.x-btn::before { transform: translate(-50%, -50%) rotate(45deg); }
.x-btn::after { transform: translate(-50%, -50%) rotate(-45deg); }
.x-btn:hover { background: var(--surface-2); color: var(--fg); }

/* ---------------------------------------------------------------- 상단 메뉴 */
.gnb { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.gnb-in { max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); height: var(--gnb-h); display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; flex: none; }
.logo-word { font: 700 18px/1 var(--pixel); letter-spacing: 0.02em; }
.logo-mark { display: inline-block; flex: none; width: 20px; height: 20px; background: var(--fg); box-shadow: inset 0 0 0 3px var(--fg), inset 0 0 0 6px var(--surface), inset 0 0 0 20px var(--accent); }
.gnb-nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-link { padding: 8px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--muted); white-space: nowrap; }
.nav-link:hover { color: var(--fg); background: var(--surface-2); }
.nav-link[aria-current='page'] { color: var(--fg); font-weight: 700; }
.nav-cta { display: none; }
.gnb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.me { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; max-width: 180px; }
.me:hover { background: var(--surface-2); }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-img { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); image-rendering: pixelated; object-fit: cover; object-position: top; flex: none; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { display: block; width: 16px; height: 1.8px; background: var(--fg); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.gnb.open .menu-btn span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.gnb.open .menu-btn span:nth-child(2) { opacity: 0; }
.gnb.open .menu-btn span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ---------------------------------------------------------------- 본문 틀 */
.page { max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 20px 8px; display: grid; gap: 56px; }
.eyebrow { margin: 0 0 6px; font: 700 12px/1.2 var(--pixel); letter-spacing: 0.18em; color: var(--accent-ink); }
.note { color: var(--muted); margin: 0; font-size: 14px; }
.msg { color: var(--accent-ink); font-size: 13px; margin: 0; min-height: 1em; }
.lbl { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0 0; }
kbd { display: inline-block; min-width: 1.6em; margin: 0 1px; padding: 1px 5px; font: 600 11px/1.5 var(--body); text-align: center; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; }

/* ---------------------------------------------------------------- 관람 화면 */
.viewer { display: grid; gap: 12px; min-width: 0; scroll-margin-top: calc(var(--gnb-h) + 12px); }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.vb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vb-titles { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; min-width: 0; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.crumb { min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.crumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.crumb-sep { color: var(--line-2); }
.vb-titles h1 { margin: 0; font: 700 clamp(20px, 2.4vw, 26px)/1.25 var(--body); letter-spacing: -0.01em; }
.scene-note { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.vb-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.stat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat b { font-weight: 600; }
.stat svg { flex: none; color: var(--muted); }
.live-stat { background: var(--ok-soft); color: var(--ok); }
.live-stat i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .live-stat i { animation: none; } }
.vb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stepper { display: inline-flex; align-items: center; gap: 6px; padding: 2px; }
.room-pos { min-width: 3.6em; text-align: center; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.mode-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; }
/* 주최자 알림 줄: 내 전시가 오늘 닫히거나 사흘 안에 지워질 때 */
.page-notes { display: grid; gap: 8px; margin-bottom: -28px; }
.page-notes:not(:has(> :not([hidden]))) { display: none; }
.host-notice { display: grid; gap: 8px; }
.hn-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--warn); background: var(--warn-soft); }
.hn-row.purge { border-color: var(--bad); background: var(--bad-soft); }
.hn-tag { padding: 1px 6px; border-radius: 3px; font: 400 12px/1.5 var(--pixel); white-space: nowrap; background: var(--warn); color: var(--surface); }
.hn-row.purge .hn-tag { background: var(--bad); }
.hn-text { margin: 0; font-size: 13.5px; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.hn-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) { .hn-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } .hn-tag { justify-self: start; } .hn-acts { justify-content: flex-start; } }

/* 꾸미기 패널 (전시 꾸미기를 켜면 전시실 바로 아래) */
.deco-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); min-width: 0; }
.dp-h { margin: 0; font-size: 17px; font-weight: 700; }
.dp-note { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.dp-body { display: grid; gap: 16px; min-width: 0; }
.dp-sec { display: grid; gap: 8px; min-width: 0; }
.dp-sec-h { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.dp-help { margin: 0; color: var(--muted); font-size: 13px; }
.dp-check { font-size: 14px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; width: 88px; padding: 8px 6px 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--muted); font: 500 12px/1.3 var(--body); text-align: center; cursor: pointer; }
.opt:hover { border-color: var(--line-2); color: var(--fg); }
.opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--accent); }
.opt canvas, .opt img { display: block; image-rendering: pixelated; border-radius: 6px; }
.opt.sq canvas { width: 64px; height: 64px; }
.opt.tall canvas { width: 44px; height: 66px; }
.opt.wide canvas { width: 72px; height: auto; }
.opt.door canvas { width: 66px; height: auto; }
.opt.light { width: 104px; }
.opt.light canvas { width: 90px; height: auto; }
.opt.deco img { height: 56px; width: auto; max-width: 100%; object-fit: contain; border-radius: 0; }
.opt.win canvas { width: 100%; max-width: 100px; height: auto; border-radius: 4px; }
.opt-tag { position: absolute; top: 4px; right: 4px; padding: 1px 5px; border-radius: 6px; background: var(--fg); color: var(--on-fg); font-size: 10px; font-weight: 600; }
.deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(84px, calc((100% - 24px) / 4)), 1fr)); gap: 8px; }
.deco-grid .opt { width: auto; }
.dp-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.dp-sel img, .dp-sel canvas { height: 34px; width: auto; image-rendering: pixelated; }
.dp-sel b { margin-right: auto; font-size: 14px; }
.dp-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); gap: 10px; }
.slot { display: grid; align-content: start; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
.slot:hover { border-color: var(--line-2); }
.slot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.slot[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.slot-pic { position: relative; display: block; }
.slot-pic canvas { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; }
.slot-num { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: 6px; background: rgba(22, 23, 27, 0.78); color: #fafaf7; font: 700 12px/1 var(--pixel); }
.slot[aria-pressed='true'] .slot-num { background: var(--accent); color: #16171b; }
.slot-text { display: grid; gap: 3px; padding: 0 2px 2px; }
.slot-text b { font-size: 14px; }
.slot-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.slot-mine { color: var(--accent-ink); font-size: 12px; font-weight: 600; }
@media (max-width: 520px) {
  .deco-panel { padding: 12px; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot-note { display: none; }
  .opt { width: calc((100% - 16px) / 3); }
}

.stage-wrap { position: relative; display: grid; place-items: center; min-height: 240px; background: var(--stage); border: 1px solid var(--stage-edge); border-radius: 16px; overflow: hidden; }
.stage-wrap::after { content: ''; position: absolute; inset: 0; background: var(--stage); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.stage-wrap.moving::after { opacity: 1; }
#stage { display: block; max-width: 100%; image-rendering: pixelated; touch-action: manipulation; }
#stage:focus-visible { outline: none; }
.stage-wrap:has(#stage:focus-visible) { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 700 12px var(--pixel); color: #a09fa8; }

.viewer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.say { display: flex; gap: 8px; flex: 1 1 420px; max-width: 560px; }
input, textarea, select {
  font: 400 14px/1.4 var(--body); color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.say input { flex: 1; width: 0; }   /* 단추가 늘어도 폰 너비를 넘지 않게 (입력칸이 줄어든다) */
/* 말풍선 기록: 입력칸 위로 펼쳐지는 목록 (들어온 뒤 받은 말만, 이 탭의 sessionStorage) */
.say { position: relative; }
.say-log-btn { position: relative; padding: 0 12px; }
.say-log-btn svg { flex: none; }
.say-log-btn[aria-expanded='true'] { background: var(--surface-2); border-color: var(--fg); }
.say-log-new {
  position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #16171b; font: 700 11px/18px var(--body); text-align: center; box-shadow: 0 0 0 2px var(--bg);
}
.say-log {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 6; display: grid; gap: 8px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
}
.say-log-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; font-size: 13px; }
.say-log-note { color: var(--muted); font-size: 12px; }
.say-log-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 10px; max-height: min(280px, 42vh); overflow-y: auto; overscroll-behavior: contain; }
.sl-item { display: grid; gap: 2px; font-size: 14px; line-height: 1.45; }
.sl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.sl-meta { min-width: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sl-tools { display: inline-flex; gap: 2px; flex: none; }
.sl-tool {
  display: inline-grid; place-items: center; min-width: 28px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--muted); font: 600 12px/1 var(--body); cursor: pointer;
}
.sl-tool:hover, .sl-tool[aria-expanded='true'] { background: var(--surface-2); color: var(--fg); }
.sl-del.ask { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: var(--bad-soft); }
.sl-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sl-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 4px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--bg); color: var(--fg); font: 600 12px/1 var(--body); font-variant-numeric: tabular-nums; cursor: pointer;
}
.sl-chip[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.sl-chip img, .sl-pick-btn img { image-rendering: pixelated; pointer-events: none; }
.sl-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.sl-pick-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); cursor: pointer; }
.sl-pick-btn:hover { border-color: var(--fg); }
.sl-meta b { color: var(--fg); font-weight: 600; }
.sl-item.mine .sl-meta b { color: var(--accent-ink); }
.sl-text { overflow-wrap: anywhere; }
.gb-text.masked, #lb-notes .masked { color: var(--muted); font-style: italic; }
.say-log-empty { margin: 0; color: var(--muted); font-size: 13px; }
.keys { margin: 0; color: var(--muted); font-size: 13px; }
/* 이모티콘 반응 (함께 관람): 도트 아이콘 단추 6개 */
.emotes { display: flex; gap: 6px; flex-wrap: wrap; }
.emote-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); cursor: pointer; transition: transform .12s ease, border-color .12s ease;
}
.emote-btn img { width: 26px; height: 26px; image-rendering: pixelated; pointer-events: none; }
.emote-btn:hover { border-color: var(--fg); transform: translateY(-2px); }
.emote-btn:active { transform: translateY(0) scale(.94); }
.emote-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--fg); }
@media (prefers-reduced-motion: reduce) { .emote-btn, .emote-btn:hover, .emote-btn:active { transition: none; transform: none; } }

/* ---------------------------------------------------------------- 전시 목록 (로비 아래) */
.section { display: grid; gap: 22px; min-width: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec-head h2, .about h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--body); letter-spacing: -0.015em; }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--fg); }
.chip[aria-selected='true'] { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.sub-block { display: grid; gap: 14px; }
.sub-h { margin: 0; font-size: 17px; font-weight: 700; }
.empty-box { grid-column: 1 / -1; margin: 0; padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px; }

.ex-cell { display: grid; gap: 8px; align-content: start; min-width: 0; }
.card-ex {
  display: grid; grid-template-rows: auto 1fr; padding: 0; text-align: left; cursor: pointer; overflow: hidden; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.card-ex:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-ex[aria-current='true'] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ex-cover { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.ex-cover.empty { display: grid; place-items: center; padding: 8px; text-align: center; font-size: 13px; color: var(--muted); }
.ex-text { display: grid; gap: 4px; padding: 14px 16px 16px; align-content: start; min-width: 0; }
.ex-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.ex-name { font-size: 17px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.ex-desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-theme::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--tone, var(--muted)); }
.ex-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-views { display: inline-flex; align-items: center; gap: 4px; }
.ex-views svg { width: 14px; height: 14px; }
.ex-views b { font-weight: 600; color: var(--fg); }
.ex-live { color: var(--ok); font-weight: 600; }
.ex-live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.ex-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-acts input { flex: 1 1 160px; padding: 6px 10px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.5; background: var(--surface-2); color: var(--muted); }
.badge.public { background: var(--ok-soft); color: var(--ok); }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.rejected { background: var(--bad-soft); color: var(--bad); }

.host-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 24px 28px; border-radius: 16px; background: var(--fg); color: var(--on-fg); }
.host-cta h3 { margin: 0 0 4px; font-size: 19px; }
.host-cta p { margin: 0; max-width: 60ch; opacity: 0.8; font-size: 14px; }
.host-cta .btn { background: var(--accent); border-color: var(--accent); color: #16171b; }
.host-cta .btn:hover { filter: brightness(1.06); }

/* ---------------------------------------------------------------- 전시 정보 (전시실 아래) */
.about { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 24px; border-top: 1px solid var(--line); }
.about-main { display: grid; gap: 10px; position: sticky; top: calc(var(--gnb-h) + 20px); }
.ab-kind { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.ab-desc { margin: 0; font-size: 15px; max-width: 60ch; }
.facts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts li span:first-child { color: var(--muted); }
.facts li span:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.about-rooms { display: grid; gap: 14px; min-width: 0; }
.room-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.room-tab { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); }
.room-tab small { font-weight: 500; font-variant-numeric: tabular-nums; }
.room-tab:hover { color: var(--fg); }
.room-tab[aria-selected='true'] { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 16px; }
.thumb { display: grid; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; min-width: 0; }
.thumb-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.15s, box-shadow 0.15s; }
.thumb-img img { display: block; min-width: 0; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; outline: 3px solid #fafaf7; box-shadow: 0 0 0 4px #16171b, 0 6px 14px rgba(0, 0, 0, 0.18); }
.thumb:hover .thumb-img { border-color: var(--line-2); box-shadow: var(--shadow); }
.thumb.here .thumb-img { border-color: var(--accent); }
.thumb-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; min-width: 0; }
.thumb-cap b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-cap span { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.thumb.add .thumb-img { border: 1.5px dashed var(--line-2); background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.thumb.add:hover .thumb-img { border-color: var(--accent); color: var(--accent-ink); }

/* ---------------------------------------------------------------- 바닥글 */
.site-foot { margin-top: 72px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: calc(var(--wrap) + 32px); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 28px 36px; display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: start; }
.foot-brand p { margin: 0; color: var(--muted); font-size: 14px; }
.foot-brand .foot-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font: 700 18px var(--pixel); color: var(--fg); }
.foot-logo .logo-mark { width: 16px; height: 16px; box-shadow: inset 0 0 0 2px var(--fg), inset 0 0 0 5px var(--surface), inset 0 0 0 16px var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links button { padding: 0; border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--muted); }
.foot-links button:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot-links a { font-size: 14px; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot-links a b { font-weight: 700; color: var(--fg); } /* 개인정보처리방침은 다른 메뉴보다 눈에 띄게 (작성지침 권고) */
.foot-small { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- 알림 */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translate(-50%, 12px); opacity: 0;
  max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 12px; background: var(--fg); color: var(--on-fg); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 창 (모달) */
.modal {
  position: fixed; inset: 0; z-index: 30; background: var(--scrim); display: grid; place-items: center; align-items: safe center; overflow-y: auto; /* safe: 창이 화면보다 길면 위를 잘라 먹지 않고 위부터 */
  padding: max(16px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(16px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
}
.card { background: var(--surface); color: var(--fg); border-radius: 18px; box-shadow: var(--shadow); padding: 24px; width: min(560px, 100%); display: grid; gap: 8px; }
.card h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-head h2 { margin: 0; }
.card-head .lbl { margin: 0 0 2px; }
.row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.row.left { justify-content: flex-start; align-items: center; }
.spacer { flex: 1; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: 14px; }
.check input { width: auto; }

.ex-card { width: min(760px, 100%); gap: 14px; }
.ex-head { display: flex; gap: 12px; align-items: center; }
.ex-staff { width: 48px; height: 48px; border-radius: 50%; image-rendering: pixelated; background: var(--surface-2); object-fit: cover; object-position: top; flex: none; }
.ex-list { display: grid; gap: 10px; max-height: min(56vh, 560px); overflow-y: auto; padding: 2px; margin: 0 -2px; }
.ex-sec { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.ex-sec:first-child { margin-top: 0; }
.ex-row { display: grid; gap: 8px; }
.ex-row .card-ex { grid-template-columns: 132px minmax(0, 1fr); grid-template-rows: none; align-items: center; }
.ex-row .ex-cover { height: 100%; min-height: 99px; aspect-ratio: auto; }
.ex-row .ex-text { padding: 12px 14px; }
.ex-row .ex-acts { padding-left: 2px; }
.ex-empty { color: var(--muted); margin: 8px 2px; }
.ex-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.ex-tools .note { flex: 1 1 260px; }

.poster-card { width: min(480px, 100%); padding: 0; overflow: hidden; gap: 0; }
.xi-cover { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.poster-body { display: grid; gap: 6px; padding: 20px 24px 24px; }
.poster-body .lbl { margin: 0; color: var(--accent-ink); }
.xi-desc { margin: 0; }
.xi-rooms { margin: 6px 0 0; padding-left: 1.3em; color: var(--muted); font-size: 14px; }
.xi-rooms b { color: var(--fg); font-weight: 600; }

.rooms { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.room-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 44vh; overflow-y: auto; }
.room-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.room-row .num { min-width: 2ch; font-weight: 700; color: var(--accent-ink); text-align: center; font-variant-numeric: tabular-nums; }
.room-row .room-btns { display: flex; gap: 4px; }
.room-row .room-btns .btn { min-width: 34px; padding: 0 8px; }
.xe-theme { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; min-width: 0; }
.slot-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.slot-opt { position: relative; display: grid; gap: 4px; justify-items: center; cursor: pointer; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }
.slot-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot-opt canvas { width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; border: 2px solid var(--line); }
.slot-opt input:checked + canvas { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.slot-opt input:checked ~ span { color: var(--fg); font-weight: 600; }
.slot-opt input:focus-visible + canvas { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .slot-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pick-card { width: min(620px, 100%); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 44vh; overflow-y: auto; padding: 4px 2px; margin-top: 6px; }
.pick { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 500; }
.pick:hover { border-color: var(--line-2); }
.pick canvas { width: 52px; height: 64px; image-rendering: pixelated; }
.pick[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.ed-preview { max-height: 220px; max-width: 100%; justify-self: center; border-radius: 4px; outline: 6px solid #fafaf7; box-shadow: 0 0 0 7px #16171b; margin: 8px 0; }
input[type='file'] { padding: 8px; }

.help-card { width: min(680px, 100%); gap: 14px; }
.help-body { display: grid; gap: 14px; font-size: 14px; }
.help-body p { margin: 0; }
.help-body h3 { margin: 6px 0 0; font-size: 16px; }
.key-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.key-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 0 8px 6px 0; border-bottom: 1px solid var(--line); }
.key-table td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.key-table td:first-child { font-weight: 600; white-space: nowrap; }
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }

/* 작품 상세 보기 (크게 보기): 왼쪽 사진 칸(확대·이동), 오른쪽 글 칸(제목·설명·사진 정보·감상).
   창은 그 전시의 모습을 살짝 따른다 (app.js skinLightbox): data-th = 전시 테마(가는 도트 테·도구 색·빛), data-frame = 방 액자(사진 테두리),
   --lb-wall = 방 벽지(사진 뒤 바탕), --lb-edge = 테마마다 1배로 그린 테 그림(border-image 9칸, 정수 배 --lb-k 로 키움).
   위·아래 도구 띠는 넉넉한 화면에서 창 바깥 위아래(.lb-stack 의 위아래 여백)에, 휴대폰·낮은 화면·작품만 보기에서는 사진 칸 안(.bars-in)에 놓인다 */
.lightbox {
  --lb-k: 2; --lb-bar: 48px; --lb-side: clamp(280px, 27vw, 360px);
  --lb-back: rgba(10, 10, 12, 0.9);
  --lb-pill: #fafaf7; --lb-pill-ink: #16171b; --lb-pill-edge: #16171b; --lb-pill-hot: #ecebe7;
  --lb-veil: radial-gradient(ellipse 80% 75% at 50% 45%, rgba(14, 15, 18, 0) 55%, rgba(14, 15, 18, 0.22));
  --lb-light: radial-gradient(ellipse 46% 60% at 50% -8%, rgba(255, 238, 196, 0.6), rgba(255, 238, 196, 0) 70%);
  --lb-tint: transparent;
  --lb-ink-l: var(--accent-ink); --lb-ink-d: var(--accent-ink); --lb-ink: var(--lb-ink-l);
  background: var(--lb-back);
}
.lightbox[data-th='city'] {
  --lb-back: rgba(6, 9, 20, 0.92);
  --lb-pill: #1e2027; --lb-pill-ink: #e8f6ff; --lb-pill-edge: #78dcff; --lb-pill-hot: #2c3c4c;
  --lb-veil: linear-gradient(rgba(8, 12, 28, 0.6), rgba(8, 12, 28, 0.78));
  --lb-light: linear-gradient(to top, rgba(120, 220, 255, 0.2), rgba(120, 220, 255, 0) 26%);
  --lb-tint: #5fd4ff; --lb-ink-l: #1d6a88; --lb-ink-d: #7fd8ff;
}
.lightbox[data-th='classic'] {
  --lb-back: rgba(20, 10, 8, 0.92);
  --lb-pill: #2a1a14; --lb-pill-ink: #f4e8cd; --lb-pill-edge: #c99a3a; --lb-pill-hot: #4a2e22;
  --lb-veil: linear-gradient(rgba(26, 8, 10, 0.5), rgba(26, 8, 10, 0.66));
  --lb-light: radial-gradient(ellipse 50% 52% at 50% 0%, rgba(255, 210, 140, 0.42), rgba(255, 210, 140, 0) 72%);
  --lb-tint: #70242e; --lb-ink-l: #70242e; --lb-ink-d: #e0b860;
}
.lightbox[data-th='garden'] {
  --lb-back: rgba(12, 20, 12, 0.9);
  --lb-pill: #2f4a34; --lb-pill-ink: #f2f1e6; --lb-pill-edge: #8a6240; --lb-pill-hot: #3e5e44;
  --lb-veil: linear-gradient(rgba(22, 34, 20, 0.16), rgba(22, 34, 20, 0.34));
  --lb-light: linear-gradient(112deg, rgba(255, 246, 214, 0) 18%, rgba(255, 246, 214, 0.34) 28%, rgba(255, 246, 214, 0) 40%, rgba(255, 246, 214, 0) 56%, rgba(255, 246, 214, 0.24) 64%, rgba(255, 246, 214, 0) 76%);
  --lb-tint: #6f9a5c; --lb-ink-l: #44702f; --lb-ink-d: #a8d08a;
}
.lightbox[data-th='dark'] {
  --lb-back: rgba(3, 3, 5, 0.94);
  --lb-pill: #121318; --lb-pill-ink: #ffe9a0; --lb-pill-edge: #f0c040; --lb-pill-hot: #2a2614;
  --lb-veil: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3));
  --lb-light: radial-gradient(ellipse 42% 62% at 50% 30%, rgba(255, 240, 210, 0.17), rgba(255, 240, 210, 0) 72%);
  --lb-tint: #000000; --lb-ink-l: #8f5a12; --lb-ink-d: #f0c040;
}
.lightbox[data-th='hanok'] {
  --lb-back: rgba(22, 14, 8, 0.92);
  --lb-pill: #3a2616; --lb-pill-ink: #f1e8d2; --lb-pill-edge: #c8b27a; --lb-pill-hot: #4e3420;
  --lb-veil: linear-gradient(rgba(40, 24, 10, 0.14), rgba(40, 24, 10, 0.3));
  --lb-light: radial-gradient(ellipse 50% 55% at 50% 0%, rgba(255, 212, 150, 0.4), rgba(255, 212, 150, 0) 72%);
  --lb-tint: #7d5a3c; --lb-ink-l: #8a3a2e; --lb-ink-d: #e8c890;
}
.lightbox[data-th='seaside'] {
  --lb-back: rgba(8, 24, 40, 0.9);
  --lb-pill: #f4f2ea; --lb-pill-ink: #1e3450; --lb-pill-edge: #1e3450; --lb-pill-hot: #dfeaf0;
  --lb-veil: linear-gradient(rgba(20, 60, 100, 0.06), rgba(20, 60, 100, 0.2));
  --lb-light: linear-gradient(rgba(255, 244, 214, 0.32), rgba(255, 244, 214, 0) 42%);
  --lb-tint: #3f88b8; --lb-ink-l: #2a6a98; --lb-ink-d: #8ccaf0;
}
.lightbox[data-th='pop'] {
  --lb-back: rgba(30, 18, 32, 0.9);
  --lb-pill: #fffdf6; --lb-pill-ink: #2e2838; --lb-pill-edge: #2e2838; --lb-pill-hot: #ffe0ec;
  --lb-veil: linear-gradient(rgba(240, 120, 170, 0.08), rgba(120, 220, 200, 0.14));
  --lb-light: radial-gradient(ellipse 60% 55% at 50% -6%, rgba(255, 170, 210, 0.42), rgba(255, 170, 210, 0) 70%);
  --lb-tint: #e0508a; --lb-ink-l: #c0306a; --lb-ink-d: #ff9cc4;
}
.lightbox[data-th='sunset'] {
  --lb-back: rgba(40, 16, 22, 0.9);
  --lb-pill: #f4eee0; --lb-pill-ink: #5a2a1a; --lb-pill-edge: #b8603a; --lb-pill-hot: #fbe0c8;
  --lb-veil: linear-gradient(rgba(120, 50, 80, 0.16), rgba(60, 20, 50, 0.36));
  --lb-light: radial-gradient(ellipse 60% 58% at 50% -6%, rgba(255, 170, 100, 0.46), rgba(255, 170, 100, 0) 72%);
  --lb-tint: #e07a4a; --lb-ink-l: #b0502a; --lb-ink-d: #ffb080;
}
.lightbox[data-th='jazz'] {
  --lb-back: rgba(6, 10, 10, 0.94);
  --lb-pill: #141416; --lb-pill-ink: #f2ead6; --lb-pill-edge: #c9a24a; --lb-pill-hot: #2a2a22;
  --lb-veil: linear-gradient(rgba(0, 12, 12, 0.32), rgba(0, 12, 12, 0.52));
  --lb-light: radial-gradient(ellipse 36% 64% at 50% -4%, rgba(255, 210, 150, 0.36), rgba(255, 210, 150, 0) 74%);
  --lb-tint: #2c6a66; --lb-ink-l: #2c6a66; --lb-ink-d: #e0c070;
}
.lightbox[data-th='camp'] {
  --lb-back: rgba(14, 10, 6, 0.93);
  --lb-pill: #3a2618; --lb-pill-ink: #f2e6cc; --lb-pill-edge: #8a5e36; --lb-pill-hot: #4e3420;
  --lb-veil: linear-gradient(rgba(20, 14, 34, 0.3), rgba(20, 14, 34, 0.46));
  --lb-light: radial-gradient(ellipse 60% 52% at 50% 108%, rgba(255, 150, 70, 0.38), rgba(255, 150, 70, 0) 72%);
  --lb-tint: #6f7a3a; --lb-ink-l: #5a6a2a; --lb-ink-d: #e8b070;
}
.lightbox[data-th='star'] {
  --lb-back: rgba(4, 6, 20, 0.94);
  --lb-pill: #141a40; --lb-pill-ink: #f0ecf6; --lb-pill-edge: #c9a24a; --lb-pill-hot: #222a5a;
  --lb-veil: linear-gradient(rgba(8, 12, 40, 0.32), rgba(8, 12, 40, 0.5));
  --lb-light: radial-gradient(ellipse 40% 62% at 72% -10%, rgba(196, 214, 255, 0.34), rgba(196, 214, 255, 0) 72%);
  --lb-tint: #3a4a9a; --lb-ink-l: #3a4a9a; --lb-ink-d: #b0c0ff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lightbox { --lb-ink: var(--lb-ink-d); } }
:root[data-theme="dark"] .lightbox { --lb-ink: var(--lb-ink-d); }

/* 창과 위아래 띠를 담는 자리: 위아래 여백에 띠가 들어간다. 빈 곳을 누르면 뒤 배경(닫기)으로 간다 */
.lb-stack { position: relative; width: min(1440px, 100%); padding: var(--lb-bar) 0; pointer-events: none; }
.lb-stack > * { pointer-events: auto; }
.lb-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--lb-side); width: 100%; max-height: calc(100dvh - 32px - 2 * var(--lb-bar)); background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
/* 가는 도트 테: 1배 그림을 --lb-k 배로 (점이 또렷하게 pixelated, 사진·글 칸은 다시 부드럽게) */
.lightbox[data-th] .lb-card {
  border: calc(var(--lb-e, 4) * var(--lb-k) * 1px) solid #16171b; border-radius: 0;
  border-image: var(--lb-edge) var(--lb-e, 4) / calc(var(--lb-e, 4) * var(--lb-k) * 1px) stretch;
  image-rendering: pixelated; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  background-clip: padding-box;   /* 깎은 모서리 점에 카드 흰 바탕이 비치지 않게 */
}
.lb-frame {
  position: relative; display: grid; place-items: center; min-width: 0; padding: 24px 26px 30px; overflow: hidden;
  background-color: #0e0f12; background-image: var(--lb-light, none), var(--lb-veil, none), var(--lb-wall, none);
  background-size: 100% 100%, 100% 100%, var(--lb-wall-size, auto); background-repeat: no-repeat, no-repeat, repeat;
  image-rendering: pixelated;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: zoom-in;
}
.lb-frame.zoomed { touch-action: none; cursor: grab; }
.lb-frame.zoomed:active { cursor: grabbing; }
/* 큰 사진도 벽 사진도 아직 없을 때: 앞에 본 사진 대신 "불러오는 중" (app.js openPhoto) */
.lb-frame.loading { min-height: min(320px, 56vh); }
.lb-frame.loading .lb-img { visibility: hidden; }
.lb-frame.loading::after {
  content: '사진을 불러오는 중…'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 8px 12px;
  background: #16171b; color: #f3ecdf; font: 400 12px var(--pixel); white-space: nowrap; box-shadow: 0 0 0 2px #0d0e11, inset 0 0 0 1px #34363f;
}
/* 사진 테두리 = 방 액자 (data-frame), 방보다 얇게. 기본은 검은 얇은 틀 + 흰 매트 */
.lb-img {
  display: block; max-width: 100%; max-height: calc(100dvh - 32px - 2 * var(--lb-bar) - 54px - 2px * var(--lb-e, 0) * var(--lb-k)); object-fit: contain; transform-origin: 50% 50%; -webkit-user-drag: none; image-rendering: auto;
  outline: 6px solid #f7f7f4; box-shadow: 0 0 0 9px #17181d, 0 12px 28px rgba(0, 0, 0, 0.45); transition: outline-color 0.2s, box-shadow 0.2s;
}
.lightbox[data-frame='metal'] .lb-img { outline: 2px solid #121318; box-shadow: 0 0 0 5px #4b505c, 0 0 0 6px #1e2027, 0 12px 28px rgba(0, 0, 0, 0.5); }
.lightbox[data-frame='gold'] .lb-img { outline: 4px solid #efe6d0; box-shadow: 0 0 0 5px #5a4214, 0 0 0 7px #d8b056, 0 0 0 8px #8e6a1e, 0 0 0 9px #4a3410, 0 12px 28px rgba(0, 0, 0, 0.5); }
.lightbox[data-frame='wood'] .lb-img { outline: 4px solid #f4efe2; box-shadow: 0 0 0 5px #5e4026, 0 0 0 8px #b58a5c, 0 0 0 9px #6e4a2c, 0 12px 28px rgba(0, 0, 0, 0.45); }
.lightbox[data-frame='float'] .lb-img { outline: 1px solid rgba(255, 255, 255, 0.16); outline-offset: 0; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7); }
.lightbox[data-frame='silk'] .lb-img { outline: 2px solid #efe6d0; box-shadow: 0 0 0 3px #c8b27a, 0 0 0 7px #a9bdb1, 0 0 0 8px #5e3e26, 0 0 0 9px #2a1a10, 0 12px 28px rgba(0, 0, 0, 0.45); }
.lightbox[data-frame='drift'] .lb-img { outline: 2px solid #5e5444; box-shadow: 0 0 0 4px #9a8c72, 0 0 0 7px #d2c6ae, 0 0 0 8px #6e6250, 0 12px 28px rgba(0, 0, 0, 0.45); }
.lightbox[data-frame='rattan'] .lb-img { outline: 4px solid #f6efe0; box-shadow: 0 0 0 5px #b8a888, 0 0 0 6px #7a5a30, 0 0 0 8px #d8b884, 0 0 0 9px #7a5a30, 0 12px 28px rgba(0, 0, 0, 0.45); }
.lightbox[data-frame='deco'] .lb-img { outline: 4px solid #f2ead6; box-shadow: 0 0 0 5px #c9a24a, 0 0 0 8px #0e0e10, 0 0 0 9px #c9a24a, 0 12px 28px rgba(0, 0, 0, 0.55); }
.lightbox[data-frame='birch'] .lb-img { outline: 4px solid #f6f2e8; box-shadow: 0 0 0 5px #b0a898, 0 0 0 8px #ece6da, 0 0 0 9px #3a3430, 0 12px 28px rgba(0, 0, 0, 0.45); }
.lightbox[data-frame='astro'] .lb-img { outline: 4px solid #f0ecf6; box-shadow: 0 0 0 5px #c9a24a, 0 0 0 8px #0c1030, 0 0 0 9px #c9a24a, 0 12px 28px rgba(0, 0, 0, 0.55); }
/* 즉석 사진: 흰 테, 아래가 두껍다 (그림자를 아래로 밀어 키운다) */
.lightbox[data-frame='instant'] .lb-img { outline: 1px solid #e4e2dc; box-shadow: 0 0 0 7px #fbfaf6, 0 14px 0 7px #fbfaf6, 0 14px 0 8px #d8d6d0, 0 0 0 8px #d8d6d0, 0 26px 32px rgba(0, 0, 0, 0.45); }
.lb-img.anim { transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), outline-color 0.2s, box-shadow 0.2s; }
.lb-frame.zoomed .lb-img { outline-color: transparent; box-shadow: none; }
/* 도구 띠: 위 = 앞뒤 작품과 몇 번째 사진, 아래 = 확대. 테마 색의 도트 단추 (모서리 한 점 깎은 네모).
   넉넉한 화면: 창 바깥 위아래, 사진 칸 가운데 줄에 맞춘다. .bars-in (휴대폰·낮은 화면·작품만 보기): 사진 칸 안 위아래 */
.lb-pill {
  position: absolute; left: calc((100% - var(--lb-side)) / 2); transform: translateX(-50%); z-index: 1; display: flex; align-items: center; gap: 2px; width: max-content; max-width: calc(100% - 16px); padding: 2px;
  background: var(--lb-pill); color: var(--lb-pill-ink); border: 2px solid var(--lb-pill-edge);
  clip-path: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
  cursor: default;
}
.lb-top { top: 2px; }
.lb-tools { bottom: 2px; }
.lightbox.bars-in .lb-stack { padding: 0; }
.lightbox.bars-in .lb-card { max-height: calc(100dvh - 32px); }
.lightbox.bars-in .lb-pill { left: 50%; }
.lightbox.bars-in .lb-top { top: 10px; }
.lightbox.bars-in .lb-tools { bottom: 12px; }
/* 낮은 넓은 화면: 띠를 사진 위에 반투명하게 띄우고 사진 칸 여백은 그대로 작게 (사진을 키운다) */
@media (min-width: 961px) and (max-height: 760px) {
  .lightbox.bars-in:not(.full) .lb-pill { background: color-mix(in srgb, var(--lb-pill) 78%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  .lightbox.bars-in:not(.full) .lb-img { max-height: calc(100dvh - 32px - 54px - 2px * var(--lb-e, 0) * var(--lb-k)); }
}
.lb-tool { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: 600 12px/1 var(--body); cursor: pointer; }
.lb-tool:hover:not(:disabled) { background: var(--lb-pill-hot); }
.lb-tool:disabled { opacity: 0.38; cursor: default; }
.lb-tool:focus-visible { outline: 2px solid var(--lb-pill-edge); outline-offset: -4px; }
.lb-zlevel { width: auto; min-width: 52px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.lb-zlevel:disabled { opacity: 0.72; }
.lb-tsep { width: 2px; height: 18px; margin: 0 4px; background: currentColor; opacity: 0.25; }
.lb-step { display: flex; align-items: center; gap: 6px; width: auto; padding: 0 10px; font: 400 12px/1 var(--pixel); white-space: nowrap; }
.lb-step svg { flex: none; }
.lb-count { min-width: 5em; padding: 0 6px; font: 700 12px/1 var(--pixel); text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
#lb-full .ic-close, .lightbox.full #lb-full .ic-open { display: none; }
.lightbox.full #lb-full .ic-close { display: block; }
/* 작품만 보기일 때 왼쪽 위에 붙는 작은 이름표 */
.lb-cap { display: none; position: absolute; top: 16px; left: 20px; max-width: min(60%, 560px); margin: 0; color: #f1f0ec; font-size: 13px; line-height: 1.45; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); pointer-events: none; transition: opacity 0.2s; }
.lb-cap b { display: block; font-size: 15px; font-weight: 700; }
.lb-cap span { color: rgba(241, 240, 236, 0.74); }
.lightbox.full .lb-cap { display: block; max-width: calc(50% - 150px); }
@media (max-width: 720px) { .lightbox.full .lb-cap { top: 66px; max-width: calc(100% - 40px); } }
.lb-frame.zoomed .lb-cap { opacity: 0; }
/* 작품만 보기: 글 칸을 접고 화면 가득 */
.lightbox.full { padding: 0; background: #0b0c0e; }
.lightbox.full .lb-stack { width: 100%; padding: 0; }
.lightbox.full .lb-card { width: 100%; height: 100dvh; max-height: none; grid-template-columns: minmax(0, 1fr); border: 0; border-image: none; border-radius: 0; background: #0b0c0e; box-shadow: none; }
.lightbox.full .lb-text { display: none; }
.lightbox.full .lb-frame { padding: 76px 24px 72px; background: #0b0c0e; }
.lightbox.full .lb-img { max-height: calc(100dvh - 168px); }
.lightbox.full .lb-close { color: #f1f0ec; background: rgba(20, 21, 25, 0.6); }
.lightbox.full .lb-close:hover { background: rgba(20, 21, 25, 0.9); color: #fff; }
/* 사진 정보: 조리개·셔터·ISO·초점거리 칸 + 카메라·렌즈·찍은 날·원본 크기 */
.lb-exif { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.lb-exif-h { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.lb-spec { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lb-spec li { display: grid; gap: 1px; padding: 9px 4px 8px; text-align: center; border-left: 1px solid var(--line); min-width: 0; }
.lb-spec li:first-child { border-left: 0; }
.lb-spec b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-spec span { font-size: 11px; color: var(--muted); }
.lb-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 13px; line-height: 1.5; }
.lb-meta dt { color: var(--muted); white-space: nowrap; }
.lb-meta dd { margin: 0; overflow-wrap: anywhere; }
.lb-exif-none { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.lb-exif-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
/* 주최자만: 이 사진의 촬영 정보를 관람객에게 보이기 (작은 스위치) */
.lb-exif-sw { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lb-exif-sw .switch { width: 34px; height: 20px; }
.lb-exif-sw .switch::after { width: 14px; height: 14px; }
.lb-exif-sw .switch:checked::after { transform: translateX(14px); }
.lb-exif-off { margin: 0; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12px; line-height: 1.5; color: var(--muted); }
.lb-exif.off .lb-spec, .lb-exif.off .lb-meta { opacity: 0.5; }
.lb-text { display: flex; flex-direction: column; gap: 6px; padding: 26px 24px 20px; overflow-y: auto; min-width: 0; background: color-mix(in srgb, var(--lb-tint) 4%, var(--surface)); }
.lb-floor { margin: 0; padding-right: 32px; font-size: 12px; font-weight: 600; color: var(--lb-ink); }
.lb-text h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 700; }
.lb-desc { margin: 4px 0 0; }
.lb-social { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.like { justify-self: start; }
.like[aria-pressed='true'] { color: #d4475f; border-color: color-mix(in srgb, #d4475f 40%, transparent); }
.lb-notes-h { margin: 4px 0 -2px; font-size: 12px; font-weight: 700; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; display: grid; gap: 8px; font-size: 14px; }
.notes li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.notes li b { font-size: 13px; font-weight: 700; }
.notes li.empty { color: var(--muted); border: 0; }
.note-del { margin-left: auto; font-size: 12px; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.note-form { display: flex; gap: 6px; }
.note-form input { flex: 1 1 auto; width: 0; }
.lb-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin-top: auto; padding-top: 16px; }
.lb-acts { display: flex; align-items: center; gap: 8px; }
.lb-close { position: absolute; top: 14px; right: 14px; }

/* ---------------------------------------------------------------- 좁은 화면 */
@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-main { position: static; }
  .lightbox { --lb-k: 2; }
  .lb-card { grid-template-columns: 1fr; }
  .lightbox .lb-card, .lightbox.bars-in .lb-card { max-height: none; }
  .lb-frame { padding: 62px 22px 66px; }
  .lb-img { max-height: 56vh; }
  .lb-close { background: var(--surface); }
}
@media (max-width: 820px) {
  .gnb-in { gap: 12px; }
  .menu-btn { display: inline-flex; }
  .gnb-cta, .live { display: none; }
  .gnb-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--gutter-r) 14px var(--gutter-l); background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .gnb.open .gnb-nav { display: flex; }
  .nav-link { padding: 12px; font-size: 15px; text-align: left; }
  .nav-cta { display: inline-flex; margin-top: 6px; min-height: 42px; }
  .nav-cta[hidden] { display: none !important; }
}
@media (max-width: 640px) {
  .page { gap: 40px; padding-top: 14px; }
  .logo-word { font-size: 16px; }
  .me { padding-right: 4px; }
  .me span { display: none; }
  .stage-wrap { margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r)); border-radius: 0; }
  .keys { display: none; }
  .say { flex-basis: 100%; }
  .emotes { width: 100%; justify-content: space-between; }
  .emote-btn { width: 44px; height: 44px; }
  .sl-tool { min-width: 36px; height: 34px; }
  .sl-chip { height: 32px; }
  .ex-row .card-ex { grid-template-columns: 96px minmax(0, 1fr); }
  .ex-row .ex-cover { min-height: 84px; }
  .ex-row .ex-desc { -webkit-line-clamp: 1; }
  .host-cta { padding: 20px; }
  .foot-in { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-wrap::after, .card-ex, .toast, .menu-btn span { transition: none; }
}

/* ---------------------------------------------------------------- 시작 화면 (PixelLab 도심 사진전 그림 488x344)
   그림 하나로 된 밤 장면이라 테마와 관계없이 같은 색을 쓴다.
   넓은 화면: 그림을 화면 높이에 맞춰 키우고 제목·버튼을 그림 위에 얹는다. 양옆 남는 곳은 같은 그림을 흐리게.
   세로 화면: 그림 가운데를 넓게 보여 주고 제목은 위, 버튼은 아래 빈 곳에.
   아래 #ts-canvas 의 크기는 app.js 가 그림을 띄우기 전 자리일 뿐이다. 그림이 오면 app.js(titleFit)가 화면 점에 맞춘 크기를 직접 정한다. */
.title-screen {
  position: fixed; inset: 0; z-index: 50; overflow: hidden; background: #141a2c; color: #fffaf0;
  transition: opacity 0.45s ease, visibility 0.45s;
}
.title-screen.out { opacity: 0; visibility: hidden; pointer-events: none; }
.ts-back {
  position: absolute; inset: -40px; background: url('assets/v2/title/city.png') center / cover no-repeat;
  filter: blur(16px) brightness(0.5) saturate(1.1);
}
.ts-crop { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; transition: opacity 0.4s ease; }
.title-screen:not(.drawn) .ts-crop { opacity: 0; } /* 시작 그림이 오면 스르르 */
#ts-canvas {
  display: block; aspect-ratio: 488 / 344; max-width: none; image-rendering: pixelated;
  height: min(100dvh, calc(100vw * 344 / 488)); box-shadow: 0 0 0 3px #140e10, 0 24px 60px rgba(0, 0, 0, 0.5);
}
.ts-logo { position: absolute; left: 0; right: 0; top: 5vh; text-align: center; padding: 0 16px; pointer-events: none; animation: ts-drop 0.9s cubic-bezier(.2, .9, .3, 1.2) both; }
.ts-eyebrow { margin: 0; font: 700 12px var(--pixel); letter-spacing: 0.3em; color: #cfe3ff; text-shadow: 2px 2px 0 #0d1222; }
.ts-name {
  margin: 0.2em 0 0; font: 700 clamp(36px, 7vw, 96px)/1.05 var(--pixel); font-size: round(nearest, clamp(36px, 7vw, 96px), 12px); color: #fffaf0; letter-spacing: 0.04em;
  text-shadow: 0 5px 0 #c98a3c, 5px 5px 0 #0d1222, -2px -2px 0 #0d1222, 2px -2px 0 #0d1222, -2px 2px 0 #0d1222, 0 0 30px rgba(255, 214, 140, 0.45);
}
.ts-sub { margin: 0.6em auto 0; width: fit-content; padding: 2px 10px; background: rgba(13, 18, 34, 0.6); font: 700 clamp(12px, 1.6vw, 18px) var(--pixel); font-size: round(nearest, clamp(12px, 1.6vw, 18px), 6px); color: #fff4df; }
/* 아래쪽: 불러오기 막대 → 입장 단추 → 한 줄 안내. 아래에 붙여 두어서 막대가 접혀도 단추가 움직이지 않는다 */
.ts-foot { position: absolute; left: 0; right: 0; bottom: max(28px, 8vh); display: grid; justify-items: center; gap: 8px; padding: 0 16px; animation: ts-rise 0.8s 0.35s ease both; }
.ts-enter {
  font: 700 clamp(18px, 1.7vw, 24px) var(--pixel); font-size: round(nearest, clamp(18px, 1.7vw, 24px), 6px); padding: 0.6em 1.8em; color: #16171b; background: #f3c25a; border: 0; cursor: pointer;
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), 0 0 0 2px #140e10; animation: ts-glow 1.8s ease-in-out infinite;
}
.ts-enter:active { box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.25), 0 0 0 2px #140e10; }
.ts-enter:focus-visible { outline: 3px solid #fffaf0; outline-offset: 3px; }
.ts-note { margin: 0; padding: 3px 10px; background: rgba(13, 18, 34, 0.72); font: 400 12px var(--pixel); color: #f3ecdf; }
/* 도트 글꼴이 오기 전에는 제목·버튼이 내려오지 않고 기다린다 (index.html 의 짧은 스크립트, 늦어도 1초) */
.title-screen.wait .ts-logo, .title-screen.wait .ts-foot { animation-play-state: paused; }
/* 불러오기 막대: 도트 칸 무늬로 채워진다. 다 되면 사라지고 입장 단추가 빛난다 */
.ts-load {
  display: flex; align-items: center; gap: 8px; max-height: 32px; padding: 5px 8px; overflow: hidden; background: rgba(13, 18, 34, 0.72);
  transition: opacity 0.3s ease 0.2s, max-height 0.3s ease 0.5s, padding 0.3s ease 0.5s, margin 0.3s ease 0.5s, visibility 0s 0.8s;
}
.ts-bar { position: relative; display: block; width: clamp(168px, 20vw, 264px); height: 12px; background: #262d4a; box-shadow: 0 0 0 2px #0d1222, inset 0 2px 0 rgba(0, 0, 0, 0.35); overflow: hidden; }
.ts-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); transition: width 0.2s linear;
  background: repeating-linear-gradient(90deg, #f3c25a 0 6px, #e2a945 6px 8px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}
.ts-pct { min-width: 4ch; text-align: right; font: 400 12px var(--pixel); color: #f3ecdf; font-variant-numeric: tabular-nums; }
.title-screen.loaded .ts-load { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -8px; visibility: hidden; }
.title-screen:not(.loaded) .ts-enter { animation: none; }
.ts-enter[aria-busy="true"] { cursor: progress; background: #d9b25e; }
/* 장면을 바꿀 때 사진을 기다리는 동안 화면 맨 위에 뜨는 가는 막대 (app.js photosFor) */
/* 장면을 바꿀 때 들어가자마자 보일 사진을 기다리는 동안 뜨는 창 (app.js photosFor). 관람 화면 가운데(top 은 app.js 가 정한다) */
.load-pop {
  position: fixed; left: 50%; top: 50%; z-index: 25; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px;
  padding: 12px 16px 14px; background: #16171b; color: #f3ecdf; box-shadow: 0 0 0 2px #0d0e11, inset 0 0 0 1px #34363f, 0 12px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none; animation: lp-in 0.18s ease both;
}
.lp-text { font: 400 12px var(--pixel); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-bar { position: relative; display: block; width: 168px; height: 8px; background: #2a2d38; box-shadow: 0 0 0 1px #0d0e11; overflow: hidden; }
.lp-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); transition: width 0.2s linear; background: repeating-linear-gradient(90deg, #f3c25a 0 6px, #e2a945 6px 8px); }
@keyframes lp-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 6px)); } }
/* 새 사진을 받기 전까지 예전 사진을 가려 둔다 (app.js swapImg) */
.img-wait { visibility: hidden; }
@media (max-aspect-ratio: 4/5) {
  .ts-crop { top: 50%; bottom: auto; height: calc(100vw * 1.45 * 344 / 488); transform: translateY(-50%); }
  #ts-canvas { height: 100%; }
  .ts-logo { top: max(16px, calc(50% - 100vw * 1.45 * 344 / 488 / 2 - 150px)); }
  .ts-name { font-size: clamp(36px, 11vw, 60px); font-size: round(nearest, clamp(36px, 11vw, 60px), 12px); }
  .ts-foot { bottom: max(24px, calc(50% - 100vw * 1.45 * 344 / 488 / 2 - 128px)); }
}
@keyframes ts-drop { from { opacity: 0; transform: translateY(-24px); } }
@keyframes ts-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes ts-glow { 50% { box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.25), 0 0 0 2px #140e10, 0 0 22px 4px rgba(255, 200, 110, 0.6); } }
@media (prefers-reduced-motion: reduce) { .ts-logo, .ts-foot, .ts-enter { animation: none; } .ts-crop, .ts-load, .ts-bar i, .lp-bar i { transition: none; } .load-pop { animation: none; } }
body.on-title { overflow: hidden; }
.brand-btn { all: unset; cursor: pointer; }
.brand-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* 방 소개 창 (전시실 입구 스탠드 포스터) */
.room-card { max-width: 440px; }
.room-card #ri-num { letter-spacing: 0.18em; }
.room-card h2 { margin: 2px 0 4px; }
.ri-desc { margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); line-height: 1.75; white-space: pre-line; }
.ri-desc.empty { color: var(--muted); font-style: italic; }
.ri-list { margin: 4px 0 14px; padding-left: 1.4em; color: var(--muted); font-size: 14px; }
.ri-edit { display: grid; gap: 6px; margin: 14px 0; }
.ri-edit textarea { width: 100%; resize: vertical; min-height: 96px; line-height: 1.6; }
.ri-count { margin: 0; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 로그인과 계정 (Firebase) */
.login-btn { white-space: nowrap; }
.acct-btn { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 700 15px/1 var(--body); cursor: pointer; overflow: hidden; }
.acct-btn:hover { border-color: var(--accent); }
.acct-btn img { width: 100%; height: 100%; object-fit: cover; }
.login-card, .acct-card { width: min(420px, 100%); gap: 12px; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: #1f1f1f; font: 600 15px var(--body); cursor: pointer; }
.google-btn:hover { background: #f4f6f9; }
.google-btn:disabled { opacity: 0.6; cursor: progress; }
.small-note { font-size: 12px; }
.login-terms a, .acct-legal a, .help-legal a { color: var(--accent-ink); text-underline-offset: 2px; }
.acct-legal { text-align: right; }
.acct-legal .link-btn { font-weight: 400; color: var(--muted); }
.acct-leave { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 10px; }
.acct-leave h3 { margin: 0 0 6px; font-size: 15px; color: var(--bad); }
.acct-leave ul { margin: 6px 0; padding-left: 18px; }
.acct-leave-ok { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 4px; font-size: 13.5px; }
.acct-leaving { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); }
.acct-leaving .btn { margin-top: 6px; }
.help-legal { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.acct-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-who div { display: grid; min-width: 0; }
.acct-who b, .acct-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span { color: var(--muted); font-size: 14px; }
.acct-photo { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ed-orig { margin: 0; font-size: 13px; color: var(--muted); }
.ed-title-row { display: flex; gap: 8px; min-width: 0; }
.ed-title-row input { flex: 1 1 auto; }
.ed-title-row .btn { flex: none; min-height: 0; font-size: 13px; }
/* 사진 창: 사진 / 인사 알림판 고르기, 그리고 인사 알림판 칸 */
.ed-kind { margin: 4px 0 2px; }
/* 벽에 거는 크기: 칩 앞 네모가 크기만큼 */
.ed-size { margin: 2px 0 4px; }
.ed-size .chip { display: inline-flex; align-items: center; gap: 7px; }
.sz-ico { display: inline-block; border: 1.5px solid currentColor; border-radius: 1px; font-style: normal; flex: none; }
.sz-ico.s { width: 9px; height: 7px; }
.sz-ico.m { width: 13px; height: 10px; }
.sz-ico.l { width: 18px; height: 13px; }
.ed-size-note { margin: 0 0 6px; }
.chip[aria-checked='true'] { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.ed-part { display: grid; gap: 8px; min-width: 0; }
#ed-bye-text { resize: vertical; min-height: 110px; line-height: 1.6; }
.ed-count { margin: -4px 0 0; justify-self: end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ed-bye-photo { display: flex; align-items: flex-end; gap: 12px; }
.ed-bye-preview { max-height: 96px; max-width: 96px; border-radius: 2px; outline: 4px solid #fbfaf5; outline-offset: 0; box-shadow: 0 0 0 5px #16171b; margin: 6px 6px 8px; transform: rotate(-2deg); }
/* 마무리 인사 창: 테마 색 띠 + 편지처럼 */
.bye-card { max-width: 460px; border-top: 6px solid var(--bye-tone, var(--accent)); }
.bye-card #bye-ex { letter-spacing: 0.02em; }
.bye-card h2 { margin: 2px 0 4px; font-family: var(--pixel); font-size: 24px; }
.bye-photo { margin: 8px auto 4px; max-width: min(260px, 70%); transform: rotate(-1.5deg); }
.bye-photo img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; outline: 6px solid #fbfaf5; outline-offset: 0; box-shadow: 0 0 0 7px #16171b, 0 10px 22px rgba(0, 0, 0, 0.2); }
.bye-text { margin: 10px 0 0; padding: 14px 16px; border-left: 3px solid var(--bye-tone, var(--accent)); background: var(--surface-2); line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.bye-sign { margin: 4px 0 0; text-align: right; font-weight: 600; color: var(--muted); }
.thumb.bye .thumb-img { background: var(--surface-2); }
.bye-quote { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.6; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
/* 파일 고르기: 브라우저 기본 칸(「파일 선택 / 선택된 파일 없음」) 대신 단추 + 고른 파일 이름 (출시 전 점검 2026-12-04) */
.file-pick { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; }
.file-in { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.file-in:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-in:disabled + label { opacity: 0.5; pointer-events: none; }
.file-pick > label { cursor: pointer; flex: none; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.ed-warn { margin: 2px 0 0; padding: 10px 12px 10px 36px; position: relative; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 1.5; }
/* 사진 걸기 창의 촬영 정보 칸 (접어 두고 한 줄 요약) */
.ed-exif { margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; } /* min-width: 긴 한 줄 요약이 휴대폰에서 창을 넓히지 않게 */
.ed-exif summary { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; }
.ed-exif summary::-webkit-details-marker { display: none; }
.ed-exif summary::before { content: ''; flex: none; align-self: center; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform 0.15s; }
.ed-exif[open] summary::before { transform: rotate(45deg); }
.ed-exif summary .lbl { flex: none; margin: 0; }
.ef-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ef-sum.bad { color: var(--bad); }
.ef-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; margin: 10px 0 4px; }
.ef-grid label { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.ef-grid input { width: 100%; }
.ef-wide, .ef-day { grid-column: span 2; }
/* 켜고 끄기 한 줄: 왼쪽 이름과 짧은 설명, 오른쪽 스위치 (전시 설정의 사진 정보 보이기, 사진 창의 관람객에게 보이기) */
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.sw-t { display: grid; gap: 2px; min-width: 0; }
.sw-t b { font-size: 14px; font-weight: 600; }
.sw-t .note { margin: 0; font-size: 12px; line-height: 1.45; }
.sw-row .switch { flex: none; }
.switch:disabled { opacity: 0.45; cursor: default; }
.xe-view { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; min-width: 0; }
.ef-show { margin: 8px 0 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.ef-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 12px; font-size: 13px; }
@media (max-width: 520px) { .ef-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ef-day { grid-column: span 1; } }
.ed-warn::before { content: '!'; position: absolute; left: 12px; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--warn); color: var(--warn-soft); font: 700 11px/16px var(--body); text-align: center; }
/* 사진 거는 단계: ○ 기다림 · 도는 원 진행 · ✓ 끝 · ✕ 실패 */
.ed-steps { list-style: none; margin: 6px 0 0; padding: 12px 14px; display: grid; gap: 9px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.4; }
.ed-steps li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 6px; color: var(--muted); }
.ed-steps li.run, .ed-steps li.done { color: var(--fg); }
.ed-steps li.run .st-name { font-weight: 600; }
.ed-steps li.fail { color: var(--bad); }
.st-ic { position: relative; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); }
.run .st-ic { border-color: var(--accent); border-right-color: transparent; animation: st-spin 0.8s linear infinite; }
.done .st-ic { border-color: var(--ok); background: var(--ok); }
.done .st-ic::after { content: ''; position: absolute; left: 3.5px; top: 0.5px; width: 3.5px; height: 7.5px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fail .st-ic { border-color: var(--bad); background: var(--bad); }
.fail .st-ic::before, .fail .st-ic::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 2px; height: 9px; border-radius: 1px; background: var(--surface); transform: rotate(45deg); }
.fail .st-ic::after { transform: rotate(-45deg); }
.st-info { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fail .st-info { color: inherit; }
.st-say { grid-column: 2 / -1; margin-top: -4px; color: var(--muted); font-size: 12px; font-style: italic; }
.st-say:empty { display: none; }
.ed-steps .st-prog { grid-column: 2 / -1; height: 4px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.st-prog b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.25s ease-out; }
.done .st-prog b { background: var(--ok); }
.fail .st-prog b { background: var(--bad); }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .run .st-ic { animation: none; border-right-color: var(--accent); } .st-prog b { transition: none; } }
@media (max-width: 420px) { .ed-steps li { grid-template-columns: 16px minmax(0, 1fr); } .st-info { grid-column: 2; text-align: left; white-space: normal; } .st-say { grid-column: 2; } }
#btn-link[aria-pressed='true'] { border-color: var(--accent); color: var(--accent-ink); }
.badge.link { background: var(--accent-soft); color: var(--accent-ink); }
.badge.blocked { background: var(--bad-soft); color: var(--bad); }
#login, #account { z-index: 40; } /* 크게 보기 위에서도 뜨게 */

/* 전시 기간 */
.xe-period { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; min-width: 0; }
.badge.soon { background: var(--warn-soft); color: var(--warn); }
.badge.ended { background: var(--bad-soft); color: var(--bad); }
.badge.paused { background: var(--surface-2); color: var(--muted); }
/* 기간 줄: 도트 달력 아이콘 + 날짜 + 남은 날 딱지 (전시 고르기 카드, 로비 포스터의 전시 소개) */
.ex-period, .xi-pd { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-size: 13px; line-height: 20px; color: var(--fg); font-variant-numeric: tabular-nums; }
.ex-period { margin-top: 2px; }
.ex-period .pd-body { column-gap: 6px; }
.ex-period .pd-ico { display: inline-block; margin: 0 6px 0 0; vertical-align: -1px; }
.pd-ico { flex: none; width: 12px; height: 12px; margin-top: 4px; color: var(--accent); }
.pd-body { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; min-width: 0; }
.pd-dates { font-weight: 600; word-break: keep-all; }
.pd-left { padding: 1px 6px; border-radius: 3px; font: 400 12px/1.5 var(--pixel); white-space: nowrap; background: var(--accent-soft); color: var(--accent-ink); }
.pd-left.last { background: var(--bad-soft); color: var(--bad); }
.pd-left.soon { background: var(--warn-soft); color: var(--warn); }
.pd-left.always { background: var(--surface-2); color: var(--muted); }
.sel-stage .ex-period { color: #f3f1ea; }
.sel-stage .pd-ico { color: #e3a64c; }
.sel-stage .pd-left { background: #3a2d1a; color: #f0c070; }
.sel-stage .pd-left.last { background: #4a2420; color: #ff9d8f; }
.sel-stage .pd-left.soon { background: #2a3146; color: #a9c8ff; }
.sel-stage .pd-left.always { background: #2a2c33; color: #c9c7cf; }
.xi-period { margin: 2px 0 6px; }
/* 전시 설정 창 위의 「도움말」 단추와 도움말 창 (설명은 창에 두지 않고 여기로) */
.xe-head { align-items: center; }
.help-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.help-q { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 3px; background: var(--fg); color: var(--on-fg); font: 400 12px/1 var(--pixel); }
#xe-help { z-index: 35; } /* 전시 설정 창 위에 */
.xh-card .pd-steps { margin-top: -4px; }
.xh-card .note { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
/* 도움말 창: 고른 기간으로 열림 → 닫힘 → 삭제 */
.pd-steps { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.pd-step { display: grid; gap: 2px; font-size: 13px; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.pd-when { display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-tag { flex: none; padding: 0 6px; border-radius: 3px; font: 400 12px/1.5 var(--pixel); background: var(--ok-soft); color: var(--ok); }
.pd-step.close .pd-tag { background: var(--warn-soft); color: var(--warn); }
.pd-step.purge .pd-tag { background: var(--bad-soft); color: var(--bad); }
.pd-step.always .pd-tag { background: var(--surface); color: var(--muted); }
.pd-what { color: var(--muted); padding-left: 2px; }
.facts li span.long { color: var(--muted); font-weight: 500; text-align: left; line-height: 1.5; word-break: keep-all; }


/* ---------------------------------------------------------------- 전시 고르기 (첫 화면, 게임의 채널 고르기처럼)
   관람 화면처럼 늘 어두운 무대 위에 전시 줄을 채널처럼 늘어놓는다. 줄 오른쪽 끝의 "입장"을 누르면 그 전시의 로비로 */
.select { display: grid; gap: 28px; min-width: 0; }
.sel-stage {
  position: relative; display: grid; gap: 18px; padding: clamp(20px, 4vw, 36px); border-radius: 16px; overflow: hidden; isolation: isolate;
  background: var(--stage); color: #f3f1ea; border: 1px solid var(--stage-edge);
}
.sel-stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.3; image-rendering: pixelated;
  background: linear-gradient(180deg, rgba(20, 21, 25, 0.2), var(--stage) 72%), url('assets/v2/title/city.png') center top / cover no-repeat;
}
.sel-head { display: grid; gap: 6px; max-width: 64ch; }
.sel-eyebrow { margin: 0; font: 700 12px/1.2 var(--pixel); letter-spacing: 0.3em; color: #cfe3ff; }
.sel-h { margin: 0; font: 700 24px/1.3 var(--pixel); color: #fffaf0; text-shadow: 2px 2px 0 #0d1222; }
@media (min-width: 720px) { .sel-h { font-size: 36px; } }
.sel-sub { margin: 0; color: #c9c7cf; font-size: 14px; }
.sel-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 14px; border-top: 1px solid #2c2e35; }
.sel-count { margin: 0; font: 400 12px var(--pixel); color: #a8a6b0; letter-spacing: 0.05em; }
.sel-stage .chip { background: #1e2026; border-color: #3a3c45; color: #c9c7cf; }
.sel-stage .chip:hover { color: #fff; }
.sel-stage .chip[aria-selected='true'] { background: #f3f1ea; border-color: #f3f1ea; color: #16171b; }
.sel-list { display: grid; gap: 10px; min-width: 0; }
.sel-stage .card-ex { background: rgba(28, 29, 35, 0.92); border-color: #34363f; color: #f3f1ea; }
.sel-stage .card-ex:hover { border-color: #e3a64c; box-shadow: 0 0 0 1px #e3a64c, 0 10px 28px rgba(0, 0, 0, 0.35); }
.sel-stage .ex-kind { color: #f0c070; }
.sel-stage .ex-desc, .sel-stage .ex-meta { color: #a8a6b0; }
.sel-stage .ex-views b { color: #f3f1ea; }
.sel-stage .ex-cover { background: #24252b; }
.sel-links { padding-top: 14px; border-top: 1px solid #2c2e35; }
.sel-sec { margin: 0 0 10px; font: 700 13px/1.5 var(--pixel); color: #e3a64c; letter-spacing: .02em; }
.sel-sec-note { margin: 8px 0 0; font-size: 12.5px; color: #a9abb3; }
.sel-stage .empty-box { color: #c9c7cf; border-color: #3a3c45; }
/* 줄 끝의 "입장" (전시 고르기 화면과 안내 데스크 창) */
.ex-row .card-ex { grid-template-columns: 132px minmax(0, 1fr) auto; }
.ex-go {
  align-self: center; margin-right: 14px; padding: 6px 12px 6px 14px; border-radius: 999px; white-space: nowrap;
  font: 700 12px/1.5 var(--pixel); background: var(--fg); color: var(--on-fg);
}
.ex-go::after { content: ' ▶'; font-size: 10px; }
.card-ex[aria-current='true'] .ex-go { background: var(--accent); color: #16171b; }
.card-ex[aria-current='true'] .ex-go::after { content: ''; }
.sel-stage .ex-go { background: #e3a64c; color: #16171b; }
.ex-go.off { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.ex-go.off::after { content: ''; }
.sel-stage .ex-go.off { background: transparent; color: #a9abb3; box-shadow: inset 0 0 0 1px #3a3c44; }
.badge.here { background: var(--accent); color: #16171b; }
@media (max-width: 640px) {
  .ex-row .card-ex { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .ex-go { margin-right: 10px; padding: 4px 9px; }
  .ex-go::after { content: ''; }
}

/* ---------------------------------------------------------------- 방명록 (전시 로비의 받침대 · 전시 소개 아래)
   캐릭터 얼굴, 닉네임, 언제, 한마디. 한 사람이 전시마다 한 장 */
.gb-block { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.gb-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gb-block-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.gb-n { margin-left: 4px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gb-card .gb-list { max-height: min(46vh, 440px); overflow-y: auto; padding-right: 4px; }
.gb-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.gb-item.mine { box-shadow: inset 0 0 0 1px var(--accent); }
.gb-pic { width: 40px; height: 48px; border-radius: 10px; background: var(--surface); image-rendering: pixelated; object-fit: cover; flex: none; }
.gb-body { display: grid; gap: 2px; min-width: 0; }
.gb-who { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.gb-who b { font: 700 12px/1.5 var(--pixel); }
.gb-when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.gb-text { margin: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.gb-list.mini .gb-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gb-empty { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; text-align: center; }
.gb-card { width: min(560px, 100%); gap: 14px; }
.gb-card .card-head .note { margin-top: 4px; font-size: 13px; }
.gb-form { display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.gb-me { display: flex; align-items: center; gap: 10px; }
.gb-me > div { display: grid; min-width: 0; flex: 1; }
.gb-me b { font: 700 12px/1.5 var(--pixel); }
.gb-me .note { font-size: 12px; }
.gb-me .note.bad { color: var(--bad); }
.gb-form textarea { resize: vertical; min-height: 76px; }
.gb-form-foot { display: flex; align-items: center; gap: 8px; }
.gb-form .msg:empty { display: none; }
.gb-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn.danger-text { color: var(--bad); }
.gb-off { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.xi-room { color: var(--fg); text-decoration: none; font-weight: 400; text-align: left; }
.xi-room:hover b { text-decoration: underline; }
/* 끝난 전시의 "삭제 예정" 안내 (주최자·운영자에게만) */
.facts li span:first-child { flex: none; }
.facts li span.warn { color: var(--bad); font-weight: 500; text-align: left; line-height: 1.5; word-break: keep-all; }

/* ---------------------------------------------------------------- 주최자 통계 (주최자·운영자만)
   한눈에 보기 네 칸 → 날마다 처음 온 관람객(세로 막대) → 곳마다 머문 시간(가로 막대) → 인기 사진 → 최근 방명록.
   막대는 호박색 한 가지(--chart), 글씨는 글씨 색. 다시 받는 동안에는 지난 그림을 흐리게 둔다 */
.st-card { width: min(760px, 100%); gap: 16px; }
.st-card.busy .st-tiles, .st-card.busy .st-sec { opacity: 0.55; transition: opacity 0.2s; }
.st-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-tile { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.st-tile p { margin: 0; }
.st-tl { font-size: 13px; color: var(--muted); }
.st-tv { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ts { font-size: 12px; color: var(--muted); word-break: keep-all; }
.st-sec { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.st-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.st-sec-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.st-sec-head .note { font-size: 13px; }
.st-empty { margin: 0; padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; text-align: center; list-style: none; }
/* 날마다 처음 온 관람객: 칸마다 막대 하나 (칸 전체가 손을 올리는 자리) */
.st-chart { position: relative; }
.st-plot { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); height: 150px; padding-top: 22px; border-bottom: 1px solid var(--line-2); }
.st-col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; min-width: 0; padding: 0; border: 0; background: transparent; cursor: default; border-radius: 4px 4px 0 0; }
.st-col:hover, .st-col:focus-visible { background: color-mix(in srgb, var(--chart) 10%, transparent); }
.st-col:focus-visible { outline-offset: -2px; }
.st-bar { display: block; width: min(24px, calc(100% - 2px)); border-radius: 4px 4px 0 0; background: var(--chart); }
.st-col:hover .st-bar, .st-col:focus-visible .st-bar { background: color-mix(in srgb, var(--chart) 82%, var(--fg)); }
.st-val { position: absolute; left: 50%; transform: translate(-50%, -4px); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.st-xs { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-top: 4px; }
.st-x { font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.st-x.now { color: var(--fg); font-weight: 600; }
.st-tip { position: absolute; top: -6px; z-index: 2; display: grid; gap: 1px; padding: 7px 10px; border-radius: 10px; background: var(--fg); color: var(--on-fg); font-size: 12px; line-height: 1.4; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); }
.st-tip b { font-size: 15px; }
.st-table summary { cursor: pointer; font-size: 13px; color: var(--muted); width: max-content; }
.st-table table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.st-table thead th { color: var(--muted); font-weight: 600; }
.st-table td, .st-table thead th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* 곳마다 머문 시간: 이름 · 막대 · 숫자 */
.st-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st-row { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; font-size: 14px; }
.st-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.st-name-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.st-track { display: block; height: 10px; }
.st-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--chart); }
.st-track.thin { height: 6px; margin-top: 4px; }
.st-num { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-num b { color: var(--fg); font-weight: 600; }
/* 인기 사진 */
.st-photos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-photo { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; }
.st-photo:hover { background: var(--surface-2); }
.st-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.st-ptext { display: grid; min-width: 0; }
.st-ptext b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-proom { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pnum { display: grid; justify-items: end; padding-right: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-pnum b { font-size: 14px; color: var(--fg); }
/* 최근 한 줄 감상: 사진 작은 그림 + 이름·감상·사진 이름 (누르면 그 사진 앞으로) */
.st-note { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; color: inherit; font: inherit; }
.st-note:hover:not(:disabled) { background: var(--surface-2); }
.st-note:disabled { cursor: default; opacity: 0.75; }
.st-note .st-thumb { width: 44px; height: 44px; }
.st-thumb.gone { visibility: hidden; }
.st-ntext { display: grid; gap: 1px; min-width: 0; }
.st-ntext > b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-nsay { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.st-nsay.masked { color: var(--muted); font-style: italic; font-size: 13px; }
.st-foot { display: flex; align-items: flex-end; gap: 8px 16px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.st-foot .note { flex: 1 1 320px; font-size: 12px; line-height: 1.6; }
@media (max-width: 640px) {
  .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-tv { font-size: 20px; }
  .st-row { grid-template-columns: minmax(0, 1fr) auto; }
  .st-row .st-track { grid-column: 1 / -1; grid-row: 2; }
  .st-plot { height: 130px; }
}

/* ---------------------------------------------------------------- 관람 기념 티켓 (마지막 방의 출구로 나가면 뜬다)
   티켓 그림은 화면 점에 딱 맞는 정수 배로 그려 넣고(app.js showTicket) 늘리지 않는다: 도트가 고르게 보이게 */
.tk-card { width: min(720px, 100%); gap: 10px; }
.tk-card .card-head .note { margin-top: 4px; font-size: 13px; }
.tk-pic { display: grid; place-items: center; min-height: 168px; padding: 4px 0; }
.tk-canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated; }
.tk-wait { margin: 0; font: 400 12px var(--pixel); color: var(--muted); }
.tk-pick { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tk-pick .lbl { margin: 0 6px 0 0; flex: none; }
.tk-photo { flex: 1; min-width: 0; padding: 0 4px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tk-card .msg:empty { display: none; }
.tk-card .row { margin-top: 2px; }
.tk-block { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.tk-block-text { flex: 1; min-width: 0; }
.tk-block h3 { margin: 0; font-size: 16px; font-weight: 700; }
.tk-block p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.tk-icon {
  flex: none; width: 36px; height: 24px; image-rendering: pixelated;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' shape-rendering='crispEdges'%3E%3Cpath fill='%23e3a64c' d='M1 0h10v1h2V0h4v1h1v10h-1v1h-4v-1h-2v1H1v-1H0V1h1z'/%3E%3Cpath fill='%2316171b' d='M3 3h6v1H3zM3 5h4v1H3zM3 8h3v1H3zM12 2h1v1h-1zM12 4h1v1h-1zM12 6h1v1h-1zM12 8h1v1h-1z'/%3E%3C/svg%3E");
}
@media (max-width: 520px) {
  .tk-pic { margin: 0 -12px; }   /* 휴대폰: 티켓을 창 폭 가까이 크게 */
  .tk-pick .lbl { display: none; }
  .tk-card .row .btn { flex: 1; }
  .tk-card .row .spacer { display: none; }
}

/* ---------------------------------------------------------------- 소리 (src/sound.js): 위 메뉴의 스피커 단추와 작은 창, 시작 화면 단추, 꾸미기 음악 탭 */
.snd { position: relative; flex: none; }
.snd-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--fg); cursor: pointer; }
.snd-btn:hover { background: var(--surface-2); }
.snd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.snd-btn svg { width: 18px; height: 18px; }
.snd-btn.off { color: var(--muted); }
.snd-btn.off .on-w, .snd-btn:not(.off) .off-x, .ts-sound.off .on-w, .ts-sound:not(.off) .off-x { display: none; }
.snd-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 25; width: min(280px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: var(--fg);
}
.snd-pop[hidden] { display: none; }
.snd-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.snd-main { grid-template-columns: 1fr auto; font-size: 14px; }
.snd-row input[type='range'] { width: 100%; margin: 0; accent-color: var(--accent); }
.snd-row input[type='range']:disabled { opacity: 0.45; }
.switch { appearance: none; -webkit-appearance: none; position: relative; width: 40px; height: 24px; margin: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background 0.15s; }
.switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.snd-now { margin: 0; font-size: 12px; color: var(--fg); min-height: 1.4em; }
.snd-now:empty { display: none; }
.snd-help { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ts-sound {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 0; background: rgba(13, 18, 34, 0.72); color: #f3ecdf;
  font: 400 12px var(--pixel); cursor: pointer;
}
.ts-sound svg { width: 14px; height: 14px; }
.ts-sound.off { color: #a9a6b8; }
.ts-sound:hover { background: rgba(13, 18, 34, 0.9); }
.ts-sound:focus-visible { outline: 2px solid #fffaf0; outline-offset: 2px; }
.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.opt-music { display: grid; align-content: start; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
.opt-music:hover { border-color: var(--line-2); }
.opt-music:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt-music[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.om-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.om-head .opt-tag { position: static; }
.om-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.dp-snd-off { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }
/* 휴대폰: 스피커 단추가 메뉴 가운데에 있어서 창을 위 메뉴 오른쪽 끝에 맞춘다 (화면 밖으로 나가지 않게) */
@media (max-width: 820px) {
  .snd { position: static; }
  .snd-pop { right: 12px; top: calc(100% + 6px); }
}

/* ---------------------------------------------------------------- 필름 (전시를 열고 키우는 것)
   필름 통 그림(도트)은 글씨색 몸통에 레일 조명 호박색 띠. 위 메뉴의 필름 단추, 내 필름 창, 전시 열기 창의 달력·필름 명세 */
.film-ico { width: 16px; height: 16px; flex: none; image-rendering: pixelated; }  /* PixelLab 필름 통 (assets/v2/ui/film-16·32.png) */
.film-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--fg); font: 700 14px/1 var(--body); font-variant-numeric: tabular-nums; cursor: pointer; }
.film-btn:hover { background: var(--surface-2); border-color: var(--accent); }
.film-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .film-btn { padding: 0 9px 0 8px; gap: 4px; } }
.acct-films { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.acct-films:hover { border-color: var(--accent); }
.acct-films .acct-films-go { margin-left: auto; color: var(--accent-ink); font-size: 13px; font-weight: 600; }

.films-card { width: min(600px, 100%); gap: 14px; }
.fm-big { display: inline-flex; align-items: center; gap: 8px; }
.fm-big .film-ico { width: 32px; height: 32px; }
.fm-big b { font-size: 28px; font-variant-numeric: tabular-nums; }
.fm-sec { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.fm-sec h3 { margin: 0; font-size: 15px; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fm-table th { text-align: left; font-weight: 500; padding: 6px 0; }
.fm-table td { text-align: right; font-weight: 700; padding: 6px 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fm-table tr + tr th, .fm-table tr + tr td { border-top: 1px dashed var(--line); }
.fm-table .note { font-size: 12px; }
.fm-table .fm-incl th, .fm-table .fm-incl td { color: var(--muted); font-weight: 500; }
.fm-get { display: grid; gap: 8px; }
.fm-get-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.fm-get-row > div { flex: 1 1 auto; min-width: 0; }
.fm-get-row .note { font-size: 13px; }
.fm-log, .fm-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.fm-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.fm-when { color: var(--muted); font-size: 12px; }
.fm-what { display: grid; min-width: 0; }
.fm-what .note { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.fm-n.plus { color: var(--ok); }
.fm-n.minus { color: var(--fg); }
.fm-left { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fm-admin { background: var(--accent-soft); margin: 0 -24px -24px; padding: 14px 24px 24px; border-radius: 0 0 18px 18px; border-top: 0; }
.fm-grant { display: grid; gap: 6px; }
.fm-grant-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fm-grant-row > input { flex: 1 1 220px; }
.fm-num { display: grid; gap: 2px; flex: 0 0 120px; }
.fm-memo { display: grid; gap: 2px; flex: 1 1 220px; }
/* 동시에 여는 전시 · VIP */
.fm-live-n { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-exs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fm-ex { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.fm-ex-t { display: grid; flex: 1 1 auto; min-width: 0; font-size: 14px; }
.fm-ex-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-ex-t .note { font-size: 12px; }
.fm-ex .btn { flex: 0 0 auto; }
.fm-vip { margin-top: 4px; }
.fm-vip-row { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fm-vip-btns { display: flex; gap: 8px; margin-left: auto; }
.fm-recent-h { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.fm-recent li { padding: 4px 0; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .fm-admin { margin: 0 -20px -20px; padding: 14px 20px 20px; } }
@media (max-width: 420px) { .fm-item { grid-template-columns: minmax(0, 1fr) auto; } .fm-when { grid-column: 1 / -1; } .fm-left { grid-column: 2; } }

/* 달력: 여는 날 → 닫는 날. 색은 필름 수(3개월 미만·6개월 미만·1년 미만) */
.cal { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.cal-picks { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; }
.cal-pick { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.cal-pick span { font-size: 12px; color: var(--muted); }
.cal-pick b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-pick[aria-pressed='true'] { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.cal-pick:disabled { cursor: default; background: var(--surface-2); }
.cal-arrow { color: var(--muted); }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-month { font-size: 15px; }
.cal-nav { width: 34px; height: 34px; font-size: 20px; line-height: 1; }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.cal-wd:first-child { color: var(--bad); }
.cal-d { position: relative; height: 38px; border: 0; border-radius: 8px; background: transparent; font: 500 14px/1 var(--body); font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-d:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--fg); }
.cal-d:disabled { color: var(--line-2); cursor: default; }
.cal-d.z1, .cal-d.z3 { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cal-d.z6 { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cal-d.z12 { background: color-mix(in srgb, var(--accent) 36%, transparent); }
.cal-d { color: var(--muted); }
.cal-d.in { color: var(--fg); font-weight: 700; }
.cal-d.start, .cal-d.end { background: var(--fg); color: var(--on-fg); font-weight: 700; box-shadow: none; }
.cal-d.today::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal-d.start.today::after, .cal-d.end.today::after { background: var(--on-fg); }
.cal-d:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.cal-lg { display: inline-flex; align-items: center; gap: 5px; }
.cal-lg i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); }
.cal-lg.z1 i, .cal-lg.z3 i { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cal-lg.z6 i { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.cal-lg.z12 i { background: color-mix(in srgb, var(--accent) 36%, transparent); }
.cal-quick .chip { padding: 5px 10px; font-size: 12px; }
.cal-sum { margin: 0; font-size: 14px; font-weight: 700; }
@media (max-width: 420px) { .cal { padding: 10px 8px; } .cal-d { height: 36px; font-size: 13px; } .cal-picks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cal-arrow { display: none; } .cal-pick b { white-space: normal; font-size: 13px; } #xe-remove { flex-basis: 100%; order: 3; } }

/* 전시 열기 창: 무료 전시 · 필름 전시 고르기 */
.xe-mode { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; min-width: 0; }
.mode-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mode-opt { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; min-width: 0; }
.mode-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mode-t { display: grid; gap: 2px; min-width: 0; }
.mode-t b { font-size: 15px; }
.mode-t .note { font-size: 12px; line-height: 1.4; }
.mode-n { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.mode-opt:has(input:checked) { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); background: var(--accent-soft); }
.mode-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-opt:has(input:disabled) { opacity: .5; cursor: default; }
@media (max-width: 420px) { .mode-row { grid-template-columns: minmax(0, 1fr); } }
.xe-free { margin: 0; font-size: 14px; color: var(--fg); }

/* 전시 열기 창: 사진 자리 고르기와 필름 명세 */
.xe-plan { border: 0; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; min-width: 0; }
.plan-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; }
.plan-text { display: grid; flex: 1 1 auto; min-width: 0; }
.plan-text b { font-size: 16px; font-variant-numeric: tabular-nums; }
.plan-text .note { font-size: 12px; }
.stepper-btns { display: flex; gap: 6px; flex: none; }
.stepper-btns .btn { min-width: 46px; font-variant-numeric: tabular-nums; }
.xe-cost { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--accent-soft); margin-top: 8px; }
.xe-bill { width: 100%; border-collapse: collapse; font-size: 14px; }
.xe-bill th { text-align: left; font-weight: 400; padding: 4px 0; }
.xe-bill th b { font-weight: 600; margin-right: 6px; }
.xe-bill th .note { font-size: 12px; }
.xe-bill td { text-align: right; padding: 4px 0; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.xe-bill .sum th, .xe-bill .sum td { border-top: 1px solid color-mix(in srgb, var(--accent-ink) 35%, transparent); padding-top: 8px; font-weight: 700; font-size: 15px; }
.xe-have { margin: 0; font-size: 13px; color: var(--accent-ink); }
.xe-have.short { color: var(--bad); font-weight: 600; }

/* ---------------------------------------------------------------- 운영자 모드 (귤이) */
.badge.staff { background: #c2410c; color: #fffdf6; }
.me.staff { border-color: #ea8a2e; background: color-mix(in srgb, #ea8a2e 14%, var(--surface)); }
.me.staff .me-img { background: color-mix(in srgb, #ea8a2e 22%, var(--surface-2)); }
.mp-card { width: min(560px, 100%); gap: 12px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.mp-opt { display: grid; justify-items: start; align-content: start; gap: 4px; padding: 14px; text-align: left; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font: inherit; }
.mp-opt:hover { border-color: var(--line-2); }
.mp-opt[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.mp-opt.staff[aria-pressed='true'] { border-color: #ea8a2e; background: color-mix(in srgb, #ea8a2e 14%, var(--bg)); box-shadow: 0 0 0 1px #ea8a2e; }
.mp-opt canvas, .mp-pic { width: 52px; height: 64px; image-rendering: pixelated; }
.mp-mode { font-size: 12px; font-weight: 700; color: var(--muted); }
.mp-opt.staff .mp-mode { color: #c2410c; }
.mp-name { font: 700 15px/1.4 var(--pixel); overflow-wrap: anywhere; }
.mp-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.acct-mode { display: grid; gap: 8px; justify-items: start; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.staff-block .sub-h { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sub-count { font-size: 13px; font-weight: 500; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mp-opt.staff .mp-mode { color: #f6a462; } }
:root[data-theme="dark"] .mp-opt.staff .mp-mode { color: #f6a462; }
.staff-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; border-left: 3px solid #ea8a2e; background: color-mix(in srgb, #ea8a2e 10%, var(--surface)); font-size: 14px; line-height: 1.6; }

/* 함께 꾸미기: 꾸미기 줄의 단추(새 신청 수), 카드 딱지, 방장 창, 초대 받기 창 */
.team-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #16171b; font-size: 11px; font-weight: 700; }
.badge.team { background: var(--accent-soft); color: var(--accent-ink); }
.ed-by { font-size: 13px; }
.tm-card { width: min(600px, 100%); gap: 14px; }
/* 사진 모두 받기 */
.zd-card { width: min(560px, 100%); gap: 14px; }
.zd-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.zd-facts li { position: relative; padding-left: 16px; color: var(--muted); }
.zd-facts li::before { content: ''; position: absolute; left: 3px; top: 0.62em; width: 5px; height: 5px; border-radius: 1px; background: var(--line-2); }
.zd-facts li.warn { color: var(--bad); }
.zd-facts li.warn::before { background: var(--bad); }
.zd-cost { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.5; word-break: keep-all; }
.zd-cost:empty { display: none; }
.zd-cost .film-ico { flex: none; image-rendering: pixelated; }
.zd-cost b { font-weight: 700; }
.zd-cost .note { display: block; margin: 2px 0 0; font-size: 12.5px; }
.zd-cost.short { background: var(--bad-soft); }
.zd-cost .link-btn { margin-left: auto; flex: none; }
.zd-steps { margin: 0; }
.zd-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.zd-parts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.zd-parts li span { min-width: 0; overflow-wrap: anywhere; }
.zd-parts li small { color: var(--muted); margin-left: 6px; white-space: nowrap; }
.facts li .zd-open { flex: none; }
/* 사진 보호: 저장 막기·워터마크 (src/protect.js) */
.pt-card { width: min(720px, 100%); gap: 14px; }
.pt-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.pt-switch:has(input:checked) { border-color: var(--line-2); background: var(--surface-2); }
.pt-switch .switch { flex: none; }
.pt-sw-t { display: grid; gap: 2px; min-width: 0; word-break: keep-all; }
.pt-sw-t .note { font-size: 13px; }
.pt-mark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.pt-mark[hidden] { display: none; }
.pt-opts { display: grid; gap: 6px; min-width: 0; }
.pt-opts .lbl:first-child { margin-top: 0; }
.pt-count { font-weight: 500; font-variant-numeric: tabular-nums; }
.pt-chips .chip { padding: 5px 10px; font-size: 12.5px; }
.pt-two { display: flex; flex-wrap: wrap; column-gap: 18px; row-gap: 2px; }
.pt-preview { margin: 0; display: grid; gap: 6px; }
.pt-preview canvas { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.pt-preview .note { font-size: 12.5px; }
.pt-steps { margin: 0; }
.pt-card .msg.ok { color: var(--ok); }
.pt-facts li.ok { color: var(--ok); }
.pt-facts li.ok::before { background: var(--ok); }
@media (max-width: 640px) { .pt-mark { grid-template-columns: 1fr; } .pt-preview { order: -1; } }
/* 저장 막기를 켠 전시의 사진: 길게 누르기 메뉴(iOS)·끌어 놓기·선택을 막는다 (오른쪽 클릭은 app.js 가 막는다) */
[data-guard] img, img[data-guard], canvas[data-guard] { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.tm-body { display: grid; gap: 16px; max-height: min(66vh, 620px); overflow-y: auto; padding: 2px; margin: 0 -2px; }
.tm-sec { display: grid; gap: 8px; }
.tm-sec h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tm-sec h3 small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tm-sec .steps { margin: 0; }
.tm-link { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tm-link input { flex: 1 1 220px; min-width: 0; font-size: 13px; padding: 7px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tm-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.tm-who { display: grid; gap: 1px; min-width: 0; }
.tm-who b { font-size: 14px; overflow-wrap: anywhere; }
.tm-who span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.tm-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.tm-acts select { min-height: 34px; padding: 0 8px; font-size: 13px; border-radius: 8px; }
.tm-out { grid-column: 1 / -1; display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; justify-content: flex-end; padding-top: 8px; border-top: 1px dashed var(--line-2); font-size: 13px; }
.tm-empty { color: var(--muted); font-size: 14px; margin: 0; }
.tm-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.tm-foot .note { flex: 1 1 240px; font-size: 13px; }
@media (max-width: 480px) { .tm-item { grid-template-columns: minmax(0, 1fr); } .tm-acts { justify-content: flex-start; } }
.jn-card #jn-text { margin: 0; font-size: 15px; line-height: 1.6; }
.jn-card .msg:empty { display: none; }
.zd-card .msg.ok { color: var(--ok); }
.zd-card .msg:empty { display: none; }

/* 신고와 가리기 (src/report.js): 신고 단추는 눈에 덜 띄게, 가린 글은 흐리게, 운영자 신고함 */
.rp-link { font-size: 12px; font-weight: 500; color: var(--muted); }
.rp-link:hover { color: var(--bad); }
.note-del + .note-del { margin-left: 0; }
.gb-tools { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; margin-left: auto; }
.gb-tools .note-del { margin-left: 0; }
.badge.hid { background: var(--warn-soft); color: var(--warn); }
.gb-item.hid { opacity: 0.72; outline: 1px dashed var(--line-2); outline-offset: -1px; }
.gb-item.muted { display: block; background: none; border: 1px dashed var(--line-2); }
.muted-line { margin: 0; color: var(--muted); font-size: 13px; font-style: italic; }
.muted-line .link-btn { font-style: normal; font-size: 12px; }
.notes li.muted { border-bottom-style: dashed; }
.say-log-mute { margin: 0; color: var(--muted); font-size: 12px; }
.sl-rep:hover { color: var(--bad); }
.ab-report { margin: 4px 0 0; }
.ab-report .link-btn { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ab-report .link-btn:hover { color: var(--bad); }
.lb-mod { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; line-height: 1.5; }
#bye-report { justify-self: start; }

#report { z-index: 40; } /* 크게 보기·작별 인사 창 위에서도 뜨게 */
.report-card { width: min(480px, 100%); gap: 12px; }
.rp-quote { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.rp-quote:empty { display: none; }
.rp-img { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.rp-q { display: grid; gap: 2px; min-width: 0; }
.rp-q b { font: 700 12px/1.5 var(--pixel); }
.rp-q p { margin: 0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.rp-form { display: grid; gap: 8px; }
.rp-why { margin: 0; padding: 0; border: 0; min-width: 0; }
.rp-why legend { padding: 0; margin-bottom: 6px; }
.rp-reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.rp-reason { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; cursor: pointer; }
.rp-reason input { width: auto; margin: 0; accent-color: var(--bad); }
.rp-reason:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.rp-form textarea { resize: vertical; min-height: 56px; }
.rp-mute { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.rp-mute input { width: auto; margin: 3px 0 0; }
.rp-note { font-size: 12.5px; line-height: 1.55; }
.rp-done { display: grid; gap: 6px; }
.rp-done p { margin: 0; }

/* 운영자 모드: 위 메뉴의 신고함 단추(처리할 대상 수), 전시 고르기의 안내, 신고함 창 */
.rq-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fffdf6; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rq-home { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(234, 138, 46, 0.45); background: rgba(234, 138, 46, 0.1); }
.rq-home p { margin: 0; font-size: 14px; }
.reports-card { width: min(720px, 100%); gap: 12px; }
.reports-card .card-head .note { margin-top: 4px; font-size: 13px; }
.rq-tabs .chip span:not(:empty) { margin-left: 4px; font-weight: 700; }
.rq-body { display: grid; gap: 10px; max-height: min(66vh, 680px); overflow-y: auto; padding: 2px; margin: 0 -2px; overscroll-behavior: contain; }
.rq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rq-item { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.rq-item.handled { background: var(--surface-2); border-style: dashed; }
.rq-head { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.rq-kind { background: var(--bad-soft); color: var(--bad); }
.rq-ex { overflow-wrap: anywhere; text-align: left; }
.rq-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.badge.rq-done { background: var(--ok-soft); color: var(--ok); }
.rq-what { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.rq-item.handled .rq-what { background: var(--surface); }
.rq-what:has(.rq-img) { grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
.rq-what p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.rq-what .note { font-size: 12.5px; }
.rq-img { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; background: var(--surface); grid-row: span 3; }
.rq-said { white-space: pre-wrap; }
.rq-why { margin: 0; font-size: 13px; font-weight: 600; color: var(--bad); }
.rq-notes { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.rq-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rq-ban { order: 2; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 8px; border-top: 1px dashed var(--line-2); font-size: 13px; }
.rq-ban .note { font-size: 13px; }
.rq-ban-l { color: var(--muted); }
.rq-banned { font-weight: 700; color: var(--bad); }
.rq-ban-item .btn { justify-self: start; }
@media (max-width: 480px) { .rq-what:has(.rq-img) { grid-template-columns: 64px minmax(0, 1fr); } .rq-img { width: 64px; height: 64px; } }
.rq-item > p { margin: 0; }
/* 위 메뉴의 「운영」 (운영자 모드): 승인 대기 + 처리할 신고 수 */
.nav-rq:not([hidden]) { display: inline-flex; align-items: center; }
@media (max-width: 820px) { .nav-rq:not([hidden]) { display: flex; } }

/* ---------------------------------------------------------------- 도슨트 투어
   관람 화면 위 「도슨트 투어」 단추, 관람 화면 아래 투어 띠(지금 사진·이야기·앞/멈춤/다음), 크게 보기 창의 도슨트 이야기,
   방장의 투어 고치기 창(사진 고르기 → 순서와 이야기) */
.tour-btn { display: inline-flex; align-items: center; gap: 6px; }
.tour-btn svg { flex: none; }
.tour-btn[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #16171b; }
.tour-bar { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 96px; padding: 12px 14px 15px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.tour-bar[hidden] { display: none; }
.tb-pic { position: relative; width: 92px; height: 68px; margin: 4px; padding: 0; border: 0; border-radius: 2px; background: #16171b; cursor: zoom-in; overflow: hidden; outline: 3px solid #fafaf7; box-shadow: 0 0 0 4px #16171b; }
.tb-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tb-pic:disabled { cursor: default; }
.tb-pic[hidden] { display: none; }
.tb-main { min-width: 0; align-self: start; }
.tb-top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; font-size: 12px; color: var(--muted); }
.tb-tag { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--pixel); color: var(--accent-ink); letter-spacing: 0.04em; }
.tb-pos { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--fg); }
.tb-state:not(:empty) { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.tour-bar[data-phase='walk'] .tb-state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 1px; background: var(--accent); vertical-align: 1px; animation: tb-step 0.8s steps(2) infinite; }
@keyframes tb-step { 50% { transform: translateY(-2px); } }
.tb-title { margin: 4px 0 0; font-size: 17px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.tb-meta { margin: 0; font-size: 12px; color: var(--muted); }
.tb-meta:empty { display: none; }
.tb-text { margin: 6px 0 0; font-size: 14.5px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.tb-text[hidden] { display: none; }
.tb-acts, .tb-end { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.tb-acts[hidden], .tb-end[hidden] { display: none; }
.tb-play .i-play, .tb-play.paused .i-pause { display: none; }
.tb-play.paused .i-play { display: block; }
.tb-play.paused { background: var(--accent); border-color: var(--accent); color: #16171b; }
.tb-time { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tb-time i { display: block; width: 0; height: 100%; background: var(--accent); }
@media (max-width: 720px) {
  .tour-bar { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 10px 12px 13px; }
  .tb-pic { width: 68px; height: 52px; }
  .tb-acts, .tb-end { grid-column: 1 / -1; justify-content: space-between; }
  .tb-acts .tb-view { margin-left: auto; }
  .tb-title { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .tour-bar[data-phase='walk'] .tb-state::before { animation: none; } }
/* 크게 보기 창: 투어로 보는 사진이면 주최자의 이야기 */
.lb-docent { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-left: 3px solid var(--accent); }
.lb-docent[hidden] { display: none; }
.lb-docent-h { margin: 0 0 2px; font: 700 12px/1.4 var(--pixel); color: var(--accent-ink); letter-spacing: 0.04em; }
.lb-docent p { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-line; }
/* 투어 고치기 창 */
.te-card { width: min(720px, 100%); gap: 10px; }
.te-card .card-head .note { margin-top: 4px; font-size: 13px; }
.te-sec { border: 0; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; min-width: 0; }
.te-pick { display: grid; gap: 12px; max-height: min(40vh, 340px); overflow-y: auto; padding: 2px 2px 4px; }
.te-room-h { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.te-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.te-ph { position: relative; display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted); font: 500 12px/1.3 var(--body); text-align: left; cursor: pointer; min-width: 0; }
.te-ph:hover { border-color: var(--line-2); color: var(--fg); }
.te-ph img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.te-ph[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); box-shadow: 0 0 0 1px var(--accent); }
.te-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.te-k { position: absolute; top: 0; left: 0; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 9px 0 8px 0; background: var(--accent); color: #16171b; font: 700 12px/22px var(--body); text-align: center; font-variant-numeric: tabular-nums; }
.te-quick { margin-top: 0; }
.te-quick [hidden] { display: none; }
.te-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.te-stop { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.te-pic { width: 76px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.te-body { display: grid; gap: 4px; min-width: 0; }
.te-head { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; margin: 0; font-size: 14px; }
.te-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; background: var(--fg); color: var(--on-fg); font-size: 12px; font-variant-numeric: tabular-nums; }
.te-where { font-size: 12px; color: var(--muted); }
.te-body textarea { width: 100%; min-height: 58px; resize: vertical; font-size: 14px; }
.te-count { justify-self: end; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.te-tools { display: grid; gap: 4px; }
.te-tool { width: 32px; height: 32px; font-size: 12px; }
.te-empty[hidden] { display: none; }
@media (max-width: 520px) {
  .te-stop { grid-template-columns: 56px minmax(0, 1fr); }
  .te-pic { width: 56px; }
  .te-tools { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .te-thumbs { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
}

/* ---------------------------------------------------------------- 제목줄의 공유 · 꾸미기 · ⋯ (UX 개편 1단계)
   꾸미기 띠(단추 9개)를 없애고: 공유는 누가 볼 수 있는지와 링크를 한 판에, 가끔 쓰는 것은 ⋯ 안에, 설정은 「전시 관리」 창 하나에 */
.pop-wrap { position: relative; display: inline-flex; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 12; min-width: 200px; display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
}
.pop-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.pop-item:hover, .pop-item:focus-visible { background: var(--surface-2); outline: none; }
.more-btn[aria-expanded='true'], #btn-share[aria-expanded='true'] { background: var(--surface-2); border-color: var(--fg); }
#btn-share svg { flex: none; }
.start-btn { gap: 6px; }
.share-pop { width: min(380px, calc(100vw - 32px)); padding: 16px; gap: 12px; }
.pop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pop-h { margin: 0; font-size: 16px; font-weight: 700; }
.sp-state { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; }
.sp-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.sp-step { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 0; }
.sp-step + .sp-step { border-top: 1px solid var(--line); }
.sp-step:first-child { padding-top: 0; }
.sp-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.sp-step.reach .sp-dot { border-color: var(--accent); }
.sp-step.on .sp-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sp-t { display: grid; gap: 1px; min-width: 0; }
.sp-t b { font-size: 14px; }
.sp-t span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.sp-step.on .sp-t b { color: var(--accent-ink); }
.sp-step .btn { justify-self: end; }
.sp-link { display: flex; gap: 6px; }
.sp-link input { flex: 1; width: 0; padding: 7px 10px; font-size: 13px; color: var(--muted); background: var(--bg); }
.share-pop .msg:empty { display: none; }
@media (max-width: 640px) {
  /* 휴대폰: 공유 판은 화면 아래에서 올라온다 (단추 자리에 매달면 화면 밖으로 나간다) */
  .share-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; padding: 18px var(--gutter-r) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); border-radius: 18px 18px 0 0; z-index: 26; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2); }
}

/* ---------------------------------------------------------------- 꾸미기 패널 (무대 옆에 붙는다)
   컴퓨터(1024px 넘게): 무대 오른쪽 320px 칸, 위 메뉴 아래에 붙어 따라온다. 태블릿: 무대 아래. 휴대폰: 아래에서 올라오는 판 */
.deco-panel { gap: 12px; padding: 14px; align-content: start; }
.dp-head { display: grid; gap: 10px; align-items: stretch; justify-content: stretch; }
.dp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dp-h { font-size: 16px; }
.dp-manage { font-size: 13px; }
.dp-grip { display: none; }
.dp-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.dp-tab { padding: 7px 4px; border: 0; border-radius: 8px; background: none; font: 600 13px/1.2 var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.dp-tab:hover { color: var(--fg); }
.dp-tab[aria-selected='true'] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(22, 23, 27, 0.12); }
.dp-main { display: grid; gap: 12px; min-width: 0; }
.dp-note { margin: 0; }
.dp-note:empty { display: none; }
.dp-sub { gap: 4px; }
.dp-sub .chip { padding: 5px 10px; font-size: 12.5px; }
.dp-sub .chip[aria-selected='true'] { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.dp-sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dp-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.drop {
  display: grid; justify-items: center; gap: 2px; width: 100%; padding: 16px 12px; border: 1.5px dashed var(--line-2); border-radius: 12px;
  background: var(--bg); color: var(--fg); font: inherit; text-align: center; cursor: pointer;
}
.drop b { font-size: 14px; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:disabled { opacity: 0.55; cursor: default; }
.stage-wrap.drop-over { box-shadow: inset 0 0 0 3px var(--accent); }
.dp-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.dp-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.dp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.dp-ph { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.dp-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dp-ph:hover { border-color: var(--fg); }
.dp-ph i { position: absolute; left: 0; top: 0; min-width: 18px; padding: 0 4px; border-radius: 0 0 6px 0; background: rgba(22, 23, 27, 0.72); color: #fafaf7; font: 600 11px/18px var(--body); font-style: normal; text-align: center; }
/* 벽에 거는 크기 표시: 크게(금색 테두리) · 묶음 위/아래 · 작게 */
.dp-ph em { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(22, 23, 27, 0.78); color: #fafaf7; font: 700 10.5px/17px var(--body); font-style: normal; text-align: center; white-space: nowrap; overflow: hidden; }
.dp-ph em.big { background: rgba(240, 192, 64, 0.94); color: #1e1a20; }
.dp-ph.big { outline: 2px solid #f0c040; outline-offset: -2px; }
.dp-ph.add { display: grid; place-items: center; border-style: dashed; background: transparent; color: var(--muted); font-size: 20px; }
.dp-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dp-room { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 13.5px; text-align: left; cursor: pointer; }
.dp-room b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-room span { flex: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dp-room[aria-current='true'] { border-color: var(--accent); background: var(--accent-soft); }
.dp-desc textarea { width: 100%; resize: vertical; font-size: 14px; }
.dp-desc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-desc-foot .dp-count { margin-right: auto; }
.bulk { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.bulk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.bulk-head .link-btn { font-size: 12.5px; }
.bulk-ask { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; }
.bulk-ask p { margin: 0; }
.bulk-ask .row { margin-top: 0; }
.bulk-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: grid; gap: 3px; max-height: 196px; overflow-y: auto; overscroll-behavior: contain; }
.bulk-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 12.5px; line-height: 1.5; }
.bk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-st { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bulk-list li.run .bk-st { color: var(--accent-ink); font-weight: 600; }
.bulk-list li.done .bk-st { color: var(--ok); }
.bulk-list li.fail .bk-st, .bulk-list li.skip .bk-st { color: var(--bad); }
.bulk-list li.fail, .bulk-list li.skip { grid-template-columns: minmax(0, 1fr); }
.bulk-list li.fail .bk-st, .bulk-list li.skip .bk-st { white-space: normal; }
@media (min-width: 1024px) {
  .viewer.editing { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto auto 1fr; column-gap: 16px; align-items: start; }
  .viewer.editing > .viewer-bar { grid-column: 1 / -1; grid-row: 1; }
  .viewer.editing > .stage-wrap { grid-column: 1; grid-row: 2; }
  .viewer.editing > .tour-bar { grid-column: 1; grid-row: 3; }
  .viewer.editing > .viewer-foot { grid-column: 1; grid-row: 4; align-self: start; }
  .viewer.editing > .deco-panel {
    grid-column: 2; grid-row: 2 / 5; position: sticky; top: calc(var(--gnb-h) + 12px);
    max-height: calc(100vh - var(--gnb-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  }
  .viewer.editing .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .viewer.editing .slot-note { display: none; }
}
@media (max-width: 640px) {
  .deco-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; gap: 10px;
    max-height: max(220px, calc(100dvh - var(--gnb-h) - var(--stage-h, 270px) - 20px)); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 var(--gutter-r) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); border-radius: 18px 18px 0 0; border-bottom: 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
  }
  .dp-head { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: var(--surface); }
  .dp-grip { display: grid; place-items: center; width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
  .dp-grip i { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .deco-panel.min .dp-main { display: none; }
  body.sheet-open .site-foot { padding-bottom: 60vh; }
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot-text b { font-size: 12.5px; }
}

/* ---------------------------------------------------------------- 전시 관리 창: 탭 (기본 정보 · 기간과 필름 · 함께 꾸미기 · 도슨트 투어 · 사진 보호 · 내리기) */
.mg-card { width: min(720px, 100%); }
.mg-on.tm-card, .mg-on.pt-card, .mg-on.te-card { width: min(720px, 100%); }
.mg-tabs { display: flex; gap: 2px; margin: 2px 0 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.mg-tabs::-webkit-scrollbar { display: none; }
/* 탭을 옮겨도 창이 위아래로 뛰지 않게 위에 붙여 둔다 */
@media (min-width: 641px) { .modal:has(.mg-tabs:not([hidden])) { align-items: start; padding-top: max(32px, 5vh); } }
.mg-tab { flex: none; margin-bottom: -1px; padding: 8px 10px 9px; border: 0; border-bottom: 2px solid transparent; background: none; font: 600 14px/1.2 var(--body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.mg-tab:hover { color: var(--fg); }
.mg-tab[aria-selected='true'] { color: var(--fg); border-bottom-color: var(--fg); }
.mg-tab.out[aria-selected='true'] { color: var(--bad); border-bottom-color: var(--bad); }
.mg-tab .team-n { margin-left: 4px; }
.xe-head .x-btn { margin-left: -4px; }
.xe-part, .xe-more { display: grid; gap: 8px; min-width: 0; }
#xe-form[data-tab='info'] .xe-part:not([data-tab='info']),
#xe-form[data-tab='plan'] .xe-part:not([data-tab='plan']),
#xe-form[data-tab='remove'] .xe-part:not([data-tab='remove']) { display: none; }
#xe-form[data-tab='info'][data-pay='1'] #xe-cost { display: grid; }
#xe-form[data-tab='new'] .xe-more, #xe-form[data-tab='new'] .xe-out, #xe-form[data-tab='remove'] #xe-save { display: none; }
.xe-out { justify-items: start; padding: 4px 0 8px; }
.xe-out-t { margin: 0; font-size: 14px; }

/* ---------------------------------------------------------------- 첫 입장: 자동으로 정한 모습 알림 (오른쪽 위 내 캐릭터 단추 아래) */
/* 컴퓨터: 프로필 단추 왼쪽, 위 메뉴 줄 안에 뜬다 (전시 제목줄 단추를 가리지 않게) */
/* 위 메뉴 줄 밖(body)에 두고 app.js 가 자리를 잡아 준다: 위 메뉴의 backdrop-filter 가 fixed 기준을 바꾸기 때문 */
.me-nudge {
  position: fixed; right: 16px; top: 30px; transform: translateY(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--fg); color: var(--on-fg); box-shadow: var(--shadow); font-size: 13.5px;
}
.me-nudge::before { content: ''; position: absolute; right: -5px; top: calc(50% - 6px); width: 12px; height: 12px; background: var(--fg); transform: rotate(45deg); }
.me-nudge p { margin: 0; white-space: nowrap; }
.me-nudge .btn { background: var(--accent); border-color: var(--accent); color: #16171b; }
.me-nudge .x-btn { width: 30px; height: 30px; color: var(--on-fg); }
.me-nudge .x-btn:hover { background: color-mix(in srgb, var(--on-fg) 14%, transparent); color: var(--on-fg); }
/* 휴대폰: 위 메뉴 줄이 좁으니 화면 아래에 알림처럼 (알림 한 줄은 그 위로 비켜 난다) */
@media (max-width: 640px) {
  .me-nudge { right: auto !important; left: 50%; top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
  .me-nudge::before { display: none; }
  .me-nudge p { font-size: 12.5px; }
  body.nudge-on .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------- 위 메뉴: 프로필 단추 하나 (UX 개편 2단계)
   로그인·필름·내 계정·신고함 단추를 프로필 단추의 「내 메뉴」 하나로. 관람객에게는 옅은 「+ 전시 열기」, 주최자에게는 「내 전시」 */
.gnb-cta.ghost { color: var(--muted); }
.gnb-cta.ghost:hover { color: var(--fg); }
@media (min-width: 821px) { #nav-mine { display: none; } }
.me { position: relative; }
.me[aria-expanded='true'] { background: var(--surface-2); border-color: var(--fg); }
.me-dot { position: absolute; top: 2px; left: 28px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--surface); }
.me-pop { width: 260px; }
.mpop-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mpop-head .me-img { width: 40px; height: 40px; }
.mpop-who { display: grid; gap: 2px; min-width: 0; }
.mpop-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpop-who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpop-who span:empty { display: none; }
.mpop-films { display: inline-flex; align-items: center; gap: 8px; }
#mpop-films b { font-variant-numeric: tabular-nums; }
.pop-sep { height: 1px; margin: 4px 6px; border: 0; background: var(--line); }
.pop-item.danger { color: var(--bad); }
.mini-switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); transition: background 0.15s; }
.mini-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
[aria-checked='true'] > .mini-switch { background: var(--accent); }
[aria-checked='true'] > .mini-switch::after { transform: translateX(14px); }
@media (max-width: 640px) {
  /* 휴대폰: 내 메뉴도 아래에서 올라오는 판. 위 메뉴의 backdrop-filter 는 fixed 기준을 위 메뉴로 바꿔서 휴대폰에서는 끈다 */
  .gnb { backdrop-filter: none; background: var(--surface); }
  .me-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; padding: 10px var(--gutter-r) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); border-radius: 18px 18px 0 0; z-index: 26; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2); }
  .me-pop .pop-item { padding: 13px 12px; font-size: 15px; }
  .me-dot { left: 30px; }
}

/* ---------------------------------------------------------------- 운영 (운영자 모드): 승인 대기 · 신고함 · 모든 전시 · 필름·VIP (UX 개편 2단계) */
.ops-card { width: min(820px, 100%); gap: 12px; }
.reports-card { width: min(820px, 100%); }
.ops-part { display: grid; gap: 10px; min-width: 0; }
.ops-part[hidden] { display: none; }
.ops-part .sel-list { max-height: min(62vh, 640px); overflow-y: auto; padding: 2px; margin: 0 -2px; }
.mg-tab .rq-n { margin-left: 6px; }
.mg-count { margin-left: 5px; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.ops-card .fm-admin { margin: 0; padding: 0; background: none; border-radius: 0; }
/* 알림의 「되돌리기」 단추 */
.toast.act { display: flex; align-items: center; gap: 14px; pointer-events: auto; padding-right: 10px; }
.toast-act { flex: none; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--accent); font: 700 14px/1.2 var(--body); cursor: pointer; }
.toast-act:hover { background: color-mix(in srgb, var(--on-fg) 14%, transparent); }

/* ---------------------------------------------------------------- 창 틀 통일 (UX 개편 2단계)
   머리: 이름표·제목 왼쪽, 「도움말」과 ✕ 는 오른쪽에 나란히. 설명 문단은 이용 안내로 (창마다 「도움말」이 맞는 탭을 연다) */
.card-head > :first-child { flex: 1; min-width: 0; }
.card-head > .help-btn { margin-left: auto; }
#help { z-index: 32; }   /* 다른 창의 「도움말」로 열면 그 창 위에 */
.help-card { width: min(720px, 100%); max-height: calc(100dvh - 2 * max(32px, 5vh)); grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; }
.help-card .mg-tabs { margin-top: 0; }
.help-card > .help-body { overflow-y: auto; overscroll-behavior: contain; margin: 0 -24px -24px; padding: 4px 24px 24px; }
.help-part { display: grid; gap: 14px; min-width: 0; }
.help-part[hidden] { display: none; }
.help-part h3 { scroll-margin-top: 12px; }
.help-part .fm-table { margin: 0; }
/* 긴 창(내 전시 열기·전시 관리·사진 걸기·도슨트 투어·사진 보호): 아래 단추 줄은 창이 화면보다 길어도 늘 보이게 (출시 전 점검 2026-12-04) */
#xe-row, #ed-form > .row:last-child, #te-form > .row:last-child, #pt-form > .row:last-child {
  position: sticky; bottom: calc(-1 * max(16px, env(safe-area-inset-bottom, 0px))); z-index: 3; background: var(--surface);
  margin: 4px -24px -24px; padding: 12px 24px max(24px, calc(16px + env(safe-area-inset-bottom, 0px))); border-top: 1px solid var(--line); border-radius: 0 0 18px 18px;
}
@media (max-width: 640px) {
  #xe-row, #ed-form > .row:last-child, #te-form > .row:last-child, #pt-form > .row:last-child {
    bottom: 0; margin: 4px -20px calc(-20px - env(safe-area-inset-bottom, 0px)); padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); border-radius: 0;
  }
}

/* 키보드 표는 키보드·마우스가 있는 기기에서만 */
@media (hover: none) and (pointer: coarse) { .kb-only { display: none; } }
@media (max-width: 640px) {
  /* 휴대폰: 창은 화면 아래에서 올라오는 판 */
  .modal:not(.lightbox) { align-items: safe end; padding: max(24px, env(safe-area-inset-top, 0px)) 0 0; }
  .modal:not(.lightbox) > .card { width: 100%; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2); }
  .help-card { max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px))); }
  .help-card > .help-body { margin: 0 -20px calc(-20px - env(safe-area-inset-bottom, 0px)); padding: 4px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------- 전시 고르기: 벽에 건 포스터 격자 (UX 개편 3단계)
   「전시 둘러보기」(진행 중 · 곧 끝남 · 새로 열림 · 오픈 예정) · 「내 전시」 탭. 컴퓨터 3~4칸, 휴대폰 2칸. 관리 단추는 카드 안 아래 칸 */
.sel-sub { max-width: none; }
.sel-tabs { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 12px; background: #1e2026; border: 1px solid #2c2e35; }
.sel-tabs[hidden] { display: none; }
.sel-tab { padding: 8px 16px; border: 0; border-radius: 9px; background: none; font: 600 14px/1.2 var(--body); color: #a8a6b0; cursor: pointer; white-space: nowrap; }
.sel-tab:hover { color: #fff; }
.sel-tab[aria-selected='true'] { background: #f3f1ea; color: #16171b; }
.sel-tab-n { font-variant-numeric: tabular-nums; }
.sel-stage { grid-template-columns: minmax(0, 1fr); }
.sel-part { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.sel-part[hidden] { display: none; }
.sel-bar[hidden] { display: none; }
.sel-bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sel-count { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.sel-live { display: inline-flex; align-items: center; gap: 6px; color: #8fd6a2; }
.sel-live[hidden] { display: none; }
.sel-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(143, 214, 162, 0.22); }
.sel-kind { padding: 6px 10px; border-radius: 999px; background: #1e2026; border-color: #3a3c45; color: #c9c7cf; font-size: 13px; }
.sel-kind:focus { border-color: #e3a64c; }
.sel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 18px; min-width: 0; }
.ex-cell.poster {
  position: relative; grid-template-rows: 1fr auto; gap: 0; border: 1px solid #34363f; border-radius: 14px; overflow: hidden;
  background: rgba(28, 29, 35, 0.92); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.ex-cell.poster:hover { transform: translateY(-3px); border-color: #e3a64c; box-shadow: 0 0 0 1px #e3a64c, 0 14px 30px rgba(0, 0, 0, 0.4); }
.ex-cell.poster:has(.card-ex:focus-visible) { border-color: #e3a64c; box-shadow: 0 0 0 2px #e3a64c; }
.sel-stage .ex-cell.poster .card-ex, .sel-stage .ex-cell.poster .card-ex:hover { grid-template-rows: auto 1fr; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
.ex-cell.poster .card-ex:focus-visible { outline: none; }
/* 액자: 짙은 벽에 옅은 매트와 얇은 검은 틀로 건 사진 */
.ex-frame { position: relative; display: block; padding: 16px 16px 4px; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 238, 200, 0.07), transparent 70%); }
.ex-frame .ex-cover {
  aspect-ratio: 4 / 5; border: 6px solid #f4f1e8; border-radius: 2px; background: #2a2c33;
  box-shadow: 0 0 0 2px #0b0c0f, 0 10px 18px rgba(0, 0, 0, 0.45);
}
.ex-frame .ex-cover.empty { border-color: #3a3c45; background: #24252b; color: #a8a6b0; box-shadow: none; }
.ex-flag {
  position: absolute; top: 26px; left: 26px; max-width: calc(100% - 52px); padding: 3px 8px; border-radius: 4px;
  font: 400 12px/1.4 var(--pixel); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.ex-flag.ending { background: #c4473a; color: #fff6f2; }
.ex-flag.fresh { background: #e3a64c; color: #16171b; }
.ex-flag.soon { background: #2a3146; color: #cfe0ff; }
.ex-live.on-pic { position: absolute; left: 26px; bottom: 16px; padding: 2px 8px; border-radius: 999px; background: rgba(14, 15, 18, 0.82); color: #8fd6a2; font-size: 12px; }
.ex-cell.poster .ex-text { padding: 12px 16px 14px; }
.ex-cell.poster .ex-name { font-size: 16px; }
.ex-cell.poster .ex-desc { -webkit-line-clamp: 1; font-size: 13px; }
.ex-cell.poster .ex-acts { padding: 0 16px 16px; }
.ex-cell.poster .ex-acts::before { content: ''; flex-basis: 100%; height: 1px; margin-bottom: 6px; background: #2c2e35; }
.sel-stage .ex-acts .btn.ghost { background: #1e2026; border-color: #3a3c45; color: #e9e7ef; }
.sel-stage .ex-acts .btn.ghost:hover { border-color: #e3a64c; }
.sel-stage .ex-acts .btn.ok { background: #e3a64c; border-color: #e3a64c; color: #16171b; }
.sel-stage .badge.public { background: #1f3a2a; color: #8fd6a2; }
.sel-stage .badge.draft { background: #2a2c33; color: #c9c7cf; }
.sel-stage .badge.pending { background: #3a2d1a; color: #f0c070; }
.sel-stage .badge.rejected, .sel-stage .badge.blocked { background: #4a2420; color: #ff9d8f; }
/* 내 전시 탭 끝: 새 전시 열기 칸 */
.ex-new-tile {
  display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 240px; padding: 20px; border: 1.5px dashed #4a4c56; border-radius: 14px;
  background: transparent; color: #f3f1ea; font: inherit; text-align: center; cursor: pointer;
}
.ex-new-tile b { font: 700 15px/1.4 var(--pixel); color: #e3a64c; }
.ex-new-tile span { font-size: 13px; color: #a8a6b0; word-break: keep-all; }
.ex-new-tile:hover { border-color: #e3a64c; background: rgba(227, 166, 76, 0.06); }
/* 전시가 없을 때: 전시장 그림과 안내 */
.sel-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 14px; padding: 18px 12px 8px; text-align: center; }
.sel-empty img { width: min(380px, 100%); height: auto; image-rendering: pixelated; border-radius: 12px; box-shadow: 0 0 0 1px #34363f, 0 14px 30px rgba(0, 0, 0, 0.4); }
.sel-empty p { margin: 0; max-width: 40ch; color: #c9c7cf; font-size: 14px; }
.sel-empty .btn { background: #e3a64c; border-color: #e3a64c; color: #16171b; }
@media (max-width: 640px) {
  .sel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .sel-sort { flex: 1 1 100%; flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sel-sort::-webkit-scrollbar { display: none; }
  .sel-tabs { justify-self: stretch; }
  .sel-tab { flex: 1; padding: 8px 10px; }
  .sel-bar { gap: 8px; }
  .sel-bar-end { width: 100%; justify-content: space-between; }
  .ex-frame { padding: 10px 10px 2px; }
  .ex-frame .ex-cover { border-width: 4px; }
  .ex-flag { top: 17px; left: 17px; max-width: calc(100% - 34px); padding: 2px 6px; font-size: 11px; }
  .ex-live.on-pic { left: 17px; bottom: 9px; font-size: 11px; }
  .ex-cell.poster .ex-text { padding: 9px 10px 11px; gap: 3px; }
  .ex-cell.poster .ex-name { font-size: 14.5px; }
  .ex-cell.poster .ex-desc, .ex-cell.poster .ex-theme { display: none; }
  .ex-cell.poster .ex-kind { font-size: 11px; flex-wrap: wrap; }
  .ex-cell.poster .ex-period { font-size: 12px; line-height: 18px; flex-wrap: wrap; gap: 2px 6px; }
  .ex-cell.poster .pd-ico { display: none; }
  .ex-cell.poster .ex-meta { gap: 2px 8px; font-size: 11.5px; }
  .ex-cell.poster .ex-acts { padding: 0 10px 10px; gap: 4px; }
  .ex-cell.poster .ex-acts .btn { padding: 0 9px; font-size: 12px; }
  .ex-new-tile { min-height: 180px; }
}

/* ---------------------------------------------------------------- 휴대폰 전시실 (UX 개편 3단계)
   위는 한 줄(뒤로 · 방 이름 · ⋯), 무대는 크게(app.js hallK), 이 방 사진은 무대 바로 아래 가로 줄,
   말풍선·이모티콘은 떠 있는 단추 하나 (누르면 아래에서 판이 올라온다) */
.strip, .chat-fab, .vf-head { display: none; }
@media (min-width: 641px) { .ph-only { display: none !important; } }
@media (max-width: 640px) {
  .viewer { gap: 10px; }
  .viewer-bar { flex-wrap: nowrap; gap: 8px; }
  .vb-left { flex: 1 1 auto; gap: 8px; }
  .vb-titles { flex: 1; }
  .vb-titles h1 { font-size: 18px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .crumbs { flex-wrap: nowrap; font-size: 12px; }
  .crumbs > :nth-child(-n+2) { display: none; }   /* 「전시 고르기 ›」는 뒤로 단추가 대신한다 */
  .scene-note { display: none; }
  .vb-stats { flex-wrap: nowrap; gap: 4px; margin-top: 3px; }
  .vb-stats .stat { gap: 4px; padding: 1px 7px 1px 6px; font-size: 11.5px; }
  .vb-stats .stat svg { width: 13px; height: 13px; }
  .ph-hide { display: none; }
  .vb-actions { flex: none; flex-wrap: nowrap; gap: 6px; }
  .vb-actions > .stepper, #btn-tour, #btn-share { display: none !important; }
  /* 사진 줄 */
  .strip:not([hidden]) { display: grid; gap: 6px; }
  .viewer.editing .strip { display: none; }
  .strip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
  .strip-h { margin: 0; font-size: 14px; font-weight: 700; }
  .strip-step { display: inline-flex; align-items: center; gap: 2px; }
  .strip-step .icon-btn { width: 34px; height: 34px; }
  .strip-step .room-pos { min-width: 3em; }
  .strip-row {
    display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding: 2px var(--gutter-r) 4px var(--gutter-l); scroll-padding-inline: var(--gutter-l);
  }
  /* 끝에 말풍선 단추(.chat-fab, 54px) 자리를 비워 둬서 마지막 사진을 단추 옆까지 밀어 볼 수 있게 (출시 전 점검 2026-12-04) */
  .strip-row::after { content: ''; flex: none; width: 56px; }
  .strip-row::-webkit-scrollbar { display: none; }
  .strip-item { position: relative; flex: none; display: grid; gap: 4px; width: 76px; padding: 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; scroll-snap-align: start; }
  .strip-item.room { width: 132px; }
  .strip-img { display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
  .strip-item.room .strip-img { aspect-ratio: 4 / 3; }
  .strip-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .strip-cap { position: absolute; left: 4px; top: 4px; min-width: 20px; padding: 0 5px; border-radius: 6px; background: rgba(22, 23, 27, 0.72); color: #fafaf7; font: 600 11px/18px var(--body); text-align: center; font-variant-numeric: tabular-nums; }
  .strip-item.room .strip-cap { position: static; padding: 0; background: none; color: var(--fg); font-size: 12.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .strip-item.near .strip-img { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
  .strip-item:focus-visible { outline: none; }
  .strip-item:focus-visible .strip-img { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); }
  /* 이 방 사진(로비는 방)은 위 줄에 있으니 아래 전시 소개 옆 칸은 뺀다 */
  .about-rooms { display: none; }
  /* 말풍선·이모티콘 */
  .chat-fab {
    position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 17;
    display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%;
    background: var(--fg); color: var(--on-fg); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28); cursor: pointer;
  }
  .chat-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
  .chat-fab-dot { position: absolute; top: 5px; right: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--fg); }
  .viewer.chat-open .chat-fab, .viewer.editing .chat-fab, body.nudge-on .chat-fab, .viewer:has(> .tour-bar:not([hidden])) .chat-fab { display: none; }
  .viewer-foot { display: none; }
  .viewer.chat-open .viewer-foot {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; display: flex; gap: 12px;
    padding: 10px var(--gutter-r) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gutter-l);
    background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
  }
  .vf-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
}

/* 남은 창도 같은 틀로 (UX 개편 6 마무리): 전시 소개 포스터는 사진 위 오른쪽에 ✕ */
.poster-card { position: relative; }
.x-btn.on-pic { position: absolute; top: 10px; right: 10px; z-index: 1; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--fg); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.x-btn.on-pic:hover { background: var(--surface); }

/* ---------------------------------------------------------------- 작가 페이지와 팔로우 (src/follow.js · app.js 「작가 페이지와 팔로우」)
   전시 소개의 작가 줄(얼굴 · 작가 ○○ › · 팔로우), 작가 페이지 창, 내 메뉴 › 팔로우한 작가 창, 전시 고르기 맨 위 「팔로우한 작가의 전시」.
   캐릭터 얼굴은 52×64 그림을 정수 배(작가 페이지 2배)로 키우거나 둥글게 잘라 쓴다 */
.host-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 2px 0 4px; }
.host-chip {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 3px 12px 3px 3px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-size: 13px; text-align: left; transition: border-color 0.15s, background-color 0.15s;
}
.host-chip:hover { background: var(--surface-2); border-color: var(--accent); }
.host-pic { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); image-rendering: pixelated; object-fit: cover; object-position: 50% 15%; }
.host-lbl { color: var(--muted); font-size: 12px; white-space: nowrap; }
.host-name { min-width: 0; font: 700 12px/1.5 var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-go { color: var(--muted); font-weight: 700; }
.follow-btn.on { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.follow-btn.on::before { content: '✓'; font-size: 12px; color: var(--ok); }
.follow-btn.on:hover { background: var(--surface-2); }
.ex-host { min-width: 0; font: 400 12px/1.5 var(--pixel); color: var(--accent-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-stage .ex-host { color: #f0c070; }
#mpop-follows b { font-variant-numeric: tabular-nums; }

/* 작가 페이지 */
.artist-card { width: min(760px, 100%); gap: 14px; }
.ar-who { display: flex; align-items: center; gap: 18px; }
.ar-pic { flex: none; width: 104px; height: 128px; border-radius: 14px; background: var(--surface-2); image-rendering: pixelated; box-shadow: inset 0 0 0 1px var(--line); }
.ar-meta { display: grid; gap: 10px; min-width: 0; }
.ar-count { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ar-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ar-bio { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.ar-bio.empty { background: none; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; }
.ar-bio-form { display: grid; gap: 6px; }
.ar-bio-form label { font-size: 13px; font-weight: 600; }
.ar-bio-form .row { margin-top: 0; }
.lbl-sub { margin-left: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
.ar-exs { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ar-exs h3 { margin: 0; font-size: 16px; font-weight: 700; }
.ar-ex-n, .fl-n { margin-left: 4px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.ar-ex-note:empty { display: none; }
/* 작가의 전시: 전시 고르기 화면처럼 어두운 벽에 건 포스터 */
.ar-wall { padding: 16px; border-radius: 14px; gap: 0; }
.ar-wall::before { display: none; }
.ar-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 16px; }
@media (min-width: 641px) {   /* 검은 판은 포스터 수만큼만 (--n = 1~3, app.js renderArtist) */
  .ar-wall:not([hidden]) { width: fit-content; max-width: 100%; }
  .ar-grid { grid-template-columns: repeat(var(--n, 3), minmax(0, 236px)); }
}
.ar-report { margin: 0; text-align: right; }
.ar-report .link-btn { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ar-report .link-btn:hover { color: var(--bad); }

/* 팔로우한 작가 창 */
.follows-card { width: min(480px, 100%); gap: 12px; }
.fl-list { list-style: none; margin: 0; padding: 2px; display: grid; gap: 6px; max-height: min(56vh, 520px); overflow-y: auto; }
.fl-list:empty { display: none; }
.fl-btn {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%;
  padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left;
}
.fl-btn:hover { background: var(--surface-2); border-color: var(--line-2); }
.fl-pic { grid-row: 1 / 3; width: 40px; height: 48px; border-radius: 10px; background: var(--surface-2); image-rendering: pixelated; object-fit: cover; }
.fl-name { align-self: end; min-width: 0; font: 700 12px/1.5 var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-sub { grid-column: 2; align-self: start; font-size: 12.5px; color: var(--muted); }
.fl-btn .host-go { grid-column: 3; grid-row: 1 / 3; }

/* 전시 고르기 맨 위 「팔로우한 작가의 전시」 */
.sel-follow .sel-sec, .sel-friends .sel-sec { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.sel-sec-n { color: #f3f1ea; font-variant-numeric: tabular-nums; }
.sel-sec-more { margin-left: auto; font: 500 12.5px/1.5 var(--body); color: #c9c7cf; }
.sel-sec-more:hover { color: #f0c070; }
@media (max-width: 640px) {
  .ar-who { gap: 14px; }
  .ar-wall { padding: 10px; margin: 0 -8px; }
  .ar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
}

/* ---------------------------------------------------------------- 친구 (src/friends.js · app.js 「친구」)
   내 메뉴 › 친구 창(받은 신청 · 친구와 있는 곳 · 가기), 작가 페이지의 친구 단추와 「지금 ○○에 있어요」, 전시 고르기 맨 위 「지금 전시를 보는 친구」 */
.pop-new { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 11px/1.5 var(--body); font-style: normal; }
#mpop-friends b { font-variant-numeric: tabular-nums; }
.ar-where { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0; padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--fg); font-size: 14px; }
.ar-where-t::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.friends-card { width: min(520px, 100%); gap: 12px; }
.fr-sec { display: grid; gap: 8px; }
.fr-sec h3 { margin: 0; font-size: 14px; font-weight: 700; }
.fr-row { display: flex; align-items: center; gap: 8px; }
.fr-row .fl-btn { flex: 1; min-width: 0; }
.fr-acts { display: flex; gap: 6px; flex: none; }
.fl-sub.on { color: var(--ok); font-weight: 600; }
.fr-opts { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.fr-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.fr-chip {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-width: 0; padding: 5px 6px 5px 5px; border-radius: 999px;
  border: 1px solid #3a3c45; background: rgba(28, 29, 35, 0.92); color: #f3f1ea; cursor: pointer; text-align: left; font: inherit;
}
.fr-chip:hover { border-color: #e3a64c; }
.fr-chip .host-pic { background: #2a2c33; }
.fr-chip-t { display: grid; min-width: 0; line-height: 1.35; }
.fr-chip-n { font: 700 12px/1.5 var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-chip-w { font-size: 12.5px; color: #8fd6a2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-chip-go { flex: none; padding: 5px 11px; border-radius: 999px; background: #e3a64c; color: #16171b; font: 700 12px/1.4 var(--pixel); }
@media (max-width: 640px) {
  .fr-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 2px; }
  .fr-chips::-webkit-scrollbar { display: none; }
  .fr-chip { flex: none; max-width: 86%; }
}
