/* ============================================================
   Vibe Board · 전체 사이트 확장 스타일
   기존 styles.css(컴포넌트 레이어) + neon.css(다크/네온) 위에 얹는
   신규 화면 전용 스타일. 모든 색/간격/반경은 design token(var)만 사용.
   ============================================================ */

/* ---------- 헤더 네비게이션 ---------- */
.app-nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.app-nav__item {
  height: 38px; padding: 0 14px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap;
  letter-spacing: -0.02em; transition: background var(--dur-fast), color var(--dur-fast);
}
.app-nav__item:hover { background: var(--surface-3); color: var(--ink); }
.app-nav__item.is-active { color: var(--ink); }
.app-nav__item.is-active::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: var(--blue); margin: 6px 4px 0;
}
body.neon-calm .app-nav__item.is-active::after {
  background: var(--nf-color);
  box-shadow: 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 30%, transparent);
}

.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: background var(--dur-fast), color var(--dur-fast);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn__dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--coral); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- 라이트/다크 공통 네온 버튼 ---------- */
.btn {
  position: relative;
  isolation: isolate;
}
.btn--primary {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--nf-color, var(--blue)) 10%, var(--surface)), color-mix(in srgb, var(--nf-color, var(--blue)) 4%, var(--surface)));
  color: var(--blue-ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nf-color, var(--blue)) 54%, transparent),
    0 8px 20px color-mix(in srgb, var(--nf-color, var(--blue)) 10%, transparent);
}
.btn--primary:hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--nf-color, var(--blue)) 14%, var(--surface)), color-mix(in srgb, var(--nf-color, var(--blue)) 7%, var(--surface)));
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nf-color, var(--blue)) 70%, transparent),
    0 10px 22px color-mix(in srgb, var(--nf-color, var(--blue)) 14%, transparent);
}
.btn--secondary,
.btn--primary-outline {
  background: color-mix(in srgb, var(--surface) 90%, var(--nf-color, var(--blue)) 10%);
  color: var(--ink-2);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nf-color, var(--blue)) 24%, var(--line)),
    0 6px 16px color-mix(in srgb, var(--nf-color, var(--blue)) 5%, transparent);
}
.btn--secondary:hover,
.btn--primary-outline:hover {
  background: color-mix(in srgb, var(--surface) 82%, var(--nf-color, var(--blue)) 18%);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nf-color, var(--blue)) 46%, transparent),
    0 8px 18px color-mix(in srgb, var(--nf-color, var(--blue)) 8%, transparent);
}
.btn--ghost:hover {
  background: color-mix(in srgb, var(--surface-3) 72%, var(--nf-color, var(--blue)) 28%);
  color: var(--ink);
}
/* primary = 시그니처 글로우 그라데이션 (neon dual) — 메인 CTA가 빛나도록 */
:is(body.neon-dark, html.neon-dark body) .btn--primary {
  background: var(--grad-dual);
  background-size: 180% 180%;
  color: #fff;
  box-shadow:
    var(--glow-md),
    inset 0 1px 0 rgba(255,255,255,0.28);
  transition: box-shadow var(--dur), transform .06s, background-position var(--dur-slow) var(--ease);
}
:is(body.neon-dark, html.neon-dark body) .btn--primary:hover {
  background-position: 100% 0;
  box-shadow:
    var(--glow-lg),
    inset 0 1px 0 rgba(255,255,255,0.34);
}
:is(body.neon-dark, html.neon-dark body) .btn--primary svg {
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.4));
}
:is(body.neon-dark, html.neon-dark body) .btn--secondary,
:is(body.neon-dark, html.neon-dark body) .btn--primary-outline {
  background: rgba(255,255,255,0.025);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 8%, transparent);
}

/* ---------- 페이지 헤더 ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 48px 0 8px; flex-wrap: wrap; }
.page-head__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; }
.page-head__title { margin: 0; font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.page-head__sub { margin: 12px 0 0; font-size: 16px; color: var(--ink-3); line-height: 1.6; max-width: 560px; }

/* ---------- 검색바 ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; min-width: 0; background: var(--surface); border-radius: 16px; padding: 0 12px 0 14px; height: 52px; border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.searchbar:focus-within { border-color: var(--blue); box-shadow: var(--shadow-2); }
.searchbar svg { color: var(--muted-2); flex-shrink: 0; }
.searchbar input { flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; box-shadow: none; appearance: none; -webkit-appearance: none; background: transparent; padding: 0; margin: 0; font-size: 15px; line-height: normal; color: var(--ink); font-family: inherit; }
.searchbar input::-webkit-search-decoration,
.searchbar input::-webkit-search-cancel-button,
.searchbar input::-webkit-search-results-button,
.searchbar input::-webkit-search-results-decoration { display: none; }
.searchbar input::placeholder { color: var(--muted-2); }
.searchbar__clear { flex: 0 0 auto; color: var(--muted); width: 32px; height: 32px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; }
.searchbar__clear:hover { background: var(--surface-3); color: var(--ink); }

.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 4px; }
.list-count { font-size: 14px; color: var(--muted); font-weight: 600; }
.list-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.latest-total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line-soft);
  white-space: nowrap;
}
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-card--latest-tile {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  min-height: 108px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
}
.post-card--latest-tile:hover {
  transform: none;
  box-shadow: var(--shadow-1);
}
.post-card--latest-tile:active {
  transform: scale(0.99);
}
.post-card--latest-tile .post-card__thumb {
  flex: 0 0 112px;
  width: 112px;
  height: 88px;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 10px;
}
.post-card--latest-tile .post-card__thumb--image::after,
.post-card--latest-tile .post-card__image-bg {
  display: none;
}
.post-card__tile-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card__tile-icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: auto;
  color: rgba(255,255,255,0.92);
}
.post-card--latest-tile .post-card__body {
  flex: 1;
  min-width: 0;
  padding: 0;
  gap: 0;
}
.post-card__tile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.post-card--latest-tile .post-card__cat {
  position: static;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: none;
}
.post-card__likes {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.post-card__likes svg {
  color: var(--muted-2);
}
.post-card--latest-tile .post-card__title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
}
.post-card--latest-tile .post-card__desc {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.35;
}

/* ---------- 광고 랜딩 홈 보강 ---------- */
.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.hero__trust {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.hero__trust .dot {
  background: var(--muted-3);
}
.hero__stat-ico {
  min-width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.section--compact {
  padding-block: 16px 4px;
}
.creator-strip,
.policy-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.creator-strip h2,
.policy-strip h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.28;
  letter-spacing: 0;
}
.creator-strip p,
.policy-strip p {
  margin: 7px 0 0;
  max-width: 720px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.65;
}
.policy-strip__links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 260px;
}
.policy-strip__links a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.policy-strip__links a:hover {
  background: var(--surface-3);
  color: var(--ink);
}
body.neon-calm .hero__stat-ico {
  background: color-mix(in srgb, var(--nf-color) 16%, transparent);
  color: var(--nf-color);
}
body.neon-calm .creator-strip,
body.neon-calm .policy-strip {
  box-shadow: var(--shadow-1), inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 12%, transparent);
}

/* ---------- 홈 카드 레일 + 안전한 이미지 프레임 ---------- */
.home-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  overflow-x: visible;
  overflow-y: visible;
  padding: 4px 0 0;
  margin: 0;
  scroll-snap-type: none;
  scroll-padding-inline: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-rail::-webkit-scrollbar { display: none; height: 0; }
.home-rail::-webkit-scrollbar-track { background: transparent; }
.home-rail::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--r-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
.home-rail::-webkit-scrollbar-thumb:hover { background: var(--muted-3); background-clip: content-box; }
.home-rail__item {
  position: relative;
  min-width: 0;
  scroll-snap-align: start;
}
.home-rail--top .home-rail__item:first-child,
.home-rail--latest .home-rail__item { min-width: 0; }
.home-rail .post-card {
  height: 100%;
  min-height: 348px;
}
.home-rank {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-1);
}
.home-rail__item .home-rank + .post-card .post-card__cat { left: 50px; }

