/* styles/00-foundation.css */
:root {
    --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    /* 로고 워드마크도 본문과 동일한 Pretendard 사용 — serif 웹폰트 FOUT(cold-start 글자 꾸겨짐) 제거 */
    --font-brand: var(--font-sans);
    --ink: #18181B;
    --paper: #ffffff;
    --hero-surface: #ffffff;
    --surface: #f4f4f5;
    --accent: #27466d;
    --accent2: #6f5aa8;
    --muted: #71717A;
    --title: #27272A;
    --caption: #52525B;
    --card-bg: #ffffff;
    --border: #e4e4e7;
    --native-safe-top: 0px;
    --native-bottom-nav-height: 90px;
    --web-bottom-nav-height: 78px;
    --app-header-height: 52px;
    --floating-nav-height: var(--web-bottom-nav-height);
    --toast-bottom-offset: calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 18px);
    --floating-control-bottom-offset: calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 12px);
    --safe-top: max(env(safe-area-inset-top, 0px), var(--native-safe-top));
    /* iOS spring easing 토큰 — linear()로 cubic-bezier 불가능한 미세 오버슈트(폭신함) 표현.
       단순 키프레임(from→to)에 이 timing-function을 얹으면 곡선이 1을 살짝 넘었다 정착. */
    --ease-standard: cubic-bezier(0.22, 0.72, 0, 1);
    --ease-emphasized: cubic-bezier(0.2, 0.84, 0.18, 1);
    --ease-spring-soft: linear(0, 0.006, 0.025, 0.056, 0.097, 0.206, 0.338, 0.481, 0.625, 0.755, 0.864, 0.945, 0.998, 1.026 62%, 1.033, 1.026, 1.014, 1.004, 0.999, 1);
    --ease-spring-snappy: linear(0, 0.026, 0.101, 0.22, 0.374, 0.554, 0.738 50%, 0.881, 0.98, 1.039, 1.058 73%, 1.052, 1.032, 1.012, 1.001, 0.998, 1);
    --motion-fast: 160ms;
    --motion-normal: 260ms;
    --motion-settle: 340ms;
  }

  html.native-glass-nav-active,
  body.native-glass-nav-active {
    --floating-nav-height: var(--native-bottom-nav-height);
    --toast-bottom-offset: calc(var(--native-bottom-nav-height) + 18px);
    --floating-control-bottom-offset: calc(var(--native-bottom-nav-height) + 12px);
  }

  html.native-glass-nav-active .bottom-nav,
  body.native-glass-nav-active .bottom-nav {
    display: none !important;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    letter-spacing: 0;
    min-height: 100vh;
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: overflow 0s;
  }
  html {
    color-scheme: light dark;
    background: var(--paper);
    overscroll-behavior: none;
  }
  main {
    overscroll-behavior-y: contain;
  }
  body.search-layer-open {
    overflow: hidden;
  }
  body.filter-sheet-open {
    overflow: hidden;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: var(--motion-normal);
    animation-timing-function: var(--ease-standard);
  }
  ::view-transition-old(root) {
    animation-name: app-view-old;
  }
  ::view-transition-new(root) {
    animation-name: app-view-new;
  }
  @keyframes app-view-old {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.86; transform: scale(0.992); }
  }
  @keyframes app-view-new {
    from { opacity: 0.84; transform: translateY(6px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  body.app-view-settle main,
  body.app-view-settle #mapContainer {
    animation: app-view-settle var(--motion-settle) var(--ease-emphasized);
    transform-origin: 50% 58%;
    will-change: transform, opacity;
  }
  body.app-view-settle.map-view-active main {
    animation: none;
  }
  @keyframes app-view-settle {
    0% { opacity: 0.92; transform: translateY(4px) scale(0.988); }
    64% { opacity: 1; transform: translateY(0) scale(1.003); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  /* ── 당근식 chrome 고정 cross-dissolve ── */
  /* header·bottom-nav를 root 스냅샷에서 분리해 독립 그룹으로 추적 → 전환 중 제자리 고정.
     view-transition-name은 전환이 없을 땐 완전 무효 → 평상시/웹/PWA 렌더 무변(전환은
     startViewTransition을 호출하는 탭 전환에서만, Safari18+/Chromium에서만 발생).
     (.bottom-nav는 native-ios 결합 시 품질가드 위반이라 전역 지정 — 어차피 전환 외엔 무효) */
  header { view-transition-name: app-header; }
  .bottom-nav { view-transition-name: app-bottom-nav; }
  /* 고정 chrome: 동일 위치/크기 그룹이라 morph가 사실상 무동작이지만, 명시적으로 즉시 처리 */
  ::view-transition-group(app-header),
  ::view-transition-group(app-bottom-nav) {
    animation-duration: 0.01ms;
  }
  /* iOS 전용: 남은 main 콘텐츠만 부드럽게 디졸브 (웹/PWA는 위 cubic-bezier 유지) */
  :root.native-ios::view-transition-old(root) {
    animation: app-view-old-ios 240ms var(--ease-spring-soft);
  }
  :root.native-ios::view-transition-new(root) {
    animation: app-view-new-ios 260ms var(--ease-spring-soft);
  }
  @keyframes app-view-old-ios {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.7; transform: scale(0.996); }
  }
  @keyframes app-view-new-ios {
    from { opacity: 0.6; transform: translateY(4px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  /* iOS 전용: main 콘텐츠 박스를 명명해 풀블리드 전환(주변·저장)을 "헤더 자리까지 부드럽게
     펼쳐지는" 모핑으로 만든다. main은 어떤 뷰에서도 display:none이 안 되므로 old/new에 항상
     존재 → 박스 morph + 콘텐츠 크로스디졸브. (전환 없을 땐 무효 → 웹/PWA 무변) */
  :root.native-ios main { view-transition-name: app-main; }
  :root.native-ios::view-transition-group(app-main) {
    animation-duration: 300ms;
    animation-timing-function: var(--ease-spring-soft);
  }
  :root.native-ios::view-transition-old(app-main),
  :root.native-ios::view-transition-new(app-main) {
    animation-duration: 260ms;
    animation-timing-function: var(--ease-spring-soft);
  }
  /* iOS<18(View Transitions 미지원)에서도 폭신하도록 settle 자체를 spring으로.
     오버슈트는 --ease-spring-soft가 만들므로 키프레임은 단순 from→to. */
  html.native-ios body.app-view-settle main,
  html.native-ios body.app-view-settle #mapContainer {
    animation: app-view-settle-ios 440ms var(--ease-spring-soft);
    transform-origin: 50% 58%;
    will-change: transform, opacity;
  }
  html.native-ios body.app-view-settle.map-view-active main {
    animation: none;
  }
  @keyframes app-view-settle-ios {
    0% { opacity: 0.88; transform: translateY(8px) scale(0.974); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  /* iOS 전용: 스켈레톤→콘텐츠 reveal을 spring rise+fade로 (웹은 즉시 표시 유지) */
  html.native-ios .content-reveal {
    animation: content-rise-in 0.5s var(--ease-spring-snappy) both;
  }
  @keyframes content-rise-in {
    0% { opacity: 0; transform: translateY(10px) scale(0.992); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root),
    ::view-transition-group(app-main),
    ::view-transition-old(app-main),
    ::view-transition-new(app-main) {
      animation: none !important;
    }
    body.app-view-settle main,
    body.app-view-settle #mapContainer {
      animation: none !important;
    }
    html.native-ios .content-reveal {
      animation: none !important;
    }
  }
  body.map-view-active {
    overflow: hidden;
    height: 100vh;
    overscroll-behavior: none;
  }
  body.map-view-active > header,
  body.favorites-view-active > header {
    display: none !important;
  }
  body.map-view-active #heroShell,
  body.map-view-active #quickCategoryBar,
  body.map-view-active #homeSubFilterBar,
  body.map-view-active #homeCurationHost,
  body.map-view-active #connectionBanner,
  body.map-view-active #sectionHeader,
  body.map-view-active .data-source,
  body.map-view-active .bottom-spacer {
    display: none !important;
  }
  body.map-view-active main {
    width: 100vw;
    max-width: none;
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  body.favorites-view-active .data-source {
    display: none !important;
  }
  body.favorites-view-active {
    /* clip(스크롤 컨테이너 미생성)으로 가로 오버플로만 차단 — hidden은 body를 세로
       스크롤 컨테이너로 만들어(overflow-y가 auto로 계산됨) iOS에서 sticky 헤더가
       뷰포트 대신 body 기준으로 붙고, 그 경로는 컴포지터가 아닌 메인스레드에서
       매 프레임 재계산돼 스크롤 중 헤더가 위아래로 떨린다. clip이면 뷰포트가
       스크롤러로 유지돼 sticky가 매끄럽게 고정됨. (hidden은 clip 미지원 구형 폴백) */
    overflow-x: hidden;
    overflow-x: clip;
  }
  body.modal-open .bottom-nav,
  body.feedback-open .bottom-nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
  }

  button, select, input, textarea {
    font: inherit;
    letter-spacing: inherit;
  }

  button,
  .chip,
  .day-chip,
  .nav-item,
  .fav-btn,
  .filter-btn,
  .cal-nav-btn,
  .feedback-type-btn {
    touch-action: manipulation;
  }

  header {
    background: #FFFFFF;
    color: var(--ink);
    opacity: 1;
    padding: var(--safe-top) 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: calc(var(--app-header-height) + var(--safe-top));
    position: sticky;
    top: 0;
    z-index: 220;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transition: transform var(--motion-normal) var(--ease-standard);
  }
  body.search-layer-open header {
    transform: translateX(-25vw);
  }

  .hero-shell {
    position: relative;
    background: var(--paper);
    overflow: visible;
    transition: transform var(--motion-normal) var(--ease-standard);
  }
  body.search-layer-open .hero-shell {
    transform: translateX(-25vw);
  }

  .logo {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.03em;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    position: relative;
    padding-left: 14px;
  }
  .logo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 16px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateY(-50%) rotate(15deg);
  }
  .logo span {
    color: var(--ink);
    font-weight: inherit;
    letter-spacing: inherit;
    margin-left: 0.08em;
  }
  .logo span:first-of-type { color: var(--ink); }
  .logo span:last-of-type { color: var(--accent); }
  .logo:focus-visible {
    outline: none;
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
  }
  .header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
  }
  .header-action-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #52525B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition:
      background var(--motion-fast) ease,
      color var(--motion-fast) ease,
      transform var(--motion-fast) ease;
  }
  .header-action-btn svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.7;
  }
  .header-action-btn:active {
    background: #F4F4F5;
    color: #18181B;
    transform: translateY(1px);
  }
  .header-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
    background: #F4F4F5;
  }

  .hero {
    background: var(--paper);
    color: var(--ink);
    padding: 8px 20px;
    position: relative;
    overflow: hidden;
  }
  body.app-chrome-compact .hero-shell,
  body.app-chrome-compact .hero {
    max-height: 0;
    min-height: 0;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    border-width: 0;
    transform: none !important;
  }
  body.app-chrome-compact .quick-filter-block {
    top: var(--safe-top);
  }
  body.app-chrome-compact main {
    padding-top: 10px;
  }

  .sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }

  .search-bar {
    display: block;
    align-items: stretch;
    width: 100%;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
  }
  .search-bar input {
    min-width: 0;
    min-height: 40px;
    background: var(--hero-surface);
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 11px;
    padding: 8px 13px;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.2;
    outline: none;
    box-shadow: 0 8px 24px rgba(26,20,16,0.06);
  }
  .search-bar input::placeholder {
    color: rgba(23,23,23,0.42);
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
  .search-bar input:focus {
    border-color: rgba(39,70,109,0.36);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.10), 0 8px 24px rgba(26,20,16,0.06);
  }
  .search-bar button:not(.search-pill) {
    background: var(--accent);
    border: none;
    border-radius: 11px;
    padding: 0 14px;
    min-height: 40px;
    color: white;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(39,70,109,0.22);
  }
  .search-bar button:not(.search-pill):focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.18), 0 6px 16px rgba(39,70,109,0.22);
  }


