/* ==========================================================================
   FestAlive — 앱 컴포넌트 스타일 (Task 19)
   --------------------------------------------------------------------------
   · 모든 색·간격·라운드·지속시간은 tokens.css 의 --fa-* 에서만 온다. 하드코딩 금지.
   · `/assets/tokens.css` 는 `design/tokens.css` 의 **바이트 단위 사본**이다.
     웹루트가 public/ 이라 design/ 은 서빙되지 않는다. 원본을 고치면 반드시 다시 복사하라:
         cp design/tokens.css public/assets/tokens.css
     (검증: `diff design/tokens.css public/assets/tokens.css` 가 아무것도 내지 않아야 한다)
   · 빌드 도구 없음 — 이 파일은 브라우저가 그대로 읽는다. 전처리기 문법을 쓰지 마라.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0-A. 웹폰트 — Pretendard Variable (self-host, OFL 1.1)
   --------------------------------------------------------------------------
   외부 CDN 을 쓰지 않는다. `public/assets/fonts/` 에 직접 담았다.
   · 원본 Pretendard v1.3.9 가변 폰트를 **wght 축 400~800 으로 자르고**(varLib.instancer)
     **KS X 1001 한글 2,350자 + 라틴/기호**로 서브셋했다(fontTools + zopfli woff2).
   · latin 26.2KB / korean 282.3KB = **합계 308.5KB**. unicode-range 로 갈라 두었으므로
     한글이 없는 화면은 26KB 만 받는다. 정적 400+800 두 벌(347KB)보다 작으면서
     400·500·600·700·800 을 전부 쓸 수 있다(수치 근거는 task-22-report.md).
   · `font-display: swap` — 폰트를 기다리느라 첫 화면이 비지 않는다. 시스템 폰트로 먼저 그린다.
   · 한자·일본어 글리프는 넣지 않았다(축제명에 드물게 섞인다) → 그 글자만 시스템 폰트로 떨어진다.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/pretendard-var-latin.woff2") format("woff2");
  unicode-range: U+0020-007F, U+00A0-00FF, U+2010-2027, U+2022, U+203B, U+20A9,
                 U+2116, U+2190-2193, U+2260, U+2264-2265, U+25A0, U+25CF,
                 U+2605-2606, U+00B7, U+FF01-FF60;
}
@font-face {
  font-family: "Pretendard Variable";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/pretendard-var-korean.woff2") format("woff2");
  unicode-range: U+3000-303F, U+3131-3163, U+AC00-D7A3;
}

/* --------------------------------------------------------------------------
   0. 리셋 · 기본
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* 컴포넌트의 display 선언이 UA 의 [hidden]{display:none} 을 이겨 버리는 사고를 막는다.
   (예: .iconbtn{display:inline-grid} 때문에 홈에서 뒤로가기 버튼이 사라지지 않았다) */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fa-bg);
  color: var(--fa-text-1);
  font-family: var(--fa-font-sans);
  font-size: var(--fa-text-md);
  line-height: var(--fa-lh-normal);
  overflow-x: hidden;          /* 최후의 안전장치 — 여기 기대지 말고 원인을 고쳐라 */
  overflow-wrap: break-word;
  /* 하단 탭바 + FAB 높이만큼 본문 바닥을 비워 둔다 */
  padding-bottom: calc(var(--fa-tabbar-h) + var(--fa-safe-bottom) + var(--fa-space-16));
}

img, svg { max-width: 100%; }
img { border: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--fa-accent-text); }

h1, h2, h3, h4 { margin: 0; line-height: var(--fa-lh-tight); letter-spacing: var(--fa-ls-tight); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: var(--fa-focus-width) solid var(--fa-focus);
  outline-offset: var(--fa-focus-offset);
  border-radius: var(--fa-radius-xs);
}

.skiplink {
  position: fixed; left: var(--fa-space-8); top: var(--fa-space-8);
  z-index: var(--fa-z-toast);
  transform: translateY(-200%);
  background: var(--fa-surface-1); color: var(--fa-text-1);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-sm);
  padding: var(--fa-space-8) var(--fa-space-12);
  transition: transform var(--fa-dur-fast) var(--fa-ease-out);
}
.skiplink:focus-visible { transform: translateY(0); }

/* 모션 축소 — design-system.md §8 전역 리셋 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .livedot::after { display: none; }
  .sk, .sk::after { background: var(--fa-skeleton-base); animation: none; }
}

/* --------------------------------------------------------------------------
   0-1. 손맛 — 계획서 2026-09-17-festalive-motion-icons Task 1
        `html` 에 상속시키지 않는다: ① touch-action 을 본문에 걸면 저시력 사용자의
        더블탭 확대를 막는다(viewport 에 user-scalable=no 가 없다 — 지킨다)
        ② 놓친 탭 대상은 기본 하이라이트가 남아 완전히 죽지 않는다.
   -------------------------------------------------------------------------- */
a, button, .tab, .fcard, .frow, .fa-chip, .act, .checkrow, .iconbtn {
  touch-action: manipulation;              /* 더블탭 줌 대기 ~300ms 제거 */
  -webkit-tap-highlight-color: transparent;
}

/* 빠져 있던 누름 피드백 4개. 클수록 작게 줄인다 —
   .fab/.totop 0.94(:233 · :250) · .btn/.fa-chip 0.97(:349 · :313) · 카드는 가장 크므로 0.98 */
.fcard, .frow { transition: transform var(--fa-dur-instant) var(--fa-ease-out); }
.fcard:active, .frow:active { transform: scale(0.98); }
.section__more:active, .listnote__link:active { color: var(--fa-text-1); }

/* --------------------------------------------------------------------------
   1. 레이아웃 셸
   -------------------------------------------------------------------------- */
.shell {
  max-width: var(--fa-content-max);
  margin-inline: auto;
  padding-inline: max(var(--fa-gutter), var(--fa-safe-left), var(--fa-safe-right));
  min-width: 0;
}
.shell--flush { padding-inline: 0; }   /* 히어로 이미지처럼 화면 끝까지 가는 블록 */

.main { display: block; }
.main:focus { outline: none; }

.section { margin-top: var(--fa-space-24); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--fa-space-8); margin-bottom: var(--fa-space-12);
}
.section__title {
  font-size: var(--fa-text-xl); font-weight: var(--fa-fw-bold);
  display: flex; align-items: center; gap: var(--fa-space-8); min-width: 0;
}
.section__more {
  flex: none; font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
  color: var(--fa-accent-text); text-decoration: none;
  min-height: var(--fa-tap-min); display: inline-flex; align-items: center;
  padding-inline: var(--fa-space-4);
}