.post-card__thumb {
  min-height: 176px;
  isolation: isolate;
}
.post-card__thumb--image {
  background:
    radial-gradient(circle at 22% 12%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 34%),
    linear-gradient(135deg, var(--surface), var(--surface-3));
}
.post-card__thumb--image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 42%),
    linear-gradient(0deg, rgba(25,31,40,0.08), transparent 38%);
}
.post-card__image-bg {
  position: absolute;
  inset: -14px;
  z-index: 0;
  width: calc(100% + 28px);
  height: calc(100% + 28px);
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  opacity: 0.34;
  transform: scale(1.04);
}
.post-card__image {
  z-index: 1;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  border-radius: calc(var(--r-xl) - 10px);
  background: color-mix(in srgb, var(--surface) 88%, #111827 12%);
  box-shadow:
    0 10px 30px rgba(25, 31, 40, 0.10),
    0 0 0 1px color-mix(in srgb, var(--line) 72%, transparent);
}
.post-card:hover .post-card__image-bg { opacity: 0.42; }
.post-card__cat,
.post-card .like-btn { z-index: 3; }
:is(body.neon-dark, html.neon-dark body) .post-card__thumb--image {
  background:
    radial-gradient(circle at 24% 12%, color-mix(in srgb, var(--nf-color) 12%, transparent), transparent 34%),
    linear-gradient(135deg, #0d1320, #111827);
}
:is(body.neon-dark, html.neon-dark body) .post-card__thumb--image::after {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 42%),
    linear-gradient(0deg, rgba(0,0,0,0.22), transparent 46%);
}
:is(body.neon-dark, html.neon-dark body) .post-card__image-bg {
  opacity: 0.28;
  filter: blur(20px) saturate(1.16) brightness(0.9);
}
:is(body.neon-dark, html.neon-dark body) .post-card__image {
  background: rgba(255,255,255,0.035);
  box-shadow:
    0 14px 34px rgba(0,0,0,0.28),
    0 0 0 1px rgba(255,255,255,0.07);
}
.post-card__thumb--fallback .post-card__thumb-fill {
  font-size: clamp(20px, 6vw, 28px);
}
.post-card__title,
.post-card__desc,
.post-card__meta span:nth-child(2) {
  min-width: 0;
}

/* load more — 양옆 헤어라인 + 알약형 고스트 버튼 */
.load-more { display: flex; align-items: center; gap: 18px; padding: 40px 0 8px; }
.load-more::before, .load-more::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.load-more__btn {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 10px 0 20px;
  border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line); flex-shrink: 0;
  transition: background var(--dur-fast), box-shadow var(--dur-fast), transform .06s, color var(--dur-fast);
}
.load-more__btn:hover { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--muted-3); }
.load-more__btn:active { transform: scale(0.98); }
.load-more__btn svg { transition: transform var(--dur) var(--ease); color: var(--muted); }
.load-more__btn:hover svg { transform: translateY(2px); }
.load-more__count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 700;
}
body.neon-calm .load-more__btn:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 42%, transparent), 0 0 calc(7px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 14%, transparent);
  color: var(--ink);
}
body.neon-calm .load-more__btn:hover .load-more__count { background: color-mix(in srgb, var(--nf-color) 18%, transparent); color: var(--nf-color); }

/* ---------- field 보조 ---------- */
.field-hint { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.field-label > span:first-child { white-space: nowrap; }

.image-size-guide {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.image-size-guide__frame {
  width: 132px;
  aspect-ratio: 16 / 11;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--blue-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 14%, transparent), transparent),
    var(--surface);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 28%, var(--line));
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
}
.image-size-guide__frame small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.image-size-guide b {
  display: block;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.image-size-guide p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.image-check {
  margin: 9px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.image-check--ok { color: var(--ok); }
.image-check--warn { color: var(--coral-ink); }
.image-check--invalid { color: var(--danger); }
:is(body.neon-dark, html.neon-dark body) .image-size-guide {
  background: rgba(255,255,255,0.035);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
}
:is(body.neon-dark, html.neon-dark body) .image-size-guide__frame {
  color: var(--nf-color);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--nf-color) 16%, transparent), transparent),
    rgba(255,255,255,0.04);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 36%, transparent),
    0 0 calc(5px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 8%, transparent);
}

/* detail 사이드바 meta 값 줄바꿈 방지 (짧은 라벨) */
.detail-card .meta-row { min-width: 0; }
.detail-card .meta-row dt { flex: 0 0 auto; }
.detail-card .meta-row dd { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.detail-card .meta-row dd,
.detail-card .meta-link { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.detail-card .meta-link { display: block; white-space: nowrap; }

.source-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.source-links__item { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 800; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-soft); }
.source-links__item:hover { color: var(--blue-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 45%, var(--line-soft)); }
.source-link-list { display: grid; gap: 8px; }
.source-link-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.source-link-row:has(.source-link-row__remove) { grid-template-columns: minmax(0, 1fr) 36px; }
.source-link-row:not(:has(.source-link-row__remove)) { grid-template-columns: minmax(0, 1fr); }
.source-link-row__remove { width: 36px; height: 36px; border: 0; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-soft); cursor: pointer; }
.source-link-row__remove:hover { color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 12.5px; font-weight: 700; }

/* 상세 — 좋아요/공유 아이콘 액션 행 (본문 상단) */
.act-icons { display: flex; align-items: center; gap: 10px; margin: 2px 0 24px; }
.act-icon { width: 46px; height: 46px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform .08s; }
.act-icon:hover { box-shadow: inset 0 0 0 1px var(--muted-3); transform: translateY(-1px); }
.act-icon:active { transform: scale(0.93); }
.act-icon.is-liked { background: var(--coral); color: #fff; box-shadow: none; }
.act-icon.is-liked svg { animation: heartPop .32s ease; }
.act-icon--kakao { background: var(--kakao); color: rgba(0,0,0,0.85); box-shadow: none; }
.act-icon--kakao:hover { box-shadow: none; filter: brightness(0.97); }
.act-count { font-size: 15px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin: 0 6px 0 -2px; white-space: nowrap; }
body.neon-calm .act-icon.is-liked { box-shadow: 0 0 calc(8px * var(--nf-glow)) color-mix(in srgb, var(--coral) 30%, transparent); }
.detail-card .meta-row dt { white-space: nowrap; }
.detail__byline b, .detail__byline > span:not(.dot) { white-space: nowrap; }

/* segmented choice */
.seg-choice { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg-choice__item {
  height: 44px; padding: 0 18px; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-3); font-size: 14px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line); transition: all var(--dur-fast);
}
.seg-choice__item:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.seg-choice__item.is-active { background: var(--blue-soft); color: var(--blue-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 45%, transparent); }
body.neon-calm .seg-choice__item.is-active { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 72%, transparent), 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 20%, transparent); }

/* tech chip removable / add */
.tech-chip--removable { cursor: pointer; gap: 4px; }
.tech-chip__x { font-size: 14px; opacity: 0.6; }
.tech-chip--removable:hover .tech-chip__x { opacity: 1; }
.tech-add { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-3); font-size: 12.5px; font-weight: 600; transition: background var(--dur-fast); }
.tech-add:hover { background: var(--surface-pressed); color: var(--ink); }

/* ============================================================
   등록 / 수정 폼 — 섹션 구조 · 아이콘 카테고리 · 미리보기 · 진행
   ============================================================ */
.compose-page { padding-bottom: 64px; }
.compose-sub { margin: 8px 0 4px; font-size: 15px; color: var(--ink-3); line-height: 1.65; max-width: 640px; }

