/* =====================================================================
   fun-hall.css — 재미사주관 둘러보기 (2026-11-15 · fun-saju.html)
   · 주제 칩 · 캐릭터 카드 · 추천 / 새로 나온 / 기획전 가로 줄 · 전체 목록 더 보기
   · 기존 fun-saju.html 안 <style> 의 .fs-* 규칙은 다시 정의하지 않습니다 (새 fh- 이름만)
   ===================================================================== */

/* 불러오는 동안 — 「준비 중」 대신 목록 뼈대 (자리 흔들림 방지) */
html.fh-loading .fs-soon{ display:none; }
html.fh-loading #funList[hidden]{ display:block; }
.fh-skel{ pointer-events:none; }
.fh-skel-img{ display:block; width:100%; aspect-ratio:3 / 4; background:#1C1139; }
.fh-skel-txt{ color:transparent; background:rgba(243,239,252,.1); border-radius:6px; user-select:none;
              -webkit-box-decoration-break:clone; box-decoration-break:clone; }
@keyframes fhPulse{ 0%,100%{ opacity:1; } 50%{ opacity:.55; } }
.fh-skel-img, .fh-skel-txt{ animation:fhPulse 1.4s ease-in-out infinite; }

/* 공통 */
.fh{ width:min(1040px,100%); margin:0 auto; text-align:left; }
.fs-list-h a[hidden], .fh[hidden], .fh-sec[hidden], .fh-meta[hidden], .fh-reset[hidden], .fh-more[hidden], .fh-empty[hidden]{ display:none; }
.fh-sec{ margin:0 0 clamp(26px,3.4vw,38px); }
.fh-sec-h{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0 0 12px; }
.fh-sec-h h2{ margin:0; font-family:var(--font-serif, serif); font-size:clamp(1.08rem,2.4vw,1.3rem); color:#FDFAF3; }
.fh-sec-sub{ margin:-6px 0 12px; color:rgba(243,239,252,.72); font-size:.88rem; line-height:1.55; }
.fh-sec-sub em{ font-style:normal; color:#E3C367; }

.fh button{ font:inherit; }
.fh button:focus-visible, .fh-list-btn:focus-visible, .fh .fs-card:focus-visible, #funGrid .fs-card:focus-visible{
  outline:2px solid #F0D57A; outline-offset:2px; }

/* 「모두 보기」 · 「전체로」 · 「더 보기」 */
.fh-all, .fh-reset{
  flex:none; background:none; border:0; padding:6px 2px; min-height:36px; cursor:pointer;
  color:#F0D57A; font-size:.88rem; white-space:nowrap; }
.fh-all:hover, .fh-reset:hover{ text-decoration:underline; }

/* 가로로 넘기는 줄 (휴대폰 · 태블릿) */
.fh-scroll{ display:flex; gap:12px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x proximity;
            -webkit-overflow-scrolling:touch; padding:5px 2px 10px; scrollbar-width:thin; scrollbar-color:rgba(212,175,55,.35) transparent; }
.fh-scroll::-webkit-scrollbar{ height:6px; }
.fh-scroll::-webkit-scrollbar-thumb{ background:rgba(212,175,55,.35); border-radius:3px; }
.fh-scroll > *{ scroll-snap-align:start; }

/* ② 주제 칩 */
.fh-chips{ gap:8px; }
.fh-chip{
  flex:none; display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:8px 14px; cursor:pointer;
  border-radius:999px; border:1px solid rgba(212,175,55,.38); background:rgba(255,255,255,.04);
  color:#F3EFFC; font-size:.9rem; white-space:nowrap; transition:background-color .15s ease, border-color .15s ease; }
.fh-chip:hover{ border-color:rgba(212,175,55,.75); }
.fh-chip[aria-pressed="true"]{ background:linear-gradient(135deg,#E3C367,#C9A447); border-color:#E3C367; color:#1B0F33; font-weight:700; }
.fh-chip-n{ font-size:.78rem; opacity:.75; font-variant-numeric:tabular-nums; }
.fh-chip[aria-pressed="true"] .fh-chip-n{ opacity:.85; }

/* ③ 캐릭터 카드 */
.fh-series{ gap:12px; }
.fh-ser{
  flex:none; width:min(58vw,224px); display:flex; flex-direction:column; text-align:left; cursor:pointer; padding:0;
  border-radius:14px; overflow:hidden; border:1px solid rgba(212,175,55,.28); background:rgba(255,255,255,.05);
  color:#F3EFFC; transition:transform .15s ease, border-color .15s ease; }
.fh-ser:hover{ transform:translateY(-2px); border-color:rgba(212,175,55,.7); }
.fh-ser[aria-pressed="true"]{ border-color:#E3C367; box-shadow:0 0 0 1px #E3C367 inset; }
/* 2026-11-17 : 캐릭터 대표 이미지는 4:3 으로 제작 → 그림 칸도 4:3 (인물 · 그림 속 제목이 잘리지 않게) */
.fh-ser-pic{ position:relative; display:block; width:100%; aspect-ratio:4 / 3; background:#1C1139; overflow:hidden; }
.fh-ser-pic img{ display:block; width:100%; height:100%; object-fit:cover; }
/* 그림이 없을 때 — 보라 하늘 + 금빛 별 (CSS 만 · 외부 그림 없음) */
.fh-ph{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
        background:
          radial-gradient(circle at 22% 28%, rgba(240,213,122,.35) 0 1.5px, transparent 2.5px),
          radial-gradient(circle at 78% 22%, rgba(240,213,122,.28) 0 1px, transparent 2px),
          radial-gradient(circle at 64% 76%, rgba(240,213,122,.25) 0 1px, transparent 2px),
          radial-gradient(120% 90% at 50% 110%, rgba(150,96,220,.55), transparent 60%),
          linear-gradient(160deg,#2A1752 0%,#1C1139 55%,#140A28 100%); }
.fh-ph::before{ content:"\2726"; color:#E3C367; font-size:2.1rem; line-height:1; text-shadow:0 0 18px rgba(227,195,103,.55); }
.fh-ph b{ position:absolute; left:12px; bottom:10px; font-family:var(--font-serif, serif); font-size:1.5rem; color:rgba(253,250,243,.18); }
.fh-ser-b{ display:flex; flex-direction:column; gap:4px; padding:11px 13px 13px; }
.fh-ser-t{ font-weight:700; font-size:.98rem; line-height:1.4; word-break:keep-all; }
.fh-ser-d{ color:rgba(243,239,252,.72); font-size:.84rem; line-height:1.5; word-break:keep-all;
           display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.fh-ser-n{ color:#F0D57A; font-size:.82rem; font-weight:600; }

/* ④⑤⑥ 상품 가로 줄 — 카드 자체 모양은 .fs-card 그대로, 폭만 정함 */
.fh-row{ gap:12px; }
.fh-row > .fs-card{ flex:none; width:min(40vw,190px); }

/* 카드 위 표시 (NEW · 추천) — 카드 모양 규칙은 건드리지 않고 자리만 */
.fh-card{ position:relative; }
.fh-badges{ position:absolute; top:8px; left:8px; display:flex; gap:4px; pointer-events:none; }
.fh-badge{ display:inline-block; padding:3px 7px; border-radius:6px; font-size:.68rem; font-weight:800; letter-spacing:.04em; line-height:1.2;
           background:#E3C367; color:#1B0F33; box-shadow:0 2px 6px rgba(0,0,0,.35); }
.fh-badge.is-rec{ background:#6B3FC4; color:#FDFAF3; }
.fh-noimg{ display:block; width:100%; aspect-ratio:3 / 4; background:#1C1139; }

/* ⑦ 큰 목록 머리 · 더 보기 */
.fh-meta{ display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; margin:-6px 0 14px; color:rgba(243,239,252,.75); font-size:.88rem; }
.fh-crumb{ color:#E3C367; font-weight:600; }
.fh-count{ font-variant-numeric:tabular-nums; }
.fh-reset{ margin-left:auto; border:1px solid rgba(212,175,55,.5); border-radius:999px; padding:6px 14px; }
.fh-reset:hover{ text-decoration:none; border-color:#E3C367; }
#funListH:focus{ outline:none; }
#funListH:focus-visible{ outline:none; }   /* 분류를 고른 뒤 제목으로 옮기는 초점(읽어 주기용) — 화면엔 테두리 없이 */
.fh-more-wrap{ display:flex; justify-content:center; margin-top:18px; }
.fh-more{
  min-height:46px; min-width:min(320px,100%); padding:11px 22px; border-radius:999px; cursor:pointer;
  border:1px solid rgba(212,175,55,.75); background:rgba(12,7,26,.55); color:#F0D57A; font-size:.95rem; font-weight:600; }
.fh-more:hover{ background:rgba(212,175,55,.12); }
.fh-empty{ margin:4px 0 0; padding:18px; border:1px dashed rgba(212,175,55,.35); border-radius:12px; color:rgba(243,239,252,.8); text-align:center; }

/* 태블릿 이상 — 칩은 줄 바꿈, 캐릭터는 격자 */
@media (min-width:769px){
  .fh-chips{ flex-wrap:wrap; overflow:visible; }
  .fh-series{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); overflow:visible; }
  .fh-ser{ width:auto; }
  .fh-row > .fs-card{ width:calc((100% - 36px) / 4.3); }
}
@media (min-width:1100px){
  .fh-row > .fs-card{ width:calc((100% - 48px) / 5); }
}

@media (prefers-reduced-motion:reduce){
  .fh-chip, .fh-ser{ transition:none; }
  .fh-ser:hover{ transform:none; }
  .fh-skel-img, .fh-skel-txt{ animation:none; }
  .fh-scroll{ scroll-behavior:auto; }
}