.h2 { font-size: var(--fa-text-xl); font-weight: var(--fa-fw-bold); }
.h3 { font-size: var(--fa-text-md); font-weight: var(--fa-fw-bold); }
.muted { color: var(--fa-text-2); font-size: var(--fa-text-sm); }
.meta  { color: var(--fa-text-3); font-size: var(--fa-text-xs); font-variant-numeric: var(--fa-numeric); }
.nums  { font-variant-numeric: var(--fa-numeric); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   2. 앱바 · 탭바 · FAB
   -------------------------------------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: var(--fa-z-nav);
  background: color-mix(in srgb, var(--fa-bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fa-border);
  padding-top: var(--fa-safe-top);
}
@supports not (backdrop-filter: blur(1px)) { .appbar { background: var(--fa-bg); } }

.appbar__inner {
  max-width: var(--fa-content-max); margin-inline: auto;
  min-height: var(--fa-header-h);
  display: flex; align-items: center; gap: var(--fa-space-4);
  padding-inline: max(var(--fa-space-8), var(--fa-safe-left), var(--fa-safe-right));
}
.appbar__title {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: var(--fa-space-8);
  font-size: var(--fa-text-lg); font-weight: var(--fa-fw-bold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar__titletext { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 서브 페이지 제목 앞 작은 로고 마크(2026-09-14) — 누르면 홈 */
.appbar__mark { flex: none; display: inline-grid; place-items: center; }
.appbar__mark img { display: block; width: 20px; height: 20px; }
.appbar__back svg { display: block; }
.brand {
  display: inline-flex; align-items: center; gap: var(--fa-space-8);
  color: var(--fa-text-1); text-decoration: none;
}
/* 로고 마크(2026-09-14 교체) — 예전 핑크 점 + 퍼지는 링은 「지금 열리는 축제」의 .livedot 과 똑같아 구분이 안 됐다.
   움직임은 .livedot(진행 중 표시)만 갖는다. 원본 SVG 는 design/logo/ (Beacon Pennant — 위치 핀 + F 깃발). */
.brand__mark { width: 24px; height: 24px; flex: none; display: block; }

.iconbtn {
  flex: none; width: var(--fa-tap-min); height: var(--fa-tap-min);
  display: inline-grid; place-items: center;
  border: 0; border-radius: var(--fa-radius-circle);
  background: transparent; color: var(--fa-text-1);
  font-size: var(--fa-text-lg); line-height: 1; cursor: pointer; text-decoration: none;
  transition: background-color var(--fa-dur-fast) var(--fa-ease-out);
}
.iconbtn:active { background: var(--fa-surface-2); }
@media (hover: hover) and (pointer: fine) { .iconbtn:hover { background: var(--fa-surface-2); } }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--fa-z-nav);
  display: flex; align-items: stretch;
  background: color-mix(in srgb, var(--fa-bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--fa-border);
  padding-bottom: var(--fa-safe-bottom);
  padding-inline: max(0px, var(--fa-safe-left), var(--fa-safe-right));
}
@supports not (backdrop-filter: blur(1px)) { .tabbar { background: var(--fa-bg); } }

.tab {
  flex: 1 1 0; min-width: 0; min-height: var(--fa-tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--fa-text-3);
  font-size: var(--fa-text-2xs); font-weight: var(--fa-fw-semibold);
  transition: color var(--fa-dur-fast) var(--fa-ease-out);
}
/* 아이콘 — 계획서 Task 2. Phosphor 는 fill-path(`fill="currentColor"`)라 color 가 닿는다.
   그래서 위 `transition: color 140ms` 와 아래 [aria-current] 색 전환이 드디어 아이콘에
   적용된다 — 이모지는 컬러 폰트로 렌더되어 color 를 무시했다(설계 §3-1). */
.ico     { width: 24px; height: 24px; display: block; flex: none; }
.ico--lg { width: 28px; height: 28px; }        /* FAB — 56px 원 안 */

.tab__i  { line-height: 1; display: grid; place-items: center; }
.tab__i .ico--fill { display: none; }
.tab[aria-current="page"] .tab__i .ico--line { display: none; }
.tab[aria-current="page"] .tab__i .ico--fill { display: block; }
.tab[aria-current="page"] { color: var(--fa-accent-text); }

/* 누름 피드백 — 장식이 아니라 입력 확인이므로 빈도 규칙의 예외.
   아이콘은 가장 작은 대상이므로 0.92(카드 0.98 · .btn 0.97 · .fab 0.94) */
.tab__i { transition: transform var(--fa-dur-instant) var(--fa-ease-out); }
.tab:active .tab__i { transform: scale(0.92); }

.tab--cta .tab__i {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: var(--fa-radius-circle);
  background: var(--fa-accent-grad); color: var(--fa-on-accent);
}
.tab--cta .tab__i .ico { width: 18px; height: 18px; }

/* 테마 토글 — app.js 가 #themeIcon 의 data-mode 를 쓴다(계획서 Task 2 Step 9).
   :not([data-mode]) — app.js 는 defer 라 첫 apply() 전에는 속성이 없다. 없으면 셋 다
   숨어 버튼이 빈 칸으로 한 프레임 보이므로 system 을 기본으로 둔다. */
#themeIcon .ico--theme { display: none; }
#themeIcon:not([data-mode]) [data-for="system"],
#themeIcon[data-mode="system"] [data-for="system"],
#themeIcon[data-mode="dark"]   [data-for="dark"],
#themeIcon[data-mode="light"]  [data-for="light"] { display: block; }

.fab {
  position: fixed; z-index: var(--fa-z-fab);
  right: calc(var(--fa-safe-right) + var(--fa-gutter));
  bottom: calc(var(--fa-safe-bottom) + var(--fa-tabbar-h) + var(--fa-space-16));
  width: 56px; height: 56px; display: grid; place-items: center;
  border: 0; border-radius: var(--fa-radius-circle);
  background: var(--fa-accent-grad); color: var(--fa-on-accent);
  box-shadow: var(--fa-shadow-3), var(--fa-shadow-accent);
  font-size: var(--fa-text-2xl); line-height: 1; text-decoration: none;
  transition: transform var(--fa-dur-instant) var(--fa-ease-out);
}
.fab:active { transform: scale(0.94); }
.fab[hidden] { display: none; }

/* 맨 위로(2026-09-14) — 글쓰기 FAB 와 같은 오른쪽 열. FAB 가 떠 있으면(축제 상세) 그 위로 한 칸 올린다.
   CTA 가 둘로 보이지 않게 그라데이션이 아닌 표면색 */
.totop {
  position: fixed; z-index: var(--fa-z-fab);
  right: calc(var(--fa-safe-right) + var(--fa-gutter) + 6px);   /* 56px FAB 와 가운데를 맞춘다: (56 - 44) / 2 */
  bottom: calc(var(--fa-safe-bottom) + var(--fa-tabbar-h) + var(--fa-space-16));
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-circle);
  background: var(--fa-surface-1); color: var(--fa-text-1);
  box-shadow: var(--fa-shadow-2); cursor: pointer;
}
.fab:not([hidden]) ~ .totop {
  bottom: calc(var(--fa-safe-bottom) + var(--fa-tabbar-h) + var(--fa-space-16) + 56px + var(--fa-space-12));
}
.totop:active { transform: scale(0.94); }
.totop[hidden] { display: none; }
.totop svg { display: block; }

.offline {
  background: var(--fa-warning-bg); color: var(--fa-warning-fg);
  border-bottom: 1px solid var(--fa-warning-bd);
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
  text-align: center; padding: var(--fa-space-8) var(--fa-gutter);
}
.offline[hidden] { display: none; }

.toast {
  position: fixed; z-index: var(--fa-z-toast);
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--fa-safe-bottom) + var(--fa-tabbar-h) + var(--fa-space-16));
  max-width: calc(100vw - var(--fa-space-32));
  background: var(--fa-surface-3); color: var(--fa-text-1);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-pill);
  box-shadow: var(--fa-shadow-2);
  padding: var(--fa-space-12) var(--fa-space-16);
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
}
.toast[hidden] { display: none; }

/* --------------------------------------------------------------------------
   3. 상태 칩 — design-system.md §5-5 참조 구현
   -------------------------------------------------------------------------- */
.fa-chip {
  display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box;
  border-radius: var(--fa-chip-radius);
  border: var(--fa-chip-border-w) solid var(--fa-chip-neutral-bd);
  background: var(--fa-chip-neutral-bg); color: var(--fa-chip-neutral-fg);
  font-weight: var(--fa-fw-semibold); font-variant-numeric: var(--fa-numeric);
  line-height: 1; white-space: nowrap; text-decoration: none;
  transition: background-color var(--fa-dur-fast) var(--fa-ease-out),
              border-color     var(--fa-dur-fast) var(--fa-ease-out),
              color            var(--fa-dur-fast) var(--fa-ease-out),
              transform        var(--fa-dur-instant) var(--fa-ease-out);
}
.fa-chip__icon { font-size: var(--fa-chip-icon); line-height: 1; }
.fa-chip[data-size="display"] {
  height: var(--fa-chip-h-display); padding-inline: var(--fa-chip-pad-x-display);
  font-size: var(--fa-chip-font-display);
}
.fa-chip[data-size="select"] {
  height: var(--fa-chip-h-select); padding-inline: var(--fa-chip-pad-x-select);
  font-size: var(--fa-chip-font-select); cursor: pointer; appearance: none;
}
.fa-chipgroup { display: flex; flex-wrap: wrap; gap: var(--fa-chip-gap); }

.fa-chip[data-sev="0"]        { background: var(--fa-sev-0-bg);        border-color: var(--fa-sev-0-bd);        color: var(--fa-sev-0-fg); }
.fa-chip[data-sev="1"]        { background: var(--fa-sev-1-bg);        border-color: var(--fa-sev-1-bd);        color: var(--fa-sev-1-fg); }
.fa-chip[data-sev="2"]        { background: var(--fa-sev-2-bg);        border-color: var(--fa-sev-2-bd);        color: var(--fa-sev-2-fg); }
.fa-chip[data-sev="3"]        { background: var(--fa-sev-3-bg);        border-color: var(--fa-sev-3-bd);        color: var(--fa-sev-3-fg); }
.fa-chip[data-tone="info"]    { background: var(--fa-chip-info-bg);    border-color: var(--fa-chip-info-bd);    color: var(--fa-chip-info-fg); }
.fa-chip[data-tone="live"]    { background: var(--fa-chip-live-bg);    border-color: var(--fa-chip-live-bd);    color: var(--fa-chip-live-fg); }
.fa-chip[data-tone="neutral"] { background: var(--fa-chip-neutral-bg); border-color: var(--fa-chip-neutral-bd); color: var(--fa-chip-neutral-fg); }

.fa-chip[data-size="select"]:not([aria-pressed="true"]) {
  background: var(--fa-chip-idle-bg); border-color: var(--fa-chip-idle-bd); color: var(--fa-chip-idle-fg);
}
.fa-chip[data-size="select"][aria-pressed="true"] { border-width: var(--fa-chip-border-w-active); }
.fa-chip[data-size="select"]:active { transform: scale(0.97); }
.fa-chip[data-size="select"][disabled] { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .fa-chip[data-size="select"]:hover:not([disabled]) { border-color: currentColor; }
}

/* LIVE 점 (카드·상세용) */
.livedot {
  width: var(--fa-livedot-size); height: var(--fa-livedot-size); flex: none;
  border-radius: var(--fa-radius-circle); background: var(--fa-accent-2); position: relative;
}
.livedot::after {
  content: ""; position: absolute; inset: calc(var(--fa-livedot-ring) * -1);
  border-radius: inherit; border: 2px solid var(--fa-accent-2);
  animation: fa-pulse var(--fa-pulse-dur) var(--fa-ease-out) infinite;
}
@keyframes fa-pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }

.livetag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fa-text-xs); font-weight: var(--fa-fw-black);
  letter-spacing: var(--fa-ls-wide); color: var(--fa-accent-text);
}

/* --------------------------------------------------------------------------
   4. 버튼
   -------------------------------------------------------------------------- */
.btn {
  min-height: var(--fa-tap-min); padding-inline: var(--fa-space-16);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fa-space-8);
  border: 1px solid transparent; border-radius: var(--fa-radius-md);
  font-weight: var(--fa-fw-bold); font-size: var(--fa-text-md);
  cursor: pointer; text-decoration: none;
  transition: transform var(--fa-dur-instant) var(--fa-ease-out),
              background-color var(--fa-dur-fast) var(--fa-ease-out);
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--primary   { background: var(--fa-accent-grad); color: var(--fa-on-accent); }
.btn--secondary { background: var(--fa-surface-2);   color: var(--fa-text-1); }
.btn--ghost     { background: transparent; color: var(--fa-text-1); border-color: var(--fa-border-strong); }
.btn--block     { width: 100%; }
.btn--sm        { min-height: 36px; font-size: var(--fa-text-sm); padding-inline: var(--fa-space-12); }

