/* ==========================================================================
   bw-ui4.css — 2026-11-16 새 디자인(ui4): 대형 여행 앱 방식의 화면 짜임
   - includes/_ui4.php bw_ui4() 가 참일 때만 머리(_shared_header.php)가 싣는다 (html.bw-ui4)
   - 브랜드 색은 그대로(감 #FF5A1F · 진한 감 #C2410C). 다른 회사의 그림·색·문구는 쓰지 않는다
   - 홈(main#bw-main.u4-home): 검색 → 분류 아이콘 10개 → 배너(슬라이드) → 최근 본 곳 → 구별 인기(가로 카드) → 축제 → 나머지 순서 그대로
   - 휴대폰(767px 이하): 섹션 사이 8px 회색 띠, 흰 섹션. PC: 흰 바탕, 히어로 낮춤
   ========================================================================== */
html.bw-ui4 {
  --u4-brand: #FF5A1F; --u4-brand-d: #C2410C; --u4-brand-bg: #FFF1EA;
  --u4-ink: #111827; --u4-ink2: #4B5563; --u4-ink3: #6B7280; --u4-line: #E5E7EB;
  --u4-band: #F2F4F6; --u4-card: #fff; --u4-r: 16px;
  --u4-shadow: 0 1px 2px rgba(17,24,39,.05), 0 4px 14px rgba(17,24,39,.06);
}
html.bw-ui4[data-theme="dark"] {
  --u4-ink: #F3F4F6; --u4-ink2: #D1D5DB; --u4-ink3: #9CA3AF; --u4-line: #2A2F3A;
  --u4-band: #0B0E14; --u4-card: #161A22; --u4-brand-bg: rgba(255,90,31,.14);
}

/* ---------- 홈: 순서 · 폭 ---------- */
html.bw-ui4 body #bw-main.u4-home { display: flex; flex-direction: column; }
/* 세로 flex 안에서 margin:auto 인 칸(.bw-container 등)이 내용 폭으로 줄지 않게 width:100% — 각 칸의 max-width 는 그대로 */
html.bw-ui4 body #bw-main.u4-home > * { order: 50; width: 100%; box-sizing: border-box; min-width: 0; }
html.bw-ui4 body #bw-main.u4-home > #bw-hero { order: 0; }
html.bw-ui4 body #bw-main.u4-home > #bw-home-search { order: 1; }
html.bw-ui4 body #bw-main.u4-home > .u4q { order: 2; }
html.bw-ui4 body #bw-main.u4-home > #bw-recent-rail { order: 4; }
html.bw-ui4 body #bw-main.u4-home > #bw-dp { order: 5; }
html.bw-ui4 body #bw-main.u4-home > [data-screen-label="홈 / 이벤트"] { order: 6; }

/* ---------- 섹션 머리: 굵은 제목 + 회색 '전체보기 >' (영문 꼬리표는 숨김) ---------- */
html.bw-ui4 body .u4-home .bw-section-head { align-items: flex-end; gap: 12px; margin-bottom: 14px; }
html.bw-ui4 body .u4-home .bw-section-head__eyebrow { display: none !important; }
html.bw-ui4 body .u4-home .bw-section-head__title { margin: 0; font-size: 22px !important; line-height: 1.3 !important; font-weight: 800 !important; letter-spacing: -.025em; color: var(--u4-ink); }
html.bw-ui4 body .u4-home .bw-section-head__link { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; font-size: 14px !important; font-weight: 600; color: var(--u4-ink3) !important; text-decoration: none; white-space: nowrap; }