/* styles/10-search-filter.css */
  /* ── 검색 Pill 버튼 ── */
  .search-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0 15px 0 16px;
    min-height: 42px;
    background: #ffffff;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 16px;
    color: rgba(23,23,23,0.46);
    font-family: var(--font-sans);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s;
  }
  .search-pill:active { background: #f4f4f5; }
  .search-pill:focus-visible {
    outline: none;
    border-color: rgba(39,70,109,0.36);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.10);
  }
  .search-pill-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .search-pill.is-transitioning .search-pill-text {
    opacity: 0.55;
    transform: translateY(1px);
  }
  .search-pill-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    opacity: 0.66;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .search-pill-icon svg {
    width: 12px;
    height: 12px;
  }

  /* ── 검색 레이어 ── */
  .search-layer {
    position: fixed; inset: 0; z-index: 980;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0s linear 0.18s;
    display: flex; flex-direction: column;
    padding-top: var(--safe-top);
  }
  .search-layer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }
  .search-layer.is-entering .search-layer-header {
    animation: searchLayerHeaderIn 0.34s var(--ease-spring-soft) both;
  }
  .search-layer.is-entering .search-layer-section {
    animation: searchLayerSectionIn 0.38s var(--ease-spring-snappy) both;
  }
  .search-layer.is-entering .search-layer-section:nth-child(1) { animation-delay: 0.02s; }
  .search-layer.is-entering .search-layer-section:nth-child(2) { animation-delay: 0.06s; }
  .search-layer.is-entering .search-layer-section:nth-child(3) { animation-delay: 0.10s; }
  .search-layer.is-entering .search-layer-section:nth-child(4) { animation-delay: 0.14s; }
  .search-layer.is-entering .search-layer-section:nth-child(5) { animation-delay: 0.18s; }
  .search-layer-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(228,228,231,0.72);
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-shrink: 0;
  }
  .search-layer-back {
    background: none; border: none; padding: 4px 6px;
    color: var(--ink); cursor: pointer;
    width: 44px; height: 44px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
    border-radius: 50%;
    transition: background 0.16s ease, transform 0.16s ease;
  }
  .search-layer-back:active {
    background: rgba(24,24,27,0.06);
    transform: scale(0.94);
  }
  .search-layer-back svg { width: 18px; height: 18px; }
  .search-layer-input-wrapper {
    flex: 1; position: relative; min-width: 0;
  }
  .search-layer-input {
    width: 100%; min-height: 44px;
    background: #fff;
    border: 1px solid rgba(212,212,216,0.82);
    border-radius: 999px;
    padding: 8px 68px 8px 16px;
    font-family: var(--font-sans);
    font-size: 15px; color: #18181B;
    outline: none;
    -webkit-appearance: none;
    box-shadow: 0 4px 16px rgba(24,24,27,0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }
  .search-layer-input::placeholder {
    color: var(--muted);
  }
  .search-layer-input:focus {
    border-color: var(--accent);
    background: #fbfcfe;
    box-shadow: 0 0 0 2px rgba(39,70,109,0.14), 0 8px 24px rgba(39,70,109,0.08);
  }
  .search-layer-clear {
    position: absolute;
    right: 30px;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    color: #52525B;
    background: rgba(24,24,27,0.065);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.86);
    transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .search-layer-input-wrapper[data-has-value="true"] .search-layer-clear {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
  }
  .search-layer-clear:active {
    background: rgba(24,24,27,0.11);
    transform: translateY(-50%) scale(0.92);
  }
  .search-layer-clear:focus-visible {
    outline: 2px solid rgba(39,70,109,0.38);
    outline-offset: 2px;
  }
  .search-layer-clear:disabled {
    opacity: 0;
    pointer-events: none;
  }
  .search-layer-icon {
    position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%); flex-shrink: 0;
    opacity: 0.5; color: var(--ink); pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .search-layer-input-wrapper:focus-within .search-layer-icon {
    opacity: 0.72;
    transform: translateY(-50%) scale(1.04);
  }
  .search-layer-input-wrapper[data-has-value="true"] .search-layer-icon {
    opacity: 0.38;
  }
  .search-layer-body {
    flex: 1; overflow-y: auto;
    padding: 20px 18px calc(140px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }
  .search-layer-section { margin-bottom: 30px; }
  .search-layer-section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
  }
  .search-layer-section-head > span {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    color: #18181B;
  }
  .search-layer-section-head > button {
    min-height: 44px;
    background: none; border: none; padding: 0 4px;
    font-size: 11px; color: var(--muted); cursor: pointer;
    font-family: var(--font-sans);
  }
  .search-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .search-chip {
    display: inline-flex; align-items: center; gap: 0;
    background: #fff; border: 1px solid rgba(212,212,216,0.82);
    border-radius: 999px; padding: 0;
    min-height: 46px;
    font-size: 13px; color: #27272A;
    box-shadow: 0 4px 12px rgba(24,24,27,0.04);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .search-chip:active {
    transform: scale(0.97);
    background: #f8fafc;
  }
  .search-chip-main {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0;
    padding: 0 12px;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .search-chip-del {
    width: 44px; height: 44px;
    flex: 0 0 44px;
    background: none; border: none; padding: 0;
    border-radius: 50%;
    font-size: 14px; color: var(--muted); cursor: pointer;
    line-height: 1; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
  .search-chip-main:focus-visible,
  .search-chip-del:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
  }
  .search-chip-del:active {
    background: rgba(24,24,27,0.06);
  }
  .search-chip-suggest {
    background: #fff; border: 1px solid rgba(212,212,216,0.82);
    border-radius: 999px; padding: 0 14px;
    min-height: 44px;
    font-size: 13px; font-weight: 600; color: #27272A;
    letter-spacing: 0;
    box-shadow: 0 4px 12px rgba(24,24,27,0.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .search-chip-suggest:active {
    transform: translateY(1px) scale(0.98);
    background: #f8fafc;
    border-color: rgba(39,70,109,0.24);
  }
  .explore-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px 10px;
  }
  .explore-shortcut {
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    color: #27272A;
    font-family: var(--font-sans);
    display: grid;
    justify-items: center;
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, color 0.16s ease;
  }
  .explore-shortcut-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    border: 1px solid rgba(226,232,240,0.92);
    box-shadow: 0 8px 20px rgba(24,24,27,0.055);
    color: #18181B;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
  }
  .explore-shortcut.tone-1 .explore-shortcut-icon {
    background: #FFF7ED;
    border-color: #FED7AA;
    color: #9A3412;
  }
  .explore-shortcut.tone-2 .explore-shortcut-icon {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
  }
  .explore-shortcut.tone-3 .explore-shortcut-icon {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #047857;
  }
  .explore-shortcut.tone-4 .explore-shortcut-icon {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
  }
  .explore-shortcut:active {
    transform: translateY(1px) scale(0.98);
  }
  .explore-shortcut:active .explore-shortcut-icon {
    transform: scale(0.94);
  }
  .explore-shortcut:focus-visible {
    outline: none;
  }
  .explore-shortcut:focus-visible .explore-shortcut-icon {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .explore-shortcut-label {
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .explore-promo-card {
    width: 100%;
    min-height: 118px;
    border: 1px solid rgba(228,228,231,0.86);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24,24,27,0.08);
    padding: 12px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  }
  .explore-promo-card:active {
    transform: translateY(1px) scale(0.99);
    border-color: rgba(39,70,109,0.20);
    box-shadow: 0 8px 22px rgba(24,24,27,0.075);
  }
  .explore-promo-image {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #F4F4F5;
  }
  .explore-promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .explore-promo-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }
  .explore-promo-kicker {
    width: fit-content;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(24,24,27,0.16);
    color: #52525B;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
  }
  .explore-promo-copy strong {
    color: #18181B;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .explore-promo-copy span:last-child {
    color: #71717A;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .explore-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .explore-category-chip {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(212,212,216,0.88);
    background: #fff;
    color: #27272A;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(24,24,27,0.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }
  .explore-category-chip:active {
    transform: translateY(1px) scale(0.98);
    background: #f8fafc;
    border-color: rgba(39,70,109,0.24);
  }

  .search-layer.is-entering :is(.search-chip, .search-chip-suggest, .explore-shortcut, .explore-promo-card, .explore-category-chip) {
    animation: searchLayerItemIn 0.34s var(--ease-spring-snappy) both;
    animation-delay: var(--motion-delay, 80ms);
  }

  @keyframes searchLayerHeaderIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes searchLayerSectionIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes searchLayerItemIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* ── 필터 바텀 시트 ── */
  .filter-sheet-overlay {
    position: fixed; inset: 0; z-index: 1120;
    background: rgba(17,12,9,0.55);
    opacity: 0; pointer-events: none;
    overscroll-behavior: contain;
    transition: opacity 0.25s ease;
  }
  .filter-sheet-overlay.open {
    opacity: 1; pointer-events: auto;
  }
  .filter-sheet {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    border-radius: 20px 20px 0 0;
    padding-bottom: var(--safe-bottom, 0px);
    height: min(80vh, 680px);
    max-height: min(80vh, 680px);
    box-sizing: border-box;
    overflow: hidden;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .filter-sheet-overlay.open .filter-sheet {
    transform: translateY(0);
  }
  .filter-sheet-handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  .filter-sheet-tabs {
    display: flex; gap: 0;
    padding: 12px 16px 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-sheet-tabs::-webkit-scrollbar { display: none; }
  .filter-sheet-tab {
    min-height: 44px;
    padding: 0 14px;
    background: none; border: none;
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 500;
    color: var(--muted); cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
    position: relative;
    display: inline-flex;
    align-items: center;
  }
  .filter-sheet-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
  .filter-sheet-tab .tab-dot {
    position: absolute; top: 6px; right: 8px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--accent); display: none;
  }
  .filter-sheet-tab.has-filter .tab-dot { display: block; }
  .filter-sheet-body {
    flex: 1; overflow-y: auto;
    min-height: 0;
    padding: 20px 16px 8px;
    -webkit-overflow-scrolling: touch;
  }
  .filter-tab-panel .filter-panel-title { margin-bottom: 10px; }
  .filter-tab-panel .filter-days { margin-bottom: 0; }
  .filter-selected-summary {
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f4f4f5;
    color: #71717A;
    font-size: 12px;
    font-weight: 600;
  }
  .filter-selected-summary strong {
    min-width: 0;
    color: #18181B;
    font-size: 13px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .filter-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .filter-more-toggle {
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 14px;
    background: #fff;
    color: #18181B;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }
  .filter-sheet-footer {
    display: flex; gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    flex-shrink: 0;
  }
  .btn-filter-reset-sheet {
    flex: 0 0 auto;
    background: none; border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 18px;
    font-family: var(--font-sans);
    font-size: 14px; color: var(--muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .btn-filter-apply-sheet {
    flex: 1;
    background: var(--ink); color: white;
    border: none; border-radius: 10px;
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
  }
  .btn-filter-apply-sheet:active { opacity: 0.85; }

  .quick-filter-block {
    position: sticky;
    top: calc(var(--app-header-height) + var(--safe-top));
    z-index: 210;
    background: #FFFFFF;
    opacity: 1;
    /* 카테고리 탭을 로고(헤더)에 가깝게 — 상단 숨구멍 최소화(밀리식 탭 밀착). */
    padding: 2px 20px 0;
    /* 밀리식 전폭 hairline 트랙 — 활성 탭의 2px 강조선이 이 1px 회색선 위에 겹쳐
       "탭/콘텐츠 분리 + 강조" 형태. sticky라 스크롤로 떠 있을 때도 같이 따라감. */
    border-bottom: 1px solid var(--border);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.search-layer-open .quick-filter-block {
    transform: none;
    border-bottom: 1px solid rgba(23,23,23,0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .quick-intent-row { padding-top: 2px; }
  .category-row {
    display: flex;
    gap: 20px;
    padding: 0;
  }
  .home-category-tabs {
    gap: 20px;
    min-height: 44px;
    align-items: flex-end;
  }
  .filter-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 0 4px;
    margin: 0;
    scrollbar-width: none;
  }
  .filter-row.home-category-tabs {
    gap: 20px;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .chip {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 999px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    color: #52525B;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: background-color 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }
  .chip:hover, .chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
  }
  .chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
  }
  .home-category-tabs .chip {
    min-height: 44px;
    padding: 0 0 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15.3px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .home-category-tabs .chip:hover,
  .home-category-tabs .chip.active {
    background: transparent;
    border-color: var(--ink);
    color: var(--ink);
    box-shadow: none;
    font-weight: 700;
  }
  .home-category-tabs .chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
  }
  .home-subfilter-block {
    margin: 0 0 14px;
    padding: 0;
    background: #FFFFFF;
  }
  .home-subfilter-block.view-hidden {
    display: none;
  }
  /* 추천 외 카테고리 선택 시 인텐트 칩 바 숨김 — 필터 옵션 인지 부담 감소 */
  #homeSubFilterBar[data-active-category]:not([data-active-category=""]) {
    display: none;
  }
  .home-subfilter-block .filter-row {
    gap: 8px;
    padding: 0 0 4px;
  }
  .intent-chip {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 999px;
    min-height: 44px;
    padding: 0 11px;
    font-size: 12px;
    font-weight: 500;
    color: #52525B;
    letter-spacing: -0.02em;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background-color 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out, box-shadow 0.18s ease-out;
  }
  .intent-chip.active {
    background: var(--ink);
    border-color: var(--ink);
    color: white;
    box-shadow: 0 8px 18px rgba(23,23,23,0.12);
  }
  .intent-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
  }

  main {
    padding: 14px 16px calc(84px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.search-layer-open main {
    transform: none;
  }
  body.search-results-mode > header,
  body.search-results-mode #heroShell,
  body.search-results-mode #quickCategoryBar,
  body.search-results-mode #homeSubFilterBar,
  body.search-results-mode #homeCurationHost,
  body.search-results-mode #connectionBanner,
  body.search-results-mode #sectionHeader,
  body.search-results-mode .data-source {
    display: none !important;
  }
  main.search-results-mode {
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .search-results-appbar {
    position: sticky;
    top: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: 44px auto;
    align-items: center;
    gap: 4px 8px;
    padding: 8px 0 10px;
    margin: -2px 0 14px;
    background: var(--paper);
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .search-results-appbar.is-search-revealing {
    animation: searchResultsAppbarIn 0.34s var(--ease-spring-soft) both;
  }
  .search-results-appbar.view-hidden {
    display: none;
  }
  .search-results-appbar.is-hidden {
    transform: translateY(calc(-100% - 10px));
    opacity: 0;
    pointer-events: none;
  }
  .search-results-back,
  .search-results-filter {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  }
  .search-results-back:active,
  .search-results-filter:active {
    transform: scale(0.94);
    background: #f4f4f5;
  }
  .search-results-filter.active {
    background: #F0F5FA;
    color: #27466D;
  }
  .search-results-filter-badge {
    display: none;
    position: absolute;
    top: 5px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #27466D;
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    letter-spacing: 0;
  }
  .search-results-filter.active .search-results-filter-badge {
    display: block;
  }
  .search-results-filter-dot {
    display: none;
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27466D;
    box-shadow: 0 0 0 2px #fff;
  }
  .search-results-fab.active .search-results-filter-dot {
    display: block;
  }
  .search-results-back svg,
  .search-results-filter svg,
  .search-results-fab svg {
    width: 22px;
    height: 22px;
  }
  .search-results-query {
    justify-self: center;
    max-width: 100%;
    min-width: 0;
    height: 44px;
    border: 1px solid rgba(23,23,23,0.08);
    border-radius: 999px;
    background: #f4f4f5;
    color: #18181B;
    padding: 0 12px 0 14px;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    font-family: var(--font-sans);
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  }
  .search-results-query:focus-within,
  .search-results-query:active {
    border-color: rgba(39,70,109,0.18);
    box-shadow: 0 6px 18px rgba(24,24,27,0.055);
  }
  .search-results-query-edit,
  .search-results-query-clear {
    height: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .search-results-query-edit {
    min-width: 0;
    padding: 0 0 0 0;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
  }
  .search-results-query-clear {
    width: 30px;
    flex: 0 0 30px;
    color: #71717A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
  }
  .search-results-query-edit:focus-visible,
  .search-results-query-clear:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    box-shadow: none;
  }
  .search-results-query-edit span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .search-results-count {
    grid-column: 1 / -1;
    text-align: center;
    color: #71717A;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
  }
  .search-results-fab {
    position: fixed;
    left: 50%;
    bottom: var(--floating-control-bottom-offset);
    transform: translateX(-50%);
    z-index: 260;
    height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    color: #18181B;
    box-shadow: 0 14px 36px rgba(23,23,23,0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  }
  .search-results-fab:active {
    transform: translateX(-50%) translateY(1px) scale(0.98);
    box-shadow: 0 10px 26px rgba(23,23,23,0.14);
  }
  .search-results-fab.active {
    border-color: rgba(39,70,109,0.24);
    background: #F0F5FA;
    color: #27466D;
  }
  .search-results-fab .search-results-filter-dot {
    top: 9px;
    right: 11px;
  }
  .search-results-fab.view-hidden {
    display: none;
  }
  body.search-results-mode:has(.events-grid > .empty-state) .search-results-fab {
    display: none;
  }
  body.modal-open .search-results-appbar,
  body.modal-open .search-results-fab {
    display: none !important;
  }
  main.search-results-mode .events-grid.is-search-revealing > .event-card {
    animation: searchResultCardIn 0.42s var(--ease-spring-snappy) both;
  }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(1) { animation-delay: 0.02s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(2) { animation-delay: 0.05s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(3) { animation-delay: 0.08s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(4) { animation-delay: 0.11s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(5) { animation-delay: 0.14s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(6) { animation-delay: 0.17s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(7) { animation-delay: 0.20s; }
  main.search-results-mode .events-grid.is-search-revealing > .event-card:nth-child(8) { animation-delay: 0.23s; }
  body.search-results-entering .search-loading-state {
    animation: searchResultLoadingIn 0.28s ease both;
  }
  @keyframes searchResultsAppbarIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes searchResultCardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes searchResultLoadingIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .search-layer {
      transition: none;
      transform: none;
    }
    .search-layer-clear {
      transition: none;
    }
    .search-results-appbar {
      transition: none;
    }
    .search-layer.is-entering .search-layer-header,
    .search-layer.is-entering .search-layer-section,
    .search-layer.is-entering :is(.search-chip, .search-chip-suggest, .explore-shortcut, .explore-promo-card, .explore-category-chip),
    .search-results-appbar.is-search-revealing,
    main.search-results-mode .events-grid.is-search-revealing > .event-card,
    body.search-results-entering .search-loading-state {
      animation: none !important;
    }
  }


/* styles/20-home-feed.css */
  .home-curation {
    display: flex;
    flex-direction: column;
    /* 시각 구획: 섹션 사이 gap 제거 → 음영 밴드가 빈틈 없이 맞닿게. 세로 리듬은 각 섹션의
       상하 패딩이 담당한다. */
    gap: 0;
    margin-bottom: 16px;
    transition: opacity 0.3s ease;
    overflow: visible;
  }
  /* 추천 섹션은 회색 배경 밴드 없이 여백(상하 패딩)으로만 구획 — 깨끗한 배경 위에 콘텐츠가 떠있게. */
  .curation-section {
    position: relative;
    padding-top: 24px;
    padding-bottom: 20px;
  }
  /* State B (filter active): fade out, then collapse once the fade has finished.
     Collapsing after the fade avoids animating max-height over the whole feed every frame. */
  .state-filtered .home-curation {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0s linear 0.3s, margin-bottom 0s linear 0.3s;
  }

  /* 가로 스크롤 포스터 카드 행 */
  .home-featured-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 7 / 6;
    min-height: 314px;
    max-height: 382px;
    border-radius: 16px;
    overflow: hidden;
    background: #e8e2d6;
    box-shadow: none;
    isolation: isolate;
    touch-action: pan-y;
  }
  .home-featured-track {
    position: absolute;
    inset: 0;
  }
  .home-featured-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: #e8e2d6;
    color: white;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease;
    appearance: none;
    text-align: left;
  }
  .home-featured-slide.active {
    opacity: 1;
    pointer-events: auto;
  }
  .home-featured-slide:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,0.82);
  }
  .home-featured-slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.28s ease, transform 0.42s ease;
  }
  .home-featured-slide.is-loaded img {
    opacity: 1;
    transform: scale(1);
  }
  .home-featured-shade {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(0,0,0,0.00) 52%, rgba(0,0,0,0.12) 70%, rgba(0,0,0,0.54) 100%),
      linear-gradient(0deg, rgba(39,70,109,0.04), rgba(39,70,109,0.04));
    pointer-events: none;
  }
  .home-featured-copy {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 26px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.30);
  }
  .home-featured-kicker {
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 99px;
    background: rgba(255,255,255,0.24);
    border: 1px solid rgba(255,255,255,0.30);
    color: rgba(255,255,255,0.94);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }
  .home-featured-copy strong {
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.22;
    font-weight: 800;
    letter-spacing: 0;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-featured-copy span:last-child {
    color: rgba(255,255,255,0.84);
    font-size: 11.5px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  @media (min-width: 768px) {
    .home-featured-carousel {
      aspect-ratio: 16 / 5.8;
      min-height: 300px;
      max-height: 410px;
      border-radius: 18px;
    }
    .home-featured-shade {
      background:
        linear-gradient(90deg, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.28) 48%, rgba(0,0,0,0.06) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.00) 58%, rgba(0,0,0,0.34) 100%);
    }
    .home-featured-copy {
      left: 32px;
      right: auto;
      bottom: 34px;
      width: min(520px, 58%);
      gap: 10px;
    }
    .home-featured-kicker {
      font-size: 11px;
      padding: 5px 10px;
    }
    .home-featured-copy strong {
      font-size: clamp(28px, 3vw, 42px);
      line-height: 1.14;
    }
    .home-featured-copy span:last-child {
      font-size: 14px;
      line-height: 1.42;
    }
  }
  .home-featured-meter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 112px;
    height: 30px;
    padding: 0 6px 0 10px;
    border-radius: 99px;
    background: rgba(23,23,23,0.50);
    color: white;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 2;
  }
  @media (min-width: 768px) {
    .home-featured-meter {
      right: 20px;
      bottom: 18px;
    }
  }
  .home-featured-all {
    height: 22px;
    border: 0;
    border-radius: 999px;
    padding: 0 7px;
    background: rgba(255,255,255,0.16);
    color: white;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, background 0.16s ease;
  }
  .home-featured-all:active {
    transform: scale(0.94);
    background: rgba(255,255,255,0.24);
  }
  .home-featured-all:focus-visible {
    outline: 2px solid rgba(255,255,255,0.82);
    outline-offset: 2px;
  }
  .home-featured-playback {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255,255,255,0.16);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, background 0.16s ease;
  }
  .home-featured-playback:disabled {
    opacity: 0.45;
    cursor: default;
  }
  .home-featured-playback:not(:disabled):active {
    transform: scale(0.92);
    background: rgba(255,255,255,0.24);
  }
  .home-featured-playback:focus-visible {
    outline: 2px solid rgba(255,255,255,0.82);
    outline-offset: 2px;
  }
  .home-featured-playback-icon {
    position: relative;
    width: 12px;
    height: 12px;
    display: block;
  }
  .home-featured-playback-icon::before,
  .home-featured-playback-icon::after {
    content: '';
    position: absolute;
    top: 1px;
    height: 10px;
    border-radius: 2px;
    background: currentColor;
  }
  .home-featured-playback[data-state="playing"] .home-featured-playback-icon::before {
    left: 2px;
    width: 3px;
  }
  .home-featured-playback[data-state="playing"] .home-featured-playback-icon::after {
    right: 2px;
    width: 3px;
  }
  .home-featured-playback[data-state="paused"] .home-featured-playback-icon::before {
    left: 3px;
    top: 1px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid currentColor;
    border-radius: 0;
    background: transparent;
  }
  .home-featured-playback[data-state="paused"] .home-featured-playback-icon::after {
    display: none;
  }

  .poster-scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    /* 강제 스냅(scroll-snap-type: x mandatory) 제거 — 자유로운 스크롤을 방해하지 않음 */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    /* 풀블리드 + 다음 카드 약 15% peek: 좌우 -16px(main 패딩)로 뷰포트 끝까지 흘리고
       안쪽 패딩 16px로 첫 카드를 정렬. 우측 끝에서 다음 카드가 삐죽 잘려 보여 가로 밀도를
       직관적으로 인지 → 스크롤 속도를 늦추고 넘겨보게 유도. */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .poster-scroll-row::-webkit-scrollbar { display: none; }

  /* 박스 제거 — 배경 위에 라운드 포스터만 얹는 플랫 카드. */
  .poster-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 146px;
    border-radius: 0;
    overflow: visible;
    position: relative;
    cursor: pointer;
    background: transparent;
    box-shadow: none;
    border: 0;
    display: flex;
    flex-direction: column;
    transition:
      transform 0.16s ease,
      opacity 0.18s ease;
  }
  .poster-card:active {
    transform: translateY(1px) scale(0.985);
  }
  /* 이미지 영역: 4:5 비율 */
  .poster-card-img {
    width: 146px;
    height: auto;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: none;
    background: #e8e2d6;
    flex-shrink: 0;
  }
  .poster-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .poster-card-img img.is-loaded { opacity: 1; }
  /* 이미지 없을 때 카테고리 아이콘 배경 */
  .poster-card-img-fallback {
    width: 146px;
    height: auto;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: rgba(26,20,16,0.25);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: none;
    flex-shrink: 0;
  }
  /* 텍스트 영역 */
  .poster-card-body {
    padding: 9px 0 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }
  .poster-card-title {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .poster-card-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
  }
  .poster-card-pill {
    display: none;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 400;
    padding: 2px 6px;
    border-radius: 99px;
    margin-top: 4px;
    width: fit-content;
  }
  .poster-card-pill.free {
    background: #e0ede6;
    color: #2d6a4f;
  }
  .poster-card-pill.live {
    background: #fde8e0;
    color: var(--accent);
  }

  /* 포스터 카드 찜 버튼 */
  .poster-card .fav-btn,
  .feed-poster-card .fav-btn {
    display: none;
  }

  /* 큐레이션 섹션 헤더 */
  .curation-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
    min-height: 34px;
  }
  .curation-section-head.is-clickable {
    width: 100%;
    border: 0;
    appearance: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    margin-left: 0;
    margin-right: 0;
    padding: 2px 0;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .curation-section-head.is-clickable:active {
    background: #F4F4F5;
  }
  .curation-section-head.is-clickable:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.12);
  }
  .curation-section-copy {
    margin: -8px 0 14px;
    color: #71717A;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0;
  }
  .curation-section-label {
    font-family: var(--font-sans);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    color: #18181B;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .curation-section-more {
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin-left: auto;
    font-size: 12px;
    color: #71717A;
    pointer-events: none;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    line-height: 1;
    white-space: nowrap;
    font-weight: 800;
    flex: 0 0 auto;
  }
  .curation-section-more-label {
    display: none;
  }
  .curation-section-more-arrow {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0;
    flex-shrink: 0;
  }
  .curation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .curation-card {
    position: relative;
    min-height: 132px;
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
      radial-gradient(circle at top right, rgba(200,64,26,0.18), transparent 40%),
      linear-gradient(180deg, var(--ink) 0%, #1a1a1a 100%);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    appearance: none;
  }
  .curation-card.wide {
    grid-column: 1 / -1;
    min-height: 144px;
  }
  .curation-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.24);
  }
  .curation-kicker {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .curation-title {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.28;
    font-weight: 700;
    color: var(--paper);
  }
  .curation-copy {
    font-size: 12px;
    line-height: 1.55;
    color: rgba(245,240,232,0.78);
  }
  .curation-meta {
    font-size: 11px;
    color: rgba(245,240,232,0.65);
    margin-top: auto;
  }
  .curation-hints {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .curation-hint {
    font-size: 12px;
    color: rgba(245,240,232,0.82);
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .curation-hint::before {
    content: '·';
    color: var(--accent);
    margin-right: 6px;
  }

  .home-avatar-chip-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 18px 8px;
    margin: 0 -16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-avatar-chip-row::-webkit-scrollbar { display: none; }
  .home-avatar-chip {
    width: 58px;
    flex: 0 0 58px;
    border: 0;
    border-radius: 0;
    padding: 0;
    min-height: 76px;
    background: transparent;
    color: #27272A;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    appearance: none;
    box-shadow: none;
    transition: transform 0.16s ease, opacity 0.18s ease;
  }
  .home-avatar-chip:active {
    transform: translateY(1px) scale(0.97);
  }
  .home-avatar-chip-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    --theme-chip-bg: #EFF5FB;
    --theme-chip-color: #29456F;
    --theme-chip-border: rgba(41,69,111,0.10);
    background: var(--theme-chip-bg);
    border: 1px solid var(--theme-chip-border);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--theme-chip-color);
    font-size: 0;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.18s ease;
  }
  .home-avatar-chip:active .home-avatar-chip-img {
    transform: scale(0.94);
    box-shadow: none;
  }
  .home-avatar-chip-img[data-icon-key="forest"] { --theme-chip-bg: #EEF7FB; --theme-chip-color: #29456F; }
  .home-avatar-chip-img[data-icon-key="palace"] { --theme-chip-bg: #F5F1E7; --theme-chip-color: #856B25; }
  .home-avatar-chip-img[data-icon-key="weekend"] { --theme-chip-bg: #FFF4D8; --theme-chip-color: #9A5B13; }
  .home-avatar-chip-img[data-icon-key="free"] { --theme-chip-bg: #EBF8F1; --theme-chip-color: #176E4A; }
  .home-avatar-chip-img[data-icon-key="indoor"] { --theme-chip-bg: #F0F1FF; --theme-chip-color: #4F4B9B; }
  .home-avatar-chip-img[data-icon-key="date"] { --theme-chip-bg: #FFF0F5; --theme-chip-color: #9A3D65; }
  .home-avatar-chip-img[data-icon-key="solo"] { --theme-chip-bg: #ECF4FF; --theme-chip-color: #245C9B; }
  .home-avatar-chip-img[data-icon-key="kids"] { --theme-chip-bg: #FFF2E7; --theme-chip-color: #A4561F; }
  .home-theme-icon,
  .home-theme-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .home-theme-icon {
    width: 31px;
    height: 31px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }
  .home-theme-icon-fallback {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
  }
  .home-avatar-chip-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-avatar-chip-label {
    width: 64px;
    color: #27272A;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .home-keyword-banner-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-keyword-banner-row::-webkit-scrollbar { display: none; }
  .home-keyword-banner {
    --keyword-bg: #EEF7FB;
    --keyword-ink: #27466D;
    --keyword-soft: rgba(39,70,109,0.68);
    flex: 0 0 174px;
    min-height: 112px;
    border: 1px solid rgba(24,24,27,0.06);
    border-radius: 14px;
    padding: 13px;
    background:
      linear-gradient(145deg, rgba(255,255,255,0.62), rgba(255,255,255,0.16)),
      var(--keyword-bg);
    color: var(--keyword-ink);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    cursor: pointer;
    text-align: left;
    appearance: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .home-keyword-banner.is-wide {
    flex-basis: 204px;
  }
  .home-keyword-banner:nth-child(2) {
    --keyword-bg: #F6F1E6;
    --keyword-ink: #755D20;
    --keyword-soft: rgba(117,93,32,0.70);
  }
  .home-keyword-banner:nth-child(3) {
    --keyword-bg: #EAF7F0;
    --keyword-ink: #176E4A;
    --keyword-soft: rgba(23,110,74,0.70);
  }
  .home-keyword-banner:nth-child(4) {
    --keyword-bg: #F3F0FF;
    --keyword-ink: #50459B;
    --keyword-soft: rgba(80,69,155,0.70);
  }
  .home-keyword-banner:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: none;
  }
  .home-keyword-banner small,
  .home-keyword-banner em {
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-keyword-banner small {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.64);
    color: var(--keyword-ink);
  }
  .home-keyword-banner strong {
    color: var(--keyword-ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: 0;
  }
  .home-keyword-banner span {
    color: var(--keyword-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.46;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-keyword-banner em {
    margin-top: auto;
    padding-top: 2px;
    color: var(--keyword-ink);
  }

  .home-prompt-card-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-prompt-card-row::-webkit-scrollbar { display: none; }
  .home-prompt-card {
    flex: 0 0 min(82%, 300px);
    min-height: 126px;
    border: 1px solid rgba(24,24,27,0.07);
    border-radius: 16px;
    padding: 14px;
    background: #FFFFFF;
    color: #27272A;
    box-shadow: none;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 8px 10px;
    cursor: pointer;
    text-align: left;
    appearance: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .home-prompt-card:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: none;
  }
  .home-prompt-card-kicker {
    grid-row: 1 / span 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #18181B;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-prompt-card:nth-child(2) .home-prompt-card-kicker {
    background: #27466D;
  }
  .home-prompt-card:nth-child(3) .home-prompt-card-kicker {
    background: #9A3D65;
  }
  .home-prompt-card strong {
    min-width: 0;
    color: #18181B;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.34;
    letter-spacing: 0;
  }
  .home-prompt-card span:last-child {
    min-width: 0;
    color: #71717A;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .home-feed-bento-mosaic-3 {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    background: linear-gradient(180deg, rgba(248,250,252,0.82), rgba(255,255,255,0));
  }

  .curation-section[data-home-feed-section="today-one-pick"],
  .curation-section[data-home-feed-section="today-one-pick-client-fallback"] {
    padding-top: 18px;
    padding-bottom: 30px;
  }

  .curation-section[data-home-feed-section*="fresh-starts"] .poster-card {
    width: 158px;
  }
  .curation-section[data-home-feed-section*="fresh-starts"] .poster-card-img,
  .curation-section[data-home-feed-section*="fresh-starts"] .poster-card-img-fallback {
    width: 158px;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }
  .curation-section[data-home-feed-section*="fresh-starts"] .poster-card-img::after {
    content: 'NEW';
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(39,70,109,0.92);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
  }

  .curation-section[data-home-feed-section*="ending-soon"] .poster-card-img {
    box-shadow: none;
  }
  .curation-section[data-home-feed-section*="ending-soon"] .poster-card-img::after {
    content: '마감 임박';
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(164,48,31,0.92);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
  }
  .curation-section[data-home-feed-section*="free-weekend"] .poster-card-img::after {
    content: '무료';
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(29,111,79,0.92);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: none;
  }

  .home-text-ticker {
    position: relative;
    overflow: hidden;
    min-height: 42px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid rgba(24,24,27,0.07);
    box-shadow: none;
  }
  .home-text-ticker::before,
  .home-text-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    z-index: 2;
    pointer-events: none;
  }
  .home-text-ticker::before {
    left: 0;
    background: linear-gradient(90deg, #FFFFFF, rgba(255,255,255,0));
  }
  .home-text-ticker::after {
    right: 0;
    background: linear-gradient(270deg, #FFFFFF, rgba(255,255,255,0));
  }
  .home-text-ticker-track {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    height: 42px;
    animation: homeTickerMarquee 26s linear infinite;
  }
  .home-text-ticker:hover .home-text-ticker-track,
  .home-text-ticker:focus-within .home-text-ticker-track {
    animation-play-state: paused;
  }
  .home-ticker-item {
    border: 0;
    background: transparent;
    color: #27272A;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    appearance: none;
    transition: transform 0.16s ease, opacity 0.18s ease;
  }
  .home-ticker-item:active {
    transform: translateY(1px) scale(0.98);
  }
  .home-ticker-item::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #27466D;
    opacity: 0.72;
    flex: 0 0 auto;
  }
  .home-ticker-item span {
    display: inline;
  }
  @keyframes homeTickerMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  .home-section-support {
    margin-top: 8px;
  }
  .home-section-support.is-curated {
    margin-top: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(39,70,109,0.10);
    border-bottom: 1px solid rgba(39,70,109,0.06);
    background: linear-gradient(180deg, rgba(246,248,251,0.72), rgba(246,248,251,0.36));
  }
  .home-support-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-support-strip::-webkit-scrollbar { display: none; }
  .home-section-support.is-curated .home-support-strip {
    gap: 0;
    margin: 0;
    padding: 0 12px;
  }
  .home-support-card {
    flex: 0 0 min(78%, 292px);
    min-height: 70px;
    border: 1px solid rgba(24,24,27,0.07);
    border-radius: 14px;
    padding: 10px;
    background: #FAFAFA;
    color: #27272A;
    box-shadow: none;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-align: left;
    appearance: none;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.18s ease;
  }
  .home-support-card:active {
    transform: translateY(1px) scale(0.985);
  }
  .home-section-support.is-curated .home-support-card {
    flex-basis: min(76%, 284px);
    min-height: 66px;
    border: 0;
    border-radius: 0;
    padding: 8px 12px;
    background: transparent;
  }
  .home-section-support.is-curated .home-support-card + .home-support-card {
    border-left: 1px solid rgba(39,70,109,0.10);
  }
  .home-support-thumb,
  .home-support-icon {
    width: 44px;
    height: 58px;
    border-radius: 9px;
    border: 1px solid rgba(24,24,27,0.06);
    background: #ECE7DE;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #27466D;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-support-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-support-icon {
    height: 44px;
    border-radius: 50%;
    background: #EFF5FB;
  }
  .home-support-card.is-shortcut {
    background: #F6F8FB;
  }
  .home-section-support.is-curated .home-support-thumb,
  .home-section-support.is-curated .home-support-icon {
    width: 40px;
    height: 52px;
    border-radius: 8px;
  }
  .home-section-support.is-curated .home-support-icon {
    height: 40px;
    border-radius: 50%;
  }
  .home-support-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .home-support-copy small {
    color: #27466D;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-section-support.is-curated .home-support-copy small {
    color: #52647A;
  }
  .home-support-copy strong {
    color: #18181B;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.34;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-section-support.is-curated .home-support-copy strong {
    font-size: 12.5px;
  }

  .home-course-bundle-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 16px 12px;
    scroll-padding-left: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-course-bundle-row::-webkit-scrollbar { display: none; }
  .home-course-bundle-card {
    flex: 0 0 min(88%, 342px);
    scroll-snap-align: start;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 10px 28px rgba(39,70,109,0.08);
  }
  .home-course-bundle-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .home-course-bundle-head small {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 8px;
    background: #EDF5F1;
    color: #13724B;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-course-bundle-head strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.28;
    letter-spacing: 0;
  }
  .home-course-bundle-head span {
    color: var(--caption);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
  }
  .home-course-bundle-lead {
    width: 100%;
    min-height: 118px;
    border: 0;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    display: grid;
    grid-template-columns: minmax(0, 0.54fr) minmax(0, 0.46fr);
    text-align: left;
    cursor: pointer;
    appearance: none;
  }
  .home-course-bundle-lead-img {
    min-width: 0;
    min-height: 118px;
    background: #E8E2D6;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    overflow: hidden;
  }
  .home-course-bundle-lead-img img,
  .home-course-bundle-mini-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-course-bundle-lead-copy {
    min-width: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
  }
  .home-course-bundle-lead-copy small {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-course-bundle-lead-copy strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.34;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-course-bundle-lead-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-course-bundle-notes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px;
    border-radius: 12px;
    background: var(--surface);
  }
  .home-course-bundle-notes p {
    margin: 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    color: var(--caption);
    font-size: 11.5px;
    line-height: 1.4;
    letter-spacing: 0;
  }
  .home-course-bundle-notes b {
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
  }
  .home-course-bundle-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 1px;
  }
  .home-course-bundle-chips span {
    border-radius: 999px;
    padding: 4px 7px;
    background: var(--card-bg);
    color: var(--caption);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-course-bundle-mini-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .home-course-bundle-mini {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: var(--surface);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    appearance: none;
  }
  .home-course-bundle-mini-img {
    width: 38px;
    height: 48px;
    border-radius: 8px;
    background: #E8E2D6;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
  }
  .home-course-bundle-mini-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .home-course-bundle-mini-copy strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.32;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-course-bundle-mini-copy small {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-course-bundle-cta {
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: #27466D;
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
  }
  .home-course-bundle-lead:active,
  .home-course-bundle-mini:active,
  .home-course-bundle-cta:active {
    transform: translateY(1px) scale(0.99);
  }

  .home-rail-shell {
    position: relative;
  }
  .home-rail-meter-row {
    display: flex;
    justify-content: flex-end;
    padding-right: 16px;
    margin-top: 2px;
  }
  .home-rail-meter {
    width: fit-content;
    min-width: 48px;
    height: 24px;
    margin: 0;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
  }

  .home-ranking-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    /* 풀블리드 — 다음 랭킹 페이지(3개 묶음)가 우측 끝에서 살짝 보이도록 뷰포트 끝까지 흘림 */
    margin: 0 -16px;
    padding: 0 16px 10px;
    scroll-padding-left: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-ranking-paged {
    gap: 16px;
    /* 페이지 단위 스냅 스크롤 — 한 페이지(3개)씩 깔끔하게 넘김 */
    scroll-snap-type: x mandatory;
  }
  .home-ranking-list::-webkit-scrollbar { display: none; }
  .home-ranking-page {
    /* 한 페이지(3개)가 화면 폭을 거의 채우고(~90%) 다음 페이지가 살짝 보이게(밀리 랭킹처럼) */
    flex: 0 0 min(calc(100% - 32px), 380px);
    display: flex;
    flex-direction: column;
    gap: 22px;
    scroll-snap-align: start;
  }
  .home-ranking-page-spacer {
    flex: 0 0 72%;
    pointer-events: none;
    scroll-snap-align: none;
  }
  /* 카드 블록 제거 — 배경에 떠있는 형태(번호 · 풀 포스터 · 텍스트) */
  .home-ranking-item {
    width: 256px;
    flex: 0 0 256px;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    grid-template-columns: 34px 86px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    cursor: pointer;
    text-align: left;
    appearance: none;
    transition: transform 0.16s ease, opacity 0.18s ease;
  }
  .home-ranking-item:active {
    transform: translateY(1px) scale(0.985);
  }
  .home-ranking-page .home-ranking-item {
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
  }
  .home-ranking-index {
    color: #18181B;
    font-size: 23px;
    font-weight: 800;
    line-height: 1;
    text-align: right;
    letter-spacing: 0;
  }
  /* 포스터를 세로(3/4)로 풀로 보이게 — 작은 정사각 크롭 대신 밀리식 풀 커버 */
  .home-ranking-thumb {
    width: 86px;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    background: #ECE7DE;
    display: grid;
    place-items: center;
    color: #71717A;
    font-size: 11px;
    font-weight: 700;
  }
  .home-ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-ranking-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .home-ranking-copy strong,
  .home-landscape-copy strong,
  .home-bento-copy strong,
  .home-masonry-copy strong {
    color: #27272A;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-ranking-copy small,
  .home-bento-copy small,
  .home-masonry-copy small {
    color: #71717A;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-landscape-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 0 20px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-landscape-rail::-webkit-scrollbar { display: none; }
  .home-landscape-card {
    position: relative;
    flex: 0 0 306px;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #E8E2D6;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    text-align: left;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }
  .home-landscape-card:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: none;
  }
  .home-landscape-card img,
  .home-bento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-landscape-shade,
  .home-bento-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 45%, rgba(0,0,0,0.58) 100%);
    pointer-events: none;
  }
  .home-landscape-copy,
  .home-bento-copy {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.26);
  }
  .home-landscape-copy small {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 7px;
    background: rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.92);
    font-size: 11px;
    font-weight: 700;
  }
  .home-landscape-copy strong,
  .home-bento-copy strong {
    color: white;
  }
  .home-landscape-copy span {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-bento-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    grid-template-rows: repeat(2, 120px);
    gap: 10px;
  }
  .home-bento-card {
    position: relative;
    min-width: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #E8E2D6;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    text-align: left;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }
  .home-bento-card:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: none;
  }
  .home-bento-card.is-large {
    grid-row: 1 / span 2;
  }
  .home-bento-copy {
    left: 12px;
    right: 12px;
    bottom: 10px;
  }
  .home-bento-copy strong {
    font-size: 15px;
    line-height: 1.34;
  }
  .home-bento-copy small {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
  }

  .home-editorial-card {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    overflow: hidden;
    background:
      linear-gradient(135deg, var(--card-bg), var(--surface)),
      var(--card-bg);
    box-shadow: none;
    display: grid;
    grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
    gap: 10px;
    min-height: 196px;
    cursor: pointer;
    text-align: left;
    appearance: none;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }
  .home-editorial-card:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: none;
  }
  .home-editorial-img {
    width: 100%;
    height: 100%;
    min-height: 176px;
    aspect-ratio: auto;
    border-radius: 16px;
    overflow: hidden;
    background: #E8E2D6;
  }
  .home-editorial-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-editorial-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 4px 2px 4px 0;
    min-width: 0;
  }
  .home-editorial-copy small {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(39,70,109,0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
  }
  .home-editorial-copy strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.32;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-editorial-copy span {
    color: var(--caption);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.42;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .home-editorial-copy span b {
    display: block;
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
  }
  .home-editorial-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .home-editorial-copy .home-editorial-checkpoints {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
  .home-editorial-checkpoints i {
    border-radius: 999px;
    padding: 4px 7px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--caption);
    font-style: normal;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
  }
  @media (min-width: 768px) {
    .home-editorial-card {
      display: grid;
      grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
      gap: 18px;
      min-height: 260px;
      padding: 16px;
      align-items: stretch;
    }
    .home-editorial-img {
      height: 100%;
      min-height: 228px;
      aspect-ratio: auto;
    }
    .home-editorial-copy {
      justify-content: center;
      padding: 8px 8px 8px 0;
      gap: 12px;
    }
    .home-editorial-copy strong {
      font-size: 22px;
      line-height: 1.3;
    }
    .home-editorial-copy span {
      font-size: 15px;
      line-height: 1.65;
      -webkit-line-clamp: 4;
    }
  }

  /* 좌우 엇갈리는 masonry(column-count) 대신 행이 나란히 맞는 2열 그리드 */
  .home-masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
    align-items: start;
  }
  .home-feed-masonry-two-column,
  .curation-section[data-home-feed-section="more-culture"] {
    margin-top: 18px;
    padding-top: 10px;
  }
  .home-masonry-card {
    width: 100%;
    border: 0;
    border-radius: 16px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: none;
    cursor: pointer;
    text-align: left;
    appearance: none;
    display: flex;
    flex-direction: column;
    transition:
      transform 0.18s ease,
      opacity 0.18s ease;
  }
  .home-masonry-card:active {
    transform: translateY(1px) scale(0.985);
    box-shadow: none;
  }
  .home-masonry-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #E8E2D6;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
  }
  /* 행 정렬을 위해 모든 카드 이미지 비율 통일(is-tall 변형 제거) */
  .home-masonry-card.is-tall .home-masonry-img {
    aspect-ratio: 4 / 5;
  }
  .home-masonry-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .home-masonry-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 10px 12px;
  }
  .home-masonry-copy strong {
    font-size: 14px;
    line-height: 1.42;
  }

  .home-ranking-item:focus-visible,
  .home-landscape-card:focus-visible,
  .home-bento-card:focus-visible,
  .home-editorial-card:focus-visible,
  .home-masonry-card:focus-visible,
  .home-keyword-banner:focus-visible,
  .home-prompt-card:focus-visible,
  .home-avatar-chip:focus-visible,
  .home-support-card:focus-visible,
  .home-ticker-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16);
  }
  .home-featured-slide.active:active img {
    transform: scale(1.02);
  }

  .home-curation.is-home-feed-entering .curation-section {
    animation: homeFeedSectionIn 0.42s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: var(--home-section-delay, 0ms);
  }
  .home-curation.is-home-feed-entering .home-feed-action:not(.home-featured-slide) {
    animation: homeFeedItemIn 0.34s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: var(--home-item-delay, 0ms);
  }

  @keyframes homeFeedSectionIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes homeFeedItemIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  @media (prefers-reduced-motion: reduce) {
    .home-text-ticker-track {
      animation: none;
      transform: none;
    }
    .poster-card,
    .home-avatar-chip,
    .home-avatar-chip-img,
    .home-ticker-item,
    .home-ranking-item,
    .home-landscape-card,
    .home-bento-card,
    .home-editorial-card,
    .home-masonry-card,
    .home-support-card,
    .home-keyword-banner,
    .home-prompt-card {
      transition: none !important;
    }
    .home-featured-slide,
    .home-featured-slide img,
    .home-featured-playback {
      transition: none !important;
    }
    .home-curation.is-home-feed-entering .curation-section,
    .home-curation.is-home-feed-entering .home-feed-action:not(.home-featured-slide) {
      animation: none !important;
    }
  }


/* styles/30-results-events-modal.css */
  .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .section-heading {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }
  .fav-section-divider {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 0 10px;
    margin-top: 4px;
  }
  .fav-section-divider.today-label {
    color: var(--accent);
  }
  .fav-section-divider.all-label {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  main.favorites-view-mode {
    width: 100%;
    max-width: min(520px, 100vw);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-x: clip;
    padding: calc(var(--safe-top) + 14px) 20px calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 34px);
  }
  main.favorites-view-mode .section-header {
    position: sticky;
    top: 0;
    z-index: 28;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin: calc((var(--safe-top) + 14px) * -1) 0 16px;
    padding: calc(var(--safe-top) + 14px) 0 10px;
    min-height: 42px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--paper);
    isolation: isolate;
  }
  main.favorites-view-mode .section-header::before {
    content: '';
    position: absolute;
    inset: 0 -20px;
    z-index: -1;
    background: var(--paper);
  }
  main.favorites-view-mode .section-title {
    font-size: clamp(25px, 6.1vw, 29px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.02em;
  }
  main.favorites-view-mode .section-count {
    display: none;
  }
  main.favorites-view-mode .section-tools {
    min-width: 0;
    padding-top: 0;
    justify-self: end;
  }
  main.favorites-view-mode .sort-filter-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }
  main.favorites-view-mode .sort-select-wrap,
  main.favorites-view-mode .filter-btn {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(23,23,23,0.10);
    background: var(--surface);
    box-shadow: none;
  }
  main.favorites-view-mode .sort-select-label,
  main.favorites-view-mode .filter-btn {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--title);
  }
  main.favorites-view-mode .sort-select {
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
  }
  main.favorites-view-mode .events-grid.favorites-feed {
    /* 기본 .events-grid가 2열 포스터 그리드라, 저장 피드는 세로 스택으로 되돌린다.
       (안 그러면 섹션 라벨/포스터 레일이 2열 칸에 갇혀 좌우로 쪼개짐) */
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  main.favorites-view-mode .fav-section-divider {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    color: #71717A;
    padding: 0 0 14px;
    margin: 0;
  }
  main.favorites-view-mode .fav-section-divider.today-label {
    color: var(--accent);
  }
  main.favorites-view-mode .fav-section-divider.all-label {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(23,23,23,0.10);
  }
  main.favorites-view-mode .poster-rail {
    gap: 22px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 0 18px;
    box-sizing: border-box;
    overscroll-behavior-x: contain;
    scroll-padding-left: 0;
  }
  /* 카드가 1~2장뿐인 섹션은 가로 스크롤 레일 대신 2열로 채워 오른쪽이 비지 않게 한다. */
  main.favorites-view-mode .poster-rail:not(:has(> :nth-child(3))) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
  }
  main.favorites-view-mode .poster-rail:not(:has(> :nth-child(3))) > :is(.poster-card, .feed-poster-card) {
    width: auto;
    min-width: 0;
  }
  main.favorites-view-mode .poster-rail:not(:has(> :nth-child(3))) .feed-poster-img {
    width: 100%;
    height: auto;
    aspect-ratio: 126 / 158;
  }
  main.favorites-view-mode .poster-card {
    width: min(31vw, 150px);
    min-width: min(31vw, 150px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  main.favorites-view-mode .poster-card-img,
  main.favorites-view-mode .poster-card-img-fallback {
    width: 100%;
    height: auto;
    aspect-ratio: 0.78;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(23,23,23,0.08);
  }
  main.favorites-view-mode .poster-card-body {
    padding: 9px 0 0;
    background: transparent;
    gap: 5px;
  }
  main.favorites-view-mode .poster-card-title {
    font-size: 13px;
    line-height: 1.38;
    font-weight: 760;
    min-height: calc(1.38em * 2);
  }
  main.favorites-view-mode .poster-card-meta {
    font-size: 12px;
    color: #71717A;
  }
  main.favorites-view-mode .event-context-line {
    margin: -4px 0 14px !important;
    font-size: 14px;
    line-height: 1.5;
    color: #71717A;
  }
  @media (max-width: 380px) {
    main.favorites-view-mode {
      padding-inline: 18px;
    }
    main.favorites-view-mode .poster-rail {
      gap: 18px;
      width: 100%;
      margin-inline: 0;
      padding-inline: 0;
    }
    main.favorites-view-mode .sort-select-wrap,
    main.favorites-view-mode .filter-btn {
      min-height: 44px;
      padding-inline: 12px;
    }
  }
  .feed-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
  }
  .feed-section + .feed-section {
    margin-top: 44px;
    padding-top: 0;
    border-top: none;
  }
  .feed-section-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px 0;
  }
  .feed-section-title {
    font-family: var(--font-sans);
    /* 밀리식 큰 섹션 타이틀 — .curation-section-label과 위계 일치(폴백 렌더러 경로). */
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #18181B;
    flex: 1;
    min-width: 0;
  }
  .feed-section-title.is-accent {
    color: var(--ink);
  }
  .feed-section-copy {
    display: none;
  }
  /* Poster rail: the single home section card layout used by web and iOS. */
  .poster-rail {
    display: flex;
    flex-direction: row;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 18px 12px;
  }
  .poster-rail::-webkit-scrollbar { display: none; }
  .feed-poster-card {
    flex: 0 0 126px;
    width: 126px;
    min-width: 126px;
    position: relative;
    border: 0;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }
  .feed-poster-card:focus-visible .feed-poster-img {
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16);
  }
  .feed-poster-img {
    width: 126px;
    height: 158px;
    border-radius: 12px;
    overflow: hidden;
    background: #e8e2d6;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .feed-poster-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.16) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 220% 100%;
    animation: imageShimmer 1.5s linear infinite;
    transition: opacity 0.24s ease;
    pointer-events: none;
  }
  .feed-poster-img.is-loaded::after { opacity: 0; animation: none; }
  .feed-poster-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .feed-poster-img.is-loaded img { opacity: 1; }
  .feed-poster-card .fav-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: var(--accent);
    border: 1px solid rgba(39,70,109,0.14);
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    font-size: 17px;
    z-index: 2;
  }
  .feed-poster-card .fav-btn.active {
    background: var(--accent);
    color: white;
  }
  .feed-poster-body {
    padding-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }
  .feed-poster-category {
    display: none;
    width: fit-content;
    max-width: 100%;
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(23,23,23,0.18);
    border-radius: 999px;
    color: #52525B;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .feed-poster-title {
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.38;
    letter-spacing: -0.02em;
    color: #27272A;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .feed-poster-meta {
    font-size: 12px;
    font-weight: 500;
    color: #71717A;
    line-height: 1.45;
    letter-spacing: -0.02em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .section-title {
    font-family: var(--font-sans); font-size: 17px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  }
  .section-count {
    display: none;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    min-width: 0;
    text-align: left;
  }
  .section-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }
  .sort-filter-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .sort-select-wrap {
    position: relative;
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    height: 44px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    flex-shrink: 0;
    overflow: hidden;
  }
  .sort-select-wrap::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
  }
  .sort-select-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
  }
  .sort-select-label {
    position: absolute;
    inset: 0 22px 0 12px;
    display: flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: #52525B;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
  }

  .sort-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 16px;
    color: transparent;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    opacity: 0;
  }
  .filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 12px;
    min-width: 58px;
    height: 44px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    color: #52525B;
    letter-spacing: -0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  .filter-btn:focus,
  .filter-btn:focus-visible {
    outline: none;
    background: var(--card-bg);
    color: var(--muted);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
  }
  .filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
  .filter-btn.active:focus,
  .filter-btn.active:focus-visible {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.18);
  }
  .filter-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: white;
    display: none;
  }
  .filter-btn.active .filter-dot { display: block; }

  @media (hover: hover) and (pointer: fine) {
    .filter-btn:hover {
      background: var(--ink);
      color: var(--paper);
      border-color: var(--ink);
    }
    .filter-btn.active:hover {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }
  }

  .filter-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    animation: fadeUp 0.2s ease;
  }
  .filter-panel-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
  }
  .filter-section { margin-bottom: 14px; }
  .filter-section:last-child { margin-bottom: 0; }
  .filter-panel-note {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
  }
  .filter-days {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .day-chip {
    appearance: none;
    -webkit-appearance: none;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 999px;
    min-height: 42px;
    height: 42px;
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
    color: var(--ink);
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .day-chip.sun { color: var(--accent); border-color: rgba(200,64,26,0.3); }
  .day-chip.sat { color: var(--accent2); border-color: rgba(45,106,79,0.3); }
  .day-chip.active { background: var(--ink); border-color: var(--ink); color: white !important; }
  .day-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
  }
  .filter-date-row { display: flex; align-items: center; gap: 8px; }
  .filter-date-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 40px;
    padding: 10px 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    background: var(--paper);
    color: var(--ink);
    outline: none;
  }
  .filter-date-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.12);
  }
  .filter-actions { display: flex; gap: 8px; margin-top: 14px; }
  .btn-filter-apply {
    flex: 1;
    background: var(--ink);
    color: var(--paper);
    border: none;
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  .btn-filter-apply:hover { opacity: 0.85; }
  .btn-filter-apply:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.14);
  }
  .btn-filter-reset {
    background: none;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease-out, color 0.2s ease-out;
  }
  .btn-filter-reset:hover { border-color: var(--accent); color: var(--accent); }
  .btn-filter-reset:focus-visible {
    outline: none;
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.12);
  }

  /* 기본(홈) 행사 목록: 세로 포스터 카드 2열 그리드(검색 결과와 동일 패턴). */
  .events-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; align-items: start; position: relative; }
  /* 카드가 아닌 직계 자식(빈 상태·섹션 피드·로딩)은 2열에 갇히지 않게 전폭으로 — 좌측 쏠림 방지. */
  .events-grid > .empty-state,
  .events-grid > .feed-section,
  .events-grid > .search-loading {
    grid-column: 1 / -1;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .events-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
    align-items: start;
  }
  .events-grid.is-refreshing::after {
    content: '검색 조건 적용 중';
    position: sticky;
    bottom: calc(var(--bottom-nav-height, 96px) + 14px);
    grid-column: 1 / -1;
    justify-self: center;
    align-self: end;
    z-index: 5;
    padding: 9px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(24, 24, 27, 0.82);
    box-shadow: 0 10px 24px rgba(24, 24, 27, 0.14);
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
  }

  /* 기본(홈 "지금 뜨는 행사") 카드 — '오늘 바로 갈 수 있는 행사' 포스터 카드 스타일 채택.
     세로로 긴 포스터(이미지 위) + 제목/메타(아래), 박스 없이 배경에 떠있게. */
  .event-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    transition:
      transform 0.16s ease,
      opacity 0.18s ease,
      box-shadow 0.18s ease;
    cursor: pointer;
    position: relative;
    box-shadow: none;
  }
  .event-card:active {
    transform: translateY(1px) scale(0.985);
  }
  @media (hover: hover) and (pointer: fine) {
    .event-card:hover { transform: none; }
  }
  .event-card:focus-visible {
    outline: none;
    border-radius: 14px;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16);
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  @media (hover: hover) and (pointer: fine) {
    :is(main.search-results-mode, main.home-category-results-mode) .event-card:hover {
      transform: none;
      box-shadow: none;
    }
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card:focus-visible {
    border-radius: 14px;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16);
  }
  /* 이미지 없는 카드: 포스터 자리(세로 3/4) 플레이스홀더 */
  .event-card-accent {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    flex-shrink: 0;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card-accent {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    flex-shrink: 0;
  }
  .event-card-body {
    padding: 9px 2px 0;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card-body {
    padding: 10px 2px 0;
    gap: 5px;
  }

  .event-meta, .event-status-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .tag {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 999px;
  }
  .tag-performance { background: rgba(39,70,109,0.10); color: var(--accent); }
  .tag-exhibit { background: #e0ede6; color: #2d6a4f; }
  .tag-festival { background: #e8e4f5; color: #5b4db8; }
  .tag-class { background: #fef3cd; color: #856404; }
  .tag-film { background: #ddeeff; color: #1a5fa8; }
  .tag-other { background: #efefef; color: #666; }
  .tag-free {
    background: #e0ede6;
    color: #2d6a4f;
    font-weight: 600;
    letter-spacing: 0;
  }
  .event-card .tag-free { display: none; }
  /* 태그 다이어트: 카테고리는 메타 텍스트 줄로 이동했으므로 카드의 카테고리 pill은 숨김
     (상태/무료 pill만 남겨 "중요한 1개" 강조). 검색/카테고리 모드는 상태행 전체가 숨겨짐. */
  .event-card .event-status-row .status-pill.kind { display: none; }
  .event-card .event-status-row .status-pill.kind.is-ended { display: inline-flex; }
  .status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
  }
  .status-pill.kind {
    background: rgba(26,20,16,0.06);
    border-color: rgba(26,20,16,0.08);
    color: var(--muted);
  }
  .status-pill.live {
    background: rgba(39,70,109,0.10);
    color: var(--accent);
    border-color: rgba(39,70,109,0.18);
  }
  .status-pill.free {
    background: #e0ede6;
    color: #2d6a4f;
    border-color: rgba(45,106,79,0.18);
    font-weight: 600;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-status-row,
  :is(main.search-results-mode, main.home-category-results-mode) .event-context-line,
  :is(main.search-results-mode, main.home-category-results-mode) .event-recommend-reason,
  :is(main.search-results-mode, main.home-category-results-mode) .event-meta-inline,
  :is(main.search-results-mode, main.home-category-results-mode) .event-time-badge {
    display: none !important;
  }

  .event-title {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.36;
    color: #111827;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: pretty;
    min-height: 2.72em;
  }
  .event-title.is-long {
    font-size: 14px;
    line-height: 1.36;
    -webkit-line-clamp: 2;
  }
  /* 기본 리스트 카드: 카테고리·장소·날짜를 한 줄 회색 텍스트로. 나머지 메타행은 숨겨 단순화. */
  .event-meta-inline { display: none; }
  .event-card .event-meta-inline {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #71717A;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .event-card .event-status-row,
  .event-card .event-venue,
  .event-card .event-schedule,
  .event-card .event-context-line,
  .event-card .event-recommend-reason {
    display: none;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-title,
  :is(main.search-results-mode, main.home-category-results-mode) .event-title.is-long {
    font-size: 14px;
    line-height: 1.36;
    font-weight: 700;
    -webkit-line-clamp: 2;
    min-height: 2.72em;
  }
  .event-venue {
    font-size: 12px;
    font-weight: 500;
    color: #71717A;
    line-height: 1.45;
    min-height: 1.45em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-venue {
    font-size: 12px;
    line-height: 1.32;
    min-height: 1.32em;
  }
  .event-schedule {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #71717A;
    line-height: 1.32;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-schedule {
    display: block;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .event-schedule > span:first-child {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
  }
  .event-compact-meta {
    display: none;
    color: #71717A;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.34;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-compact-meta {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.68em;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-venue,
  :is(main.search-results-mode, main.home-category-results-mode) .event-schedule {
    display: none;
  }
  .event-time-badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(26,20,16,0.08);
    background: rgba(26,20,16,0.04);
    color: #71717A;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    box-sizing: border-box;
  }
  .event-context-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    margin-top: auto;
  }
  .event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
  }
  .event-district {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
  }
  .event-price {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
  }

  .event-recommend-reason {
    font-size: 11px;
    color: var(--accent);
    opacity: 0.85;
    margin-top: 5px;
    letter-spacing: 0.01em;
  }

  .loading-state { text-align: center; padding: 60px 20px; color: var(--muted); }
  .loading-spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .home-loading-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 4px;
  }
  .home-loading-stage {
    background: #ffffff;
    border: 1px solid rgba(23,23,23,0.08);
    border-radius: 22px;
    min-height: clamp(220px, 30vh, 320px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 20px 34px;
    box-shadow: 0 14px 28px rgba(26,20,16,0.05);
    position: relative;
    overflow: hidden;
  }
  .home-loading-stage::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 22px;
    width: 72px;
    height: 6px;
    border-radius: 999px;
    background: rgba(26,20,16,0.08);
    transform: translateX(-50%);
  }
  .home-loading-stage-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    margin-top: 14px;
  }
  .home-loading-spinner {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(26,20,16,0.08);
    border-top-color: var(--accent);
    border-right-color: rgba(26,20,16,0.14);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  .home-loading-stage-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .home-loading-stage-copy strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .home-loading-stage-copy span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
  }
  .home-loading-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 4px;
  }
  .home-loading-list .skeleton-card {
    height: 132px;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(26,20,16,0.04);
  }
  .home-loading-list .skeleton-img {
    width: 96px;
  }
  .home-loading-layer {
    position: relative;
    z-index: 30;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 16px 20px;
    background: var(--bg);
    opacity: 1;
    transition: opacity 0.22s ease;
  }
  .home-loading-layer.is-compact {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    z-index: 3000;
    padding: 0;
    pointer-events: none;
    background: transparent;
  }
  .home-loading-layer.is-leaving {
    opacity: 0;
  }
  .home-skeleton-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #ece9e3;
  }
  .skeleton-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.58), transparent);
    animation: skeletonShimmer 1.25s ease-in-out infinite;
  }
  @keyframes skeletonShimmer {
    100% { transform: translateX(100%); }
  }
  .home-skeleton-carousel {
    aspect-ratio: 4 / 3;
    min-height: 320px;
    max-height: 340px;
    border-radius: 18px;
  }
  .home-skeleton-theme-row {
    display: flex;
    gap: 14px;
    margin: -4px -16px 2px;
    padding: 0 16px 2px;
    overflow: hidden;
  }
  .home-skeleton-theme {
    flex: 0 0 72px;
    display: grid;
    justify-items: center;
    gap: 8px;
  }
  .home-skeleton-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
  }
  .home-skeleton-label {
    width: 54px;
    height: 12px;
    border-radius: 999px;
  }
  .home-skeleton-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .home-skeleton-heading {
    width: min(58vw, 240px);
    height: 24px;
    border-radius: 999px;
  }
  .home-skeleton-action {
    width: 66px;
    height: 16px;
    border-radius: 999px;
  }
  .home-skeleton-rail {
    display: flex;
    gap: 16px;
    margin: -8px -16px 0;
    padding: 0 20px 8px;
    overflow: hidden;
  }
  .home-skeleton-card {
    flex: 0 0 172px;
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .home-skeleton-poster {
    width: 172px;
    height: 218px;
    border-radius: 14px;
  }
  .home-skeleton-line {
    display: block;
    height: 13px;
    border-radius: 999px;
  }
  .home-skeleton-line.is-title {
    width: 88%;
  }
  .home-skeleton-line.is-meta {
    width: 64%;
    height: 11px;
  }
  .home-refresh-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 0 0 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(23,23,23,0.08);
    box-shadow: 0 10px 22px rgba(26,20,16,0.05);
  }
  .home-refresh-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(26,20,16,0.08);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
  }
  .home-refresh-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .home-refresh-copy strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
  }
  .home-refresh-copy span {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
  }

  .empty-state {
    text-align: center;
    padding: 44px 20px 48px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .empty-state-title { font-size: 15px; font-weight: 600; color: var(--ink); }
  .empty-state-body { font-size: 13px; line-height: 1.55; color: var(--muted); }
  .empty-state-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
  }
  .empty-state-suggestion {
    min-height: 44px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(39,70,109,0.14);
    background: #F0F5FA;
    color: #27466D;
    font-size: 12px;
    font-weight: 800;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  }
  .empty-state-suggestion:hover {
    background: #EAF1F8;
    border-color: rgba(39,70,109,0.22);
  }
  .empty-state-suggestion:focus-visible {
    outline: none;
    background: #EAF1F8;
    border-color: rgba(39,70,109,0.32);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.12);
  }
  .empty-state-suggestion:active {
    transform: scale(0.96);
    background: #E7EEF7;
  }
  .empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
  }
  .empty-state-reset {
    margin-top: 12px;
    min-height: 44px;
    padding: 9px 22px;
    border-radius: 99px;
    background: var(--ink);
    color: var(--paper);
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .empty-state-reset.is-secondary {
    background: var(--surface);
    color: var(--title);
    border: 1px solid var(--border);
  }
  .empty-state-reset:hover { opacity: 0.82; }
  :is(main.search-results-mode, main.home-category-results-mode) .events-grid .empty-state {
    grid-column: 1 / -1;
    width: 100%;
    min-height: calc(100vh - 260px);
    justify-content: center;
    padding: 56px 24px 120px;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .events-grid .empty-state-title {
    max-width: 260px;
    font-size: 16px;
    line-height: 1.35;
    word-break: keep-all;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .events-grid .empty-state-body {
    max-width: 260px;
    word-break: keep-all;
  }

  .search-loading-state {
    grid-column: 1 / -1;
    min-height: calc(100vh - 260px);
    padding: 58px 24px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    color: #71717A;
  }
  .search-loading-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(39,70,109,0.14);
    border-top-color: var(--accent);
    animation: search-spin 0.78s linear infinite;
  }
  .search-loading-title {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
  }
  .search-loading-body {
    max-width: 240px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
    word-break: keep-all;
  }
  @keyframes search-spin {
    to { transform: rotate(360deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .search-loading-spinner {
      animation: none;
    }
  }

  /* 신규 유저 취향 설정 유도 카드 */
  .curation-onboarding-nudge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(39,70,109,0.08), rgba(29,111,79,0.05));
    border: 1px solid rgba(39,70,109,0.14);
    cursor: pointer;
    transition: background 0.18s;
    margin-top: 4px;
  }
  .curation-onboarding-nudge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .curation-onboarding-nudge:hover { background: linear-gradient(135deg, rgba(39,70,109,0.12), rgba(29,111,79,0.08)); }
  .curation-onboarding-icon { font-size: 18px; flex-shrink: 0; color: #27466D; }
  .curation-onboarding-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
  }
  .curation-onboarding-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.4;
  }
  .curation-onboarding-arrow { font-size: 16px; color: var(--muted); flex-shrink: 0; margin-left: auto; }

  .error-state {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 16px;
    font-size: 13px;
    color: #c00;
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .connection-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
  }
  .connection-banner.demo {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #856404;
  }
  .connection-banner.live {
    display: none;
    background: #e0ede6;
    border: 1px solid #a8d5b8;
    color: #2d6a4f;
  }
  .connection-banner.offline {
    background: #f5f0eb;
    border: 1px solid #d4ccc4;
    color: #6b5e52;
  }
  .status-dot.offline { background: #aaa; }
  .status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .status-dot.demo { background: #f5a623; }
  .status-dot.live { background: #2d6a4f; animation: pulse 2s infinite; }
  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }

  .load-more {
    display: block;
    width: 100%;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
  }
  .load-more:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .load-more:active {
    background: var(--card-bg);
    color: var(--muted);
    border-color: var(--border);
    transform: translateY(1px);
  }
  .load-more:focus,
  .load-more:focus-visible {
    outline: none;
    background: var(--card-bg);
    color: var(--muted);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39,70,109,0.12);
  }

  .bottom-spacer { height: 90px; }

  .data-source {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 12px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }

  .bottom-nav {
    position: fixed;
    bottom: max(8px, calc(env(safe-area-inset-bottom, 0px) - 10px));
    left: 0;
    right: 0;
    width: min(calc(100% - 24px), 430px);
    height: 58px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-radius: 999px;
    border: 1px solid rgba(228, 228, 231, 0.82);
    box-shadow: 0 16px 42px rgba(24,24,27,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    z-index: 100;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  }
  body.search-layer-open .bottom-nav {
    transform: none;
  }
  .nav-indicator {
    display: none;
  }
  .nav-item {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    font-family: var(--font-sans);
    flex: 1;
    min-width: 0;
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--muted);
    border-radius: 999px;
    padding: 4px 0 3px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    position: relative;
    z-index: 1;
  }
  .nav-item.active {
    background: rgba(24, 24, 27, 0.07);
    color: var(--ink);
  }
  .nav-item:active {
    transform: translateY(1px) scale(0.96);
  }
  .nav-item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(39,70,109,0.24);
  }
  .nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.85;
    flex: 0 0 auto;
  }
  .nav-label {
    display: block;
    max-width: 100%;
    font-size: 10.5px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .nav-item.active .nav-label { font-weight: 700; }

  .event-detail-view {
    position: fixed;
    inset: 0;
    z-index: 1200;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--paper);
    color: var(--ink);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(100%, 0, 0);
    transition:
      transform 0.48s cubic-bezier(0.2, 0.84, 0.18, 1),
      opacity 0.28s ease;
    will-change: transform, opacity;
  }
  .event-detail-view.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }
  /* iOS 전용: 슬라이드 인을 spring으로 → 0 지점을 살짝 지나 폭신하게 안착 (웹은 위 cubic-bezier 유지) */
  html.native-ios .event-detail-view {
    transition:
      transform 0.52s var(--ease-spring-soft),
      opacity 0.26s ease;
  }
  @media (prefers-reduced-motion: reduce) {
    .event-detail-view,
    html.native-ios .event-detail-view {
      transition: none;
      transform: none;
    }
  }
  body.event-detail-open .bottom-nav {
    display: none !important;
  }
  .event-detail-view,
  .event-detail-view * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
  .event-detail-content {
    position: absolute;
    inset: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    background: var(--paper);
  }
  .event-detail-topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    min-height: calc(58px + env(safe-area-inset-top, 0px));
    padding: calc(9px + env(safe-area-inset-top, 0px)) 18px 9px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  }
  .event-detail-top-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .event-detail-round-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    cursor: pointer;
    transition:
      transform 0.16s ease,
      background 0.18s ease,
      box-shadow 0.18s ease;
  }
  .event-detail-round-btn:active {
    transform: translateY(1px) scale(0.94);
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  }
  .event-detail-round-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .event-detail-fav-btn.active svg {
    fill: currentColor;
  }
  .event-detail-sticky-fav > span[aria-hidden="true"] { display: inline-flex; }
  .event-detail-sticky-fav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .event-detail-sticky-fav.active svg { fill: currentColor; }
  .event-detail-hero {
    position: relative;
    height: clamp(300px, 43vh, 400px);
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
  }
  .event-detail-backdrop {
    position: absolute;
    inset: -28px;
    background-size: cover;
    background-position: center;
    filter: blur(28px) saturate(1.08);
    transform: scale(1.12);
    opacity: 0.58;
  }
  .event-detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at center, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.08) 56%, rgba(0,0,0,0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.02) 38%, rgba(0,0,0,0.28) 100%);
    pointer-events: none;
  }
  .event-detail-hero-img {
    position: relative;
    z-index: 1;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 18px 36px rgba(0,0,0,0.20));
  }
  .event-detail-placeholder {
    width: 100%;
    min-height: clamp(300px, 43vh, 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: rgba(255,255,255,0.86);
  }
  .event-detail-sheet {
    position: relative;
    z-index: 2;
    margin-top: -22px;
    padding: 22px 20px 22px;
    border-radius: 24px 24px 0 0;
    background: var(--paper);
  }
  .event-detail-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }
  .event-detail-badge {
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--title);
    background: var(--surface);
    letter-spacing: -0.02em;
  }
  .event-detail-badge.is-free {
    margin-left: auto;
    background: color-mix(in srgb, #22c55e 14%, var(--card-bg));
    color: #16a34a;
  }
  .event-detail-title {
    margin: 0;
    font-size: clamp(23px, 6vw, 30px);
    line-height: 1.2;
    font-weight: 820;
    letter-spacing: -0.035em;
    color: var(--ink);
  }
  .event-detail-section {
    margin-top: 24px;
  }
  .event-detail-section h2 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.3;
    color: var(--ink);
    letter-spacing: -0.03em;
  }
  .event-detail-info-card {
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 76%, var(--card-bg));
    border: 1px solid color-mix(in srgb, var(--border) 84%, transparent);
    padding: 4px 16px;
  }
  .event-detail-info-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  }
  .event-detail-info-row:last-child {
    border-bottom: 0;
  }
  .event-detail-info-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .event-detail-info-value {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
  }
  .event-detail-actions {
    display: grid;
    gap: 12px;
    margin-top: 26px;
  }
  .event-detail-action {
    min-height: 50px;
    border-radius: 17px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition:
      transform 0.16s ease,
      background 0.18s ease,
      color 0.18s ease,
      box-shadow 0.18s ease;
  }
  .event-detail-action:active {
    transform: translateY(1px) scale(0.985);
  }
  .event-detail-action.is-primary {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }
  .event-detail-sticky-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 32%);
    pointer-events: auto;
  }
  .event-detail-sticky-actions.has-primary {
    grid-template-columns: minmax(0, 1fr) 56px;
    align-items: center;
  }
  .event-detail-sticky-primary,
  .event-detail-sticky-fav {
    min-height: 52px;
    border-radius: 16px;
    border: 0;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0;
    cursor: pointer;
    transition:
      transform 0.16s ease,
      background 0.18s ease,
      color 0.18s ease,
      box-shadow 0.18s ease;
  }
  .event-detail-sticky-primary {
    background: var(--ink);
    color: var(--paper);
  }
  .event-detail-sticky-fav {
    background: color-mix(in srgb, var(--card-bg) 90%, transparent);
    color: var(--ink);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .event-detail-sticky-actions.has-primary .event-detail-sticky-fav {
    width: 56px;
    padding: 0;
    border-radius: 18px;
    font-size: 20px;
  }
  .event-detail-sticky-actions.has-primary .event-detail-fav-label {
    display: none;
  }
  .event-detail-sticky-fav.active {
    background: var(--accent);
    color: var(--paper);
  }
  .event-detail-sticky-primary:disabled { opacity: 0.45; cursor: default; }
  .event-detail-sticky-primary:not(:disabled):active,
  .event-detail-sticky-fav:active {
    transform: translateY(1px) scale(0.985);
  }

  .event-detail-view.open.is-detail-entering .event-detail-hero {
    animation: eventDetailHeroIn 0.46s cubic-bezier(0.32, 0.72, 0, 1) both;
  }
  .event-detail-view.open.is-detail-entering .event-detail-hero-img {
    animation: eventDetailImageIn 0.52s cubic-bezier(0.32, 0.72, 0, 1) both;
  }
  .event-detail-view.open.is-detail-entering .event-detail-sheet {
    animation: eventDetailSheetIn 0.46s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: 80ms;
  }
  .event-detail-view.open.is-detail-entering .event-detail-section {
    animation: eventDetailBlockIn 0.36s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: calc(150ms + var(--event-detail-section-delay, 0ms));
  }
  .event-detail-view.open.is-detail-entering .event-detail-info-row {
    animation: eventDetailRowIn 0.3s ease both;
    animation-delay: calc(190ms + var(--event-detail-section-delay, 0ms) + var(--event-detail-row-delay, 0ms));
  }
  .event-detail-view.open.is-detail-entering .event-detail-sticky-actions {
    animation: eventDetailStickyIn 0.34s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: 260ms;
  }

  @keyframes eventDetailHeroIn {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes eventDetailImageIn {
    from { opacity: 0; transform: translateY(10px) scale(0.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes eventDetailSheetIn {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes eventDetailBlockIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes eventDetailRowIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
  }
  @keyframes eventDetailStickyIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .event-card,
    .event-detail-round-btn,
    .event-detail-action,
    .event-detail-sticky-primary,
    .event-detail-sticky-fav {
      transition: none !important;
    }
    .event-detail-view.open.is-detail-entering .event-detail-hero,
    .event-detail-view.open.is-detail-entering .event-detail-hero-img,
    .event-detail-view.open.is-detail-entering .event-detail-sheet,
    .event-detail-view.open.is-detail-entering .event-detail-section,
    .event-detail-view.open.is-detail-entering .event-detail-info-row,
    .event-detail-view.open.is-detail-entering .event-detail-sticky-actions {
      animation: none !important;
    }
  }

  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 250;
    align-items: flex-end;
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--card-bg);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px 20px 40px;
    animation: slideUp 0.3s ease;
    position: relative;
    will-change: transform;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modal-tag-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .modal-tag-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
  }
  .modal-title { font-family: var(--font-sans); font-size: 20px; font-weight: 700; margin-bottom: 14px; line-height: 1.4; }
  .modal-detail { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; display: grid; gap: 8px; }
  .modal-detail-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }
  .modal-detail strong { color: var(--ink); font-weight: 700; }
  .detail-value { color: var(--muted); font-weight: 400; }
  .modal-price { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
  .btn-primary {
    display: block; width: 100%;
    background: var(--accent);
    color: white; border: none;
    border-radius: 8px; padding: 14px;
    font-family: var(--font-sans);
    font-size: 15px; font-weight: 500;
    cursor: pointer; text-align: center;
    text-decoration: none;
  }
  .fav-btn {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(23,23,23,0.12);
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 16px;
    line-height: 1;
    color: var(--ink);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(26,20,16,0.08);
    transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    z-index: 1;
  }
  .fav-btn::after { content: ''; position: absolute; inset: -7px; }
  .fav-btn:hover {
    background: #f4f4f5;
    border-color: rgba(23,23,23,0.16);
  }
  .fav-btn.active {
    background: #ffffff;
    border-color: rgba(23,23,23,0.12);
    color: var(--ink);
  }
  .fav-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16), 0 2px 10px rgba(26,20,16,0.08);
  }
  .fav-btn:active { transform: scale(0.96); }
  .modal-secondary-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }
  .modal-secondary-btn {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--ink);
    border-radius: 14px;
    padding: 13px 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  }
  .modal-secondary-btn:hover {
    background: #f4f4f5;
    border-color: rgba(23,23,23,0.16);
  }
  .modal-secondary-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(39,70,109,0.16);
  }
  .modal-secondary-btn:active { transform: scale(0.98); }
  .modal-fav-btn {
    position: static;
    margin-left: 0;
    margin-right: 0;
    color: var(--ink);
  }
  .modal-fav-btn.active {
    background: #ffffff;
    border-color: rgba(23,23,23,0.12);
    color: var(--ink);
  }
  .fav-btn[disabled] { opacity: 1; pointer-events: none; }
  .modal-actions { display: flex; gap: 8px; margin-bottom: 4px; }
  .modal-actions > a, .modal-actions > button {
    flex: 1; min-width: 0;
    border-radius: 8px; padding: 13px 8px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 500;
    cursor: pointer; text-align: center;
    text-decoration: none; border: none;
    transition: opacity 0.15s;
  }
  .modal-actions > a:active, .modal-actions > button:active { opacity: 0.8; }
  .btn-booking { background: var(--accent); color: white; }
  .btn-naver-search { background: #03C75A; color: white; }
  .btn-share {
    display: block; width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--ink);
    border-radius: 14px; padding: 13px;
    font-family: var(--font-sans);
    font-size: 14px; font-weight: 600;
    cursor: pointer; text-align: center;
    transition: background 0.15s;
  }
  .btn-share:active { background: var(--surface); }
  .toast-msg {
    position: fixed;
    bottom: var(--toast-bottom-offset);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    max-width: min(calc(100vw - 40px), 420px);
    background: rgba(30,30,30,0.88);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 9999;
  }
  .toast-msg.show {
    opacity: 1; transform: translateX(-50%) translateY(0);
  }
  body.event-detail-open .toast-msg {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  }
  .toast-msg.has-action {
    pointer-events: auto;
    width: max-content;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 6px;
  }
  .toast-action {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
  }
  .toast-action:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
  main.home-category-results-mode .section-count,
  .state-filtered .section-count {
    display: block;
  }
  main.search-results-mode .section-count { display: none; }
  .view-hidden { display: none !important; }

  .event-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 0;
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
    background: var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(23,23,23,0.06);
  }
  .event-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.16) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 220% 100%;
    animation: imageShimmer 1.5s linear infinite;
    transition: opacity 0.24s ease;
    pointer-events: none;
  }
  .event-card-img.is-loaded::after { opacity: 0; animation: none; }
  .event-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.32s ease, transform 0.32s ease;
    transform: scale(1.01);
    will-change: opacity;
  }
  .event-card-img.is-loaded img {
    opacity: 1;
    transform: scale(1);
    will-change: auto;
  }
  @keyframes imageShimmer {
    from { background-position: 200% 0; }
    to   { background-position: -20% 0; }
  }
  #eventsGrid {
    transition: none;
  }
  #eventsGrid.loading-fade {
    opacity: 1;
    pointer-events: auto;
  }
  .skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    height: 126px;
    overflow: hidden;
  }
  .skeleton-img {
    width: 90px;
    flex-shrink: 0;
    background: var(--border);
    position: relative;
    overflow: hidden;
  }
  .skeleton-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 8%, rgba(255,255,255,0.16) 18%, rgba(255,255,255,0.04) 33%);
    background-size: 220% 100%;
    animation: imageShimmer 1.5s linear infinite;
  }
  .skeleton-body {
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(110deg, rgba(0,0,0,0.04) 8%, rgba(0,0,0,0.08) 18%, rgba(0,0,0,0.04) 33%);
    background-size: 220% 100%;
    animation: imageShimmer 1.5s linear infinite;
  }
  .skeleton-line.w60 { width: 60%; }
  .skeleton-line.w80 { width: 80%; }
  .skeleton-line.w40 { width: 40%; }

  .event-card.removing {
    opacity: 0 !important;
    pointer-events: none;
    overflow: hidden;
    border-width: 0;
    transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .event-card-img.grad-performance,
  .poster-card-img-fallback.grad-performance { background: linear-gradient(135deg,#fde8e0,#f5c2b0); }
  .event-card-img.grad-exhibit,
  .poster-card-img-fallback.grad-exhibit { background: linear-gradient(135deg,#e0ede6,#b8d4c4); }
  .event-card-img.grad-festival,
  .poster-card-img-fallback.grad-festival { background: linear-gradient(135deg,#f9e2ed,#f0b8d0); }
  .event-card-img.grad-class,
  .poster-card-img-fallback.grad-class { background: linear-gradient(135deg,#fef3cd,#fad98a); }
  .event-card-img.grad-film,
  .poster-card-img-fallback.grad-film { background: linear-gradient(135deg,#ddeeff,#a8ccf0); }
  .event-card-img.grad-other,
  .poster-card-img-fallback.grad-other { background: linear-gradient(135deg,#efefef,#d8d8d8); }
  .event-card-img .img-icon { font-size: 15px; font-weight: 700; opacity: 0.45; font-family: var(--font-sans); letter-spacing: -0.5px; }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(23,23,23,0.08);
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card-img img {
    border-radius: inherit;
  }
  .event-card.has-img .fav-btn {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  }
  /* 포스터 카드: 찜 버튼은 이미지 우상단(기본 top/right 8px) */
  .event-card .fav-btn {
    top: 8px;
    right: 8px;
  }
  :is(main.search-results-mode, main.home-category-results-mode) .event-card .fav-btn {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 4px 14px rgba(23,23,23,0.12);
  }


/* styles/40-calendar-map.css */
  .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }
  .cal-month-label {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 600;
  }
  .cal-nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 32px; height: 32px;
    cursor: pointer;
    color: var(--ink);
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    position: relative;
  }
  .cal-nav-btn::after { content: ''; position: absolute; inset: -6px; }
  .cal-nav-btn:hover { background: var(--ink); color: var(--paper); }
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 20px;
  }
  .cal-day-header {
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    padding: 4px 0 8px;
  }
  .cal-day-header:first-child { color: var(--accent); }
  .cal-day-header:last-child  { color: #2d6a4f; }
  .cal-cell {
    position: relative;
    min-height: 44px;
    border-radius: 6px;
    padding: 4px 2px;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.15s;
  }
  .cal-cell:not(.other-month) { cursor: pointer; }
  .cal-cell.has-events:hover  { background: rgba(200,64,26,0.07); }
  .cal-cell.has-events:active { background: rgba(200,64,26,0.14); }
  .cal-cell.selected {
    background: transparent !important;
  }
  .cal-cell.selected .cal-date-num,
  .cal-cell.today-active .cal-date-num {
    background: var(--ink);
    color: var(--paper);
    border-radius: 50%;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
  }
  .cal-date-num {
    font-size: 12px;
    color: var(--ink);
    line-height: 1;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
  }
  .cal-cell.other-month .cal-date-num { color: var(--border); }
  .cal-sun .cal-date-num { color: var(--accent); }
  .cal-sat .cal-date-num { color: #2d6a4f; }
  .cal-cell.selected.today-active .cal-date-num { color: var(--paper) !important; }
  .cal-cell.today:not(.selected) .cal-date-num {
    background: transparent;
    color: var(--ink);
  }
  .cal-day-list-header {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }

  /* ── 지도 뷰 레이아웃 (오버레이 바텀 시트 구조) ── */
  .map-shell {
    position: relative;
    /* JS에서 header+nav 높이 계산 후 style.height로 덮어씀 */
    height: calc(100vh - 56px - 66px - env(safe-area-inset-bottom, 0px));
    min-height: 400px;
    margin: -14px -16px 0; /* main 패딩 상쇄 */
    overflow: hidden;
    background: var(--border);
    isolation: isolate;
  }
  body.map-view-active #mapContainer {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    overflow: hidden;
  }
  body.map-view-active .map-shell {
    width: 100vw;
    min-height: 100vh;
    margin: 0;
  }
  body.map-view-active #mapContainer > .loading-state {
    min-height: 100vh;
    padding: 0 20px calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 36px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1.45;
  }
  body.map-view-active #mapContainer > .map-load-failure {
    min-height: 100vh;
    padding: 0 28px calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 56px);
    justify-content: center;
    background: var(--paper);
  }
  .map-load-failure .empty-state-body {
    max-width: 280px;
    word-break: keep-all;
  }
  .map-surface {
    position: absolute;
    inset: 0;
  }
  #kakaoMap {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--border);
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
    transform: translateZ(0);
    backface-visibility: hidden;
  }
  /* 베이스 지도 톤다운: 원격 카카오 타일 img만 채도/대비를 낮춰 차분하게(당근식 뮤트 배경).
     우리 행사 마커는 data:image/svg+xml URI라 제외 → 선명하게 떠 보임. 클러스터/내위치는 div라 무영향. */
  #kakaoMap img:not([src^="data:"]) {
    filter: saturate(0.85) brightness(1.02) contrast(0.96);
  }
  .map-surface.is-scroll-guard #kakaoMap { pointer-events: auto; }

  /* 툴바 — 지도 위 고정 */
  .map-toolbar {
    position: absolute;
    top: calc(var(--safe-top) + clamp(10px, 2.2vh, 18px));
    left: 0;
    right: 0;
    padding: 0 max(12px, env(safe-area-inset-left, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
    z-index: 6;
    pointer-events: none;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .map-toolbar::before,
  .map-toolbar::after {
    content: none;
    display: none;
  }
  .map-toolbar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 8px;
    scrollbar-width: none;
    pointer-events: auto;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .map-toolbar-row::-webkit-scrollbar { display: none; }
  .map-toolbar-chip {
    border: 1px solid rgba(23,23,23,0.10);
    background: #ffffff;
    color: var(--ink);
    border-radius: 999px;
    min-height: 38px;
    padding: 0 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(24,24,27,0.035);
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
      transform 0.16s ease,
      box-shadow 0.18s ease,
      background 0.18s ease,
      border-color 0.18s ease,
      color 0.18s ease;
  }
  .map-toolbar-chip:active {
    transform: translateY(1px) scale(0.97);
  }
  .map-toolbar-chip:focus-visible {
    outline: 2px solid rgba(39,70,109,0.34);
    outline-offset: 2px;
  }
  html body.map-view-active .map-toolbar,
  html body.map-view-active .map-toolbar-row {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html body.map-view-active .map-toolbar-chip {
    background: #ffffff !important;
    color: #18181B !important;
    border-color: rgba(23,23,23,0.10) !important;
    box-shadow: 0 1px 4px rgba(24,24,27,0.035) !important;
  }
  body.map-view-active .map-toolbar-chip {
    background: #ffffff;
    color: #18181B;
    border-color: rgba(23,23,23,0.10);
  }
  .map-toolbar-chip.active {
    background: #27466D;
    color: var(--paper);
    border-color: #27466D;
    box-shadow: 0 8px 18px rgba(39,70,109,0.18);
  }
  body.map-view-active .map-toolbar-chip.active {
    background: #27466D;
    color: #ffffff;
    border-color: #27466D;
  }
  html body.map-view-active .map-toolbar-chip.active {
    background: #27466D !important;
    color: #ffffff !important;
    border-color: #27466D !important;
  }

  /* "이 지역에서 재검색" 버튼 */
  .map-research-btn {
    position: absolute;
    top: calc(var(--safe-top) + 62px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: 0 1px 4px rgba(24,24,27,0.035);
    z-index: 5;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.22s cubic-bezier(0.32, 0.72, 0, 1),
      box-shadow 0.18s ease;
    transform: translateX(-50%) translateY(-8px) scale(0.96);
  }
  .map-research-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .map-research-btn:focus-visible {
    outline: 2px solid rgba(39, 70, 109, 0.32);
    outline-offset: 3px;
  }
  .map-research-btn:active {
    transform: translateX(-50%) translateY(1px) scale(0.98);
  }

  .map-location-btn {
    position: absolute;
    left: 14px;
    bottom: calc(var(--map-sheet-min-visible, 20%) + 18px);
    width: 46px;
    height: 46px;
    border: 1px solid rgba(23,23,23,0.10);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(24,24,27,0.16);
    z-index: 7;
    cursor: pointer;
    transition:
      transform 0.16s ease,
      box-shadow 0.2s ease,
      background 0.18s ease;
  }
  .map-location-btn:active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 0 6px 16px rgba(24,24,27,0.18);
  }
  .map-location-btn:disabled,
  .map-location-btn.is-pending {
    cursor: progress;
    opacity: 0.72;
  }
  .map-location-btn svg {
    width: 24px;
    height: 24px;
  }
  .map-user-location-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #27466D;
    border: 4px solid #fff;
    box-shadow: 0 0 0 8px rgba(39,70,109,0.18), 0 8px 20px rgba(24,24,27,0.18);
  }
  .map-user-location-dot span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #27466D;
  }

  /* ── 바텀 시트 ── */
  .map-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100%;
    background: var(--paper);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 36px rgba(24,24,27,0.14);
    /* 초기: minimum, JS가 화면 높이에 맞춘 snap 값으로 덮어씀 */
    transform: translateY(calc(100% - 128px));
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
    backface-visibility: hidden;
    contain: layout paint;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* 드래그 핸들 */
  .map-sheet-handle {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    cursor: grab;
    flex-shrink: 0;
    touch-action: none;
    user-select: none;
  }
  .map-sheet-handle:focus-visible {
    outline: 2px solid rgba(39,70,109,0.32);
    outline-offset: -4px;
  }
  .map-sheet-handle-bar {
    width: 36px; height: 4px;
    background: rgba(24,24,27,0.15);
    border-radius: 2px;
    transition:
      width 0.18s ease,
      background 0.18s ease,
      transform 0.18s ease;
  }
  .map-sheet.is-dragging .map-sheet-handle-bar {
    width: 48px;
    background: rgba(39,70,109,0.32);
    transform: scaleY(1.15);
  }

  .map-sheet[data-state="minimum"] .map-sheet-peek,
  .map-sheet[data-state="medium"] .map-sheet-peek,
  .map-sheet[data-state="maximum"] .map-sheet-peek {
    display: flex;
    flex-direction: column;
  }
  .map-sheet[data-state="minimum"] .map-sheet-list-wrap {
    display: none;
  }
  .map-sheet[data-state="minimum"] .map-sheet-peek-row {
    display: none;
  }
  .map-sheet[data-state="medium"] .map-sheet-list-wrap,
  .map-sheet[data-state="maximum"] .map-sheet-list-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }

  /* Peek 콘텐츠 (가로 썸네일 스크롤) */
  .map-sheet-peek {
    padding: 2px clamp(14px, 4vw, 22px) 10px;
    gap: 8px;
    flex-shrink: 0;
  }
  .map-sheet-peek-info {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    min-height: 22px;
    display: flex;
    align-items: center;
  }
  .map-sheet-peek-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .map-sheet-peek-row::-webkit-scrollbar { display: none; }
  .map-sheet-feature-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 64px;
    padding: 9px 12px;
    border-radius: 14px;
    background: #f4f4f5;
    transition:
      transform 0.18s ease,
      background 0.18s ease,
      box-shadow 0.18s ease;
  }
  .map-sheet-feature-card.is-empty {
    grid-template-columns: minmax(0, 1fr);
  }
  .map-sheet-feature-thumb {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
  .map-sheet-feature-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .map-sheet-feature-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
  }
  .map-sheet-feature-copy span,
  .map-sheet-feature-copy em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.35;
  }
  .map-sheet-feature-copy strong {
    color: var(--ink);
    font-size: clamp(14px, 3.4vw, 16px);
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .map-thumb-card {
    flex-shrink: 0;
    width: 82px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    transition: transform 0.16s ease, opacity 0.18s ease;
  }
  .map-thumb-card:active {
    transform: translateY(1px) scale(0.98);
  }
  .map-thumb-img {
    width: 82px; height: 82px;
    border-radius: 12px;
    background: var(--border) center/cover no-repeat;
    margin-bottom: 5px;
  }
  .map-thumb-title {
    font-size: 11px;
    line-height: 1.4;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 리스트 섹션 (medium/maximum) */
  .map-sheet-list-wrap {
    padding: 0 clamp(14px, 4vw, 22px);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .map-sheet-list-title {
    font-size: clamp(18px, 4.6vw, 22px);
    font-weight: 800;
    color: var(--ink);
    padding: 12px 0 14px;
    flex-shrink: 0;
    letter-spacing: -0.02em;
  }
  .map-sheet-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 18px 14px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  body.native-glass-nav-active .map-sheet-list,
  html.native-glass-nav-active .map-sheet-list {
    padding-bottom: calc(var(--native-bottom-nav-height) + 24px);
  }
  body.map-view-active .map-sheet-list {
    padding-bottom: calc(var(--floating-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
  }
  body.map-view-active #mapContainer {
    overflow: hidden;
  }
  .map-sheet-list > .empty-state {
    grid-column: 1 / -1;
  }

  /* 결과 카드 */
  .map-result-item {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0;
    border-radius: 16px;
    background: transparent;
    border: 0;
    cursor: pointer;
    box-shadow: none;
    min-width: 0;
    text-align: left;
    transition:
      transform 0.16s ease,
      opacity 0.18s ease;
  }
  .map-result-item:active {
    transform: translateY(1px) scale(0.985);
  }
  .map-result-thumb {
    width: 100%;
    aspect-ratio: 0.82;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    background: #ECE7DE;
    display: grid;
    place-items: center;
    color: #71717A;
    font-size: 11px;
    font-weight: 700;
  }
  .map-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .map-result-copy { min-width: 0; }
  .map-result-item strong {
    display: block;
    font-size: clamp(14px, 3.7vw, 17px);
    line-height: 1.35;
    margin-bottom: 5px;
    color: var(--ink);
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .map-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .map-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(26,20,16,0.06);
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
  }
  .map-result-place {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .map-sheet.is-selection-entering .map-sheet-feature-card {
    animation: mapFeatureCardIn 0.34s cubic-bezier(0.32, 0.72, 0, 1) both;
  }
  .map-sheet.is-selection-entering .map-sheet-list-title {
    animation: mapSheetTitleIn 0.32s ease both;
  }
  .map-sheet.is-selection-entering .map-thumb-card {
    animation: mapThumbCardIn 0.36s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: var(--map-thumb-delay, 0ms);
  }
  .map-sheet.is-selection-entering .map-result-item.is-motion-sequenced {
    animation: mapResultItemIn 0.38s cubic-bezier(0.32, 0.72, 0, 1) both;
    animation-delay: var(--map-result-delay, 0ms);
  }
  .map-sheet.is-selection-entering[data-selection-source="venue"] .map-sheet-feature-card,
  .map-sheet.is-selection-entering[data-selection-source="cluster"] .map-sheet-feature-card {
    box-shadow: 0 10px 24px rgba(39,70,109,0.12);
  }

  @keyframes mapFeatureCardIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes mapSheetTitleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes mapThumbCardIn {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes mapResultItemIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .map-toolbar-chip,
    .map-research-btn,
    .map-location-btn,
    .map-sheet,
    .map-sheet-handle-bar,
    .map-sheet-feature-card,
    .map-thumb-card,
    .map-result-item {
      transition: none !important;
    }
    .map-sheet.is-selection-entering .map-sheet-feature-card,
    .map-sheet.is-selection-entering .map-sheet-list-title,
    .map-sheet.is-selection-entering .map-thumb-card,
    .map-sheet.is-selection-entering .map-result-item.is-motion-sequenced {
      animation: none !important;
    }
  }

  @media (max-width: 360px) {
    .map-toolbar {
      top: calc(var(--safe-top) + 10px);
      padding-inline: 10px;
    }
    .map-toolbar-chip {
      min-height: 34px;
      padding: 0 12px;
      font-size: 12px;
    }
    .map-sheet {
      border-radius: 18px 18px 0 0;
    }
    .map-sheet-peek {
      padding-inline: 12px;
    }
    .map-sheet-list-wrap {
      padding-inline: 12px;
    }
    .map-sheet-list {
      gap: 14px 10px;
    }
    .map-sheet-feature-card {
      min-height: 70px;
      padding: 10px 12px;
      grid-template-columns: 46px minmax(0, 1fr);
    }
    .map-sheet-feature-thumb {
      width: 46px;
      height: 46px;
    }
  }

  @media (max-height: 680px) {
    .map-sheet-handle {
      padding: 8px 0 4px;
    }
    .map-sheet-feature-card {
      min-height: 60px;
      padding-block: 8px;
    }
    .map-thumb-img {
      width: 72px;
      height: 72px;
    }
    .map-thumb-card {
      width: 72px;
    }
    .map-sheet-list-title {
      padding: 8px 0 10px;
    }
  }

  @media (min-width: 600px) {
    .map-toolbar {
      padding-inline: clamp(18px, 5vw, 34px);
    }
    .map-sheet-peek,
    .map-sheet-list-wrap {
      padding-inline: clamp(22px, 6vw, 40px);
    }
    .map-sheet-list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px 16px;
    }
  }

  @media (min-width: 840px) {
    .map-sheet-list {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }


/* styles/50-profile-feedback.css */
  .profile-view {
    min-height: 220px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
  }
  .login-section { text-align: center; padding: 36px 8px 20px; }
  .login-section h2 {
    font-family: var(--font-sans);
    font-size: 20px; font-weight: 700; margin-bottom: 8px;
  }
  .login-section p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
  .btn-kakao {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; background: #FEE500; color: #3C1E1E;
    border: none; border-radius: 8px; padding: 14px 20px;
    font-family: var(--font-sans); font-size: 15px; font-weight: 700;
    cursor: pointer; margin-bottom: 10px; transition: opacity 0.2s;
  }
  .btn-kakao:hover { opacity: 0.88; }
  .btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; background: white; color: #3c4043;
    border: 1px solid var(--border); border-radius: 8px; padding: 14px 20px;
    font-family: var(--font-sans); font-size: 15px; font-weight: 500;
    cursor: pointer; margin-bottom: 10px; transition: box-shadow 0.2s;
  }
  .btn-google:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
  .btn-apple {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; background: #000; color: #fff;
    border: none; border-radius: 8px; padding: 14px 20px;
    font-family: var(--font-sans); font-size: 15px; font-weight: 500;
    cursor: pointer; margin-bottom: 10px; transition: opacity 0.2s;
  }
  .btn-apple:hover { opacity: 0.85; }
  .auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 12, 9, 0.66);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }
  .auth-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  .auth-overlay-card {
    width: min(100%, 420px);
    background: rgba(255, 250, 244, 0.98);
    border: 1px solid rgba(97, 72, 52, 0.18);
    border-radius: 24px;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 70px rgba(17, 13, 10, 0.22);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.24s ease;
  }
  .auth-overlay.is-visible .auth-overlay-card {
    transform: translateY(0) scale(1);
  }
  .auth-overlay-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(200, 64, 26, 0.08);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .auth-overlay-title {
    margin: 18px 0 10px;
    font-family: var(--font-sans);
    font-size: 28px;
    line-height: 1.28;
    font-weight: 600;
    color: #19120f;
  }
  .auth-overlay-body {
    margin: 0;
    color: #6c5a4f;
    font-size: 14px;
    line-height: 1.8;
  }
  .auth-overlay-provider {
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 14px;
    background: #fee500;
    color: #3c1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
  }
  .auth-overlay-status {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(26, 20, 16, 0.04);
    border: 1px solid rgba(26, 20, 16, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4e4037;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
  }
  .auth-overlay-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 0 rgba(200, 64, 26, 0.28);
    animation: authPulse 1.4s ease-in-out infinite;
  }
  @keyframes authPulse {
    0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(200, 64, 26, 0.30); }
    70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(200, 64, 26, 0); }
    100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(200, 64, 26, 0); }
  }
  .auth-overlay-note {
    margin-top: 14px;
    color: #857366;
    font-size: 12px;
    line-height: 1.7;
  }
  .auth-overlay-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
  }
  .auth-overlay-button {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
  }
  .auth-overlay-button:hover { opacity: 0.92; }
  .auth-overlay-button:active { transform: translateY(1px); }
  .auth-overlay-button.primary {
    background: var(--accent);
    color: #ffffff;
  }
  .auth-overlay-button.secondary {
    background: rgba(26, 20, 16, 0.06);
    color: #4e4037;
  }
  .auth-overlay-button[hidden] {
    display: none;
  }
  .login-divider {
    font-size: 11px; color: var(--muted); text-align: center;
    margin: 6px 0 14px; position: relative;
  }
  .login-divider::before, .login-divider::after {
    content: ''; position: absolute; top: 50%; width: 38%;
    height: 1px; background: var(--border);
  }
  .login-divider::before { left: 0; }
  .login-divider::after  { right: 0; }
  .sdk-notice {
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px;
    padding: 10px 12px; font-size: 12px; color: #856404;
    line-height: 1.6; margin-bottom: 10px; text-align: left;
  }
  .profile-view.authenticated {
    padding: 0 0 28px;
    margin-inline: -8px;
  }
  .profile-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 24px 8px;
  }
  .profile-avatar {
    width: 66px; height: 66px; border-radius: 50%; object-fit: cover;
    border: 1px solid rgba(24,24,27,0.08); flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(24,24,27,0.08);
  }
  .profile-avatar-placeholder {
    width: 66px; height: 66px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e8724e);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: #fff; flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(200,64,26,0.16);
  }
  .profile-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .profile-name { font-family: var(--font-sans); font-size: 20px; font-weight: 700; line-height: 1.3; color: #111827; margin: 0; letter-spacing: -0.02em; }
  .profile-email { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
  .profile-provider {
    display: inline-flex; align-items: center; min-height: 22px;
    margin-top: 0; padding: 0 9px; border-radius: 999px;
    background: rgba(24,24,27,0.05); color: #52525B;
    font-size: 11px; font-weight: 600;
  }
  .profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 8px 28px;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .profile-stat-tile {
    appearance: none; -webkit-appearance: none;
    border: none; background: #F8F9FA;
    border-radius: 16px;
    min-height: 92px; padding: 20px 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px; cursor: pointer; color: var(--ink);
    font-family: var(--font-sans);
  }
  .profile-stat-tile strong { font-size: 24px; line-height: 1; font-weight: 700; color: #3B82F6; }
  .profile-stat-tile span { font-size: 13px; line-height: 1.25; font-weight: 500; color: #6B7280; text-align: center; }
  .profile-stat-tile:active { background: #F3F4F6; }
  .profile-saved-section { margin: 0 8px 30px; }
  .profile-section-head {
    appearance: none; -webkit-appearance: none;
    border: none; background: transparent;
    width: 100%; min-height: 36px; padding: 0 0 12px;
    display: flex; align-items: center; justify-content: space-between;
    color: var(--ink); font-family: var(--font-sans); cursor: pointer;
  }
  .profile-section-head span { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
  .profile-section-head svg,
  .profile-menu-row svg {
    width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .profile-saved-rail {
    display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
    margin: 0 -8px; padding: 0 8px 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .profile-saved-rail::-webkit-scrollbar { display: none; }
  .profile-saved-rail .feed-poster-card { width: 132px; flex: 0 0 132px; }
  .profile-saved-rail .feed-poster-img { width: 132px; height: 170px; border-radius: 14px; }
  .profile-saved-rail .feed-poster-title { font-size: 14px; line-height: 1.4; }
  .profile-saved-rail .feed-poster-meta { font-size: 12px; }
  .profile-empty-row {
    padding: 18px 0 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    color: var(--muted); font-size: 13px;
  }
  .profile-menu-list {
    margin: 0 0 24px;
    border-top: 0;
  }
  .profile-menu-list .setting-row,
  .profile-menu-row {
    min-height: 58px;
    border: none;
    border-bottom: 1px solid #F3F4F6;
    background: transparent;
    padding: 0 8px;
  }
  .profile-menu-list .setting-row { padding: 18px 8px; }
  .profile-menu-list .setting-row:last-child,
  .profile-menu-row:last-child { border-bottom: 0; }
  .profile-menu-row {
    appearance: none; -webkit-appearance: none;
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    color: var(--ink); font-family: var(--font-sans); cursor: pointer;
  }
  .profile-menu-row span,
  .profile-menu-list .setting-label {
    font-size: 15px; font-weight: 500; color: #111827;
  }
  .profile-menu-row svg { color: #D1D5DB; }
  .profile-footer-actions {
    display: flex; align-items: center; justify-content: center; gap: 24px;
    margin-top: 32px;
    padding: 0 0 22px; color: #9CA3AF;
  }
  .profile-footer-actions button {
    appearance: none; -webkit-appearance: none;
    border: none; background: transparent; padding: 7px 2px;
    color: #9CA3AF; font-size: 13px; font-weight: 500;
    text-decoration: underline;
    font-family: var(--font-sans); cursor: pointer;
  }
  .profile-footer-actions button.danger { color: #9CA3AF; }
  .government-data-notice { margin: 20px 16px 8px; padding: 12px 0 0; border: 0; border-top: 1px solid #DCE6F2; border-radius: 0; background: transparent; color: #334155; font-size: 12px; line-height: 1.55; }
  .government-data-notice > strong { display: block; color: #111827; font-size: 13px; margin-bottom: 4px; }
  .government-data-notice p { margin: 0; }
  .government-data-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 12px; }
  .government-data-links a { display: inline-flex; align-items: center; min-height: 44px; color: #155EEF; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
  .government-disclaimer { padding-top: 11px; border-top: 1px solid #DCE6F2; color: #475569; }
  .government-disclaimer strong { color: #1E293B; }
  .delete-account-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1100;
    display: flex; align-items: center; justify-content: center;
  }
  .delete-account-dialog {
    background: var(--card-bg); border-radius: 16px; padding: 28px 24px;
    max-width: 320px; width: 90%; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.18);
  }
  .delete-account-dialog h3 { font-size: 18px; margin: 0 0 12px; color: var(--ink); }
  .delete-account-dialog p { font-size: 14px; color: var(--muted); margin: 0 0 24px; line-height: 1.6; }
  .delete-account-dialog .dialog-btns { display: flex; gap: 10px; }
  .delete-account-dialog .btn-cancel { flex: 1; padding: 12px; border-radius: 8px; border: 1.5px solid var(--border); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
  .delete-account-dialog .btn-confirm-delete { flex: 1; padding: 12px; border-radius: 8px; border: none; background: var(--accent); color: white; font-size: 14px; font-weight: 700; cursor: pointer; }
  .oauth-note { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.6; }

  .notif-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .notif-overlay.open { display: flex; }
  .notif-modal {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 32px 24px 24px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    animation: popIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  }
  @keyframes popIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
  }
  .notif-icon { font-size: 44px; margin-bottom: 14px; display: block; }
  .notif-modal h3 {
    font-family: var(--font-sans);
    font-size: 18px; font-weight: 700; margin-bottom: 10px; text-align: left;
  }
  .notif-modal p { font-size: 13px; color: var(--muted); line-height: 1.8; margin-bottom: 22px; text-align: left; }
  .notif-btn-row { display: flex; gap: 8px; }
  .btn-notif-yes {
    flex: 1; background: var(--accent); color: white; border: none;
    border-radius: 10px; padding: 12px;
    font-family: var(--font-sans); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s;
  }
  .btn-notif-yes:hover { opacity: 0.88; }
  .btn-notif-no {
    background: none; border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 16px; font-family: var(--font-sans);
    font-size: 14px; color: var(--muted); cursor: pointer; transition: border-color 0.2s ease-out;
  }
  .btn-notif-no:hover { border-color: var(--muted); }

  @media (max-width: 360px) {
    main { padding: 18px 12px calc(80px + env(safe-area-inset-bottom)); }
    .hero { padding: 8px 16px; }
    .quick-filter-block { padding: 0 16px; }
    .home-category-tabs,
    .filter-row.home-category-tabs { gap: 20px; }
    .home-category-tabs .chip { font-size: 14.5px; }
    .search-pill { min-height: 40px; padding: 0 14px 0 15px; font-size: 12px; }
    .search-pill-icon { width: 22px; height: 22px; }
    .search-pill-icon svg { width: 11px; height: 11px; }
    .search-bar input  { min-height: 38px; font-size: 13px; padding: 8px 12px; }
    .chip { min-height: 32px; padding: 0 11px; }
    .curation-grid { grid-template-columns: 1fr; }
    .sort-select-wrap { width: 84px; min-width: 84px; max-width: 84px; height: 44px; }
    .filter-btn { min-width: 54px; height: 44px; }
    .section-title { font-size: 15px; }
  .section-count { font-size: 10px; }
    .event-card-body .event-title { font-size: 14px; line-height: 1.42; }
    .bottom-nav { width: min(calc(100% - 20px), 430px); padding: 5px 7px; }
  }

  @supports (-webkit-touch-callout: none) {
    .search-bar input,
    .filter-date-input,
    input[type="text"],
    input[type="search"],
    input[type="date"],
    input[type="email"],
    textarea {
      font-size: 16px;
    }
  }

  .btn-feedback {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: none; border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; font-family: var(--font-sans);
    font-size: 14px; font-weight: 500; color: var(--ink);
    cursor: pointer; text-align: left; margin-top: 12px;
    transition: background 0.15s, border-color 0.15s;
  }
  .btn-feedback:hover { background: var(--surface); border-color: var(--muted); }
  .btn-feedback svg { flex-shrink: 0; opacity: 0.5; }
  .btn-feedback .btn-feedback-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
  .btn-preferences {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; font-family: var(--font-sans);
    font-size: 14px; font-weight: 500; color: var(--ink);
    cursor: pointer; text-align: left; margin-top: 12px;
    transition: background 0.15s, border-color 0.15s;
  }
  .btn-preferences:hover { background: var(--surface); border-color: var(--muted); }
  .btn-preferences svg { flex-shrink: 0; opacity: 0.55; }
  .btn-preferences strong { font-weight: 500; }
  .btn-preferences .btn-feedback-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
  .onboarding-overlay {
    display: none; position: fixed; inset: 0; z-index: 950;
    background: rgba(17,12,9,0.7); padding: 18px;
    align-items: center; justify-content: center;
  }
  .onboarding-overlay.open { display: flex; }
  .onboarding-overlay.is-profile-edit .onboarding-skip { display: none; }
  .onboarding-sheet {
    width: min(100%, 420px);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    background: var(--card-bg);
    color: var(--ink);
    border-radius: 22px;
    border: 1px solid rgba(26,20,16,0.08);
    padding: 20px 18px 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
    animation: fadeUp 0.2s ease;
  }
  .onboarding-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
  .onboarding-top-actions { display: inline-flex; align-items: center; gap: 8px; }
  .onboarding-progress { display: inline-flex; align-items: center; gap: 6px; }
  .onboarding-step-text { display: inline-flex; align-items: center; min-height: 20px; }
  .onboarding-dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(26,20,16,0.12); }
  .onboarding-dot.active { background: var(--accent); }
  .onboarding-skip {
    border: none; background: none; color: var(--muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; min-width: 44px; padding: 0 8px;
  }
  .onboarding-close { display: none; }
  .onboarding-eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
  }
  .onboarding-title {
    font-family: var(--font-sans); font-size: 22px; font-weight: 700;
    line-height: 1.28; letter-spacing: -0.02em; margin-bottom: 8px;
  }
  .onboarding-copy { font-size: 13px; line-height: 1.65; color: var(--muted); margin-bottom: 16px; }
  .onboarding-section { margin-top: 14px; }
  .onboarding-section-label { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
  .onboarding-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
  .onboarding-chip {
    appearance: none; -webkit-appearance: none;
    border: 1px solid var(--border); background: var(--paper); color: var(--ink);
    border-radius: 999px; min-height: 36px; padding: 0 13px;
    font-size: 12px; font-weight: 500; cursor: pointer; transition: background-color 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out, box-shadow 0.18s ease-out;
  }
  .onboarding-chip.active {
    background: var(--accent); color: white; border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(39,70,109,0.20);
  }
  .onboarding-chip.secondary.active {
    background: rgba(39,70,109,0.08); color: var(--accent);
    border-color: rgba(39,70,109,0.24); box-shadow: none;
  }
  .onboarding-chip:focus-visible,
  .onboarding-skip:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(39,70,109,0.16); }
  .onboarding-summary {
    margin-top: 16px; padding: 12px 13px; border-radius: 14px;
    background: var(--paper); border: 1px solid rgba(26,20,16,0.06);
    font-size: 12px; color: var(--muted); line-height: 1.6;
  }
  .onboarding-empty { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 12px 0 4px; }
  .onboarding-actions { display: flex; gap: 8px; margin-top: 18px; }
  .onboarding-btn {
    flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer;
  }
  .onboarding-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .onboarding-btn.primary[disabled],
  .onboarding-btn[disabled] { opacity: 0.45; cursor: default; }
  .onboarding-btn-subtle {
    border: none; background: none; color: var(--muted);
    font-size: 12px; font-weight: 500; margin-top: 10px; cursor: pointer;
  }
  .onboarding-nav-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; min-height: 44px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--paper);
    color: var(--ink); font-size: 15px; font-family: var(--font-sans);
    cursor: pointer; flex-shrink: 0;
  }
  .onboarding-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .feedback-overlay {
    display: none; position: fixed; inset: 0; z-index: 900;
    background: rgba(0,0,0,0.5); align-items: flex-end; justify-content: center;
  }
  .feedback-overlay.open { display: flex; }
  .feedback-sheet {
    background: var(--card-bg); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 480px; padding: 24px 20px 36px;
    animation: slideUp 0.25s ease;
  }
  .feedback-sheet h3 {
    font-family: var(--font-sans); font-size: 17px;
    font-weight: 700; margin-bottom: 18px;
  }
  .feedback-type-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .feedback-type-btn {
    padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
    background: none; font-family: var(--font-sans);
    font-size: 13px; cursor: pointer; color: var(--ink); transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
  }
  .feedback-type-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
  .feedback-textarea {
    width: 100%; min-height: 120px; border: 1px solid var(--border);
    border-radius: 10px; padding: 12px; font-family: var(--font-sans);
    font-size: 13px; color: var(--ink); background: var(--surface);
    resize: none; box-sizing: border-box; line-height: 1.6;
  }
  .feedback-textarea:focus { outline: none; border-color: var(--accent); }
  .feedback-contact {
    width: 100%; border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 13px; font-family: var(--font-sans); font-size: 13px;
    background: #fff; margin-bottom: 10px;
  }
  .feedback-contact:focus { outline: none; border-color: var(--accent); }
  .feedback-hint { font-size: 11px; color: var(--muted); margin: 6px 0 14px; }
  .feedback-btn-row { display: flex; gap: 8px; margin-top: 4px; }
  .btn-feedback-submit {
    flex: 1; background: var(--accent); color: white; border: none;
    border-radius: 10px; padding: 13px; font-family: var(--font-sans);
    font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity 0.2s;
  }
  .btn-feedback-submit:hover { opacity: 0.88; }
  .btn-feedback-cancel {
    background: none; border: 1px solid var(--border); border-radius: 10px;
    padding: 13px 18px; font-family: var(--font-sans);
    font-size: 14px; color: var(--muted); cursor: pointer;
  }
  .setting-row {
    display: flex; align-items: center; gap: 16px;
    justify-content: space-between;
    padding: 14px 0; border-bottom: 1px solid var(--border);
  }
  .setting-copy { flex: 1; min-width: 0; text-align: left; }
  .setting-label { flex: 1; font-size: 14px; font-weight: 500; text-align: left; }
  .setting-sub { font-size: 11px; color: var(--muted); }
  .setting-sub.status { min-width: 54px; text-align: right; }
  .setting-control {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  .notification-native-request-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    border-radius: 999px;
    padding: 9px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  }
  .toggle-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex-shrink: 0; }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; inset: 0; background: #d1d1d6;
    border-radius: 999px; cursor: pointer; transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.08);
  }
  .toggle-slider::before {
    content: ''; position: absolute; width: 27px; height: 27px;
    left: 2px; top: 2px; background: white; border-radius: 50%;
    transition: transform 0.2s ease; box-shadow: 0 3px 8px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.08);
  }
  .toggle-switch input:checked + .toggle-slider { background: #34c759; }
  .toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
  .toggle-switch input:disabled + .toggle-slider { opacity: 0.55; cursor: not-allowed; }

  .event-detail-topbar-spacer { display: block; width: 42px; height: 42px; }
  .government-data-details { margin-top: 10px; }
  .government-data-details summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
  }
  .government-data-details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .government-data-details[open] summary { margin-bottom: 4px; }


/* styles/60-adaptive-theme.css */
:root.theme-dark {
  --ink: #F5F5F7;
  --paper: #050507;
  --bg: #050507;
  --hero-surface: #151518;
  --surface: #1C1C20;
  --accent: #8FB7FF;
  --accent2: #C4A7FF;
  --muted: #A1A1AA;
  --title: #F4F4F5;
  --caption: #D4D4D8;
  --card-bg: #111114;
  --border: #2A2A30;
}

@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --ink: #F5F5F7;
    --paper: #050507;
    --bg: #050507;
    --hero-surface: #151518;
    --surface: #1C1C20;
    --accent: #8FB7FF;
    --accent2: #C4A7FF;
    --muted: #A1A1AA;
    --title: #F4F4F5;
    --caption: #D4D4D8;
    --card-bg: #111114;
    --border: #2A2A30;
  }
}

/* Final dark-mode polish: keep text-tab navigation, explore, and SDUI cards readable. */
html.theme-dark .home-category-tabs .chip,
html.theme-dark .home-category-tabs .chip:hover,
html.theme-dark .home-category-tabs .chip.active {
  background: transparent;
  box-shadow: none;
  border-left-color: transparent;
  border-right-color: transparent;
  border-top-color: transparent;
}

html.theme-dark .home-category-tabs .chip {
  color: #8E8E99;
  border-bottom-color: transparent;
}

html.theme-dark .home-category-tabs .chip.active,
html.theme-dark .home-category-tabs .chip:hover {
  color: #F5F5F7;
  border-bottom-color: #F5F5F7;
}

html.theme-dark :is(.search-layer-header, .search-layer-body) {
  background: #050507;
  color: var(--ink);
}

html.theme-dark .search-layer-header {
  border-bottom-color: rgba(255,255,255,0.10);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.theme-dark :is(
  .search-layer-section-head > span,
  .search-chip,
  .search-chip-suggest,
  .explore-shortcut,
  .explore-shortcut-label,
  .explore-shortcut-icon,
  .explore-promo-copy strong,
  .explore-category-chip,
  .home-avatar-chip,
  .home-avatar-chip-label,
  .home-ticker-item,
  .home-ranking-index,
  .home-ranking-copy strong,
  .feed-poster-title,
  .event-title,
  .profile-empty-row
) {
  color: var(--ink);
}

html.theme-dark :is(
  .search-chip,
  .search-chip-suggest,
  .explore-shortcut-icon,
  .explore-promo-card,
  .explore-category-chip,
  .home-ranking-item,
  .profile-menu-list,
  .profile-empty-row
) {
  background: #151518;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}

html.theme-dark .explore-promo-kicker {
  color: #D4D4D8;
  border-color: rgba(255,255,255,0.16);
}

html.theme-dark .explore-promo-copy span:last-child {
  color: var(--muted);
}

html.theme-dark .home-text-ticker {
  background: #151518;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.30);
}

html.theme-dark .home-text-ticker::before {
  background: linear-gradient(90deg, #151518, rgba(21,21,24,0));
}

html.theme-dark .home-text-ticker::after {
  background: linear-gradient(270deg, #151518, rgba(21,21,24,0));
}

html.theme-dark .home-ticker-item::before {
  background: #8FB7FF;
  opacity: 0.84;
}

html.theme-dark :is(
  .home-ranking-copy small,
  .feed-poster-meta,
  .event-venue,
  .event-schedule,
  .profile-menu-row svg
) {
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .home-category-tabs .chip,
  html:not(.theme-light) .home-category-tabs .chip:hover,
  html:not(.theme-light) .home-category-tabs .chip.active {
    background: transparent;
    box-shadow: none;
    border-left-color: transparent;
    border-right-color: transparent;
    border-top-color: transparent;
  }

  html:not(.theme-light) .home-category-tabs .chip {
    color: #8E8E99;
    border-bottom-color: transparent;
  }

  html:not(.theme-light) .home-category-tabs .chip.active,
  html:not(.theme-light) .home-category-tabs .chip:hover {
    color: #F5F5F7;
    border-bottom-color: #F5F5F7;
  }

  html:not(.theme-light) :is(.search-layer-header, .search-layer-body) {
    background: #050507;
    color: var(--ink);
  }

  html:not(.theme-light) .search-layer-header {
    border-bottom-color: rgba(255,255,255,0.10);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html:not(.theme-light) :is(
    .search-layer-section-head > span,
    .search-chip,
    .search-chip-suggest,
    .explore-shortcut,
    .explore-shortcut-label,
    .explore-shortcut-icon,
    .explore-promo-copy strong,
    .explore-category-chip,
    .home-avatar-chip,
    .home-avatar-chip-label,
    .home-ticker-item,
    .home-ranking-index,
    .home-ranking-copy strong,
    .feed-poster-title,
    .event-title,
    .profile-empty-row
  ) {
    color: var(--ink);
  }

  html:not(.theme-light) :is(
    .search-chip,
    .search-chip-suggest,
    .explore-shortcut-icon,
    .explore-promo-card,
    .explore-category-chip,
    .home-ranking-item,
    .profile-menu-list,
    .profile-empty-row
  ) {
    background: #151518;
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  }

  html:not(.theme-light) .explore-promo-kicker {
    color: #D4D4D8;
    border-color: rgba(255,255,255,0.16);
  }

  html:not(.theme-light) .explore-promo-copy span:last-child {
    color: var(--muted);
  }

  html:not(.theme-light) .home-text-ticker {
    background: #151518;
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.30);
  }

  html:not(.theme-light) .home-text-ticker::before {
    background: linear-gradient(90deg, #151518, rgba(21,21,24,0));
  }

  html:not(.theme-light) .home-text-ticker::after {
    background: linear-gradient(270deg, #151518, rgba(21,21,24,0));
  }

  html:not(.theme-light) .home-ticker-item::before {
    background: #8FB7FF;
    opacity: 0.84;
  }

  html:not(.theme-light) :is(
    .home-ranking-copy small,
    .feed-poster-meta,
    .event-venue,
    .event-schedule,
    .profile-menu-row svg
  ) {
    color: var(--muted);
  }
}

html.theme-dark body,
html.theme-dark header,
html.theme-dark .hero-shell,
html.theme-dark .hero,
html.theme-dark main,
html.theme-dark .search-layer,
html.theme-dark .quick-filter-block,
html.theme-dark .home-subfilter-block,
html.theme-dark .home-loading-layer {
  background-color: var(--paper);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) body,
  html:not(.theme-light) header,
  html:not(.theme-light) .hero-shell,
  html:not(.theme-light) .hero,
  html:not(.theme-light) main,
  html:not(.theme-light) .search-layer,
  html:not(.theme-light) .quick-filter-block,
  html:not(.theme-light) .home-subfilter-block,
  html:not(.theme-light) .home-loading-layer {
    background-color: var(--paper);
    color: var(--ink);
  }
}

html.theme-dark header,
html.theme-dark .quick-filter-block,
html.theme-dark .home-subfilter-block {
  background: #050507;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) header,
  html:not(.theme-light) .quick-filter-block,
  html:not(.theme-light) .home-subfilter-block {
    background: #050507;
  }
}

html.theme-dark :is(
  .logo span,
  .header-action-btn,
  .section-title,
  .feed-section-title,
  .curation-section-label,
  .profile-name,
  .profile-section-head,
  .profile-menu-row,
  .profile-menu-row span,
  .profile-menu-list .setting-label,
  .modal-title,
  .empty-state-title,
  .home-category-tabs .chip.active,
  .home-theme-card-title,
  .home-ranking-title,
  .home-editorial-title,
  .home-masonry-title
) {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(
    .logo span,
    .header-action-btn,
    .section-title,
    .feed-section-title,
    .curation-section-label,
    .profile-name,
    .profile-section-head,
    .profile-menu-row,
    .profile-menu-row span,
    .profile-menu-list .setting-label,
    .modal-title,
    .empty-state-title,
    .home-category-tabs .chip.active,
    .home-theme-card-title,
    .home-ranking-title,
    .home-editorial-title,
    .home-masonry-title
  ) {
    color: var(--ink);
  }
}

html.theme-dark :is(
  .search-pill,
  .search-bar input,
  .search-layer-input,
  .filter-sheet,
  .filter-date-input,
  .event-card,
  .feed-poster-card,
  .curation-card,
  .home-editorial-card,
  .home-masonry-card,
  .home-theme-card,
  .profile-stat-tile,
  .modal,
  .notif-modal,
  .delete-account-dialog,
  .feedback-sheet,
  .onboarding-sheet,
  .map-sheet,
  .map-toolbar-chip,
  .map-result-item,
  .btn-share,
  .modal-secondary-btn,
  .btn-google
) {
  background-color: var(--card-bg);
  color: var(--ink);
  border-color: var(--border);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(
    .search-pill,
    .search-bar input,
    .search-layer-input,
    .filter-sheet,
    .filter-date-input,
    .event-card,
    .feed-poster-card,
    .curation-card,
    .home-editorial-card,
    .home-masonry-card,
    .home-theme-card,
    .profile-stat-tile,
    .modal,
    .notif-modal,
    .delete-account-dialog,
    .feedback-sheet,
    .onboarding-sheet,
    .map-sheet,
    .map-toolbar-chip,
    .map-result-item,
    .btn-share,
    .modal-secondary-btn,
    .btn-google
  ) {
    background-color: var(--card-bg);
    color: var(--ink);
    border-color: var(--border);
  }
}

html.theme-dark :is(.search-pill, .search-bar input, .search-layer-input) {
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(.search-pill, .search-bar input, .search-layer-input) {
    box-shadow: none;
  }
}

/* 홈 리스트 카드(.event-card 기본 모드)는 보더리스 행이라 다크에서도 카드 배경을 채우지
   않고 투명 유지 + 얇은 하단 구분선만. (검색/카테고리 2열 모드 카드는 위 규칙 그대로 유지) */
html.theme-dark main:not(.search-results-mode):not(.home-category-results-mode) .event-card {
  background-color: transparent;
  border-color: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) main:not(.search-results-mode):not(.home-category-results-mode) .event-card {
    background-color: transparent;
    border-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
}

/* ── 다크모드 지도 ── */
/* 1) 시트 내부 하드코딩 흰색 패널(현재 지도 N개 행사 카드/썸네일)을 다크로 */
html.theme-dark .map-sheet-feature-card { background: rgba(255,255,255,0.06); }
html.theme-dark .map-sheet-feature-thumb { background: rgba(255,255,255,0.10); }
/* 2) 카카오 베이스 타일을 다크맵으로 (라이트 톤다운 대신). data: SVG 마커는 제외 → 색 유지 */
html.theme-dark #kakaoMap img:not([src^="data:"]) {
  filter: invert(0.91) hue-rotate(180deg) saturate(0.6) brightness(0.97) contrast(0.92);
}
@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .map-sheet-feature-card { background: rgba(255,255,255,0.06); }
  html:not(.theme-light) .map-sheet-feature-thumb { background: rgba(255,255,255,0.10); }
  html:not(.theme-light) #kakaoMap img:not([src^="data:"]) {
    filter: invert(0.91) hue-rotate(180deg) saturate(0.6) brightness(0.97) contrast(0.92);
  }
}

html.theme-dark :is(
  .search-pill-text,
  .profile-email,
  .profile-provider,
  .profile-stat-tile span,
  .event-venue,
  .event-schedule,
  .feed-poster-meta,
  .home-ranking-copy small,
  .home-masonry-copy small,
  .modal-detail,
  .detail-value,
  .empty-state-body,
  .data-source
) {
  color: var(--muted);
}

html.theme-dark .search-layer-input::placeholder,
html.theme-dark .search-bar input::placeholder {
  color: var(--muted);
}

html.theme-dark .government-data-notice {
  background: transparent;
  border-color: #2A3441;
  color: #CBD5E1;
}

html.theme-dark .government-data-notice > strong,
html.theme-dark .government-disclaimer strong {
  color: #F1F5F9;
}

html.theme-dark .government-data-links a {
  color: #8AB4F8;
}

html.theme-dark .government-disclaimer {
  border-color: #2A3441;
  color: #AEBBCB;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(
    .search-pill-text,
    .profile-email,
    .profile-provider,
    .profile-stat-tile span,
    .event-venue,
    .event-schedule,
    .feed-poster-meta,
    .home-ranking-copy small,
    .home-masonry-copy small,
    .modal-detail,
    .detail-value,
    .empty-state-body,
    .data-source
  ) {
    color: var(--muted);
  }

  html:not(.theme-light) .search-layer-input::placeholder,
  html:not(.theme-light) .search-bar input::placeholder {
    color: var(--muted);
  }

  html:not(.theme-light) .government-data-notice {
    background: transparent;
    border-color: #2A3441;
    color: #CBD5E1;
  }

  html:not(.theme-light) .government-data-notice > strong,
  html:not(.theme-light) .government-disclaimer strong {
    color: #F1F5F9;
  }

  html:not(.theme-light) .government-data-links a {
    color: #8AB4F8;
  }

  html:not(.theme-light) .government-disclaimer {
    border-color: #2A3441;
    color: #AEBBCB;
  }
}

html.theme-dark :is(
  .chip,
  .intent-chip,
  .filter-btn,
  .search-results-query,
  .search-results-fab,
  .home-avatar-chip-img,
  .sdk-notice
) {
  background: #151518;
  color: var(--ink);
  border-color: var(--border);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(
    .chip,
    .intent-chip,
    .filter-btn,
    .search-results-query,
    .search-results-fab,
    .home-avatar-chip-img,
    .sdk-notice
  ) {
    background: #151518;
    color: var(--ink);
    border-color: var(--border);
  }
}

html.theme-dark :is(
  .chip.active,
  .intent-chip.active,
  .filter-btn.active,
  .map-toolbar-chip.active,
  .feedback-type-btn.active
) {
  background: #F5F5F7;
  color: #050507;
  border-color: #F5F5F7;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(
    .chip.active,
    .intent-chip.active,
    .filter-btn.active,
    .map-toolbar-chip.active,
    .feedback-type-btn.active
  ) {
    background: #F5F5F7;
    color: #050507;
    border-color: #F5F5F7;
  }
}

html.theme-dark .home-editorial-card {
  background: #151519;
  border: 1px solid rgba(255,255,255,0.12);
}

html.theme-dark .home-editorial-copy small {
  color: #AFCBFF;
}

html.theme-dark .home-editorial-copy strong {
  color: #F5F5F7;
}

html.theme-dark .home-editorial-copy span {
  color: #D7D7DE;
}

html.theme-dark .home-editorial-copy em {
  color: #B3B3BD;
}

html.theme-dark .home-avatar-chip-label {
  color: #ECECF1;
}

html.theme-dark .home-avatar-chip-img {
  --theme-chip-bg: #151B25;
  --theme-chip-color: #AFCBFF;
  --theme-chip-border: rgba(255,255,255,0.12);
  background: var(--theme-chip-bg);
  border-color: rgba(255,255,255,0.14);
  color: var(--theme-chip-color);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 24px rgba(0,0,0,0.30);
}

html.theme-dark .home-avatar-chip-img[data-icon-key="forest"] { --theme-chip-bg: #132235; --theme-chip-color: #AFCBFF; }
html.theme-dark .home-avatar-chip-img[data-icon-key="palace"] { --theme-chip-bg: #241E12; --theme-chip-color: #F2D27E; }
html.theme-dark .home-avatar-chip-img[data-icon-key="weekend"] { --theme-chip-bg: #2A210F; --theme-chip-color: #F2C86B; }
html.theme-dark .home-avatar-chip-img[data-icon-key="free"] { --theme-chip-bg: #102216; --theme-chip-color: #8AD7A8; }
html.theme-dark .home-avatar-chip-img[data-icon-key="indoor"] { --theme-chip-bg: #1B1A32; --theme-chip-color: #B9B7FF; }
html.theme-dark .home-avatar-chip-img[data-icon-key="date"] { --theme-chip-bg: #2B1724; --theme-chip-color: #F1A2C7; }
html.theme-dark .home-avatar-chip-img[data-icon-key="solo"] { --theme-chip-bg: #121D2E; --theme-chip-color: #9CC7FF; }
html.theme-dark .home-avatar-chip-img[data-icon-key="kids"] { --theme-chip-bg: #251A10; --theme-chip-color: #F0B578; }

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .home-editorial-card {
    background: #151519;
    border: 1px solid rgba(255,255,255,0.12);
  }

  html:not(.theme-light) .home-editorial-copy small {
    color: #AFCBFF;
  }

  html:not(.theme-light) .home-editorial-copy strong {
    color: #F5F5F7;
  }

  html:not(.theme-light) .home-editorial-copy span {
    color: #D7D7DE;
  }

  html:not(.theme-light) .home-editorial-copy em {
    color: #B3B3BD;
  }

  html:not(.theme-light) .home-avatar-chip-label {
    color: #ECECF1;
  }

  html:not(.theme-light) .home-avatar-chip-img {
    --theme-chip-bg: #151B25;
    --theme-chip-color: #AFCBFF;
    --theme-chip-border: rgba(255,255,255,0.12);
    background: var(--theme-chip-bg);
    border-color: rgba(255,255,255,0.14);
    color: var(--theme-chip-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 24px rgba(0,0,0,0.30);
  }

  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="forest"] { --theme-chip-bg: #132235; --theme-chip-color: #AFCBFF; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="palace"] { --theme-chip-bg: #241E12; --theme-chip-color: #F2D27E; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="weekend"] { --theme-chip-bg: #2A210F; --theme-chip-color: #F2C86B; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="free"] { --theme-chip-bg: #102216; --theme-chip-color: #8AD7A8; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="indoor"] { --theme-chip-bg: #1B1A32; --theme-chip-color: #B9B7FF; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="date"] { --theme-chip-bg: #2B1724; --theme-chip-color: #F1A2C7; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="solo"] { --theme-chip-bg: #121D2E; --theme-chip-color: #9CC7FF; }
  html:not(.theme-light) .home-avatar-chip-img[data-icon-key="kids"] { --theme-chip-bg: #251A10; --theme-chip-color: #F0B578; }
}

html.theme-dark .bottom-nav {
  background: rgba(18, 18, 20, 0.82);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 18px 46px rgba(0,0,0,0.52);
}

html.theme-dark .nav-indicator {
  display: none;
}

html.theme-dark .nav-item {
  color: #8A8A91;
}

html.theme-dark .nav-item.active {
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) .bottom-nav {
    background: rgba(18, 18, 20, 0.82);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 18px 46px rgba(0,0,0,0.52);
  }

  html:not(.theme-light) .nav-indicator {
    display: none;
  }

  html:not(.theme-light) .nav-item {
    color: #8A8A91;
  }

  html:not(.theme-light) .nav-item.active {
    background: rgba(255,255,255,0.14);
    color: #FFFFFF;
  }
}

html.theme-dark :is(.fav-btn, .event-card .fav-btn, .feed-poster-card .fav-btn) {
  background: rgba(18,18,20,0.84);
  color: var(--ink);
  border-color: rgba(255,255,255,0.14);
}

html.theme-dark .toast-msg {
  background: rgba(245,245,247,0.92);
  color: #111114;
  box-shadow: 0 14px 40px rgba(0,0,0,0.34);
}

html.theme-dark :is(
  .modal-overlay,
  .feedback-overlay,
  .notif-overlay,
  .filter-sheet-overlay,
  .onboarding-overlay
) {
  background: rgba(0,0,0,0.68);
}

@media (prefers-color-scheme: dark) {
  html:not(.theme-light) :is(.fav-btn, .event-card .fav-btn, .feed-poster-card .fav-btn) {
    background: rgba(18,18,20,0.84);
    color: var(--ink);
    border-color: rgba(255,255,255,0.14);
  }

  html:not(.theme-light) .toast-msg {
    background: rgba(245,245,247,0.92);
    color: #111114;
    box-shadow: 0 14px 40px rgba(0,0,0,0.34);
  }

  html:not(.theme-light) :is(
    .modal-overlay,
    .feedback-overlay,
    .notif-overlay,
    .filter-sheet-overlay,
    .onboarding-overlay
  ) {
    background: rgba(0,0,0,0.68);
  }
}