/* --------------------------------------------------------------------------
   5. 카드 (공통)
   -------------------------------------------------------------------------- */
.card {
  background: var(--fa-surface-1);
  border-radius: var(--fa-radius-md);
  box-shadow: var(--fa-shadow-1);
  overflow: hidden;
}
.card--pad { padding: var(--fa-space-16); }

/* 썸네일 — 실제 크기를 모르므로 비율 박스로 고정해 레이아웃 시프트를 막는다 (G6) */
.thumb {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--fa-surface-2);
}
.thumb > img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 로드 페이드 — 계획서 2026-09-17-festalive-motion-icons Task 5 · 설계 §6-3
   ⚠️ opacity:0 을 맨 `.thumb > img` 에 두지 않는다. [data-fade] 는 JS 가 붙이므로
      JS 가 죽거나 load 가 안 오면 이미지는 그냥 보인다(실패해도 보이게).
   ⚠️ `.hero > img` 는 제외한다 — 씨앗(Task 3)으로 HTTP 캐시에서 즉시 나오므로
      불필요하고, 공유 요소 전환(Task 4)이 반투명 프레임을 잡을 여지를 없앤다. */
.thumb > img[data-fade]      { opacity: 0; transition: opacity var(--fa-dur-fast) var(--fa-ease-out); }
.thumb > img[data-fade="on"] { opacity: 1; }
/* 이미지가 없거나 실패했을 때 — 연한 8색 중 축제마다 고정 1색 + 연도 뺀 축제명 4~5자
   (사용자 요청 2026-09-14 "배경색이 너무 강렬해, 연한색으로 랜덤하게". 예전엔 전부 브랜드 그라데이션이라 목록이 붉게 보였다) */
:is(.thumb, .hero)[data-ph="0"] { --ph-bg: var(--fa-ph-0-bg); --ph-fg: var(--fa-ph-0-fg); }
:is(.thumb, .hero)[data-ph="1"] { --ph-bg: var(--fa-ph-1-bg); --ph-fg: var(--fa-ph-1-fg); }
:is(.thumb, .hero)[data-ph="2"] { --ph-bg: var(--fa-ph-2-bg); --ph-fg: var(--fa-ph-2-fg); }
:is(.thumb, .hero)[data-ph="3"] { --ph-bg: var(--fa-ph-3-bg); --ph-fg: var(--fa-ph-3-fg); }
:is(.thumb, .hero)[data-ph="4"] { --ph-bg: var(--fa-ph-4-bg); --ph-fg: var(--fa-ph-4-fg); }
:is(.thumb, .hero)[data-ph="5"] { --ph-bg: var(--fa-ph-5-bg); --ph-fg: var(--fa-ph-5-fg); }
:is(.thumb, .hero)[data-ph="6"] { --ph-bg: var(--fa-ph-6-bg); --ph-fg: var(--fa-ph-6-fg); }
:is(.thumb, .hero)[data-ph="7"] { --ph-bg: var(--fa-ph-7-bg); --ph-fg: var(--fa-ph-7-fg); }
.thumb[data-fallback="1"] { background: var(--ph-bg, var(--fa-surface-2)); }
.thumb[data-fallback="1"] > img { display: none; }
.thumb__ph {
  position: absolute; inset: 0; display: none;
  place-items: center; padding: var(--fa-space-8);
  color: var(--ph-fg, var(--fa-text-2));
  font-size: var(--fa-text-lg); font-weight: var(--fa-fw-bold);
  line-height: var(--fa-lh-snug); text-align: center;
  word-break: keep-all; overflow-wrap: anywhere;
  letter-spacing: var(--fa-ls-tight);
}
.thumb[data-fallback="1"] .thumb__ph { display: grid; }

.statedot {
  position: absolute; left: var(--fa-space-8); top: var(--fa-space-8);
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--fa-chip-h-display); padding-inline: var(--fa-chip-pad-x-display);
  border-radius: var(--fa-chip-radius);
  background: color-mix(in srgb, var(--fa-p-ink-950) 72%, transparent);
  color: var(--fa-p-white);
  font-size: var(--fa-chip-font-display); font-weight: var(--fa-fw-bold);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.statedot[data-state="live"] { color: var(--fa-p-pink-300); }   /* 이 배지는 사진 위 어두운 판 위라 테마와 무관하게 원시 토큰을 쓴다 */

/* --------------------------------------------------------------------------
   6. 홈 — 가로 레일
   -------------------------------------------------------------------------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62%;
  gap: var(--fa-space-12);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  /* 레일만 화면 끝까지 흐르게 하고, 좌우 여백은 패딩으로 준다 */
  margin-inline: calc(var(--fa-gutter) * -1);
  padding-inline: var(--fa-gutter);
  padding-bottom: var(--fa-space-8);
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; min-width: 0; }
@media (min-width: 520px) { .rail { grid-auto-columns: 38%; } }
@media (min-width: 720px) { .rail { grid-auto-columns: 30%; } }
.rail--boot { grid-auto-columns: 62%; }

.fcard { display: block; text-decoration: none; color: inherit; }
.fcard__body { padding: var(--fa-space-12); }
.fcard__name {
  font-size: var(--fa-text-md); font-weight: var(--fa-fw-bold);
  line-height: var(--fa-lh-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.fcard__meta { margin-top: var(--fa-space-4); }
.fcard__chips { margin-top: var(--fa-space-8); display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
   7. 목록 — 세로 행 (903건, 커서 페이지네이션)
   -------------------------------------------------------------------------- */
.list { display: grid; gap: var(--fa-space-8); margin-top: var(--fa-space-12); }

.frow {
  display: grid; grid-template-columns: 96px 1fr; gap: var(--fa-space-12);
  align-items: stretch;
  background: var(--fa-surface-1); border-radius: var(--fa-radius-md);
  box-shadow: var(--fa-shadow-1); overflow: hidden;
  text-decoration: none; color: inherit;
  /* 화면 밖 행의 렌더링 비용을 줄인다 — 903건 스크롤 대비 */
  content-visibility: auto;
  contain-intrinsic-size: auto 108px;
}
.frow .thumb { aspect-ratio: auto; height: 100%; min-height: 96px; }
.frow__body { padding: var(--fa-space-12) var(--fa-space-12) var(--fa-space-12) 0; min-width: 0; }
.frow__name {
  font-size: var(--fa-text-md); font-weight: var(--fa-fw-bold); line-height: var(--fa-lh-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.frow__meta { margin-top: var(--fa-space-4); }
.frow__chips { margin-top: var(--fa-space-8); display: flex; flex-wrap: wrap; gap: 6px; }
.frow .statedot { position: static; margin-bottom: var(--fa-space-4); }

/* 목록 머리글 — 진행중 · 예정(시작일별) · 종료 경계 (사용자 결정 2026-09-13 "날짜 머리글") */
.listhead {
  margin: var(--fa-space-12) 0 0; padding: 0 var(--fa-space-4);
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold); line-height: var(--fa-lh-snug);
  color: var(--fa-text-2);
}
.list > .listhead:first-child { margin-top: 0; }

.loadmore { margin: var(--fa-space-16) 0; text-align: center; min-height: 44px; }

/* --------------------------------------------------------------------------
   8. 필터 (지역 · 기간 · 상태)
   -------------------------------------------------------------------------- */
/* 접힌 한 줄 필터 바 — 예전 `.filters` 폼(314px)을 대신한다 (P0-3)
   ⚠️ 결과를 가리지 않는 것이 이 화면의 전부다. 여기서 높이를 늘리지 마라. */
.filterbar {
  position: sticky; top: calc(var(--fa-safe-top) + var(--fa-header-h)); z-index: 10;
  display: flex; align-items: center; gap: var(--fa-space-8);
  margin-inline: calc(var(--fa-gutter) * -1);
  padding: var(--fa-space-8) var(--fa-gutter);
  background: color-mix(in srgb, var(--fa-bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fa-border);
}
@supports not (backdrop-filter: blur(1px)) { .filterbar { background: var(--fa-bg); } }
/* 조건 요약은 **줄바꿈한다** — 한 줄 말줄임이면 좁은 폰(360px)에서 "124개 · 전체 상태 · 전국 · 날짜"의
   날짜가 필터 버튼 뒤로 잘려 사라졌다. 조각(.filterbar__bit) 단위로만 끊어 날짜 중간에서 갈라지지 않게 한다. */
.filterbar__text {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px;
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold); color: var(--fa-text-2);
  line-height: 1.35;
}
.filterbar__bit { white-space: nowrap; }
.filterbar__bit + .filterbar__bit::before { content: '·'; padding-inline: var(--fa-space-4); color: var(--fa-text-3); }
.filterbar__btn {
  flex: none; min-height: var(--fa-tap-min); padding-inline: var(--fa-space-12);
  display: inline-flex; align-items: center; gap: var(--fa-space-4);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-pill);
  background: var(--fa-surface-2); color: var(--fa-text-1);
  font: inherit; font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold); cursor: pointer;
}
.filterbar__btn:active { background: var(--fa-surface-3); }
.filterbar__n {
  min-width: 18px; height: 18px; padding-inline: 5px; border-radius: var(--fa-radius-pill);
  display: inline-grid; place-items: center;
  background: var(--fa-accent-2); color: var(--fa-on-accent);
  font-size: var(--fa-text-2xs); font-weight: var(--fa-fw-black);
  font-variant-numeric: var(--fa-numeric);
}
.filterbar__n[hidden] { display: none; }

/* 가로 칩 스크롤러 — 끝에 **페이드 힌트**를 둔다 (P1-9)
   "부…" 에서 잘린 채 끝으로 보이던 문제. 마스크라 색을 따로 맞출 필요가 없다. */
.chipscroll {
  margin-inline: calc(var(--fa-gutter) * -1);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%);
}
.chiprow {
  display: flex; gap: var(--fa-chip-gap);          /* 8px — 인접 탭 타깃 최소 간격 */
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: var(--fa-space-8) var(--fa-gutter);
  scrollbar-width: none;
}
.chiprow::-webkit-scrollbar { display: none; }
/* ⚠️ 탐색의 칩도 **44px** 다 (P1-9 · WCAG 2.5.5).
   예전엔 여기만 36px 이라 홈(61×44)과 화면끼리 어긋났다. 높이를 다시 줄이지 마라. */
.chiprow .fa-chip[data-size="select"] { flex: none; }

.chipwrap { display: flex; flex-wrap: wrap; gap: var(--fa-chip-gap); }

.listnote {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--fa-space-8); margin: var(--fa-space-8) 0 var(--fa-space-4);
}
.listnote[hidden] { display: none; }
.listnote__link {
  min-height: var(--fa-tap-min); display: inline-flex; align-items: center;
  color: var(--fa-accent-text); text-decoration: none;
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
}