/* ---------- 분류 아이콘 10개 ---------- */
html.bw-ui4 .u4q { max-width: var(--bw-container, 1240px) !important; margin: 0 auto; padding: 20px var(--bw-gutter, 24px) 8px; background: var(--u4-card); }
html.bw-ui4 .u4q__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 14px 8px; }
html.bw-ui4 .u4q__it { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; border-radius: 14px; color: var(--u4-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
html.bw-ui4 .u4q__ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: var(--u4q-b); color: var(--u4q-c); transition: transform .15s; }
html.bw-ui4 .u4q__ic .bw-icon { width: 28px; height: 28px; }
/* 이름표: 낱말 가운데서 끊지 않는다('Restaurant/s' 방지). 칸보다 조금 넓게(좌우 5px) 써도 된다 */
html.bw-ui4 .u4q__lb { width: calc(100% + 10px); margin: 0 -5px; font-size: 14px; font-weight: 600; line-height: 1.25; text-align: center; word-break: keep-all; overflow-wrap: normal; hyphens: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html.bw-ui4:is(:lang(en), :lang(es), :lang(fr), :lang(vi), :lang(th), :lang(hi)) .u4q__lb { font-size: 13px; letter-spacing: -.01em; }
html.bw-ui4 .u4q__it:hover .u4q__ic { transform: translateY(-2px); }
html.bw-ui4 .u4q__it:active .u4q__ic { transform: scale(.94); }
html.bw-ui4 .u4q__it:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: 2px; }
html.bw-ui4[data-theme="dark"] .u4q__ic { background: color-mix(in srgb, var(--u4q-c) 22%, #161A22); color: color-mix(in srgb, var(--u4q-c) 55%, #fff); }

/* ---------- PC·태블릿 (768px 이상) ---------- */
@media (min-width: 768px) {
  html.bw-ui4 body .u4-home #bw-hero.bwh { height: 440px !important; --bwh-hdr: 0px; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__inner { padding-top: 32px !important; }
  html.bw-ui4 body .u4-home .u4q { padding-top: 28px; padding-bottom: 4px; background: transparent; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  html.bw-ui4 .u4q__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- 휴대폰 (767px 이하) ---------- */
@media (max-width: 767px) {
  html.bw-ui4 body #bw-main.u4-home { gap: 8px; background: var(--u4-band); padding-bottom: 8px; }
  html.bw-ui4 body #bw-main.u4-home > * { margin-left: 0 !important; margin-right: 0 !important; background-color: var(--u4-card); }
  html.bw-ui4 body #bw-main.u4-home > .bw-section { margin-top: 0 !important; margin-bottom: 0 !important; padding: 24px 16px !important; }
  html.bw-ui4 body #bw-main.u4-home > .bw-ad-mo-only { background: transparent; padding: 0 !important; }
  html.bw-ui4 body .u4-home .bw-section-head__title { font-size: 20px !important; }

  /* 검색: 히어로 위에 겹치지 않고 맨 위 흰 판 */
  html.bw-ui4 body .u4-home #bw-home-search.bwh-search { margin: 0 !important; padding: 12px 16px 0; }
  html.bw-ui4 body .u4-home .bwh-search__card { padding: 0; border-radius: 0; box-shadow: none; background: transparent; gap: 10px; }
  html.bw-ui4 body .u4-home .bwh-search__label { display: none; }
  html.bw-ui4 body .u4-home .bwh-search__form { height: 52px; border-radius: 14px; background: var(--u4-band); }
  html.bw-ui4 body .u4-home .bwh-search__row { flex-direction: row; align-items: center; gap: 8px; }
  html.bw-ui4 body .u4-home .bwh-search__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  html.bw-ui4 body .u4-home .bwh-search__chips::-webkit-scrollbar { display: none; }
  html.bw-ui4 body .u4-home .bwh-search__chips a { flex: 0 0 auto; min-height: 36px; padding: 0 12px; font-size: 14px; background: var(--u4-card); color: var(--u4-ink2); box-shadow: inset 0 0 0 1px var(--u4-line); }
  html.bw-ui4 body .u4-home .bwh-search__ai { display: none; }   /* 아래 분류 아이콘 'AI 코스' 로 옮김 */

  /* 분류 아이콘: 5칸 × 2줄 */
  html.bw-ui4 body .u4-home > .u4q { margin-top: -8px !important; padding: 18px 8px 14px; }
  html.bw-ui4 .u4q__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 0; }
  html.bw-ui4 .u4q__it { gap: 6px; }
  html.bw-ui4 .u4q__ic { width: 52px; height: 52px; border-radius: 18px; }
  html.bw-ui4 .u4q__ic .bw-icon { width: 26px; height: 26px; }
  html.bw-ui4:is(:lang(en), :lang(es), :lang(fr), :lang(vi), :lang(th), :lang(hi)) .u4q__lb { font-size: clamp(12px, 3.4vw, 13px); }

  /* 배너(슬라이드): 분류 아래 둥근 카드 */
  html.bw-ui4 body #bw-main.u4-home > #bw-hero.bwh { order: 3; height: 196px !important; margin: -8px 0 0 !important; border-radius: 0; background-color: var(--u4-card); padding: 4px 16px 16px; overflow: visible;
    --bwh-hdr: 0px; --bwh-ovl: 0px; --bwh-bar-b: 10px; --bwh-gut: 16px; --bwh-gut-r: 16px; }
  html.bw-ui4 body .u4-home #bw-hero .bwh__slides { position: relative; height: 100%; border-radius: var(--u4-r); overflow: hidden; isolation: isolate; transform: translateZ(0); }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__inner,
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide--center .bwh-slide__inner { padding: 16px 18px 38px !important; align-items: flex-end; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide--center .bwh-slide__inner { align-items: center; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__eyebrow { font-size: 12px !important; padding: 3px 10px !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__title { margin-top: 6px !important; font-size: 21px !important; line-height: 1.25 !important; min-height: 0 !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__title .l2 { font-size: 24px !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__sub,
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__tags { display: none !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__cta { margin-top: 10px !important; gap: 8px; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-btn { min-height: 36px !important; padding: 0 14px !important; font-size: 13.5px !important; width: auto !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__cta .bwh-btn ~ .bwh-btn { display: none !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__poster { top: 18px !important; bottom: 38px !important; right: 14px !important; width: 84px !important; height: auto !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh-slide__credit { top: 8px !important; right: 12px !important; bottom: auto !important; max-width: 62% !important; font-size: 9.5px !important; opacity: .85; }
  html.bw-ui4 body .u4-home #bw-hero .bwh__bar { left: auto !important; right: 26px !important; bottom: 26px !important; gap: 0; }
  html.bw-ui4 body .u4-home #bw-hero .bwh__track,
  html.bw-ui4 body .u4-home #bw-hero .bwh__btn { display: none !important; }
  html.bw-ui4 body .u4-home #bw-hero .bwh__ctrl { background: rgba(11,14,20,.55); border-radius: 999px; padding: 0 2px; min-height: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.bw-ui4 body .u4-home #bw-hero .bwh__count { padding: 2px 9px; font-size: 12px; min-width: 0; }

  /* 구별 인기 TOP 8: 세로 목록 → 가로로 넘기는 카드 */
  html.bw-ui4 body .u4-home > #bw-dp.bw-dp { padding: 22px 0 18px !important; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__head { padding: 0 16px; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__panel { padding: 0; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 2px 16px 6px; scrollbar-width: none; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__grid::-webkit-scrollbar { display: none; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__item { flex: 0 0 148px; scroll-snap-align: start; }
  html.bw-ui4 body .u4-home #bw-dp .bw-pc { flex-direction: column; align-items: stretch; gap: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
  html.bw-ui4 body .u4-home #bw-dp .bw-pc__media { width: 148px; height: 148px; border-radius: 14px; }
  html.bw-ui4 body .u4-home #bw-dp .bw-pc__rank { left: 8px; top: 8px; min-width: 24px; height: 24px; font-size: 13px; border-radius: 8px; }
  html.bw-ui4 body .u4-home #bw-dp .bw-pc__body { padding: 8px 2px 0; gap: 2px; }
  html.bw-ui4 body .u4-home #bw-dp .bw-pc .bw-pc__name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px !important; line-height: 1.3 !important; }
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__foot,
  html.bw-ui4 body .u4-home #bw-dp .bw-dp__basis { padding: 0 16px; }

  /* 이번 주 HOT·지금 부산·아이와: 가로 카드 둥근 모서리 통일 */
  html.bw-ui4 body .u4-home .hot-scroller { margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
  html.bw-ui4 body .u4-home .hot-card { border-radius: var(--u4-r); }
}

/* ==========================================================================
   목록 화면(맛집·관광지·숙소) — 2단계
   ========================================================================== */
/* 한 줄 필터 막대(bw-ui4.js 가 만든 뒤 html.u4-lf): 원래 줄(지역·분류·평점·정렬)은 숨기고 막대만 */
html.bw-ui4.u4-lf .bw-lt-dbar,
html.bw-ui4.u4-lf .food-cat-row,
html.bw-ui4.u4-lf section.bw-container:has(> .food-cat-row),
html.bw-ui4.u4-lf .list-filter__inner > .list-filter__chips,
html.bw-ui4.u4-lf .list-filter__inner > .list-filter__sort { display: none !important; }
html.bw-ui4 .u4-fbar { display: flex; align-items: center; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
html.bw-ui4 .u4-fbar::-webkit-scrollbar { display: none; }
html.bw-ui4 .u4-fbar__b { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; min-height: 44px !important; padding: 0 14px 0 16px; border-radius: 999px; border: 1px solid var(--u4-line); background: var(--u4-card); color: var(--u4-ink); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.bw-ui4 .u4-fbar__b svg { flex: 0 0 auto; color: var(--u4-ink3); }
html.bw-ui4 .u4-fbar__b.is-set { border-color: var(--u4-brand-d); background: var(--u4-brand-bg); color: var(--u4-brand-d); }
html.bw-ui4 .u4-fbar__b.is-set svg { color: var(--u4-brand-d); }
html.bw-ui4 .u4-fbar__b--sort { font-weight: 700; }
html.bw-ui4 .u4-fbar__b:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: 2px; }
html.bw-ui4 .u4-fbar__t { max-width: 11em; overflow: hidden; text-overflow: ellipsis; }
html.bw-ui4 .u4-fbar .u4-fbar__vt { flex: 0 0 auto; margin-left: auto; }
html.bw-ui4.u4-lf .list-filter__inner { display: flex !important; flex-wrap: nowrap !important; gap: 8px; }

/* 선택 판 */
html.bw-ui4 .u4-sheet[hidden] { display: none; }
html.bw-ui4 .u4-sheet { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center; }
html.bw-ui4 .u4-sheet__bg { position: absolute; inset: 0; background: rgba(11,14,20,.48); opacity: 0; transition: opacity .2s; }
html.bw-ui4 .u4-sheet__panel { position: relative; width: 100%; max-width: 560px; max-height: min(78vh, 640px); display: flex; flex-direction: column; background: var(--u4-card); color: var(--u4-ink); border-radius: 22px 22px 0 0; padding: 6px 0 max(12px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(11,14,20,.2); transform: translateY(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
html.bw-ui4 .u4-sheet.is-open .u4-sheet__bg { opacity: 1; }
html.bw-ui4 .u4-sheet.is-open .u4-sheet__panel { transform: none; opacity: 1; }
html.bw-ui4 .u4-sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--u4-line); margin: 4px auto 6px; }
html.bw-ui4 .u4-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px 20px; }
html.bw-ui4 .u4-sheet__t { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
html.bw-ui4 .u4-sheet__x { display: grid; place-items: center; width: 48px; height: 48px; min-height: 48px !important; border: 0; border-radius: 12px; background: transparent; color: var(--u4-ink2); cursor: pointer; }
html.bw-ui4 .u4-sheet__list { list-style: none; margin: 0; padding: 0 12px 4px; overflow-y: auto; overscroll-behavior: contain; }
html.bw-ui4 .u4-sheet__opt { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 56px !important; padding: 6px 12px !important; border: 0; border-radius: 14px; background: transparent; color: var(--u4-ink); font: inherit; font-size: 16.5px; font-weight: 500; text-align: left; cursor: pointer; }
html.bw-ui4 .u4-sheet__opt + .u4-sheet__opt { margin-top: 2px; }
html.bw-ui4 .u4-sheet__opt:hover { background: var(--u4-band); }
html.bw-ui4 .u4-sheet__opt:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: -3px; }
html.bw-ui4 .u4-sheet__lb { flex: 1 1 auto; min-width: 0; }
html.bw-ui4 .u4-sheet__sub { display: block; margin-top: 1px; font-size: 13.5px; font-weight: 500; color: var(--u4-ink3); }
html.bw-ui4 .u4-sheet__n { flex: 0 0 auto; font-size: 14px; color: var(--u4-ink3); font-variant-numeric: tabular-nums; }
html.bw-ui4 .u4-sheet__ck { flex: 0 0 auto; color: var(--u4-brand-d); visibility: hidden; }
html.bw-ui4 .u4-sheet__opt.is-on { font-weight: 800; color: var(--u4-brand-d); background: var(--u4-brand-bg); }
html.bw-ui4 .u4-sheet__opt.is-on .u4-sheet__ck { visibility: visible; }
html.bw-ui4.u4-sheet-open, html.bw-ui4.u4-sheet-open body { overflow: hidden; }
@media (min-width: 768px) {
  html.bw-ui4 .u4-sheet { align-items: center; }
  html.bw-ui4 .u4-sheet__panel { border-radius: 22px; max-width: 480px; }
  html.bw-ui4 .u4-sheet__grip { display: none; }
}

/* 휴대폰 목록 카드: 큰 사진 세로 카드(한 화면 2개) → 왼쪽 사진·오른쪽 정보(한 화면 5개 안팎) */
@media (max-width: 767px) {
  html.bw-ui4 body #bw-main .list-grid { display: flex; flex-direction: column; gap: 10px; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 0 14px; min-height: 0; height: auto; padding: 10px; border-radius: var(--u4-r); border: 1px solid var(--u4-line); background: var(--u4-card); box-shadow: none; overflow: visible; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card:hover { transform: none; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__media { position: relative; width: 112px; height: 112px; aspect-ratio: auto; margin: 0; border-radius: 12px; overflow: hidden; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__media img { width: 100%; height: 100%; object-fit: cover; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__badges { left: 6px !important; right: auto !important; top: auto !important; bottom: 6px !important; max-width: calc(100% - 12px); }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__badges .bw-badge { display: block; max-width: 100%; font-size: 11px !important; padding: 3px 7px !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__fav { top: 4px; right: 4px; width: 32px; height: 32px; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__body { padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 14px; color: var(--u4-ink2); }
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__meta .bw-icon { width: 14px; height: 14px; }
  html.bw-ui4 body #bw-main .list-grid > .bw-card-adfeed, html.bw-ui4 body #bw-main .list-grid > .bw-lt-feat { width: 100%; }
}

/* ==========================================================================
   상세 화면(관광지·맛집·숙소) — 3단계: 위에 붙는 바로가기 탭(정보·소개·위치·주변·리뷰) + 휴대폰 사진 가장자리까지
   ========================================================================== */
html.bw-ui4 .u4-dtabs { position: sticky; top: var(--bw-hdr-h, var(--bw-header-h, 60px)); z-index: 45; margin: 16px 0 4px; background: var(--u4-card); border-bottom: 1px solid var(--u4-line); }
html.bw-ui4 .u4-dtabs ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0 4px; overflow-x: auto; scrollbar-width: none; }
html.bw-ui4 .u4-dtabs ul::-webkit-scrollbar { display: none; }
html.bw-ui4 .u4-dtabs li { flex: 0 0 auto; }
html.bw-ui4 .u4-dtabs__a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-bottom: 3px solid transparent; color: var(--u4-ink3); font-size: 15.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
html.bw-ui4 .u4-dtabs__a:hover { color: var(--u4-ink); }
html.bw-ui4 .u4-dtabs__a.is-on { color: var(--u4-ink); font-weight: 800; border-bottom-color: var(--u4-brand); }
html.bw-ui4 .u4-dtabs__a:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: -3px; }
@media (max-width: 767px) {
  html.bw-ui4 .u4-dtabs { margin-left: -16px; margin-right: -16px; width: auto; max-width: none !important; }
  html.bw-ui4 body #bw-main > section.bw-container > .sd-gallery { margin: -8px -16px 0 !important; width: auto !important; max-width: none !important; border-radius: 0; overflow: hidden; }
  html.bw-ui4 body #bw-main > section.bw-container > .sd-gallery * { border-radius: 0 !important; }
  html.bw-ui4 body #bw-main > section.bw-container > .sd-gallery img { width: 100% !important; height: 100% !important; object-fit: cover; }
}

/* ---------- 어두운 화면(data-theme=dark): 원래부터 있던 결함 함께 고침 ---------- */
/* 흰 머리(오버레이 아님)에서 이름·단추가 어두운 바탕에 묻혀 안 보이던 것 */
html.bw-ui4[data-theme="dark"] body .bw-header.bw-hdr:not(.bw-header--overlay) .bw-hdr__word,
html.bw-ui4[data-theme="dark"] body .bw-header.bw-hdr:not(.bw-header--overlay) .bw-hdr__btn,
html.bw-ui4[data-theme="dark"] body .bw-header.bw-hdr:not(.bw-header--overlay) .bw-hdr__lang,
html.bw-ui4[data-theme="dark"] body .bw-header.bw-hdr:not(.bw-header--overlay) .bw-hdr__login,
html.bw-ui4[data-theme="dark"] body .bw-header.bw-hdr:not(.bw-header--overlay) .bw-hdr__link { color: #F3F4F6 !important; }
/* 구별 인기 제목·카드 글자(검정 고정)와 목록 필터 줄의 흰 바탕 */
html.bw-ui4[data-theme="dark"] body .bw-dp .bw-dp__title,
html.bw-ui4[data-theme="dark"] body .bw-dp .bw-pc { color: var(--u4-ink) !important; }
html.bw-ui4[data-theme="dark"] body .bw-dp .bw-pc__meta,
html.bw-ui4[data-theme="dark"] body .bw-dp .bw-dp__basis { color: var(--u4-ink3) !important; }
html.bw-ui4[data-theme="dark"] body .u4-home #bw-dp .bw-pc { background: transparent !important; }
html.bw-ui4[data-theme="dark"] body .u4-home .bwh-search__form input { background: transparent !important; }
html.bw-ui4[data-theme="dark"] body .list-filter,
html.bw-ui4[data-theme="dark"] body .list-filter__inner { background: var(--u4-band) !important; }

/* ---------- 하단 탭(모든 화면): 활성 탭 굵게 ---------- */
html.bw-ui4 body .bw-tabbar a.active span { font-weight: 800; }
html.bw-ui4 body .bw-tabbar a.active svg { stroke-width: 2.2; }

@media (prefers-reduced-motion: reduce) {
  html.bw-ui4 .u4q__ic { transition: none; }
  html.bw-ui4 .u4q__it:hover .u4q__ic, html.bw-ui4 .u4q__it:active .u4q__ic { transform: none; }
}

/* ==========================================================================
   2026-11-16 탭·필터 간편화(tf) — bw-ui4.js 의 listUI·eventUI·searchUI·detailTabs 와 짝. 되돌리기: rollback_ux.sh tf
   ========================================================================== */
/* 목록: 분류 탭 + 필터 막대가 머리 밑에 붙는다 */
html.bw-ui4.u4-lf2 body .list-filter,
html.bw-ui4.u4-ev body .list-filter { position: sticky !important; top: var(--bw-hdr-h, var(--bw-header-h, 60px)); z-index: 40; background: var(--u4-card) !important; border-bottom: 1px solid var(--u4-line); box-shadow: 0 6px 12px -12px rgba(17,24,39,.35); }
html.bw-ui4 .u4-ctabs-w { padding-top: 2px; padding-bottom: 0; }
html.bw-ui4 .u4-ctabs { border-bottom: 1px solid var(--u4-line); }
html.bw-ui4 .u4-ctabs ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
html.bw-ui4 .u4-ctabs ul::-webkit-scrollbar { display: none; }
html.bw-ui4 .u4-ctabs li { flex: 0 0 auto; margin: 0; padding: 0; }
html.bw-ui4 .u4-ctabs li::before, html.bw-ui4 .u4-ctabs li::marker { content: none; }
html.bw-ui4 .u4-ctabs__a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--u4-ink3); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none !important; white-space: nowrap; }
html.bw-ui4 .u4-ctabs__a:hover { color: var(--u4-ink); }
html.bw-ui4 .u4-ctabs__a.is-on { color: var(--u4-ink); font-weight: 800; border-bottom-color: var(--u4-brand); }
html.bw-ui4 .u4-ctabs__a:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: -3px; }
html.bw-ui4.u4-lf2 .list-filter__inner { padding-top: 6px; padding-bottom: 6px; }
html.bw-ui4 .u4-fbar__reset { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--u4-ink2); font-size: 15px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
html.bw-ui4 .u4-fbar__reset:hover { color: var(--u4-ink); background: var(--u4-band); }
html.bw-ui4 .u4-fbar__reset:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: 2px; }
/* 막대로 옮긴 위쪽 고르기(관광지 평점)는 숨김 */
html.bw-ui4.u4-lf .filter-cell.u4-moved,
html.bw-ui4.u4-lf .list-filter-row.u4-moved { display: none !important; }
/* 평점 상자가 빠진 자리(관광지)는 검색 칸이 한 줄을 다 쓴다 */
html.bw-ui4.u4-lf .lhv-main:has(> .list-filter-row.u4-moved) > .list-search-row { flex: 1 1 100% !important; max-width: none !important; width: 100% !important; }
@media (max-width: 767px) {
  /* 휴대폰: 제목 아래 숫자 알약(n개 맛집·n개 카테고리)은 목록 위 '전체 n곳' 줄과 같은 말이라 숨겨 목록을 위로 */
  html.bw-ui4.u4-lf body .list-hero__stats { display: none !important; }
  html.bw-ui4 .u4-ctabs__a { padding: 0 11px; }
}

/* 행사: 월 띠는 숨기고 칩 한 줄 + '월별' */
html.bw-ui4 .u4-hide { display: none !important; }
html.bw-ui4.u4-ev #event-filter-chips { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
html.bw-ui4.u4-ev #event-filter-chips::-webkit-scrollbar { display: none; }
html.bw-ui4.u4-ev #event-filter-chips .bw-chip { flex: 0 0 auto; min-height: 44px; }
html.bw-ui4 .u4-evm { display: inline-flex; align-items: center; gap: 4px; font: inherit; cursor: pointer; }
html.bw-ui4 .u4-evm svg { flex: 0 0 auto; }
@media (max-width: 420px) {
  /* 휴대폰: 칩 5개(전체·무료·이번 주·이번 달·월별)가 한 화면에 들어오게 */
  html.bw-ui4.u4-ev #event-filter-chips { gap: 5px !important; }
  html.bw-ui4.u4-ev #event-filter-chips .bw-chip { padding: 0 8px !important; }
}
@media (max-width: 374px) {
  html.bw-ui4.u4-ev #event-filter-chips .ev-chip-n { display: none !important; }
}

/* 검색: 종류 탭을 머리 밑에, AI 자연어 검색은 한 줄로 접기 */
html.bw-ui4 .u4-srtabs { position: sticky; top: var(--bw-hdr-h, var(--bw-header-h, 60px)); z-index: 40; background: var(--u4-card); border-bottom: 1px solid var(--u4-line); box-shadow: 0 6px 12px -12px rgba(17,24,39,.35); }
html.bw-ui4 .u4-srtabs .sr-tabs { display: flex; flex-wrap: nowrap !important; gap: 8px; margin: 0 !important; padding: 8px 0 !important; overflow-x: auto; scrollbar-width: none; }
html.bw-ui4 .u4-srtabs .sr-tabs::-webkit-scrollbar { display: none; }
html.bw-ui4 .u4-srtabs .sr-tab { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; }
html.bw-ui4 .bw-ai-search.u4-ai .u4-x { display: none !important; }
html.bw-ui4 .bw-ai-search.u4-ai-c > :not(.u4-ai-t) { display: none !important; }
html.bw-ui4 .bw-ai-search.u4-ai-c { padding-top: 6px !important; padding-bottom: 6px !important; }
html.bw-ui4 .u4-ai-t { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0; padding: 4px 2px; border: 0; background: transparent; color: var(--u4-ink); font: inherit; text-align: left; cursor: pointer; }
html.bw-ui4 .u4-ai-t__tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
html.bw-ui4 .u4-ai-t__h { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
html.bw-ui4 .u4-ai-t__p { font-size: 14px; color: var(--u4-ink2); }
html.bw-ui4 .u4-ai-t svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--u4-brand-d); transition: transform .2s; }
html.bw-ui4 .bw-ai-search:not(.u4-ai-c) .u4-ai-t svg { transform: rotate(180deg); }
html.bw-ui4 .u4-ai-t:focus-visible { outline: 3px solid var(--u4-brand-d); outline-offset: 2px; border-radius: 10px; }
/* 휴대폰 검색 결과 카드: 목록 화면과 같은 '왼쪽 사진·오른쪽 정보' */
@media (max-width: 767px) {
  html.bw-ui4 body .sr-grid { display: flex !important; flex-direction: column; gap: 10px; }
  html.bw-ui4 body .sr-grid > .bw-card:has(> .bw-card__media) { position: relative; display: grid !important; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 0 14px; min-height: 0; height: auto; padding: 10px; border-radius: var(--u4-r); border: 1px solid var(--u4-line); background: var(--u4-card); }
  html.bw-ui4 body .sr-grid > .bw-card:hover { transform: none; }
  html.bw-ui4 body .sr-grid > .bw-card > .bw-card__media { position: relative; width: 104px; height: 104px; aspect-ratio: auto; margin: 0; border-radius: 12px; overflow: hidden; }
  html.bw-ui4 body .sr-grid > .bw-card > .bw-card__media img { width: 100%; height: 100%; object-fit: cover; }
  html.bw-ui4 body .sr-grid > .bw-card > .bw-card__body { padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  html.bw-ui4 body .sr-grid > .bw-card .bw-card__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body .sr-grid > .bw-card .bw-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 14px; color: var(--u4-ink2); }
}
@media (prefers-reduced-motion: reduce) {
  html.bw-ui4 .u4-ai-t svg { transition: none; }
}

/* 2026-11-16 tf2: 휴대폰 목록 카드의 분류 표가 '카페/…'로 잘리던 것 — 원래 규칙이 오른쪽 위 ♡ 자리 60px 을 비워 둬 52px 밖에 못 썼다.
   표는 사진 왼쪽 아래(♡는 오른쪽 위)라 겹치지 않으므로 사진 폭 - 12px 까지 쓴다 */
@media (max-width: 767px) {
  html.bw-ui4 body #bw-main .list-grid > .bw-card .bw-card__badges { max-width: calc(100% - 12px) !important; }
}

/* ==========================================================================
   2026-11-16 ux3 — 중복 정리·사용성 다듬기 (되돌리기 rollback_ux.sh ux3)
   ========================================================================== */
/* 관광지 결과 줄 오른쪽의 원래 '필터 초기화 ↺' — 막대의 '초기화'(조건을 고르면 나옴)와 겹쳐 숨긴다 */
html.bw-ui4.u4-lf2 [data-list-count] + a[href="/spot_list.php"],
html.bw-ui4.u4-lf2 [data-list-count] + a[href="/spot_list"] { display: none !important; }

/* 상세 '공유' 중복: 휴대폰은 아래 고정 막대(전화·길찾기·공유)에 공유가 늘 있으므로 머리 줄의 공유는 숨긴다.
   남는 단추(저장·다녀왔어요·리뷰 쓰기 / 저장·알림 받기)가 한 줄에 들어간다. PC 는 고정 막대가 없어 그대로 */
@media (max-width: 720px) {
  html.bw-ui4 body:has(#dxShareBtn) :is(.sd-head, .fd-head, .evd-action-bar) button[onclick*="navigator.share"] { display: none !important; }
}

/* 상세 요약 칸: 평점·리뷰 칸을 숨기고 남은 칸(영업시간·입장료 / 영업시간·전화)을 두 칸으로 */
html.bw-ui4 body :is(.sd-quick, .fd-quick).u4-q2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
html.bw-ui4 body :is(.sd-quick, .fd-quick).u4-q1 { grid-template-columns: minmax(0, 1fr) !important; }
html.bw-ui4 body :is(.sd-quick, .fd-quick) > .u4-long { grid-column: 1 / -1; }
html.bw-ui4 body :is(.sd-quick, .fd-quick).u4-q2:has(> .u4-long) > :not(.u4-hide) { grid-column: 1 / -1; }
html.bw-ui4 body :is(.sd-quick, .fd-quick) > .u4-long :is(.sd-quick-card__value, .fd-quick-card__value) { font-size: 14.5px !important; font-weight: 500 !important; line-height: 1.7 !important; white-space: pre-line; color: var(--u4-ink); }
@media (min-width: 721px) {
  html.bw-ui4 body :is(.sd-quick, .fd-quick).u4-q2:has(> .u4-long) { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) !important; }
  html.bw-ui4 body :is(.sd-quick, .fd-quick).u4-q2:has(> .u4-long) > :not(.u4-hide) { grid-column: auto; }
}

/* 숙소 가격이 없을 때의 안내(목록 카드·상세 아래 막대) — 작고 차분하게 */
html.bw-ui4 body .u4-pchk, html.bw-ui4 body #bw-main .list-results .u4-pchk.u4-pchk { font-size: 13px !important; font-weight: 600 !important; line-height: 1.35 !important; color: var(--u4-ink3) !important; letter-spacing: -.01em; white-space: normal !important; word-break: keep-all; }

/* 행사 목록(휴대폰): 머리 소개 글·숫자 알약을 숨겨 칩·목록을 위로(알약 숫자는 칩 숫자와 기준이 달라 헷갈렸다) */
@media (max-width: 767px) {
  html.bw-ui4.u4-ev .ev-hero .list-hero__stats,
  html.bw-ui4.u4-ev .ev-hero .lhv-main > .lead { display: none !important; }
}

/* '맨 위로' 단추: 주황(주요 단추 색) → 흰 바탕 보조 단추('도움'과 같은 모양). 내려 읽는 동안(html.u4-sdn)은 숨긴다 */
html.bw-ui4 body .bw-fab-group > #bw-scroll-top.bw-fab { background: #fff !important; border: 1px solid #E6E3DA !important; box-shadow: 0 6px 16px rgba(11, 14, 20, .16) !important; transition: opacity .2s ease, visibility .2s ease; }
html.bw-ui4 body .bw-fab-group > #bw-scroll-top.bw-fab svg { stroke: #0B0E14 !important; }
html.bw-ui4.u4-sdn body .bw-fab-group > #bw-scroll-top.is-visible { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }

/* ==========================================================================
   2026-11-16 ux4 — 휴대폰 숙소 목록 카드 (되돌리기 rollback_ux.sh ux4)
   '목록 보기' 카드가 큰 사진 세로 카드(한 장 약 476px, 한 화면 1.5장)였다 → 맛집·관광지처럼 왼쪽 사진·오른쪽 정보(한 장 약 180px).
   분류(호텔/리조트…)는 사진 왼쪽 아래 표로, 네이버·야놀자 단추는 카드 아래 한 줄, '상세보기' 단추는 카드 전체가 눌리므로 숨긴다.
   '갤러리 보기'(큰 사진)와 PC 는 그대로. 마크업은 그대로 두고 body·head 를 display:contents 로 풀어 격자에 바로 놓는다
   ========================================================================== */
@media (max-width: 767px) {
  html.bw-ui4 body #acc-results[data-view="list"] .list-results__grid { gap: 10px !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card { position: relative; display: grid !important; grid-template-columns: 112px minmax(0, 1fr) !important; grid-template-rows: auto auto auto auto auto !important; align-content: start;
    grid-template-areas: "media rate" "media name" "media loc" "media price" "dl dl"; gap: 4px 12px !important; align-items: start; padding: 10px !important; min-height: 0 !important; height: auto !important;
    border: 1px solid var(--u4-line) !important; border-radius: var(--u4-r) !important; background: var(--u4-card) !important; box-shadow: none !important; transform: none !important; overflow: visible; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__body, html.bw-ui4 body #acc-results[data-view="list"] .stay-card__head { display: contents !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__media { grid-area: media; width: 112px !important; height: 112px !important; aspect-ratio: auto !important; margin: 0 !important; border-radius: 12px !important; overflow: hidden; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__media img { width: 100%; height: 100%; object-fit: cover; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__media .bw-card__badges { top: 6px !important; left: 6px !important; right: auto !important; bottom: auto !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__fav { top: 4px !important; right: 4px !important; width: 32px !important; height: 32px !important; }
  /* 분류 표: 사진 왼쪽 아래(맛집 카드와 같은 자리·모양). 누름은 카드로 넘긴다 */
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__type { grid-area: media; align-self: start; justify-self: start; position: relative; z-index: 2; pointer-events: none; display: block !important; max-width: 100px; margin: 86px 0 0 6px;
    padding: 3px 7px !important; border-radius: 6px !important; background: rgba(17, 24, 39, .78) !important; color: #fff !important; font-size: 11px !important; font-weight: 700; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__rating-badge { grid-area: rate; justify-self: start; display: inline-flex !important; align-items: baseline; gap: 5px; height: auto !important; min-height: 0 !important; line-height: 1.25; padding: 3px 8px !important; border-radius: 8px !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__rating-num { font-size: 14px !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__rating-label, html.bw-ui4 body #acc-results[data-view="list"] .stay-card__rating-cnt { font-size: 12px !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__name { grid-area: name; margin: 0 !important; font-size: 17px !important; font-weight: 700 !important; line-height: 1.3 !important; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__loc { grid-area: loc; display: block !important; min-width: 0; font-size: 13px !important; color: var(--u4-ink3) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__loc .bw-icon { display: inline-block; vertical-align: -2px; margin-right: 3px; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__price { grid-area: price; grid-column: 2 !important; grid-row: 4 !important; display: flex !important; flex-wrap: wrap; align-items: baseline; justify-content: flex-start !important; gap: 0 4px !important; margin: 2px 0 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__price > * { grid-column: auto !important; grid-row: auto !important; margin: 0 !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__price .bw-btn { display: none !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__price-label { font-size: 12px !important; }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__price-num { font-size: 16px !important; }
  /* 네이버·야놀자: 카드 아래 한 줄(반반), 누르기 쉬운 높이 */
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__deeplinks { grid-area: dl; display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; margin: 6px 0 0 !important; padding: 8px 0 0 !important; border-top: 1px solid var(--u4-line); }
  html.bw-ui4 body #acc-results[data-view="list"] .stay-card__dl { flex: 1 1 0; justify-content: center; min-width: 0; min-height: 38px; padding: 6px 8px !important; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ==========================================================================
   2026-11-16 ux5 — 행사 목록·상세를 새 디자인으로 (되돌리기 rollback_ux.sh ux5)
   목록: 어두운 보라 머리 → 다른 목록과 같은 밝은 머리(제목·검색·알림). 휴대폰은 '지금·곧 열리는' 띠를 빼고(아래 목록과 같은 행사),
         이번 달 큰 배너를 낮게, 묶음 머리를 회색 상자 대신 굵은 제목으로, 카드의 설명 두 줄을 빼 한 화면에 더 많이.
         사진 없는 카드의 사진 칸이 42px 로 찌그러지던 것도 112px 로.
   상세: 흐린 사진 위 흰 글씨 → 사진을 먼저 또렷하게(휴대폰은 가장자리까지, PC 는 왼쪽 사진·오른쪽 정보), 밝은 바탕에 상태·제목·남은 시간·날짜/장소/요금 표.
         남은 시간은 큰 네 칸 대신 작은 한 줄. 휴대폰: 이름 줄(제목 반복)은 숨기고 저장·알림 단추만, 바로가기 탭, 참가 안내·기본 정보는 본문 맨 위(JS),
         오른쪽 칸 '공유' 카드는 아래 고정 줄에 공유가 있어 숨김, '이어 볼만한 다른 축제'는 두 칸 작은 카드
   머리 모양은 CSS 만으로(스크립트가 늦어도 화면이 흔들리지 않게). 머리의 자식(.evd-hero__content)은 display:contents 로 풀어 순서를 정한다
   ========================================================================== */
/* ---------- 행사 목록: 밝은 머리 ---------- */
html.bw-ui4 body .ev-hero { background: var(--u4-card) !important; background-blend-mode: normal !important; color: var(--u4-ink) !important; border-bottom: 1px solid var(--u4-line); }
html.bw-ui4 body .ev-hero::before, html.bw-ui4 body .ev-hero::after { content: none !important; display: none !important; }
html.bw-ui4 body .ev-hero h1, html.bw-ui4 body .ev-hero .ev-hero__title { color: var(--u4-ink) !important; text-shadow: none !important; }
html.bw-ui4 body .ev-hero h1 .accent { color: var(--u4-brand) !important; }
html.bw-ui4 body .ev-hero p.lead { color: var(--u4-ink3) !important; text-shadow: none !important; }
html.bw-ui4 body .ev-hero .list-hero__breadcrumb, html.bw-ui4 body .ev-hero .list-hero__breadcrumb a { color: var(--u4-ink3) !important; }
html.bw-ui4 body .ev-hero .list-hero__stats { color: var(--u4-ink3) !important; }
html.bw-ui4 body .ev-hero .list-hero__stats > span:not(.list-hero__sep) { background: var(--u4-card) !important; border-color: var(--u4-line) !important; color: var(--u4-ink2) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html.bw-ui4 body .ev-hero .list-hero__stats > span:not(.list-hero__sep) strong { color: var(--u4-brand-d) !important; }
html.bw-ui4 body .ev-hero .list-hero__stats > span.list-hero__sep { color: var(--u4-ink3) !important; }
html.bw-ui4 body .ev-hero .bw-input { background: var(--u4-card) !important; border-color: var(--u4-line) !important; }
html.bw-ui4 body .ev-hero .bw-input .bw-icon { color: var(--u4-ink3) !important; }
html.bw-ui4 body .ev-hero .bw-input input { color: var(--u4-ink) !important; }
html.bw-ui4 body .ev-hero .bw-input input::placeholder { color: #8A919C !important; opacity: 1; }
html.bw-ui4 body .ev-hero .lhv__title { color: var(--u4-brand-d) !important; }
html.bw-ui4 body .ev-hero .lhv__title .bw-icon { color: var(--u4-brand) !important; }
html.bw-ui4 body .ev-hero .lhv-card { border-color: rgba(11, 14, 20, .07) !important; box-shadow: 0 1px 2px rgba(11, 14, 20, .04), 0 12px 30px -16px rgba(11, 14, 20, .30) !important; }
html.bw-ui4 body .ev-hero .lhv__foot { color: var(--u4-ink3) !important; }
html.bw-ui4 body .ev-hero .lhv__foot a:hover { color: var(--u4-ink) !important; }
@media (max-width: 767px) {
  html.bw-ui4 body .ev-hero { padding-top: 0 !important; padding-bottom: 0 !important; }
  html.bw-ui4 body .ev-hero .list-hero { padding-top: 16px !important; padding-bottom: 16px !important; }
  html.bw-ui4 body .ev-hero .list-hero__breadcrumb { display: none !important; }
  html.bw-ui4 body .ev-hero h1 { font-size: 22px !important; line-height: 1.3 !important; letter-spacing: -0.02em !important; margin: 0 0 12px !important; }
  html.bw-ui4 body .ev-hero .lhv { display: none !important; }
  html.bw-ui4 body .ev-hero .list-search-row { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 8px !important; margin: 0 !important; padding: 0 !important; }
  html.bw-ui4 body .ev-hero .list-search-row > .bw-input { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; }
  html.bw-ui4 body .ev-hero .list-search-row > .bw-btn { flex: 0 0 auto !important; width: auto !important; padding: 0 14px !important; }
  /* 이번 달 큰 배너: 4:5(448px) → 낮은 띠(220px), '자세히 보기'는 배너 전체가 눌려 뺌 */
  html.bw-ui4 body .ev-featured { aspect-ratio: auto !important; height: 220px; border-radius: var(--u4-r) !important; margin-bottom: 22px !important; }
  html.bw-ui4 body .ev-featured > img { opacity: .9 !important; }
  html.bw-ui4 body .ev-featured__content { height: 100%; box-sizing: border-box; padding: 16px 16px 30px !important; gap: 0 !important; align-content: end !important; }
  html.bw-ui4 body .ev-featured__badge { margin-bottom: 8px !important; padding: 4px 10px !important; font-size: 11.5px !important; }
  html.bw-ui4 body .ev-featured__date { font-size: 13.5px !important; margin: 0 0 2px !important; }
  html.bw-ui4 body .ev-featured h2 { font-size: 21px !important; line-height: 1.3 !important; margin: 0 0 4px !important; filter: none !important; display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body .ev-featured .ev-featured__where { display: block !important; margin: 0 !important; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.bw-ui4 body .ev-featured__content div:has(> .ev-featured__cta) { display: none !important; }
  html.bw-ui4 body section[data-screen-label="이벤트 / 메인 배너"] { padding-top: 16px !important; }
  /* 묶음 머리: 회색 상자 → 굵은 제목 줄 */
  html.bw-ui4 body .ev-timeline-group { margin-bottom: 28px !important; }
  html.bw-ui4 body .ev-timeline-head { background: none !important; padding: 0 !important; margin: 0 0 12px !important; border-radius: 0 !important; gap: 4px 10px !important; align-items: center !important; }
  html.bw-ui4 body .ev-timeline-head h3 { font-size: 19px !important; font-weight: 800 !important; }
  html.bw-ui4 body .ev-timeline-head__cal { padding: 4px 9px !important; font-size: 12px !important; }
  /* 카드: 설명 두 줄을 빼고 이름(두 줄까지)·날짜·장소만. 사진 칸은 늘 112px */
  html.bw-ui4 body .ev-grid .eventgrid-card { align-items: center !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card .eventgrid-card__desc { display: none !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card > .bw-card__media, html.bw-ui4 body .ev-grid .eventgrid-card > .bw-card__media:has(> .bw-img-ph) { height: 112px !important; aspect-ratio: auto !important; max-height: none !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card > .bw-card__media > .bw-img-ph { height: 100% !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card .bw-card__title { font-size: 17px !important; line-height: 1.35 !important; margin: 0 0 6px !important; display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body .ev-grid .eventgrid-card .bw-card__meta { font-size: 13.5px !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card .bw-card__dot:has(+ .bw-card__district) { display: none !important; }
  html.bw-ui4 body .ev-grid .eventgrid-card .bw-card__district { display: block !important; flex: 1 1 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.bw-ui4 body .ev-grid .eventgrid-card .bw-card__district .bw-icon { display: inline-block; vertical-align: -2px; margin-right: 2px; }
}

/* ---------- 행사 상세: 머리(사진 먼저, 밝은 바탕) ---------- */
html.bw-ui4 body .evd-hero { display: grid !important; grid-template-columns: minmax(0, 1fr); align-items: start !important; min-height: 0 !important; aspect-ratio: auto !important; box-sizing: border-box !important;
  padding: 0 16px 18px !important; background: var(--u4-card) !important; color: var(--u4-ink) !important; position: relative; overflow: hidden; }
html.bw-ui4 body .evd-hero::before, html.bw-ui4 body .evd-hero::after,
html.bw-ui4 body .evd-hero .evd-hero__bg::before, html.bw-ui4 body .evd-hero .evd-hero__bg::after { content: none !important; display: none !important; }
html.bw-ui4 body .evd-hero > *, html.bw-ui4 body .evd-hero .evd-hero__content > * { order: 8; min-width: 0; }
html.bw-ui4 body .evd-hero .evd-hero__content { display: contents !important; }
html.bw-ui4 body .evd-hero .evd-hero__bg { order: 0; position: relative !important; inset: auto !important; z-index: 0; height: 280px; margin: 0 -16px; overflow: hidden; background: var(--u4-band); }
html.bw-ui4 body .evd-hero .evd-hero__bg > img { opacity: 1 !important; filter: none !important; transform: none !important; object-position: center 30%; }
html.bw-ui4 body .evd-hero .evd-hero__bg > img.u4-zoom { cursor: zoom-in; }
html.bw-ui4 body .evd-hero .evd-hero__bg:not(:has(> img)) { height: 120px; }
html.bw-ui4 body .evd-hero .evd-photo-credit { order: 1; margin: 6px 0 0 !important; text-align: right; font-size: 11.5px !important; line-height: 1.45; color: var(--u4-ink3) !important; text-shadow: none !important; }
html.bw-ui4 body .evd-hero .evd-photo-credit a { color: inherit !important; }
html.bw-ui4 body .evd-hero .evd-breadcrumb { order: 2; display: none !important; color: var(--u4-ink3) !important; }
html.bw-ui4 body .evd-hero .evd-breadcrumb a { color: var(--u4-ink3) !important; opacity: 1 !important; }
html.bw-ui4 body .evd-hero .evd-status-row { order: 3; margin: 14px 0 8px !important; }
html.bw-ui4 body .evd-hero .evd-status { font-size: 12.5px !important; padding: 4px 10px !important; letter-spacing: 0 !important; }
html.bw-ui4 body .evd-hero .evd-status--editor { background: var(--u4-band) !important; color: var(--u4-ink) !important; }
html.bw-ui4 body .evd-hero .evd-title { order: 4; margin: 0 0 10px !important; color: var(--u4-ink) !important; text-shadow: none !important; font-size: 24px !important; line-height: 1.3 !important; letter-spacing: -0.02em !important; overflow-wrap: anywhere; }
/* 남은 시간: 큰 네 칸 → 제목 아래 작은 한 줄('02일 13시간 08분 29초') */
html.bw-ui4 body .evd-hero .evd-countdown { order: 5; position: static !important; z-index: auto; justify-content: flex-start !important; flex-wrap: wrap; gap: 6px !important; margin: 0 0 12px !important; }
html.bw-ui4 body .evd-hero .evd-cd-cell { display: inline-flex !important; align-items: baseline; gap: 3px; min-width: 0 !important; padding: 5px 9px !important; border-radius: 8px !important; background: var(--u4-brand-bg) !important; border: 1px solid #FFD9C2 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; text-align: left; }
html.bw-ui4 body .evd-hero .evd-cd-cell .num { font-size: 16px !important; line-height: 1.2 !important; color: var(--u4-brand-d) !important; }
html.bw-ui4 body .evd-hero .evd-cd-cell .lbl { margin: 0 !important; font-size: 12.5px !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important; color: #9A3412 !important; }
html.bw-ui4 body .evd-hero .evd-tagline { order: 6; margin: 0 0 12px !important; color: var(--u4-ink2) !important; text-shadow: none !important; font-size: 15px !important; }
/* 날짜·장소·요금: 회색 상자 안 '이름 | 값' 표 */
html.bw-ui4 body .evd-hero .evd-quick { order: 7; display: grid !important; grid-template-columns: max-content minmax(0, 1fr) !important; gap: 8px 14px !important; align-items: baseline;
  margin: 2px 0 0 !important; padding: 14px 16px !important; border: 0 !important; border-radius: 12px; background: var(--u4-band); }
html.bw-ui4 body .evd-hero .evd-quick__item { display: contents !important; }
html.bw-ui4 body .evd-hero .evd-quick__label { grid-column: 1; color: var(--u4-ink3) !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; line-height: 1.5 !important; }
html.bw-ui4 body .evd-hero .evd-quick__value { grid-column: 2; color: var(--u4-ink) !important; font-size: 15px !important; font-weight: 700 !important; line-height: 1.5 !important; text-shadow: none !important; overflow-wrap: anywhere; }
html.bw-ui4 body .evd-hero .evd-quick__hint { grid-column: 2; margin-top: -6px; color: var(--u4-ink3) !important; font-size: 13px !important; line-height: 1.5; }
/* '사진 크게 보기': 휴대폰은 사진 오른쪽 아래에 얹음 */
html.bw-ui4 body .evd-hero .evd-poster-btn { order: 9; position: absolute; top: 224px; right: 12px; z-index: 2; margin: 0 !important; min-height: 44px !important; padding: 0 14px !important;
  border: 0 !important; background: rgba(17, 24, 39, .74) !important; color: #fff !important; font-size: 13.5px !important; }
@media (min-width: 721px) {
  /* PC: 왼쪽 사진(포스터 전체가 보이게 contain) · 오른쪽 정보. 머리 폭은 본문과 같은 폭 */
  html.bw-ui4 body .evd-hero { width: auto !important; max-width: var(--bw-container, 1240px) !important; margin: 0 auto !important; padding: 28px var(--bw-gutter, 24px) 24px !important; background: transparent !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: repeat(8, auto) 1fr; column-gap: 40px; }
  /* 사진 칸 높이는 사진 비율대로(가로 사진은 꽉, 세로 포스터는 520px 안에 전체) — 크기 속성(width·height)이 있어 불러오기 전에도 자리가 잡힌다 */
  html.bw-ui4 body .evd-hero .evd-hero__bg { grid-column: 1; grid-row: 1 / 10; margin: 0; height: auto; min-height: 240px; max-height: 520px; display: flex; align-items: center; justify-content: center; border-radius: var(--u4-r); }
  html.bw-ui4 body .evd-hero .evd-hero__bg > img { position: static !important; inset: auto !important; width: 100% !important; height: auto !important; max-height: 520px; object-fit: contain !important; object-position: center; }
  html.bw-ui4 body .evd-hero .evd-hero__bg:not(:has(> img)) { height: 300px; }
  html.bw-ui4 body .evd-hero .evd-photo-credit { grid-column: 1; grid-row: 10; }
  html.bw-ui4 body .evd-hero .evd-hero__content > *:not(.evd-photo-credit), html.bw-ui4 body .evd-hero > .evd-countdown { grid-column: 2; }
  html.bw-ui4 body .evd-hero .evd-breadcrumb { display: flex !important; margin: 4px 0 16px !important; font-size: 13px !important; }
  html.bw-ui4 body .evd-hero .evd-status-row { margin: 0 0 12px !important; }
  html.bw-ui4 body .evd-hero .evd-title { font-size: clamp(28px, 2.8vw, 40px) !important; line-height: 1.2 !important; margin: 0 0 14px !important; }
  html.bw-ui4 body .evd-hero .evd-countdown { margin: 0 0 16px !important; }
  html.bw-ui4 body .evd-hero .evd-quick { padding: 18px 20px !important; gap: 10px 18px !important; }
  html.bw-ui4 body .evd-hero .evd-quick__value { font-size: 16px !important; }
  html.bw-ui4 body .evd-hero .evd-poster-btn { position: static; justify-self: start; margin: 16px 0 0 !important; background: var(--u4-card) !important; color: var(--u4-ink) !important; border: 1px solid var(--u4-line) !important; }
  html.bw-ui4 body .evd-hero .evd-poster-btn:hover { border-color: var(--u4-ink3) !important; }
}
/* ---------- 행사 상세: 이름 줄·바로가기 탭 ---------- */
html.bw-ui4 .u4-dtabs.u4-dtabs--ev { margin: 0 !important; width: auto !important; top: calc(var(--bw-hdr-h, var(--bw-header-h, 60px)) + var(--evd-bar-h, 0px)); z-index: 44; }
html.bw-ui4 .u4-dtabs.u4-dtabs--ev ul { max-width: var(--bw-container, 1240px); margin: 0 auto; box-sizing: border-box; padding: 0 max(0px, calc(var(--bw-gutter, 16px) - 14px)); }
html.bw-ui4.u4-evtabs body .evd-side { top: calc(var(--bw-header-h, 60px) + var(--evd-bar-h, 84px) + 61px) !important; }
@media (max-width: 720px) {
  /* 이름 줄: 바로 위 머리에 제목·날짜가 있어 반복을 숨기고 저장·알림 단추만 크게 */
  html.bw-ui4 body .evd-action-bar { background: var(--u4-card) !important; border-bottom: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  html.bw-ui4 body .evd-action-bar__inner { padding-top: 0 !important; padding-bottom: 14px !important; }
  html.bw-ui4 body .evd-action-bar__inner > div:not(.evd-action-bar__btns) { display: none !important; }
  html.bw-ui4 body .evd-action-bar__btns { display: flex !important; gap: 8px !important; width: 100%; }
  html.bw-ui4 body .evd-action-bar__btns > .evd-action-btn { flex: 1 1 0; min-height: 46px !important; font-size: 15px !important; justify-content: center; }
  html.bw-ui4 body .evd-body { padding-top: 16px !important; }
  /* 참가 안내·기본 정보(스크립트가 본문 맨 위 .u4-evinfo 로 옮김) */
  html.bw-ui4 body .u4-evinfo { display: flex; flex-direction: column; gap: 10px; margin: 0 0 22px; }
  html.bw-ui4 body .u4-evinfo .evd-side-card { padding: 14px 16px !important; border-radius: var(--u4-r) !important; border: 1px solid var(--u4-line) !important; background: var(--u4-card) !important; box-shadow: none !important; }
  html.bw-ui4 body .u4-evinfo .evd-side-card h3 { margin: 0 0 4px !important; font-size: 16px !important; font-weight: 800 !important; color: var(--u4-ink) !important; text-transform: none !important; letter-spacing: 0 !important; }
  html.bw-ui4 body .u4-evinfo .evd-side-row { gap: 12px; align-items: baseline; padding: 10px 0 !important; font-size: 14.5px !important; }
  html.bw-ui4 body .u4-evinfo .evd-side-row > span:first-child { flex: 0 0 auto; color: var(--u4-ink3) !important; }
  html.bw-ui4 body .u4-evinfo .evd-side-row > strong { min-width: 0; text-align: right; overflow-wrap: anywhere; }
  html.bw-ui4 body .u4-evinfo .bw-btn { min-height: 48px !important; font-size: 15px !important; }
  html.bw-ui4 body:has(#dxShareBtn) .evd-side-card.u4-evshare { display: none !important; }
  html.bw-ui4 body .evd-section .lead { font-size: 16px !important; line-height: 1.75 !important; }
  /* 이어 볼만한 다른 축제: 한 줄 큰 카드 → 두 칸 작은 카드 */
  html.bw-ui4 body .evd-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  html.bw-ui4 body .evd-related-grid > .bw-card .bw-card__media, html.bw-ui4 body .evd-related-grid > .bw-card .bw-card__media:has(> .bw-img-ph) { aspect-ratio: 4 / 3 !important; height: auto !important; max-height: none !important; }
  html.bw-ui4 body .evd-related-grid > .bw-card .bw-card__body { padding: 10px 12px 12px !important; }
  html.bw-ui4 body .evd-related-grid .bw-card__title { font-size: 15px !important; line-height: 1.35 !important; margin: 0 0 4px !important; display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  html.bw-ui4 body .evd-related-grid .bw-card__meta { font-size: 12.5px !important; }
}

/* ===== 2026-11-16 ux6: 행사 상세 휴대폰 아래 막대의 '홈페이지' 단추 (되돌리기 rollback_ux.sh ux6) =====
   모양은 원래 '전화' 단추(--call)를 그대로 쓴다. 다국어 긴 글자는 한 줄 말줄임, 아이콘은 줄지 않게. */
html.bw-ui4 .dx-sticky-cta .u4-evhome { min-width: 0; padding-left: 8px; padding-right: 8px; }
html.bw-ui4 .dx-sticky-cta .u4-evhome .dx-sticky-icon { flex: none; }
html.bw-ui4 .dx-sticky-cta .u4-evhome span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.bw-ui4 .dx-sticky-cta.u4-evbar > .dx-sticky-cta__btn:not(.u4-evhome) { min-width: 0; }

/* ==========================================================================
   2026-11-19 rd1 · 읽는 순서 정리 (표식 rd-20261119)
   대표 요청: "들어오자마자 바로 나가는 디자인 검토·수정 — 본문·소개를 쉽게 찾게, 유저 기준으로"
   근거(사이트 자체 분석 10-20~11-19): 휴대폰 방문의 약 80%가 검색에서 관광지·맛집 상세로 들어와 96~98%가 그 화면만 보고 나갔다.
     첫 화면 머문 시간 중앙값 15~18초, 절반까지 내린 사람 11~33%. 휴대폰 첫 화면에 소개 글이 없고(1,062px 아래) 주소·지도는 맨 아래(6,070px),
     PC 는 사진 한 장(596~671px)이 첫 화면 전부라 이름조차 안 보였다. 맛집·숙소의 상당수는 '사진 없음' 자동 그림이 그 자리를 차지했다.
   켜짐: html.bw-rd1 — 공용 머리(_shared_header.php)가 bw_ux_rd()(스위치 feature_ux_rd = 1, 또는 관리자 미리보기 'newui')일 때 단다.
   짝: bw-ui4.js 맨 앞 'rd1' 블록(휴대폰에서 아래쪽 칸 옮기기·바로가기 탭 위치 다시 맞추기).
   되돌리기: bash /root/bw_ux_20261119/rollback.sh   (이 블록·js 블록·머리 한 줄·_ui4.php 함수만 뺀다)
   ========================================================================== */

/* ---------- 1. 상세 머리: 분류 → 이름 → 주소·영업 → AI 한 줄 요약 (전에는 요약이 이름 위) ---------- */
html.bw-rd1 .sd-head > div:first-child { display: flex; flex-direction: column; }
html.bw-rd1 .sd-head > div:first-child > * { order: 5; }
html.bw-rd1 .sd-head > div:first-child > .sd-cat-row { order: 0; }
html.bw-rd1 .sd-head > div:first-child > .sd-name { order: 1; }
html.bw-rd1 .sd-head > div:first-child > .sd-meta { order: 2; }
html.bw-rd1 .sd-head > div:first-child > .sd-ai-summary { order: 3; margin: 10px 0 0; }

/* 요약 칸 중 값이 '–'(평점·리뷰가 아직 없음)인 칸은 숨긴다 — 4칸(두 줄)이 2칸(한 줄)이 되어 소개 글이 130px 올라온다. 리뷰 쓰기는 머리 단추·리뷰 칸에 그대로 있다 */
html.bw-rd1 :is(.sd-quick, .fd-quick) > :is(.sd-quick-card, .fd-quick-card):has(> :is(.sd-quick-card__value, .fd-quick-card__value)[style*="--bw-ink-500"]) { display: none !important; }

/* 바로가기 탭(정보·소개·위치…)은 bw-ui4.js 가 머리 아래에 끼워 넣는다 — 그 전에 자리를 비워 둬 끼울 때 아래가 밀리지 않게(첫 화면이 올라와 밀림이 보이게 됐다) */
html.bw-rd1:not(.u4-has-dtabs):is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail) :is(.sd-head, .fd-head, .stayd-head) { margin-bottom: 85px; }
/* PC(1024px 이상) 광고 띠(728x90, 위 여백 18px)가 머리 다음에 있으면 여백이 겹치는 몫까지 99px */
@media (min-width: 1024px) {
  html.bw-rd1:not(.u4-has-dtabs):is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail) :is(.sd-head, .fd-head, .stayd-head):has(~ .bw-ad-pcband) { margin-bottom: 99px; }
}
@media (max-width: 920px) {
  html.bw-rd1:not(.u4-has-dtabs):is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail) :is(.sd-head, .fd-head, .stayd-head) { margin-bottom: 61px; }
}

/* ---------- 2. 사진 칸: 한 장짜리·'사진 없음' 그림은 잘리지 않게(원본 비율 + 옆은 바탕색), PC 는 높이 제한 ----------
   같은 사진을 흐리게 깔면 그 배경 그림이 LCP(가장 큰 그림)로 잡혀 0.1~0.3초 늦게 재진다 — 그래서 단색 바탕 */
html.bw-rd1 .stayd-gallery .stayd-slide,
html.bw-rd1 :is(.sd-gallery[data-count="1"], .fd-gallery--n0, .fd-gallery--n1) > div,
html.bw-rd1 :is(.sd-gallery, .fd-gallery):has(img[src*="/generated/"]) > div { background: var(--bw-canvas-2, #F1EFEA); }
html.bw-rd1 :is(.sd-gallery, .fd-gallery, .stayd-gallery) img[src*="/generated/"] { object-fit: contain !important; }
/* '사진 없음' 자동 그림(이름·분류만 적힌 그림): 얇은 띠로 — 이름은 바로 아래 머리에 크게 있다 */
html.bw-rd1 :is(.sd-gallery, .fd-gallery):has(img[src*="/generated/"]) { aspect-ratio: auto !important; height: 150px !important; }
html.bw-rd1 :is(.sd-gallery, .fd-gallery):has(img[src*="/generated/"]) > div { height: 100% !important; width: 100% !important; aspect-ratio: auto !important; }
html.bw-rd1 :is(.sd-gallery, .fd-gallery, .stayd-gallery) img[src*="/generated/"] { width: 100% !important; height: 100% !important; }
html.bw-rd1 .stayd-gallery:has(.stayd-slide.is-active img[src*="/generated/"]) .stayd-slider { height: 150px !important; }
@media (min-width: 921px) {
  /* PC: 첫 화면(900px)에 이름·주소·단추까지 보이게 사진 칸 높이를 420px(화면 높이의 48%) 안으로 */
  html.bw-rd1 #bw-main > section.bw-container:first-child:has(> :is(.sd-gallery, .fd-gallery, .stayd-gallery)) { padding-top: 16px !important; }
  html.bw-rd1 :is(.sd-gallery[data-count="1"], .fd-gallery--n0, .fd-gallery--n1) { aspect-ratio: auto !important; height: min(420px, 48vh) !important; }
  html.bw-rd1 :is(.sd-gallery[data-count="1"], .fd-gallery--n0, .fd-gallery--n1) > div > img,
  html.bw-rd1 :is(.sd-gallery[data-count="1"], .fd-gallery--n0, .fd-gallery--n1) > div > picture > img { object-fit: contain !important; }
  html.bw-rd1 :is(.sd-gallery, .fd-gallery):not([data-count="1"]):not(.fd-gallery--n0):not(.fd-gallery--n1) { max-height: min(440px, 50vh); }
  html.bw-rd1 .stayd-gallery .stayd-slider { height: min(420px, 48vh) !important; }
  html.bw-rd1 .stayd-gallery .stayd-slide img { object-fit: contain !important; }
  html.bw-rd1 :is(.sd-gallery, .fd-gallery):has(img[src*="/generated/"]) { height: 200px !important; }
  html.bw-rd1 .stayd-gallery:has(.stayd-slide.is-active img[src*="/generated/"]) .stayd-slider { height: 200px !important; }
}

/* ---------- 3. 휴대폰 상세: 여백·단추 한 줄·요약 칸을 줄여 소개 글을 위로 ---------- */
@media (max-width: 920px) {
  html.bw-rd1 .sd-cat-row { margin-top: 8px; }
  html.bw-rd1 .sd-name { margin-bottom: 4px; }
  html.bw-rd1 .sd-meta { margin-bottom: 0; }
  html.bw-rd1 .sd-head { margin-bottom: 8px; }
  /* 저장·다녀왔어요·리뷰 쓰기를 한 줄로(전에는 두 줄 94px) */
  html.bw-rd1 .sd-actions { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-right: 0 !important; margin-top: 12px; }
  html.bw-rd1 .sd-actions > .bw-btn { grid-column: auto !important; min-width: 0; }
  html.bw-rd1 .sd-actions > .bw-btn--accent { grid-column: span 1 !important; }
  html.bw-rd1 :is(.fd-head, .stayd-head) { margin-bottom: 8px; }
  html.bw-rd1 .u4-dtabs { margin-top: 8px; }
  html.bw-rd1 :is(.sd-body, .fd-body, .stayd-body) { padding-top: 10px; }
  html.bw-rd1 :is(.sd-quick, .fd-quick) { margin-bottom: 20px; gap: 8px; }
  html.bw-rd1 :is(.sd-quick-card, .fd-quick-card) { padding: 12px 14px; }
}

/* 머리 줄 '공유'는 휴대폰 아래 고정 막대(길찾기·공유)에 늘 있어 숨긴다 — ui4 는 그 막대가 읽힌 뒤(:has)에야 숨겨 첫 화면에서 단추 줄이 한 번 흔들렸다 */
@media (max-width: 720px) {
  html.bw-rd1 :is(.sd-head, .fd-head, .stayd-head) button[onclick*="navigator.share"] { display: none !important; }
}

/* ---------- 4. 휴대폰: 내려 읽는 동안 머리를 위로 숨긴다(올리면 다시 나옴) — 상세·목록 화면 ----------
   떠 있는 것(머리 60 + 바로가기 탭 49 + 아래 탭 57)이 읽는 화면의 1/3 을 가렸다. 위치 이동이 아니라 transform 이라 화면 밀림(CLS)이 없다. */
@media (max-width: 767px) {
  html.bw-rd1:is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail, .bwp-food_list, .bwp-spot_list, .bwp-accommodation, .bwp-service_list, .bwp-theme, .bwp-tag, .bwp-search) .bw-header.bw-hdr { transition: transform .22s ease; }
  html.bw-rd1:is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail) :is(.u4-dtabs, .list-filter),
  html.bw-rd1:is(.bwp-food_list, .bwp-spot_list, .bwp-accommodation, .bwp-service_list, .bwp-theme, .bwp-tag, .bwp-search) :is(.list-filter, .u4-stabs) { transition: transform .22s ease; }
  html.bw-rd1.u4-sdn:not(.rd-hold):is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail, .bwp-food_list, .bwp-spot_list, .bwp-accommodation, .bwp-service_list, .bwp-theme, .bwp-tag, .bwp-search) .bw-header.bw-hdr { transform: translateY(-100%); }
  html.bw-rd1.u4-sdn:not(.rd-hold):is(.bwp-spot_detail, .bwp-food_detail, .bwp-stay_detail) :is(.u4-dtabs, .list-filter),
  html.bw-rd1.u4-sdn:not(.rd-hold):is(.bwp-food_list, .bwp-spot_list, .bwp-accommodation, .bwp-service_list, .bwp-theme, .bwp-tag, .bwp-search) :is(.list-filter, .u4-stabs) { transform: translateY(calc(-1 * var(--bw-hdr-h, 60px))); }
}
@media (prefers-reduced-motion: reduce) {
  html.bw-rd1 .bw-header.bw-hdr, html.bw-rd1 :is(.u4-dtabs, .list-filter, .u4-stabs) { transition: none !important; }
}

/* ---------- 5. 휴대폰 목록(맛집·관광지·숙박·생활 서비스): 검색·위치·칩 줄 사이 여백을 줄여 첫 카드를 첫 화면 안으로 ---------- */
@media (max-width: 767px) {
  html.bw-rd1 body #bw-main:is(.fl, .wl) .fl-find { padding-top: 10px !important; padding-bottom: 0 !important; }
  html.bw-rd1 body #bw-main:is(.fl, .wl) .nf { margin-top: 8px !important; margin-bottom: 0 !important; }
  html.bw-rd1 body #bw-main:is(.fl, .wl) .nf .nf-btn { min-height: 44px !important; padding-top: 4px !important; padding-bottom: 4px !important; }
  html.bw-rd1 body #bw-main:is(.fl, .wl) .wz-chips.fl-cats { padding-top: 6px !important; }
  html.bw-rd1 body #bw-main:is(.fl, .wl) .fl-res-h { margin-top: 4px !important; padding-top: 8px !important; }
  /* 비어 있는 광고 칸 안내(사장님용 '광고 칸이 비어 있어요'): 자리·문구는 그대로, 높이만 123px → 두 줄 안팎 */
  html.bw-rd1 body #bw-main .adc-cta { margin: 6px auto !important; padding: 7px 12px !important; font-size: 12.5px !important; line-height: 1.45 !important; gap: 2px 8px !important; }
}
/* ========== /rd1 rd-20261119 ========== */