/* 단계 섹션 카드 */
.form-section { margin-top: 16px; padding: 22px 22px 24px; }
.form-section__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.form-section__num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; background: var(--blue);
  font-variant-numeric: tabular-nums;
}
.form-section__heading { min-width: 0; }
.form-section__title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.form-section__desc { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-section__fields { display: grid; gap: 20px; }
body.neon-calm .form-section__num { background: var(--nf-color); box-shadow: 0 0 calc(9px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 55%, transparent); }

.source-link-list {
  display: grid;
  gap: 10px;
}
.source-link-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.34fr) minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}
.source-link-row .select,
.source-link-row .input {
  height: 46px;
}
.source-link-row__remove {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.source-link-row__remove:hover {
  color: var(--danger);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent);
}
.source-link-row:not(:has(.source-link-row__remove)) {
  grid-template-columns: minmax(132px, 0.34fr) minmax(0, 1fr);
}
.source-links {
  display: grid;
  gap: 8px;
}
.source-links__item {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  font-size: 13px;
  font-weight: 700;
}
.source-links__item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-links__item:hover {
  color: var(--blue-ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 35%, transparent);
}
.field-error {
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .source-link-row {
    grid-template-columns: minmax(0, 1fr) 38px;
  }
  .source-link-row .select {
    grid-column: 1 / -1;
  }
  .source-link-row:not(:has(.source-link-row__remove)) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 카테고리 — 아이콘 + 라벨, 큰 타겟 (3열) */
.cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-radio { flex-direction: column; gap: 5px; height: 74px; font-size: 13.5px; font-weight: 600; transition: transform var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast); }
.cat-radio__ico { font-size: 22px; line-height: 1; }
.cat-radio:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.cat-radio.is-active { transform: translateY(-1px); }
body.neon-calm .cat-radio.is-active {
  background: color-mix(in srgb, var(--nf-color) 12%, transparent);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--nf-color) 60%, transparent), var(--glow-sm);
}

/* 실시간 미리보기 */
.compose-preview__label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-2); margin-bottom: 10px; }
.compose-preview__label .pulse-dot { width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--ok); animation: pulse 1.8s ease-out infinite; }
.compose-preview__card { pointer-events: none; }
.compose-preview__hint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* 제출 카드 + 필수항목 진행 */
.compose-submit { display: grid; gap: 10px; }
.compose-submit__todo { font-size: 13px; color: var(--ink-3); line-height: 1.5; background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line-soft); }
.compose-submit__todo b { color: var(--coral-ink); }
.compose-submit__ready { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ok); }

/* ---------- 토글 스위치 ---------- */
.vb-switch { position: relative; width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--line); transition: background .18s var(--ease); flex-shrink: 0; }
.vb-switch[data-on="1"] { background: var(--blue); }
.vb-switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--r-pill); background: #fff; box-shadow: var(--shadow-1); transition: transform .18s var(--ease); }
.vb-switch[data-on="1"] i { transform: translateX(18px); }
body.neon-calm .vb-switch[data-on="1"] { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 72%, transparent), 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 20%, transparent); }
body.neon-calm .vb-switch[data-on="1"] i { background: var(--nf-color); box-shadow: 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 50%, transparent); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.toggle-row:last-child { border-bottom: none; }
.toggle-row__label { font-size: 15px; font-weight: 600; color: var(--ink); }
.toggle-row__desc { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ---------- 스폰서/회사 로고 타일 ---------- */
.logo-tile {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--surface-3); color: var(--ink); font-weight: 800; font-size: 18px; letter-spacing: -0.03em;
}
.logo-tile--lg { width: 64px; height: 64px; border-radius: var(--r-lg); font-size: 26px; }
.logo-tile--blue { background: var(--blue-soft); color: var(--blue-ink); }

/* ad transparency label */
.ad-label { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; flex-shrink: 0; }
.challenge-card__sponsor-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-footer__links a { white-space: nowrap; }