.dateinputs { display: flex; align-items: center; gap: var(--fa-space-8); flex-wrap: wrap; }
.dateinputs input[type="date"] {
  min-height: var(--fa-tap-min); min-width: 0; flex: 1 1 140px;
  padding: var(--fa-space-8) var(--fa-space-12);
  background: var(--fa-surface-2); color: var(--fa-text-1);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-md);
  font-size: var(--fa-text-md);   /* iOS 확대 방지: 16px 이상 */
}

/* --------------------------------------------------------------------------
   9. 상세
   -------------------------------------------------------------------------- */
.hero { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--fa-surface-2); overflow: hidden; }
.hero > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero[data-fallback="1"] { background: var(--ph-bg, var(--fa-surface-2)); }   /* 썸네일과 같은 연한 8색(2026-09-14) */
.hero[data-fallback="1"] > img { display: none; }
.hero__ph {
  position: absolute; inset: 0; display: none; place-items: center; padding: var(--fa-space-16);
  color: var(--ph-fg, var(--fa-text-2)); font-size: var(--fa-text-3xl); font-weight: var(--fa-fw-bold);
  line-height: var(--fa-lh-snug); text-align: center; word-break: keep-all; letter-spacing: var(--fa-ls-tight);
}
.hero[data-fallback="1"] .hero__ph { display: grid; }

.detail__head { margin-top: var(--fa-space-16); }
.detail__name { font-size: var(--fa-text-2xl); font-weight: var(--fa-fw-black); }
.detail__sub { margin-top: var(--fa-space-8); display: flex; flex-wrap: wrap; gap: var(--fa-space-8); align-items: center; }

/* 기본 정보 — 개요가 없어도 화면이 초라해지지 않게 여기를 채운다 (583건이 개요 없음) */
.infolist { display: grid; gap: 1px; background: var(--fa-border); border-radius: var(--fa-radius-md); overflow: hidden; }
.inforow {
  display: grid; grid-template-columns: 84px 1fr; gap: var(--fa-space-12);
  background: var(--fa-surface-1); padding: var(--fa-space-12);
  font-size: var(--fa-text-sm); min-width: 0;
}
.inforow dt { color: var(--fa-text-3); font-weight: var(--fa-fw-semibold); }
.inforow dd { margin: 0; color: var(--fa-text-1); min-width: 0; overflow-wrap: anywhere; }

/* D-day / 진행률 */
.progress { margin-top: var(--fa-space-12); }
.progress__bar {
  height: var(--fa-gauge-h); border-radius: var(--fa-gauge-radius);
  background: var(--fa-gauge-track); overflow: hidden;
}
.progress__fill { height: 100%; background: var(--fa-accent-grad); border-radius: inherit; }

/* 외부에서 온 본문 HTML — 375px 에서 표·이미지가 화면을 밀지 않게 가둔다 */
.prose { margin-top: var(--fa-space-12); color: var(--fa-text-1); font-size: var(--fa-text-md); line-height: var(--fa-lh-normal); }
.prose > :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6, table) { margin: 0 0 var(--fa-space-12); }
.prose :is(h1, h2, h3, h4, h5, h6) { font-size: var(--fa-text-lg); font-weight: var(--fa-fw-bold); margin-top: var(--fa-space-20); }
.prose img { height: auto; border-radius: var(--fa-radius-sm); }
.prose a { color: var(--fa-accent-text); overflow-wrap: anywhere; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose blockquote {
  border-left: 3px solid var(--fa-border-strong);
  padding-left: var(--fa-space-12); color: var(--fa-text-2);
}
.prose table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: var(--fa-text-sm); }
.prose :is(th, td) { border: 1px solid var(--fa-border); padding: var(--fa-space-8); text-align: left; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--fa-space-12); }

.mapbox {
  margin-top: var(--fa-space-12); padding: var(--fa-space-16);
  background: var(--fa-surface-2); border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-md);
}
.mapbox__coord { font-family: var(--fa-font-mono); font-size: var(--fa-text-xs); color: var(--fa-text-3); }

/* --------------------------------------------------------------------------
   10. 빈 상태 · 에러 · 스켈레톤
   -------------------------------------------------------------------------- */
.empty {
  text-align: center; padding: var(--fa-space-32) var(--fa-space-16);
  background: var(--fa-surface-1); border-radius: var(--fa-radius-md);
}
.empty__icon { font-size: var(--fa-text-3xl); line-height: 1; }
.empty__title { margin-top: var(--fa-space-12); font-size: var(--fa-text-lg); font-weight: var(--fa-fw-bold); }
.empty__desc { margin-top: var(--fa-space-8); color: var(--fa-text-2); font-size: var(--fa-text-sm); }
.empty__cta { margin-top: var(--fa-space-16); }

.errorbox {
  background: var(--fa-danger-bg); border: 1px solid var(--fa-danger-bd);
  color: var(--fa-danger-fg); border-radius: var(--fa-radius-md);
  padding: var(--fa-space-16); text-align: center;
}
.errorbox__msg { font-weight: var(--fa-fw-bold); }
.errorbox .btn { margin-top: var(--fa-space-12); }

.sk {
  background: linear-gradient(90deg,
    var(--fa-skeleton-base) 0%, var(--fa-skeleton-shine) 50%, var(--fa-skeleton-base) 100%);
  background-size: 200% 100%;
  animation: fa-shimmer var(--fa-shimmer-dur) linear infinite;
  border-radius: var(--fa-radius-sm);
}
@keyframes fa-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk--title { height: 26px; width: 44%; margin: var(--fa-space-24) var(--fa-gutter) var(--fa-space-12); }
.sk--line  { height: 14px; margin: var(--fa-space-24) var(--fa-gutter) var(--fa-space-12); }
.sk--card  { height: 200px; border-radius: var(--fa-radius-md); }
.sk--row   { height: 108px; border-radius: var(--fa-radius-md); margin: 0 var(--fa-gutter) var(--fa-space-8); }
.sk--hero  { height: 0; padding-bottom: 56.25%; border-radius: 0; }
.sk--text  { height: 14px; margin-bottom: var(--fa-space-8); }

/* --------------------------------------------------------------------------
   11. 데스크톱 보정
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  body { padding-bottom: var(--fa-space-48); }
  .tabbar {
    position: sticky; top: auto; bottom: 0;
    max-width: var(--fa-content-max); margin-inline: auto;
    border: 1px solid var(--fa-border); border-bottom: 0;
    border-radius: var(--fa-radius-lg) var(--fa-radius-lg) 0 0;
  }
  .fab { bottom: calc(var(--fa-safe-bottom) + var(--fa-space-24)); }
}

/* --------------------------------------------------------------------------
   12. 가입 · 로그인 (Task 22)
   -------------------------------------------------------------------------- */
.auth { max-width: 420px; margin-inline: auto; padding-block: var(--fa-space-24); }
.auth__title { font-size: var(--fa-text-2xl); font-weight: var(--fa-fw-black); }
.auth__lead { margin-top: var(--fa-space-8); color: var(--fa-text-2); font-size: var(--fa-text-sm); }

/* 단계 표시 — 지금 어디쯤인지 항상 보인다 */
.stepper { display: flex; gap: var(--fa-space-8); margin-top: var(--fa-space-16); }
.stepper__i {
  flex: 1 1 0; height: 4px; border-radius: var(--fa-radius-pill);
  background: var(--fa-surface-3);
  transition: background-color var(--fa-dur-base) var(--fa-ease-out);
}
.stepper__i[data-on="1"] { background: var(--fa-accent-grad); }
.stepper__label { margin-top: var(--fa-space-8); font-size: var(--fa-text-xs); color: var(--fa-text-3); font-variant-numeric: var(--fa-numeric); }

.field { margin-top: var(--fa-space-20); }
.field__label {
  display: block; font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold);
  color: var(--fa-text-1); margin-bottom: var(--fa-space-8);
}
.field__req { color: var(--fa-danger-fg); margin-left: 2px; }
.field__hint { margin-top: var(--fa-space-8); font-size: var(--fa-text-xs); color: var(--fa-text-3); }
.field__err {
  margin-top: var(--fa-space-8); font-size: var(--fa-text-xs);
  font-weight: var(--fa-fw-semibold); color: var(--fa-danger-fg);
}
.field__err[hidden] { display: none !important; }
/* 입력 필드 — design-system.md §6-7 참조 구현.
   ⚠️ min-height 44px 는 타협 대상이 아니다(WCAG 2.5.5). 글자 16px 이상이라야 iOS 가 확대하지 않는다. */
.fa-input {
  width: 100%; box-sizing: border-box; min-height: var(--fa-tap-min);
  padding: var(--fa-space-12);
  background: var(--fa-surface-2); color: var(--fa-text-1);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-md);
  font: var(--fa-fw-regular) var(--fa-text-md)/var(--fa-lh-normal) var(--fa-font-sans);
  transition: border-color var(--fa-dur-fast) var(--fa-ease-out);
}
.fa-input::placeholder { color: var(--fa-text-3); }
.fa-input:focus-visible {
  outline: var(--fa-focus-width) solid var(--fa-focus);
  outline-offset: var(--fa-focus-offset);
  border-color: var(--fa-accent);
}
.fa-input[disabled] { opacity: 0.55; cursor: not-allowed; }
.fa-input[aria-invalid="true"] { border-color: var(--fa-danger-fg); }

/* 인증번호 6자리 — 큰 글자 + 넓은 자간. 숫자 키패드가 바로 뜨게 한다 */
.otp {
  font-size: var(--fa-text-3xl); font-weight: var(--fa-fw-bold);
  letter-spacing: 0.32em; text-align: center;
  font-variant-numeric: var(--fa-numeric);
  padding-inline: var(--fa-space-8);
}
.otp::placeholder { letter-spacing: 0.32em; }

/* 만료 카운트다운 · 재발송 쿨다운 */
.otpbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--fa-space-8); margin-top: var(--fa-space-12); flex-wrap: wrap;
}
.countdown {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold);
  font-variant-numeric: var(--fa-numeric); color: var(--fa-text-2);
}
.countdown[data-urgent="1"] { color: var(--fa-danger-fg); }
.countdown[data-expired="1"] { color: var(--fa-danger-fg); }

/* ⚖️ 기록 고지 (기획서 §10-3) — 심리적 억제 장치라 작게 숨기지 않는다 */
.notice {
  margin-top: var(--fa-space-20);
  background: var(--fa-warning-bg);
  border: 1px solid var(--fa-warning-bd);
  border-radius: var(--fa-radius-md);
  padding: var(--fa-space-16);
}
.notice__title {
  display: flex; align-items: center; gap: var(--fa-space-8);
  font-size: var(--fa-text-md); font-weight: var(--fa-fw-black);
  color: var(--fa-warning-fg);
}
.notice__body {
  margin-top: var(--fa-space-8); font-size: var(--fa-text-sm);
  line-height: var(--fa-lh-normal); color: var(--fa-text-1);
}
.notice__body strong { color: var(--fa-warning-fg); font-weight: var(--fa-fw-black); }

/* 동의 체크 — 탭 타깃 44px */
.checks { margin-top: var(--fa-space-16); display: grid; gap: var(--fa-space-4); }
.checkrow {
  display: flex; align-items: center; gap: var(--fa-space-12);
  min-height: var(--fa-tap-min); padding: var(--fa-space-4) var(--fa-space-8);
  border-radius: var(--fa-radius-sm); cursor: pointer;
  font-size: var(--fa-text-sm); color: var(--fa-text-1);
  transition: background-color var(--fa-dur-fast) var(--fa-ease-out);
}
.checkrow:active { background: var(--fa-surface-2); }
@media (hover: hover) and (pointer: fine) { .checkrow:hover { background: var(--fa-surface-2); } }
.checkrow input[type="checkbox"] {
  width: 22px; height: 22px; flex: none; accent-color: var(--fa-accent);
  margin: 0; cursor: pointer;
}
.checkrow--all {
  border: 1px solid var(--fa-border-strong); font-weight: var(--fa-fw-bold);
  margin-bottom: var(--fa-space-4);
}
.checkrow__req { color: var(--fa-danger-fg); font-weight: var(--fa-fw-bold); }
.checkrow__opt { color: var(--fa-text-3); }

/* 폼 레벨 오류 — 기술 용어 없이, 다시 시도 가능하게 */
.formerr {
  margin-top: var(--fa-space-16);
  background: var(--fa-danger-bg); border: 1px solid var(--fa-danger-bd);
  color: var(--fa-danger-fg); border-radius: var(--fa-radius-md);
  padding: var(--fa-space-12) var(--fa-space-16);
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
}
.formerr[hidden] { display: none !important; }

.authactions { margin-top: var(--fa-space-24); display: grid; gap: var(--fa-space-8); }
.authfoot {
  margin-top: var(--fa-space-24); padding-top: var(--fa-space-16);
  border-top: 1px solid var(--fa-border);
  display: flex; flex-wrap: wrap; gap: var(--fa-space-16); justify-content: center;
}
.authfoot a {
  min-height: var(--fa-tap-min); display: inline-flex; align-items: center;
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
}

/* 비밀번호 규칙 체크리스트 */
.pwrules { margin-top: var(--fa-space-8); display: flex; flex-wrap: wrap; gap: var(--fa-space-8); }
.pwrule {
  font-size: var(--fa-text-xs); font-weight: var(--fa-fw-semibold);
  color: var(--fa-text-3); display: inline-flex; align-items: center; gap: 4px;
}
.pwrule[data-ok="1"] { color: var(--fa-success-fg); }

/* MY 화면 로그인 카드 */
.mecard { margin-top: var(--fa-space-16); }
.mecard__nick { font-size: var(--fa-text-xl); font-weight: var(--fa-fw-black); }

/* --------------------------------------------------------------------------
   13. 상태 칩 — 색맹 3중 부호화 (Task 20)
   --------------------------------------------------------------------------
   design-system §5-2 는 칩의 심각도를 **세 채널로 동시에** 표현하라고 정한다.
   색 하나로만 표현하면 적록색약(남성 약 8%)에게 "여유"와 "매우혼잡"이 같은 칩이 된다.

     ① 텍스트 라벨 — 값이 항상 글자로 적힌다 (여유 · 매우혼잡)
     ② 칸 수      — 4칸 중 sev+1 칸이 채워진다 (.fa-chip__bars)
     ③ 테두리 두께 — sev 가 높을수록 굵다 (표시용 칩에 한함, 아래 주석)

   ⚠️ ③ 은 **표시용(display) 칩에만** 건다. 선택용(select) 칩에서 테두리 두께는 이미
      "선택됨"을 뜻하고(--fa-chip-border-w-active), 한 채널에 두 의미를 겹치면 둘 다
      읽을 수 없게 된다. 선택용 칩은 ①②로 심각도를 전한다.
   -------------------------------------------------------------------------- */
.fa-chip__bars {
  display: inline-flex; gap: 2px; flex: none;
  align-items: center; height: 10px;
}
.fa-chip__bar {
  width: 3px; height: 100%; border-radius: 1px;
  background: currentColor; opacity: 0.28;
}
.fa-chip__bar[data-on="1"] { opacity: 1; }

/* ③ 테두리 두께 — 표시용에서만. 값이 나쁠수록 굵어진다. */
.fa-chip[data-size="display"][data-sev="2"] { border-width: 2px; }
.fa-chip[data-size="display"][data-sev="3"] { border-width: 3px; }

/* 칩 분류 아이콘은 장식이다 — 스크린리더는 라벨 텍스트만 읽는다 */
.fa-chip__cat { opacity: 0.85; }

/* --------------------------------------------------------------------------
   14. Live Board — 축제 상세 상단 요약 (기획서 6-4)
   -------------------------------------------------------------------------- */
.board {
  margin-top: var(--fa-space-16);
  background: var(--fa-surface-2);
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-lg);
  padding: var(--fa-space-16);
}
.board__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--fa-space-8); flex-wrap: wrap;
}
.board__title { font-size: var(--fa-text-md); font-weight: var(--fa-fw-bold); }
.board__rows { margin-top: var(--fa-space-12); display: grid; gap: var(--fa-space-12); }
.boardrow { display: grid; grid-template-columns: 72px 1fr; gap: var(--fa-space-8); align-items: center; }
.boardrow__label { font-size: var(--fa-text-sm); color: var(--fa-text-2); font-weight: var(--fa-fw-semibold); }
.boardrow__val { min-width: 0; display: flex; align-items: center; gap: var(--fa-space-4) var(--fa-space-8); flex-wrap: wrap; }
.gauge {
  /* 375px 에서 라벨+게이지+칩+응답수가 한 줄에 들어가야 한다 — 실측으로 정한 폭이다 */
  width: 56px; height: 10px; flex: none;
  background: var(--fa-gauge-track); border-radius: var(--fa-radius-pill); overflow: hidden;
  display: flex; gap: 2px; padding: 1px;
}
.gauge__cell { flex: 1; border-radius: 1px; background: currentColor; opacity: 0.2; }
.gauge__cell[data-on="1"] { opacity: 1; }
.gauge[data-sev="0"] { color: var(--fa-sev-0-fg); }
.gauge[data-sev="1"] { color: var(--fa-sev-1-fg); }
.gauge[data-sev="2"] { color: var(--fa-sev-2-fg); }
.gauge[data-sev="3"] { color: var(--fa-sev-3-fg); }
.board__foot { margin-top: var(--fa-space-12); padding-top: var(--fa-space-12); border-top: 1px solid var(--fa-border); }
.board__cold { margin-top: var(--fa-space-8); }

/* --------------------------------------------------------------------------
   15. 피드 — 분류 탭 · 글 카드 · 반응 (Task 20/21)
   -------------------------------------------------------------------------- */