/* ---------- 챌린지 ---------- */
.challenge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.challenge-card { background: var(--surface); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-1); cursor: pointer; transition: transform var(--dur) ease, box-shadow var(--dur) ease; display: flex; flex-direction: column; gap: 16px; }
.challenge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
body.neon-calm .challenge-card:hover { box-shadow: var(--shadow-2), 0 0 calc(8px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 10%, transparent); }
.challenge-card__top { display: flex; align-items: center; gap: 12px; }
.challenge-card__sponsor { flex: 1; min-width: 0; }
.challenge-card__sponsor-name { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.challenge-card__title { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; margin-top: 2px; color: var(--ink); }
.challenge-card__desc { font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.challenge-card__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill--blue { background: var(--blue-soft); color: var(--blue-ink); }
.pill--coral { background: var(--coral-soft); color: var(--coral-ink); }
.pill--ok { background: var(--ok-soft); color: var(--ok); }
.pill svg { width: 13px; height: 13px; }
.pill__deadline { margin-left: auto; color: var(--coral-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.tag--ad { background: var(--coral-soft); color: var(--coral-ink); }

/* challenge detail */
.challenge-hero { background: var(--surface); border-radius: var(--r-2xl); padding: 32px; box-shadow: var(--shadow-1); margin-bottom: 32px; }
.challenge-hero__top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.challenge-hero__title { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; margin: 0 0 12px; }
.challenge-hero__detail { font-size: 16px; color: var(--ink-2); line-height: 1.8; max-width: 720px; }
.challenge-hero__stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* submission status badge */
.sub-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sub-badge--pending { background: var(--surface-3); color: var(--muted); }
.sub-badge--approved { background: var(--ok-soft); color: var(--ok); }
.sub-badge--rejected { background: var(--danger-soft); color: var(--danger); }
.sub-badge--winner { background: var(--coral-soft); color: var(--coral-ink); }
.submission-thumb-badge { position: absolute; top: 12px; right: 12px; left: auto; z-index: 2; backdrop-filter: blur(6px); }

/* ---------- 채용 ---------- */
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-card { display: flex; align-items: center; gap: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1); cursor: pointer; transition: transform var(--dur) ease, box-shadow var(--dur) ease; position: relative; }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
body.neon-calm .job-card:hover { box-shadow: var(--shadow-2), 0 0 calc(8px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 9%, transparent); }
.job-card--featured { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue) 35%, transparent), var(--shadow-1); }
.job-card__main { flex: 1; min-width: 0; }
.job-card__company { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.job-card__title { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin: 4px 0 8px; }
.job-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.tag svg { width: 12px; height: 12px; }
.job-card__salary { text-align: right; flex-shrink: 0; white-space: nowrap; min-width: 80px; }
.job-card__salary b { font-size: 15px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-card__salary span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.featured-flag { position: absolute; top: -8px; left: 18px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; box-shadow: var(--shadow-1); }
:is(body.neon-dark, html.neon-dark body) .featured-flag { background: var(--nf-color); box-shadow: 0 0 calc(5px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 32%, transparent); }

/* job detail */
.detail-prose { font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.detail-prose h3 { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin: 28px 0 10px; }
.detail-prose h3:first-child { margin-top: 0; }
.detail-prose p { margin: 0 0 8px; }

/* ---------- 교육 광고 ---------- */
.biz-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.biz-flow__step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.biz-flow__step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.biz-flow__arrow { color: var(--muted-2); font-weight: 800; }
body.neon-calm .biz-flow__step b { background: color-mix(in srgb, var(--nf-color) 18%, transparent); color: var(--nf-color); }
.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.edu-card { background: var(--surface); border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 14px; transition: transform var(--dur) ease, box-shadow var(--dur) ease; }
.edu-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.edu-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.edu-card__title { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1.3; }
.edu-card__org { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.edu-card__desc { font-size: 14px; color: var(--ink-3); line-height: 1.65; flex: 1; }
.edu-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.edu-card__price { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.edu-card__actions { display: flex; gap: 8px; }
.edu-card__actions .btn { flex: 1; }

/* ---------- 프로필 / 마이페이지 ---------- */
.profile-head { display: flex; align-items: center; gap: 20px; padding: 48px 0 28px; flex-wrap: wrap; }
.profile-head__avatar { width: 84px; height: 84px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; flex-shrink: 0; }
.profile-head__info { flex: 1; min-width: 200px; }
.profile-head__name { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.profile-head__sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.profile-head__stats { display: flex; gap: 22px; margin-top: 14px; }
.profile-stat { white-space: nowrap; }
.profile-stat b { font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.profile-stat span { font-size: 13px; color: var(--muted); margin-left: 5px; }
.profile-head__actions { display: flex; gap: 8px; align-self: center; }

.my-sites-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.my-sites-head h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.my-sites-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.op-card { background: var(--surface); border-radius: var(--r-xl); padding: 22px 24px; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.op-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.op-card__title { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.op-card__note { font-size: 14px; color: var(--ink-3); line-height: 1.7; }
.op-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- 계정 설정 ---------- */
.acct-photo { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.acct-photo__avatar { width: 76px; height: 76px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; flex-shrink: 0; overflow: hidden; }
.acct-photo__avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-photo__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-photo__hint { width: 100%; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.acct-manage { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin: 8px 0 24px; }
.tab { height: 44px; padding: 0 16px; font-size: 15px; font-weight: 600; color: var(--muted); position: relative; white-space: nowrap; }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
body.neon-calm .tab.is-active::after { background: var(--nf-color); box-shadow: 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 28%, transparent); }

/* ---------- 알림 ---------- */
/* 문의함 — 2단(목록 + 대화) */
.msg-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.msg-tabs { margin: 0; }
.msg-search {
  display: flex; align-items: center; gap: 9px; height: 44px; min-width: min(100%, 360px);
  padding: 0 8px 0 14px; border-radius: var(--r-pill); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.msg-search svg { color: var(--muted-2); flex-shrink: 0; }
.msg-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--ink); font: inherit; font-size: 14px; }
.msg-layout { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 16px; margin: 24px 0 40px; height: clamp(560px, calc(100vh - 220px), 760px); min-height: 0; }
.msg-list { min-height: 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); padding: 8px; box-shadow: var(--shadow-1); }
/* 예쁜 얇은 스크롤바 (문의 목록 + 대화) */
.msg-list, .msg-bubbles, .msg-letter { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.msg-list::-webkit-scrollbar, .msg-bubbles::-webkit-scrollbar, .msg-letter::-webkit-scrollbar { width: 9px; }
.msg-list::-webkit-scrollbar-track, .msg-bubbles::-webkit-scrollbar-track, .msg-letter::-webkit-scrollbar-track { background: transparent; margin: 6px; }
.msg-list::-webkit-scrollbar-thumb, .msg-bubbles::-webkit-scrollbar-thumb, .msg-letter::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
.msg-list::-webkit-scrollbar-thumb:hover, .msg-bubbles::-webkit-scrollbar-thumb:hover, .msg-letter::-webkit-scrollbar-thumb:hover { background: var(--muted-3); background-clip: content-box; }
.msg-thread { position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; min-width: 0; padding: 13px 12px; border-radius: var(--r-md); text-align: left; overflow: hidden; transition: background var(--dur-fast), box-shadow var(--dur-fast); }
.msg-thread:hover { background: var(--surface-2); }
.msg-thread.is-active { background: var(--blue-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 20%, transparent); }
.msg-thread__body { flex: 1; min-width: 0; }
.msg-thread__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; min-width: 0; }
.msg-thread__name { min-width: 0; font-size: 14px; font-weight: 750; line-height: 1.35; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.msg-thread__tags { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 4px; flex-wrap: wrap; }
.msg-thread__tag { max-width: 100%; font-size: 10px; font-weight: 700; color: var(--blue-ink); background: var(--blue-soft); padding: 1px 6px; border-radius: 5px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-thread__time { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; flex-shrink: 0; padding-top: 1px; }
.msg-thread__title { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-thread__preview { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.45; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msg-thread__badge { position: absolute; top: 12px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--coral); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.msg-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-1); overflow: hidden; }
.msg-conv--empty { align-items: center; justify-content: center; }
.msg-conv__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.msg-conv__name { font-size: 15px; font-weight: 750; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-conv__sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-conv__identity { flex: 1; min-width: 0; }
.msg-conv__actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.msg-back { display: none; width: 34px; height: 34px; border-radius: var(--r-pill); align-items: center; justify-content: center; color: var(--ink-2); }
.msg-back:hover { background: var(--surface-3); }
.msg-context {
  margin: 14px 16px 0; padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft);
  display: grid; gap: 4px;
}
.msg-context__label { font-size: 11px; font-weight: 800; color: var(--muted-2); letter-spacing: 0.06em; text-transform: uppercase; }
.msg-context b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-context span, .msg-context small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-bubbles { flex: 1; min-width: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { max-width: 76%; min-width: 0; display: flex; flex-direction: column; }
.msg-bubble--them { align-self: flex-start; }
.msg-bubble--me { align-self: flex-end; align-items: flex-end; text-align: right; }
.msg-bubble__text { max-width: 100%; box-sizing: border-box; font-size: 14px; line-height: 1.55; padding: 10px 14px; border-radius: 16px; display: block; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg-bubble--them .msg-bubble__text { background: var(--surface-3); color: var(--ink); border-bottom-left-radius: 5px; }
.msg-bubble--me .msg-bubble__text { background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
body.neon-calm .msg-bubble--me .msg-bubble__text { background: var(--nf-color); box-shadow: 0 0 calc(6px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 20%, transparent); }
.msg-bubble__time { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.msg-letter { flex: 1; min-height: 0; overflow-y: auto; padding: 26px; }
.msg-letter__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted-2); font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.msg-letter h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.3; color: var(--ink); letter-spacing: 0; overflow-wrap: anywhere; }
.msg-letter p { max-width: 68ch; margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.78; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.msg-compose { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.msg-compose--closed { justify-content: center; min-height: 68px; color: var(--muted); background: var(--surface-2); font-size: 13.5px; font-weight: 700; text-align: center; }
.msg-compose--closed svg { color: var(--muted-2); flex-shrink: 0; }
.msg-input { flex: 1; height: 44px; border: none; outline: none; background: var(--surface-2); border-radius: var(--r-pill); padding: 0 18px; font-size: 14.5px; color: var(--ink); font-family: inherit; }
.msg-input:focus { box-shadow: inset 0 0 0 1.5px var(--blue); }
.msg-send { width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-send:active { transform: scale(0.94); }
body.neon-calm .msg-send { background: var(--nf-color); box-shadow: 0 0 calc(6px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 24%, transparent); }

/* 쪽지함 — Gmail형 리스트. 로딩/빈 상태/목록 상태가 같은 shell을 유지한다. */

@media (max-width: 760px) {
  .msg-tools { align-items: stretch; }
  .msg-search { width: 100%; min-width: 0; }
  .msg-tabs { gap: 8px; margin-top: 14px; padding-bottom: 2px; overflow-x: auto; border-bottom: 0; }
  .msg-tabs .tab {
    flex: 0 0 auto; height: 40px; padding: 0 14px; border-radius: var(--r-pill);
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-soft);
  }
  .msg-tabs .tab.is-active { background: var(--ink); color: #fff; }
  .msg-tabs .tab.is-active::after { display: none; }
  .msg-layout { grid-template-columns: 1fr; height: auto; margin: 16px 0 calc(104px + env(safe-area-inset-bottom)); }
  .msg-layout.has-active .msg-list { display: none; }
  .msg-layout:not(.has-active) .msg-conv { display: none; }
  .msg-list { max-height: none; overflow: visible; border-radius: var(--r-lg); padding: 6px; }
  .msg-thread { align-items: flex-start; gap: 10px; padding: 12px 10px; }
  .msg-thread .avatar--lg { width: 38px; height: 38px; }
  .msg-thread__body { min-width: 0; max-width: 100%; padding-right: 26px; }
  .msg-thread__top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: flex-start; gap: 6px; min-width: 0; width: 100%; }
  .msg-thread__name {
    flex: 1 1 auto; min-width: 0; max-width: 100%; white-space: normal; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .msg-thread__tags { max-width: 100%; overflow: hidden; }
  .msg-thread__tag { display: inline-flex; align-items: center; height: 20px; max-width: 100%; }
  .msg-thread__time { max-width: 44px; margin-left: 0; padding-top: 2px; overflow: hidden; text-overflow: ellipsis; }
  .msg-thread__badge { top: 16px; right: 10px; }
  .msg-thread__preview {
    max-width: 100%; white-space: normal; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .msg-conv { height: auto; min-height: min(540px, calc(100vh - var(--nav-h) - 190px)); border-radius: var(--r-lg); }
  .msg-conv__head {
    display: grid; grid-template-columns: 34px 34px minmax(0, 1fr);
    gap: 8px; align-items: center; padding: 12px;
  }
  .msg-conv__head > .avatar { width: 34px; height: 34px; }
  .msg-conv__identity { min-width: 0; }
  .msg-conv__name {
    font-size: 14px; line-height: 1.3; white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .msg-conv__sub { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .msg-conv__actions { grid-column: 1 / -1; width: 100%; margin-left: 0; justify-content: flex-start; gap: 6px; }
  .msg-conv__actions .btn { max-width: 100%; height: 34px; padding: 0 10px; font-size: 12.5px; }
  .msg-bubble { max-width: min(78%, 320px); }
  .msg-back { display: inline-flex; }
  .msg-letter { padding: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .msg-letter__meta { gap: 6px; align-items: flex-start; font-size: 11.5px; line-height: 1.4; }
  .msg-letter__meta span, .msg-letter__meta time { max-width: 100%; overflow-wrap: anywhere; }
  .msg-letter h2 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
  .msg-letter p { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; word-break: break-word; }
}

@media (max-width: 420px) {
  .msg-conv__head { grid-template-columns: 32px 32px minmax(0, 1fr); }
  .msg-letter h2 { font-size: 22px; }
}

/* ---------- 알림 ---------- */
/* 헤더 벨 드롭다운 팝오버 */
.header-actions { position: relative; }
.noti-wrap { position: relative; display: inline-flex; }
.noti-pop {
  position: absolute; top: calc(100% + 10px); left: auto; right: 0; width: 320px; max-width: calc(100vw - 32px);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  z-index: 80; overflow: hidden; transform-origin: top right; animation: noti-pop-in .16s var(--ease);
}
:is(body.neon-dark, html.neon-dark body) .noti-pop { box-shadow: 0 18px 48px rgba(0,0,0,0.5); border: 1px solid var(--line-soft); }
@keyframes noti-pop-in { from { transform: translateY(-6px); } to { transform: translateY(0); } }
.noti-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.noti-pop__head b { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.noti-pop__actions { display: flex; gap: 6px; }
.noti-pop__actions button { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: var(--r-sm); transition: background var(--dur-fast), color var(--dur-fast); white-space: nowrap; }
.noti-pop__actions button:hover { background: var(--surface-3); color: var(--ink); }
.noti-pop__list { max-height: 360px; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
.noti-pop__item { position: relative; display: flex; gap: 11px; padding: 11px 12px 11px 12px; border-radius: var(--r-md); transition: background var(--dur-fast); }
.noti-pop__item:hover { background: var(--surface-2); }
.noti-pop__item.is-unread { background: var(--blue-soft); }
.noti-pop__item.is-unread:hover { background: color-mix(in srgb, var(--blue) 18%, transparent); }
.noti-pop__item .noti-item__icon { width: 32px; height: 32px; flex-shrink: 0; }
.noti-pop__body { flex: 1; min-width: 0; padding-right: 18px; }
.noti-pop__text { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.noti-pop__text b { font-weight: 700; color: var(--ink); }
.noti-pop__text span { display: block; margin-top: 2px; color: var(--ink-3); }
.noti-pop__text,
.noti-pop__text b,
.noti-pop__text span { overflow-wrap: anywhere; }
.noti-pop__time { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.noti-pop__x { position: absolute; top: 9px; right: 8px; width: 24px; height: 24px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-2); opacity: 0; transition: opacity var(--dur-fast), background var(--dur-fast), color var(--dur-fast); }
.noti-pop__item:hover .noti-pop__x { opacity: 1; }
.noti-pop__x:hover { background: var(--surface-3); color: var(--ink); }
.noti-pop__empty { padding: 36px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.noti-pop__all { width: 100%; height: 44px; font-size: 13px; font-weight: 700; color: var(--blue-ink); border-top: 1px solid var(--line-soft); transition: background var(--dur-fast); }
.noti-pop__all:hover { background: var(--surface-2); }
body.neon-calm .noti-pop__all { color: var(--nf-color); }

.noti-tabs { margin-top: 20px; overflow-x: auto; scrollbar-width: none; }
.noti-tabs::-webkit-scrollbar { display: none; }
.noti-list { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.noti-item { position: relative; display: flex; gap: 14px; padding: 16px; border-radius: var(--r-lg); transition: background var(--dur-fast); background: var(--surface); box-shadow: var(--shadow-1); }
.noti-item:hover { background: var(--surface-2); }
.noti-item.is-unread { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 28%, var(--line)), var(--shadow-1); }
.noti-item__icon { width: 40px; height: 40px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.noti-item__icon--like { background: var(--coral-soft); color: var(--coral-ink); }
.noti-item__icon--op,
.noti-item__icon--inquiry,
.noti-item__icon--message { background: var(--blue-soft); color: var(--blue-ink); }
.noti-item__icon--sys,
.noti-item__icon--system { background: var(--surface-3); color: var(--ink-3); }
.noti-item__body { flex: 1; min-width: 0; }
.noti-item__text { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; display: grid; gap: 2px; }
.noti-item__text b { font-weight: 700; color: var(--ink); }
.noti-item__text span { color: var(--ink-3); }
.noti-item__time { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.noti-item__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.noti-item__unread { position: absolute; top: 16px; left: 16px; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--blue); box-shadow: 0 0 0 2px var(--surface); }

@media (max-width: 620px) {
  .noti-item { align-items: flex-start; flex-wrap: wrap; }
  .noti-item__actions { width: 100%; justify-content: flex-end; }
}

/* ---------- 관리자 감사 로그 ---------- */
.admin-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 20px; }
.admin-table { width: 100%; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.admin-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 12px; padding: 14px 20px; align-items: center; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.admin-row:last-child { border-bottom: none; }
.admin-row--head { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-row .mono { font-family: var(--mono); font-size: 12.5px; }
.admin-action { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-ink); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.admin-target { color: var(--ink-3); }
.admin-target b { color: var(--ink); font-family: var(--mono); font-size: 12px; }
.admin-actor { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.admin-time { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- 관리자 콘솔 ---------- */
.adm-console { padding-bottom: 60px; }
.adm-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; padding: 32px 0 0; align-items: start; }
.adm-side { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 8px; }
.adm-side__head { display: flex; align-items: center; gap: 11px; padding: 14px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.adm-side__badge { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--blue-soft); color: var(--blue-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.adm-side__title { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; }
.adm-side__sub { font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 2px; }
.adm-side__nav { display: flex; flex-direction: column; gap: 2px; }
.adm-side__item { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast); }
.adm-side__item svg { color: var(--muted-2); flex-shrink: 0; transition: color var(--dur-fast); }
.adm-side__item:hover { background: var(--surface-2); color: var(--ink); }
.adm-side__item.is-active { background: var(--blue-soft); color: var(--blue-ink); }
.adm-side__item.is-active svg { color: var(--blue-ink); }
body.neon-calm .adm-side__item.is-active { background: color-mix(in srgb, var(--nf-color) 14%, transparent); color: var(--nf-color); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--nf-color) 35%, transparent); }
body.neon-calm .adm-side__item.is-active svg { color: var(--nf-color); }

.adm-head { margin-bottom: 22px; }
.adm-head__title { margin: 10px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -0.035em; }
.adm-head__sub { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

/* 대시보드 stat 카드 */
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.adm-stat { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1); }
.adm-stat__ico { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--surface-3); color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.adm-stat__ico--warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.adm-stat__num { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.adm-stat__label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.adm-stat__delta { font-size: 12px; font-weight: 700; color: var(--ok); margin-top: 8px; }
.adm-stat__delta.is-warn { color: var(--warn); }

.adm-feed { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.adm-feed:last-child { border-bottom: none; }
.adm-feed__target { color: var(--muted); }
.adm-feed__target b { color: var(--ink); font-family: var(--mono); font-size: 12px; }
.adm-feed__time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 관리자 테이블 (그리드 기반) */
.adm-table { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.adm-row { display: grid; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.adm-row:last-child { border-bottom: none; }
.adm-row--head { background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.adm-row--empty { color: var(--muted); justify-content: center; text-align: center; }
.adm-cell { min-width: 0; }
.adm-cell--right { text-align: right; justify-self: end; }
.adm-soft { color: var(--muted); }
.adm-mono { font-family: var(--mono); font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-name__title { font-size: 13.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.adm-name__sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.adm-feat { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 5px; background: var(--blue-soft); color: var(--blue-ink); font-size: 10px; font-weight: 700; }
.adm-reports { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; }

/* 상태 배지 */
.adm-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; }
.adm-badge--ok { background: var(--ok-soft); color: var(--ok); }
.adm-badge--warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.adm-badge--danger { background: var(--danger-soft); color: var(--danger); }
.adm-badge--mute { background: var(--surface-3); color: var(--muted); }

/* row 액션 버튼 */
.adm-actions { display: inline-flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-act { height: 30px; padding: 0 11px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: background var(--dur-fast), color var(--dur-fast); }
.adm-act:hover { background: var(--surface-pressed); color: var(--ink); }
.adm-act--ok { background: var(--ok-soft); color: var(--ok); }
.adm-act--ok:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.adm-act--danger { background: var(--danger-soft); color: var(--danger); }
.adm-act--danger:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); }

@media (max-width: 900px) {
  .adm-layout { grid-template-columns: 1fr; gap: 16px; }
  .adm-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .adm-side__head { width: 100%; }
  .adm-side__nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .adm-side__item { height: 38px; }
  .adm-stats { grid-template-columns: repeat(2, 1fr); }
  .adm-table { overflow-x: auto; }
  .adm-row { min-width: 640px; }
}

/* ---------- 2단 폼 레이아웃 ---------- */
.form-page--wide { max-width: 760px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 모달 (챌린지 제출 + 재사용 Modal/ConfirmDialog) ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(10,13,19,0.5); backdrop-filter: blur(4px); z-index: 150; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--surface); border-radius: var(--r-2xl); padding: 24px; width: 100%; max-width: 480px; box-shadow: var(--shadow-3); max-height: 88vh; overflow-y: auto; animation: modal-rise .18s var(--ease); }
.modal--sm { max-width: 400px; }
.modal--lg { max-width: 1120px; }
@keyframes modal-rise { from { transform: translateY(10px) scale(.99); } to { transform: translateY(0) scale(1); } }
:is(body.neon-dark, html.neon-dark body) .modal { border: 1px solid var(--line-soft); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal__head-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.modal__icon { width: 40px; height: 40px; border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-3); color: var(--ink-3); }
.modal__icon--blue { background: var(--blue-soft); color: var(--blue-ink); }
.modal__icon--danger { background: var(--danger-soft); color: var(--danger); }
.modal__title { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.modal__sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.modal__close { width: 34px; height: 34px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.modal__close:hover { background: var(--surface-3); color: var(--ink); }
.modal__msg { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-3); }
.modal__body { font-size: 15px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* 인증(로그인/회원가입) 토글 + 보조 */
.auth-toggle { display: flex; padding: 4px; background: var(--surface-3); border-radius: var(--r-md); margin-bottom: 22px; }
.auth-toggle__item { flex: 1; height: 40px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; color: var(--muted); transition: background var(--dur-fast), color var(--dur-fast); }
.auth-toggle__item.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
:is(body.neon-dark, html.neon-dark body) .auth-toggle__item.is-active { background: var(--surface-2); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-link { color: var(--blue-ink); font-weight: 700; font-size: 13.5px; }
body.neon-calm .auth-link { color: var(--nf-color); }

/* 체크박스 */
.vb-check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; user-select: none; }
.vb-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.vb-check__box { width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: background var(--dur-fast), box-shadow var(--dur-fast), color var(--dur-fast); margin-top: 1px; }
.vb-check input:checked + .vb-check__box { background: var(--blue); box-shadow: inset 0 0 0 1.5px var(--blue); color: #fff; }
body.neon-calm .vb-check input:checked + .vb-check__box { background: var(--nf-color); box-shadow: inset 0 0 0 1px var(--nf-color), 0 0 calc(4px * var(--nf-glow)) color-mix(in srgb, var(--nf-color) 22%, transparent); }
.vb-check__label a { text-decoration: none; }

/* ---------- 챌린지 제출 모달 (기존) ---------- */
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow var(--dur-fast); }
.pick-item:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.pick-item.is-sel { box-shadow: inset 0 0 0 2px var(--blue); background: var(--blue-soft); }
.pick-item__thumb { width: 52px; height: 38px; border-radius: var(--r-sm); flex-shrink: 0; background-size: cover; background-position: center; }
.pick-item__title { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pick-item__cat { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- 부가 그리드 ---------- */
.two-col { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(300px,0.88fr); gap: 52px; padding: 40px 0 60px; align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--nav-h) + 24px); }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .app-header__inner {
    min-width: 0;
    gap: 8px;
    overflow: hidden;
  }
  .brand-word { font-size: clamp(18px, 5.1vw, 21px); }
  .header-spacer { min-width: 0; }
  .header-actions {
    min-width: 0;
    flex: 0 1 auto;
    gap: 4px;
    justify-content: flex-end;
  }
  .header-actions .btn--ghost { display: none !important; }
  .header-actions .icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .header-actions .btn--primary.btn--sm {
    width: 38px;
    min-width: 38px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    font-size: 0;
    gap: 0;
    flex: 0 0 38px;
  }
  .header-actions .btn--primary.btn--sm svg {
    width: 16px;
    height: 16px;
  }
  .app-nav { display: none; }
  .app-footer { display: none; }
  .hero__actions .btn {
    flex: 1 1 180px;
  }
  .creator-strip,
  .policy-strip {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }
  .policy-strip__links {
    justify-content: flex-start;
    min-width: 0;
  }
  .home-rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    gap: 14px;
    margin-inline: calc(var(--pad-x) * -1);
    padding-inline: var(--pad-x);
    scroll-padding-inline: var(--pad-x);
  }
  .home-rail__item,
  .home-rail--top .home-rail__item:first-child,
  .home-rail--latest .home-rail__item {
    flex: 0 0 min(82vw, 348px);
    flex-basis: min(82vw, 348px);
  }
  .home-rail .post-card { min-height: 338px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--hero { grid-column: span 2; grid-row: auto; }
  .post-card--hero .post-card__title { font-size: 18px; }
  .challenge-grid { grid-template-columns: 1fr; }
  .detail, .two-col { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .detail { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .detail-side { position: static; top: auto; width: 100%; }
  .detail-card .meta-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
  }
  .detail-card .meta-row dd { width: 100%; }
  .detail-card .meta-link { max-width: 100%; }
  .side-stack { position: static; }
  .admin-row { grid-template-columns: 1.2fr 1fr; }
  .admin-row > :nth-child(3), .admin-row > :nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .hero { padding-block: 30px 22px; }
  .hero__eyebrow { max-width: 100%; margin-bottom: 14px; overflow: hidden; text-overflow: ellipsis; }
  .hero h1 { font-size: clamp(30px, 8.8vw, 36px); line-height: 1.12; margin-bottom: 12px; }
  .hero p { font-size: 15px; line-height: 1.62; }
  .hero__actions { gap: 10px; margin-top: 20px; }
  .hero__actions .btn { flex-basis: 100%; height: 48px; border-radius: 13px; font-size: 14.5px; }
  .hero__trust { margin-top: 12px; gap: 7px; font-size: 11.5px; justify-content: center; }
  .hero__stats { margin-top: 18px; gap: 7px; }
  .hero__stat { padding: 7px 11px; font-size: 12px; }
  .filter-bar { top: var(--nav-h); padding: 10px 0; }
  .filter-bar__inner { gap: 8px; padding-inline: 18px; }
  .chip { height: 36px; padding-inline: 14px; font-size: 13px; }
  .section { padding-block: 30px 8px; }
  .section__head { margin-bottom: 14px; align-items: center; }
  .section__title { font-size: 22px; gap: 7px; }
  .section__link { font-size: 13px; }
  .creator-strip,
  .policy-strip {
    padding: 17px 16px;
    border-radius: var(--r-lg);
  }
  .creator-strip h2,
  .policy-strip h2 { font-size: 18px; line-height: 1.28; }
  .creator-strip p,
  .policy-strip p { font-size: 13.5px; line-height: 1.62; }
  .policy-strip__links { gap: 6px; }
  .policy-strip__links a { height: 34px; padding-inline: 11px; font-size: 12px; }
  .home-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    margin-inline: 0;
    padding: 4px 0 8px;
    scroll-padding-inline: 0;
  }
  .home-rail__item,
  .home-rail--top .home-rail__item:first-child,
  .home-rail--latest .home-rail__item {
    flex: 0 0 min(78vw, 304px);
    flex-basis: min(78vw, 304px);
    min-width: 0;
  }
  .home-rail .post-card { min-height: 304px; }
  .post-card { border-radius: var(--r-lg); }
  .post-card__thumb { min-height: 154px; }
  .post-card__image {
    inset: 7px;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
  }
  .post-card__body { padding: 14px 15px 16px; }
  .post-card__title { font-size: 16px; line-height: 1.28; }
  .post-card__desc { font-size: 13px; line-height: 1.48; }
  .post-card__meta { margin-top: 6px; gap: 7px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-card--hero { grid-column: auto; }
  .field-row { grid-template-columns: 1fr; }
  .job-card { flex-wrap: wrap; }
  .job-card__salary { text-align: left; }
  .app-header__inner { padding-inline: 16px; }
  .page-head { padding-top: 26px; gap: 12px; }
  .page-head__eyebrow { margin-bottom: 8px; }
  .page-head__title { font-size: clamp(28px, 8.4vw, 34px); }
  .page-head__sub { margin-top: 10px; font-size: 15px; line-height: 1.58; }
  .latest-page .page-head {
    padding-top: 18px;
    padding-bottom: 0;
    align-items: flex-end;
    flex-wrap: nowrap;
  }
  .latest-page .page-head > div {
    min-width: 0;
    flex: 1;
  }
  .latest-page .page-head__title {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.024em;
  }
  .latest-page .page-head__sub {
    margin-top: 5px;
    font-size: 13.5px;
    line-height: 1.45;
  }
  .searchbar { height: 50px; border-radius: 14px; padding: 0 10px 0 14px; max-width: none; }
  .searchbar input { font-size: 14.5px; }
  .list-toolbar { margin-top: 10px; }
  .detail { padding: 24px 0 calc(34px + env(safe-area-inset-bottom)); gap: 22px; }
  .detail__crumbs { flex-wrap: wrap; align-items: flex-start; row-gap: 5px; margin-bottom: 12px; }
  .detail__crumbs > span,
  .detail__crumbs > a { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .detail__title { font-size: clamp(25px, 8.2vw, 32px); line-height: 1.18; margin-bottom: 12px; overflow-wrap: anywhere; }
  .detail__byline { gap: 7px; row-gap: 8px; margin-bottom: 18px; }
  .detail__byline b { max-width: calc(100vw - 180px); overflow: hidden; text-overflow: ellipsis; }
  .act-icons { margin-bottom: 18px; gap: 8px; flex-wrap: wrap; }
  .act-icon { width: 42px; height: 42px; }
  .act-count { margin-right: 8px; }
  .detail__thumb { border-radius: var(--r-lg); aspect-ratio: 4 / 3; }
  .detail__image { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border-radius: calc(var(--r-lg) - 6px); }
  .detail__content { margin-top: 22px; font-size: 15.5px; line-height: 1.78; }
  .detail-card { border-radius: var(--r-lg); padding: 16px; }
  .detail-card__grid .btn { width: 100%; }
  .meta-row { align-items: flex-start; gap: 12px; }
  .meta-row dt { flex: 0 0 auto; }
  .meta-row dd { min-width: 0; flex: 1; white-space: normal; overflow-wrap: anywhere; text-align: right; }
  .detail-card .meta-row dd { white-space: normal; }
  .detail-card .meta-link { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tech-row { gap: 7px; }
}

@media (max-width: 620px) {
  .profile-head {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 30px 0 22px;
  }
  .profile-head__avatar {
    width: 64px;
    height: 64px;
    font-size: 25px;
  }
  .profile-head__info {
    min-width: 0;
  }
  .profile-head__name {
    font-size: clamp(22px, 7.2vw, 28px);
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
  .profile-head__sub {
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .profile-head__stats {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .profile-head__actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
  }
  .profile-head__actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 132px;
  }
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .noti-pop {
    position: fixed;
    top: calc(var(--nav-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    border-radius: var(--r-xl);
    transform-origin: top center;
    box-sizing: border-box;
  }
  .noti-pop__head { padding: 14px 15px; }
  .noti-pop__actions { gap: 4px; }
  .noti-pop__actions button { padding-inline: 7px; }
  .noti-pop__list { max-height: min(420px, calc(100vh - var(--nav-h) - 150px)); }
  .noti-pop__item { padding-right: 34px; }
  .noti-pop__x {
    opacity: 1;
    background: var(--surface-3);
  }
}

/* mobile bottom tab (좁은 화면에서 주요 네비) */
.mobile-tabs { display: none; }
@media (max-width: 900px) {
  .mobile-tabs {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line-soft);
    border-radius: 22px;
    padding: 7px 8px; justify-content: space-around;
    box-shadow: 0 12px 32px rgba(25,31,40,0.12), 0 2px 8px rgba(25,31,40,0.06);
    backdrop-filter: saturate(150%) blur(14px);
  }
  :is(body.neon-dark, html.neon-dark body) .mobile-tabs { background: rgba(10,13,19,0.88); backdrop-filter: blur(14px); }
  .mobile-tabs__item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; border-radius: 15px; }
  .mobile-tabs__item.is-active { color: var(--blue); }
  .mobile-tabs__item.is-active { background: var(--blue-soft); }
  body.neon-calm .mobile-tabs__item.is-active { color: var(--nf-color); }
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}


/* ════════════════════════════════════════════════════════════════════════
   접근성 전역 보강 (WCAG 2.1 AA) — extra.css 가 마지막에 로드되므로 여기서 보강
   ════════════════════════════════════════════════════════════════════════ */

/* 키보드 포커스 표시 (WCAG 2.4.7) — 기존 outline:none 을 :focus-visible 로 복원.
   마우스 클릭에는 표시되지 않고, 키보드 탐색 시에만 토큰 색상 링이 보인다. */
:where(a, button, input, textarea, select, summary,
       [role="button"], [role="switch"], [role="tab"], [role="link"], [tabindex]):focus-visible {
  outline: 2px solid var(--blue, #3182F6);
  outline-offset: 2px;
}
/* 입력 필드는 기존 inset box-shadow 포커스에 더해 outline 도 함께 노출 */
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: 2px solid var(--blue, #3182F6);
  outline-offset: 2px;
}

/* 동작 줄이기 (WCAG 2.3.3) — OS 의 prefers-reduced-motion 을 존중해
   aurora 글로우·펄스 링·그라디언트 이동·캐럿 깜빡임·하트 팝·호버 트랜지션을 정지 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 문의 폼/스레드 안내 배너 (예: 인수·판매 문의 면책) */
.form-notice {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent);
}
.form-notice b { color: var(--ink); }

/* 라이트 모드(.neon-dark 미적용, Tweaks 토글 시) 명도 대비 보강 — WCAG AA.
   다크가 기본/주 표면이므로 dark 에는 영향을 주지 않도록 :not(.neon-dark) 로 한정. */
html:not(.neon-dark) {
  --blue: #1B64DA;     /* 링크/주요 버튼: #3182F6(흰 배경 3.71:1, 미달) → 1B64DA(AA) */
  --muted-2: #6B7684;  /* placeholder: #8B95A1(3.04:1) → 6B7684(4.6:1) */
}

/* ════════ 쪽지함 (NotesScreen) — 단일 컬럼 카드 + 모달 상세 (재디자인) ════════ */
.note-feed { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 18px 0 calc(48px + env(safe-area-inset-bottom)); }
.note-card {
  position: relative; display: flex; gap: 14px; width: 100%; text-align: left;
  padding: 15px 16px; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); cursor: pointer;
  transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.note-card:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15, 23, 42, .09); border-color: var(--line); }
.note-card:active { transform: none; }
.note-card.is-unread { border-color: color-mix(in srgb, var(--blue) 38%, var(--line-soft)); background: color-mix(in srgb, var(--blue) 4%, var(--surface)); }
.note-card__avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft); color: var(--blue-ink); font-weight: 800; font-size: 15px;
}
.note-card__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 14px; }
.note-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.note-card__sender { color: var(--ink-2); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card.is-unread .note-card__sender { color: var(--ink); }
.note-card__time { flex: 0 0 auto; color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-card__title { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card.is-unread .note-card__title { font-weight: 850; }
.note-card__preview { color: var(--muted); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-card__tag { align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.note-card__dot { position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--blue); }
.note-card--skeleton { cursor: default; pointer-events: none; }
.note-skel { display: block; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 220% 100%; animation: note-skel 1.15s ease-in-out infinite; }
.note-skel--avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-pill); }
.note-skel--line { height: 12px; margin-bottom: 8px; }
@keyframes note-skel { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.note-detail { display: flex; flex-direction: column; gap: 14px; }
.note-detail__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.note-detail__body { color: var(--ink-2); font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) {
  .note-feed { max-width: 100%; margin: 14px 0 calc(104px + env(safe-area-inset-bottom)); }
  .note-card { padding: 13px 14px; gap: 12px; }
  .note-card__avatar, .note-skel--avatar { width: 36px; height: 36px; font-size: 14px; }
  .note-modal__actions { justify-content: stretch; }
  .note-modal__actions .btn { flex: 1 1 auto; }
}

/* ════════ 페이지네이션 (목록 공용, 통일 디자인) ════════ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 40px 0 12px; }
.pagination__btn {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pagination__btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pagination__btn.is-active { background: var(--blue); color: #fff; box-shadow: none; }
.pagination__btn:disabled { opacity: .4; cursor: default; }
.pagination__btn--nav { color: var(--muted); }
.pagination__ellipsis { min-width: 24px; text-align: center; color: var(--muted-2); user-select: none; }
.list-page-indicator { color: var(--muted-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .pagination { gap: 4px; }
  .pagination__btn { min-width: 36px; height: 36px; padding: 0 9px; font-size: 13px; }
}

/* ════════ 게시글 대표 이미지 업로드 필드 ════════ */
.image-field { display: flex; flex-direction: column; gap: 10px; }
.image-field__preview {
  position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-lg);
  background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px var(--line-soft);
}
.image-field__remove {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); background: rgba(15,23,42,.62); color: #fff; cursor: pointer;
  transition: background .15s ease;
}
.image-field__remove:hover { background: rgba(15,23,42,.82); }
.image-upload-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; padding: 18px; border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--ink-2);
  border: 1.5px dashed var(--line); cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.image-upload-btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--blue); color: var(--ink); }
.image-upload-btn:disabled { opacity: .6; cursor: default; }
.image-upload-btn span { font-size: 14px; font-weight: 700; }
.image-upload-btn small { color: var(--muted-2); font-size: 11.5px; }
.image-field__or { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 12px; }
.image-field__or::before, .image-field__or::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ════════ 상세 페이지 — README 소개 / 공유 시트 / 관련 콘텐츠 / 고정 액션바 ════════ */
.detail__readme { margin-top: 8px; }
.detail__readme-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.detail__content p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 공유 시트 (모달 내부) */
.share-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-sheet__item { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease; }
.share-sheet__item:hover { background: var(--surface-3); }
.share-sheet__ico { width: 46px; height: 46px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; }
.share-sheet__ico--copy { background: var(--blue-soft); color: var(--blue-ink); }
.share-sheet__ico--kakao { background: #FEE500; color: #191600; }
.share-sheet__ico--more { background: var(--surface-3); color: var(--ink-2); }
.share-sheet__url { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 9px 9px 13px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft); }
.share-sheet__url-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }

/* 관련 콘텐츠 */
.detail-related { margin: 20px 0 40px; }
.detail-related__title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 16px; }

/* 하단 고정 액션바 (모바일) */
.detail-actionbar { display: none; }
@media (max-width: 900px) {
  .detail-page { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .detail-actionbar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line-soft);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, .09);
  }
  .detail-actionbar__icon {
    flex: 0 0 auto; height: 50px; min-width: 54px; padding: 0 12px; gap: 5px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2);
    font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  }
  .detail-actionbar__icon.is-liked { color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, var(--surface-2)); }
  .detail-actionbar__visit {
    flex: 1 1 auto; height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: var(--r-md); background: var(--blue); color: #fff; font-weight: 800; font-size: 15.5px;
  }
  .detail-actionbar__visit:active { transform: scale(.99); }
}

/* ============================================================
   마크다운 본문 (소개) — components.jsx renderMarkdownToHtml 출력
   ============================================================ */
.markdown-body { color: var(--ink-2); font-size: var(--fs-body); line-height: var(--leading-body); overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body .md-p { margin: 0 0 13px; white-space: normal; }
.markdown-body .md-h { color: var(--ink); font-weight: 800; line-height: var(--leading-snug); margin: 22px 0 10px; }
.markdown-body .md-h2 { font-size: 19px; padding-bottom: 7px; border-bottom: 1px solid var(--line-soft); }
.markdown-body .md-h3 { font-size: 16.5px; }
.markdown-body .md-h4 { font-size: 14.5px; color: var(--ink-2); }
.markdown-body .md-ul, .markdown-body .md-ol { margin: 0 0 13px; padding-left: 22px; }
.markdown-body .md-ul li, .markdown-body .md-ol li { margin: 4px 0; }
.markdown-body .md-ul { list-style: disc; }
.markdown-body .md-ol { list-style: decimal; }
.markdown-body a { color: var(--blue-ink); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body a:hover { text-decoration: none; }
.markdown-body strong { font-weight: 800; color: var(--ink); }
.markdown-body em { font-style: italic; }
.markdown-body del { color: var(--muted-2); }
.markdown-body code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 5px; padding: .1em .4em; }
.markdown-body .md-pre { margin: 0 0 13px; padding: 13px 15px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-soft); overflow-x: auto; }
.markdown-body .md-pre code { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--ink-2); white-space: pre; }
.markdown-body .md-quote { margin: 0 0 13px; padding: 4px 0 4px 14px; border-left: 3px solid var(--line); color: var(--muted); }
.markdown-body .md-hr { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

/* ============================================================
   상세 페이지 댓글(리뷰)
   ============================================================ */
.detail-comments { margin: 28px 0 8px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.detail-comments__title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--ink); margin: 0 0 18px; }
.detail-comments__title svg { color: var(--muted-2); }

.comment-form { display: flex; gap: 12px; margin-bottom: 22px; }
.comment-form__main { flex: 1 1 auto; min-width: 0; }
.comment-form .textarea { width: 100%; min-height: 64px; resize: vertical; }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.comment-form__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.comment-form__count { font-size: 12px; color: var(--muted-2); }
.comment-form--reply { margin: 10px 0 0 44px; padding-left: 14px; border-left: 1px solid var(--line-soft); }

.comment-login { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); font-size: 14px; text-align: center; margin-bottom: 22px; }
.comment-empty { padding: 26px 16px; text-align: center; color: var(--muted-2); font-size: 14px; }

.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.comment-thread { list-style: none; }
.comment-item { display: flex; gap: 12px; }
.comment-item--reply { align-items: flex-start; }
.comment-item__main { flex: 1 1 auto; min-width: 0; }
.comment-item__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-item__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.comment-item__time { font-size: 12px; color: var(--muted-2); }
.comment-item__actions { margin-left: auto; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; flex-shrink: 0; }
.comment-item__del { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted-2); cursor: pointer; transition: background .15s ease, color .15s ease; }
.comment-item__del:hover { background: var(--danger-soft); color: var(--danger); }
.comment-item__body { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-replies { list-style: none; margin: 10px 0 0 44px; padding: 0 0 0 14px; border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 560px) {
  .comment-item__head { align-items: flex-start; flex-wrap: wrap; }
  .comment-item__actions { width: 100%; margin-left: 0; justify-content: flex-start; }
  .comment-replies,
  .comment-form--reply { margin-left: 34px; padding-left: 12px; }
}