.cattabs {
  display: flex; gap: var(--fa-chip-gap); overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
  padding: var(--fa-space-4) 0 var(--fa-space-8);
  margin-top: var(--fa-space-12);
}
.cattabs::-webkit-scrollbar { height: 4px; }
.cattabs::-webkit-scrollbar-thumb { background: var(--fa-border); border-radius: var(--fa-radius-pill); }
.cattabs .fa-chip { flex: none; }

/* "새 글 N개" 알약 — 읽던 위치를 지키는 장치 (기획서 11-4 ④) */
.newpill {
  position: sticky; top: var(--fa-space-8); z-index: var(--fa-z-sticky);
  display: block; margin: var(--fa-space-8) auto 0; border: 0;
  min-height: 36px; padding: 0 var(--fa-space-16);
  border-radius: var(--fa-radius-pill);
  background: var(--fa-accent-grad); color: var(--fa-on-accent);
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold); font-family: inherit;
  box-shadow: var(--fa-shadow-2); cursor: pointer;
  animation: fa-pill-in var(--fa-dur-base) var(--fa-ease-spring);
}
.newpill[hidden] { display: none; }
@keyframes fa-pill-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.feed { display: grid; gap: var(--fa-space-8); margin-top: var(--fa-space-12); }

.post {
  background: var(--fa-surface-1);
  border: 1px solid var(--fa-border);
  border-radius: var(--fa-radius-md);
  padding: var(--fa-space-12);
  contain-intrinsic-size: auto 180px;
  content-visibility: auto;
}
.post--new { animation: fa-post-in var(--fa-dur-base) var(--fa-ease-out); }
@keyframes fa-post-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.post__head { display: flex; align-items: center; gap: var(--fa-space-8); min-width: 0; }
.post__avatar {
  width: 28px; height: 28px; flex: none; border-radius: var(--fa-radius-circle);
  display: grid; place-items: center;
  font-size: var(--fa-text-xs); font-weight: var(--fa-fw-bold);
  color: var(--fa-on-accent-deep); background: var(--fa-accent-deep);
}
.post__nick {
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold); color: var(--fa-text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.post__time { margin-left: auto; flex: none; }
.post__body {
  margin-top: var(--fa-space-8); color: var(--fa-text-1);
  font-size: var(--fa-text-md); line-height: var(--fa-lh-normal);
  white-space: pre-wrap;          /* 본문 줄바꿈은 개행문자다 — nl2br 재적용 금지 */
  overflow-wrap: anywhere;
}
.post__chips { margin-top: var(--fa-space-8); display: flex; flex-wrap: wrap; gap: 6px; }
.post__img {
  margin-top: var(--fa-space-8); display: block; border-radius: var(--fa-radius-sm);
  max-width: 100%; height: auto; background: var(--fa-surface-2);
}
.post__edited { color: var(--fa-text-3); font-size: var(--fa-text-xs); margin-left: var(--fa-space-4); }

.quote {
  margin-top: var(--fa-space-8); padding: var(--fa-space-8) var(--fa-space-12);
  border-left: 3px solid var(--fa-border-strong); background: var(--fa-surface-2);
  border-radius: var(--fa-radius-sm);
  font-size: var(--fa-text-sm); color: var(--fa-text-2);
  text-decoration: none; display: block;
}

/* 반응 줄 — 44px 탭 타깃 (기획서 15-1) */
.acts { margin-top: var(--fa-space-8); display: flex; align-items: center; gap: var(--fa-space-4); flex-wrap: wrap; }
.act {
  min-height: 44px; min-width: 44px; padding: 0 var(--fa-space-8);
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; border-radius: var(--fa-radius-sm);
  color: var(--fa-text-2); font-size: var(--fa-text-sm); font-family: inherit;
  font-variant-numeric: var(--fa-numeric); cursor: pointer; text-decoration: none;
  transition: color var(--fa-dur-fast) var(--fa-ease-out), background-color var(--fa-dur-fast) var(--fa-ease-out);
}
.act:active { background: var(--fa-surface-3); }
.act[aria-pressed="true"] { color: var(--fa-accent-text); font-weight: var(--fa-fw-bold); }
.act[aria-pressed="true"] .act__i { transform: scale(1.14); }
.act__i { font-size: var(--fa-text-md); line-height: 1; transition: transform var(--fa-dur-instant) var(--fa-ease-spring); }
.act--danger[aria-pressed="true"] { color: var(--fa-danger-fg); }
.act[disabled] { opacity: 0.45; cursor: not-allowed; }
.act--end { margin-left: auto; color: var(--fa-text-3); }

/* 블라인드 글 — task-14-report.md "블라인드 규칙" */
.blind {
  margin-top: var(--fa-space-8); padding: var(--fa-space-12);
  border: 1px dashed var(--fa-border-strong); border-radius: var(--fa-radius-sm);
  background: var(--fa-surface-2); color: var(--fa-text-2); font-size: var(--fa-text-sm);
}
.blind__btn {
  margin-top: var(--fa-space-8); min-height: 36px; padding: 0 var(--fa-space-12);
  border-radius: var(--fa-radius-pill); border: 1px solid var(--fa-border-strong);
  background: none; color: var(--fa-text-1); font-family: inherit; font-size: var(--fa-text-sm);
  cursor: pointer;
}
.post[data-blinded="1"] .post__body { filter: blur(5px); user-select: none; }
.post[data-blinded="1"][data-open="1"] .post__body { filter: none; user-select: auto; }
/* 공시(임시조치 문구) — 작성자가 쓴 말처럼 안 보이게 .blind 와 같은 값으로 상자를 준다(Task 24 감사 수정 2 Minor 4 · 새 원시값 없음) */
.post__body--notice {
  padding: var(--fa-space-12); border: 1px dashed var(--fa-border-strong); border-radius: var(--fa-radius-sm);
  background: var(--fa-surface-2); color: var(--fa-text-2); font-size: var(--fa-text-sm);
}

/* 답글 */
.replies { margin-top: var(--fa-space-16); display: grid; gap: var(--fa-space-8); }
.reply {
  padding: var(--fa-space-12); background: var(--fa-surface-2);
  border-radius: var(--fa-radius-sm);
}
.reply--deep { margin-left: var(--fa-space-20); }
.reply__body { margin-top: var(--fa-space-4); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fa-text-sm); }
/* 임시조치 답글 자리 줄 — 운영정책 6항④ 공시. 작성자·버튼 없이 문구만 */
.reply--notice { background: var(--fa-surface-inset); }
.reply__notice { margin: 0; color: var(--fa-text-2); font-size: var(--fa-text-sm); }
.reply__flag { margin-left: var(--fa-space-4); }

/* --------------------------------------------------------------------------
   16. 글쓰기 (Task 21)
   -------------------------------------------------------------------------- */
/* .compose 의 아래 여백은 19절에서 탭바 높이만큼 늘린다 (P0-4) */
.compose__fest {
  display: flex; align-items: center; gap: var(--fa-space-8);
  font-size: var(--fa-text-sm); color: var(--fa-text-2); flex-wrap: wrap;
}
.compose__group { margin-top: var(--fa-space-24); }
.compose__label {
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-bold); color: var(--fa-text-1);
  display: flex; align-items: center; gap: var(--fa-space-8); flex-wrap: wrap;
}
.compose__opt { color: var(--fa-text-3); font-weight: var(--fa-fw-regular); font-size: var(--fa-text-xs); }
.ta {
  width: 100%; margin-top: var(--fa-space-8); min-height: 132px; resize: vertical;
  padding: var(--fa-space-12); border-radius: var(--fa-radius-md);
  border: 1px solid var(--fa-border-strong); background: var(--fa-surface-2);
  color: var(--fa-text-1); font: inherit; font-size: var(--fa-text-md); line-height: var(--fa-lh-normal);
}
.ta:focus-visible { outline: 2px solid var(--fa-focus); outline-offset: 1px; border-color: var(--fa-focus); }
.counter { margin-top: var(--fa-space-4); text-align: right; font-variant-numeric: var(--fa-numeric); }
.counter[data-over="1"] { color: var(--fa-danger-fg); font-weight: var(--fa-fw-bold); }

.chipcat { margin-top: var(--fa-space-16); }
/* .chipcat__head 는 이제 접기 버튼이다 — 19절 참조 (P0-4 ⑵) */
.chipcat__group { display: flex; gap: var(--fa-chip-gap); flex-wrap: wrap; }

.imgpick { margin-top: var(--fa-space-8); display: flex; gap: var(--fa-space-12); align-items: flex-start; position: relative; }
.imgpick__btn {
  width: 84px; height: 84px; flex: none; border-radius: var(--fa-radius-md);
  border: 1px dashed var(--fa-border-strong); background: var(--fa-surface-2);
  color: var(--fa-text-2); font-size: var(--fa-text-2xl); font-family: inherit; cursor: pointer;
  display: grid; place-items: center;
}
.imgpick__prev { position: relative; width: 84px; height: 84px; flex: none; }
.imgpick__prev img {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--fa-radius-md); display: block;
}
.imgpick__x {
  position: absolute; top: -8px; right: -8px; width: 28px; height: 28px;
  border-radius: var(--fa-radius-circle); border: 1px solid var(--fa-border-strong);
  background: var(--fa-surface-3); color: var(--fa-text-1); cursor: pointer;
  font-family: inherit; line-height: 1;
}
.imgpick__info { font-size: var(--fa-text-xs); color: var(--fa-text-3); min-width: 0; padding-top: var(--fa-space-4); line-height: var(--fa-lh-snug); }
.imgpick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* .composebar 는 19절에서 sticky 로 정의한다 (P0-4) */

.select {
  width: 100%; margin-top: var(--fa-space-8); min-height: var(--fa-tap-min);
  padding: 0 var(--fa-space-12); border-radius: var(--fa-radius-md);
  border: 1px solid var(--fa-border-strong); background: var(--fa-surface-2);
  color: var(--fa-text-1); font: inherit; font-size: var(--fa-text-md);
}

/* --------------------------------------------------------------------------
   17. 광고 자리 선점 — **광고 코드는 한 줄도 없다** (addendum-ad-slots.md)
   --------------------------------------------------------------------------
   목적은 오직 하나: 나중에 광고를 켤 때 **레이아웃이 밀리지 않는 것**(CLS 0).
   지금은 스크립트도, iframe 도, 외부 요청도 없다. 빈 회색 박스도 띄우지 않는다.

   · 규격 432×135 = **3.2:1 비율**. 375px 화면에서 432px 는 넘치므로 고정 픽셀로 박지 않는다.
   · 기본은 `hidden` — **공간조차 차지하지 않는다.** 켜야 위 비율 박스가 나타난다.
   · ⚠️ 주입 대상은 `.fa-ad` 가 아니라 **`[data-ad-mount]`** 다.
     `.fa-ad` 에 innerHTML 을 쓰면 "광고" 라벨이 같이 지워진다 — 라벨 누락은 계정 정지 사유다
     (§16-3: 표시광고법 · 애드센스 "콘텐츠와 구분되지 않는 광고" 금지).
   -------------------------------------------------------------------------- */
.fa-ad {
  margin: var(--fa-space-16) 0;
  /* display 를 지정하지 않는다 — [hidden] 의 기본 display:none 을 덮어쓰지 않기 위해서다 */
}
.fa-ad[hidden] { display: none !important; }

.fa-ad__label {
  display: block;
  margin: 0 auto var(--fa-space-4);
  max-width: 432px;
  font-size: var(--fa-text-2xs);
  font-weight: var(--fa-fw-semibold);
  letter-spacing: 0.04em;
  color: var(--fa-text-3);
  text-transform: none;
}
.fa-ad__box {
  width: 100%;
  max-width: 432px;
  aspect-ratio: 432 / 135;       /* 공간을 미리 확정해 CLS 를 0 으로 만든다 */
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--fa-radius-md);
  background: var(--fa-surface-2);
}
.fa-ad__box > * { max-width: 100%; }

/* 피드 안의 광고는 **글 카드와 다르게 보여야 한다** (§16-1 UGC 규정 · §16-3).
   같은 모양으로 위장하면 정책 위반이다 — 테두리를 점선으로 두고 배경도 카드와 다르게 둔다. */
.fa-ad--infeed .fa-ad__box {
  border: 1px dashed var(--fa-border-strong);
  background: transparent;
}

/* --------------------------------------------------------------------------
   18. 사이트 푸터 — 법무·필수 페이지 1클릭 도달 (task-23-report.md §7-1)
   --------------------------------------------------------------------------
   · `#main` 바깥에 있어 라우터가 화면을 바꿔도 남는다.
   · `body` 가 이미 탭바 높이 + safe-area 만큼 아래 여백을 갖고 있어(app.css §0)
     푸터가 고정 탭바에 가려지지 않는다 — 여기서 다시 빼 주지 않는다.
   · 링크가 375px 에서 한 줄에 다 들어가지 않으면 줄을 밀지 않게 줄바꿈을 허용한다.
   -------------------------------------------------------------------------- */
.sitefoot {
  margin-top: var(--fa-space-40);
  padding: var(--fa-space-20) var(--fa-gutter) var(--fa-space-16);
  border-top: 1px solid var(--fa-border);
  background: var(--fa-surface-2);
}
.sitefoot__links {
  display: flex; flex-wrap: wrap;
  gap: 0 var(--fa-space-20);
  max-width: 560px; margin-inline: auto;
}
.sitefoot__links a {
  display: inline-flex; align-items: center;
  min-height: var(--fa-tap-min);            /* 44px — 현장에서 엄지로 누른다 */
  color: var(--fa-text-2);
  font-size: var(--fa-text-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.sitefoot__links a:active { color: var(--fa-text-1); }
@media (hover: hover) and (pointer: fine) {
  .sitefoot__links a:hover { color: var(--fa-text-1); text-decoration: underline; }
}
/* 개인정보처리방침은 다른 약관과 구분해 표시한다(관행이자 심사 항목) */
.sitefoot__links a.sitefoot__strong { color: var(--fa-text-1); font-weight: var(--fa-fw-bold); }

.sitefoot__note {
  max-width: 560px; margin: var(--fa-space-8) auto 0;
  color: var(--fa-text-3); font-size: var(--fa-text-xs);
}

/* --------------------------------------------------------------------------
   19. P0 화면 묶음 — 바텀시트 · 검색 · sticky 등록 바 (dispatch-p0-ui)
   --------------------------------------------------------------------------
   전부 "엄지가 닿는 아래쪽"과 "첫 화면에 결과" 두 가지를 위한 규칙이다.
   높이를 늘리는 수정을 할 때는 375×812 에서 다시 재 보고 넣어라.
   -------------------------------------------------------------------------- */

/* ── 바텀시트 ──────────────────────────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: var(--fa-z-modal); }
.sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  animation: fa-fade var(--fa-dur-fast) var(--fa-ease-out);
}
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 82vh; display: flex; flex-direction: column;
  background: var(--fa-surface-1); color: var(--fa-text-1);
  border-top: 1px solid var(--fa-border-strong);
  border-radius: var(--fa-radius-lg) var(--fa-radius-lg) 0 0;
  box-shadow: var(--fa-shadow-3);
  padding-bottom: var(--fa-safe-bottom);
  animation: fa-sheet-up var(--fa-dur-slow) var(--fa-ease-out);
}
@keyframes fa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fa-sheet-up { from { transform: translateY(14%); } to { transform: none; } }
.sheet__grip {
  width: 36px; height: 4px; border-radius: var(--fa-radius-pill);
  background: var(--fa-border-strong); margin: var(--fa-space-8) auto 0;
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--fa-space-8);
  padding: var(--fa-space-8) var(--fa-gutter);
}
.sheet__title { font-size: var(--fa-text-lg); font-weight: var(--fa-fw-bold); }
.sheet__body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 var(--fa-gutter) var(--fa-space-16);
}
.sheet__foot {
  display: flex; gap: var(--fa-space-8);
  padding: var(--fa-space-12) var(--fa-gutter);
  border-top: 1px solid var(--fa-border);
}
.sheet__foot .btn { flex: 1 1 auto; min-height: var(--fa-tap-min); }
.sheet__foot .btn--primary { flex: 2 1 auto; }
.sheet__group { margin-top: var(--fa-space-16); }
.sheet__label {
  font-size: var(--fa-text-xs); font-weight: var(--fa-fw-bold); color: var(--fa-text-3);
  margin-bottom: var(--fa-space-8);
}
/* 시트가 열린 동안 뒤 화면은 스크롤되지 않는다 — 손가락이 엉키지 않게 */
body[data-sheet="1"] { overflow: hidden; }

/* ── 검색 (P0-2) ───────────────────────────────────────────────────────── */
.searchbar__wrap {
  position: sticky; top: calc(var(--fa-safe-top) + var(--fa-header-h)); z-index: 10;
  background: color-mix(in srgb, var(--fa-bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fa-border);
  padding: var(--fa-space-8) max(var(--fa-gutter), var(--fa-safe-left), var(--fa-safe-right));
}
@supports not (backdrop-filter: blur(1px)) { .searchbar__wrap { background: var(--fa-bg); } }
.searchbar {
  max-width: var(--fa-content-max); margin-inline: auto;
  display: flex; align-items: center; gap: var(--fa-space-8);
  min-height: var(--fa-tap-min);
  padding-inline: var(--fa-space-12);
  background: var(--fa-surface-2);
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-pill);
}
.searchbar:focus-within { border-color: var(--fa-focus); outline: 2px solid var(--fa-focus); outline-offset: 1px; }
.searchbar__i { flex: none; font-size: var(--fa-text-md); line-height: 1; }
.searchbar__input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--fa-text-1);
  font: inherit; font-size: var(--fa-text-md);   /* iOS 확대 방지: 16px 이상 */
  min-height: var(--fa-tap-min);
}
.searchbar__input:focus { outline: none; }
.searchbar__input::-webkit-search-cancel-button { display: none; }
.searchbar__x {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--fa-radius-circle);
  background: var(--fa-surface-3); color: var(--fa-text-2);
  font: inherit; line-height: 1; cursor: pointer;
}
.searchbar__x[hidden] { display: none; }
.searchpage { padding-block: var(--fa-space-8) var(--fa-space-48); }

.recent {
  display: inline-flex; align-items: center;
  border: 1px solid var(--fa-border-strong); border-radius: var(--fa-radius-pill);
  background: var(--fa-surface-2); overflow: hidden;
}
.recent__go {
  min-height: var(--fa-tap-min); display: inline-flex; align-items: center;
  padding-inline: var(--fa-space-12) var(--fa-space-8);
  color: var(--fa-text-1); text-decoration: none;
  font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
  max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recent__x {
  width: var(--fa-tap-min); min-height: var(--fa-tap-min); flex: none;
  border: 0; background: transparent; color: var(--fa-text-3);
  font: inherit; cursor: pointer;
}
.recent__x:active { background: var(--fa-surface-3); }

/* ── 글쓰기 등록 바 — 스크롤 위치와 무관하게 엄지 영역에 (P0-4 ⑴⑶) ─────────
   실측: 예전에는 `position: static` 이라 등록 버튼이 y=1,940px 에 있었다.
   ⚠️ `.compose` 의 아래 여백은 탭바 높이보다 커야 한다 — 안 그러면 스크롤 끝에서
      등록 바가 고정 탭바 밑으로 들어간다. */
.compose { padding-block: var(--fa-space-16)
           calc(var(--fa-tabbar-h) + var(--fa-safe-bottom) + var(--fa-space-24)); }
.composebar {
  position: sticky;
  bottom: calc(var(--fa-safe-bottom) + var(--fa-tabbar-h));
  z-index: 25;                     /* 탭바(--fa-z-nav: 20)보다 위 */
  display: flex; align-items: center; gap: var(--fa-space-8);
  margin-top: var(--fa-space-16);
  margin-inline: calc(var(--fa-gutter) * -1);
  padding: var(--fa-space-8) var(--fa-gutter);
  background: color-mix(in srgb, var(--fa-bg) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--fa-border);
}
@supports not (backdrop-filter: blur(1px)) { .composebar { background: var(--fa-bg); } }
.composebar__go { flex: none; min-width: 104px; min-height: var(--fa-tap-min); }
.composebar__chips {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.composebar__chips::-webkit-scrollbar { display: none; }
.composebar__chips[hidden] { display: none; }
/* 고른 칩 요약 — 탭하면 바로 해제된다(스크롤해 올라갈 필요 없이) */
.pickchip {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding-inline: var(--fa-space-8);
  border: 1px solid var(--fa-chip-neutral-bd); border-radius: var(--fa-radius-pill);
  background: var(--fa-chip-neutral-bg); color: var(--fa-chip-neutral-fg);
  font: inherit; font-size: var(--fa-text-xs); font-weight: var(--fa-fw-semibold);
  line-height: 1; white-space: nowrap; cursor: pointer;
}
.pickchip[data-sev="0"] { background: var(--fa-sev-0-bg); border-color: var(--fa-sev-0-bd); color: var(--fa-sev-0-fg); }
.pickchip[data-sev="1"] { background: var(--fa-sev-1-bg); border-color: var(--fa-sev-1-bd); color: var(--fa-sev-1-fg); }
.pickchip[data-sev="2"] { background: var(--fa-sev-2-bg); border-color: var(--fa-sev-2-bd); color: var(--fa-sev-2-fg); }
.pickchip[data-sev="3"] { background: var(--fa-sev-3-bg); border-color: var(--fa-sev-3-bd); color: var(--fa-sev-3-fg); }
.pickchip__x { opacity: 0.7; font-size: var(--fa-text-2xs); }

/* ── 칩 분류 접기 (P0-4 ⑵) — 혼잡도만 펼치고 나머지는 헤더 탭으로 연다 ──── */
.chipcat__head {
  width: 100%; min-height: var(--fa-tap-min);
  display: flex; align-items: center; gap: var(--fa-space-8);
  padding: 0; margin-bottom: var(--fa-space-4);
  border: 0; background: transparent; color: var(--fa-text-2);
  font: inherit; font-size: var(--fa-text-sm); text-align: left; cursor: pointer;
}
.chipcat__pick {
  margin-left: auto; color: var(--fa-accent-text);
  font-size: var(--fa-text-xs); font-weight: var(--fa-fw-bold);
}
.chipcat__caret {
  flex: none; color: var(--fa-text-3);
  transition: transform var(--fa-dur-fast) var(--fa-ease-out);
}
.chipcat__head[aria-expanded="true"] .chipcat__caret { transform: rotate(180deg); }
.chipcat__head[aria-expanded="true"] { color: var(--fa-text-1); font-weight: var(--fa-fw-bold); }
.chipcat__group[hidden] { display: none; }

/* ── 접히는 기록 고지 (P1-8) — 한 줄 요약은 **항상 보인다** ───────────────── */
.notice--slim { padding: var(--fa-space-8) var(--fa-space-12); }
.notice__toggle {
  width: 100%; min-height: var(--fa-tap-min);
  display: flex; align-items: center; gap: var(--fa-space-8);
  padding: 0; border: 0; background: transparent; color: var(--fa-warning-fg);
  font: inherit; font-size: var(--fa-text-sm); font-weight: var(--fa-fw-semibold);
  text-align: left; cursor: pointer;
}
.notice__line { flex: 1 1 auto; min-width: 0; }
.notice__caret { flex: none; transition: transform var(--fa-dur-fast) var(--fa-ease-out); }
.notice__toggle[aria-expanded="true"] .notice__caret { transform: rotate(180deg); }
.notice__more[hidden] { display: none; }
.notice__more { margin-top: var(--fa-space-8); }

/* ── 홈 카드의 "지금" 한 줄 (P1-10) ────────────────────────────────────── */
.fcard__live {
  display: flex; align-items: center; gap: var(--fa-space-8);
  margin-top: var(--fa-space-8); flex-wrap: wrap;
}
.fcard__live[hidden] { display: none; }
.fcard__posts { font-weight: var(--fa-fw-semibold); }

/* ── 한 화면에 CTA 하나 (P1-3) + 광고와 안 겹치기 (P1-2) ──────────────────
   · FAB 이 켜진 화면(축제 상세)에서는 탭바 ＋ 를 접는다 — 탭바가 5칸에서 4칸이 된다.
   · 광고가 화면에 들어오면 **FAB 을 물리고 탭바 ＋ 를 되살린다.**
     고정 탭바는 인콘텐츠 광고와 절대 겹치지 않으므로 CTA 는 늘 정확히 하나 남는다.
     (광고를 가리는 것은 애드센스 정책 위험이다 — §16-1 · §16-3) */
body[data-fab="1"] .tab--cta { display: none; }
body[data-fab="1"][data-ad-near="1"] .tab--cta { display: flex; }
body[data-ad-near="1"] .fab {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--fa-dur-fast) var(--fa-ease-out), visibility 0s linear var(--fa-dur-fast);
}

/* ── 2026-09-13 라운드: 관심·공유·MY 내 글·글 도구 ─────────────────────────
   실사용 테스트에서 드러난 빈자리(내 글 삭제 불가, 쓴 축제로 돌아갈 길 없음)를 메우는 요소들. */
.section[hidden], .mysec[hidden] { display: none; }
.detail__acts { margin-top: var(--fa-space-12); display: flex; flex-wrap: wrap; gap: var(--fa-space-8); }
.detail__acts .btn, .ownerbar .btn, .reply__acts .btn, .postnav .btn { min-height: var(--fa-tap-min); }
.favbtn[aria-pressed="true"] { color: var(--fa-accent-text); border-color: var(--fa-accent-2); }
.ownerbar { margin-top: var(--fa-space-8); display: flex; justify-content: flex-end; gap: var(--fa-space-8); }
.ownerbar[hidden] { display: none; }
.post__edit { margin-top: var(--fa-space-8); }
.post__edit .ta { min-height: 96px; }
.reply__acts { margin-top: var(--fa-space-4); display: flex; justify-content: flex-end; }
.postnav { display: flex; align-items: center; justify-content: space-between; gap: var(--fa-space-8); }
.mysec { margin-top: var(--fa-space-24); }
.mylist { display: grid; gap: var(--fa-space-8); margin-top: var(--fa-space-12); }
.mypost { display: block; color: inherit; text-decoration: none; }
.mypost__body {
  margin-top: var(--fa-space-4); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── 제재 안내 · 관리 링크 (Task 18 · 기획서 §5-4 · §4-1) — 토큰만 ─────── */
.mysanction {
  margin-top: var(--fa-space-16);
  border: 1px solid var(--fa-danger-bd); background: var(--fa-danger-bg); color: var(--fa-danger-fg);
}
.mysanction--warn { border-color: var(--fa-warning-bd); background: var(--fa-warning-bg); color: var(--fa-warning-fg); }
.mysanction__title { font-weight: var(--fa-fw-bold); }
.mysanction__meta { margin-top: var(--fa-space-4); font-size: var(--fa-text-sm); overflow-wrap: anywhere; }
.mysanction__link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--fa-space-4);
  color: inherit; font-weight: var(--fa-fw-semibold); text-decoration: underline;
}
.meadmin-slot { display: contents; }   /* 비어 있을 때 격자 간격이 생기지 않게 */
.postnav__right { display: inline-flex; align-items: center; gap: var(--fa-space-8); }

/* --------------------------------------------------------------------------
   공유 요소 전환 — 카드 썸네일 → 상세 히어로
   계획서 2026-09-17-festalive-motion-icons Task 4 · 설계 §5-4~§5-5 · design-system.md §8

   비율이 서로 다르다(레일 4/3 · 목록 96px 정사각 → 히어로 16/9). 기본 UA 동작은
   구·신 스냅샷을 교차 페이드하면서 크기를 맞추는데, 그러면 중간 프레임에 늘어나 보인다.
   교차 페이드를 끄고 group 의 모프만 쓴다.

   모션 축소는 CSS 가 아니라 app.js 의 canVT 가 막는다 — tokens.css 8번 블록의
   전역 리셋은 `*` 선택자라 ::view-transition-* 에 닿지 않는다(별도 pseudo 트리).
   -------------------------------------------------------------------------- */
::view-transition-group(fa-hero) {
  animation-duration: var(--fa-dur-slow);            /* 320ms */
  animation-timing-function: var(--fa-ease-inout);
}
::view-transition-old(fa-hero),
::view-transition-new(fa-hero) {
  animation: none;                  /* 교차 페이드 끔 — 늘어남의 원인 */
  height: 100%; width: 100%;
  object-fit: cover;                /* .thumb > img · .hero > img 와 같은 규칙 */
  mix-blend-mode: normal;
}
::view-transition-group(root) { animation-duration: var(--fa-dur-base); }   /* 220ms */
