/* 창빙시 홈 v4.0.0 — 대문 전체 새 판. home.css 위에 덮어씁니다.
   근거: 2026-11-07 크랙·제타·바베챗 대문 실측(reports/Changbingsi-HomeLayout-Benchmark_v1.0.0)
   - 크랙: 큰 배너 + 다음 배너가 좁은 띠로 보임(데스크톱 약 2.85:1), 모바일은 폭 가득 3:1 안팎, '오직 크랙에서만' 가로 카드에 로고 같은 제목
   - 크랙·바베챗: 세로 표지 위에 큰 제목 글씨, 카드 7장 안팎이 한 줄, 태그 타일
   - 제타·바베챗: 어두운 바탕
   제목 글씨 글꼴은 OFL 한글 글꼴(assets/fonts, 쓰는 글자만 남김)이고, 그림체마다 다른 글꼴을 씁니다. */
@font-face { font-family: "cb-bhs"; src: url(assets/fonts/blackhansans.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "cb-dohyeon"; src: url(assets/fonts/dohyeon.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "cb-songmyung"; src: url(assets/fonts/songmyung.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "cb-gowun"; src: url(assets/fonts/gowunbatang.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "cb-myeongjo"; src: url(assets/fonts/nanummyeongjo.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "cb-brush"; src: url(assets/fonts/nanumbrushscript.woff2) format("woff2"); font-display: swap; }

/* ── 대문 배너 ─────────────────────────── */
.f-banner { display: none; }
.hb { position: relative; margin: 4px 0 6px; }
.hb-track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hb-track::-webkit-scrollbar { display: none; }
.hb-slide { position: relative; flex: 0 0 100%; aspect-ratio: 2.4 / 1; overflow: hidden; scroll-snap-align: start; background: var(--f-bg-3); }
.hb-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hb-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 6, 14, 0.86) 0%, rgba(8, 6, 14, 0.55) 34%, rgba(8, 6, 14, 0) 62%), linear-gradient(to top, rgba(8, 6, 14, 0.55), rgba(8, 6, 14, 0) 40%); }
.hb-hit { position: absolute; inset: 0; z-index: 2; }
.hb-slide.light::after { background: linear-gradient(90deg, rgba(250, 246, 240, 0.9) 0%, rgba(250, 246, 240, 0.6) 34%, rgba(250, 246, 240, 0) 60%); }
.hb-slide.light .hb-txt h3 { color: #2a2133; text-shadow: 0 0 10px rgba(255, 255, 255, 0.8); }
.hb-slide.light .hb-txt p { color: #3c3346; }
.hb-txt { position: absolute; left: 16px; bottom: 14px; z-index: 1; max-width: 62%; pointer-events: none; }
.hb-txt .kick { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 5px; background: var(--gold); color: var(--gold-ink); }
.hb-txt .kick.char { background: #d9407a; color: #fff; }
.hb-txt .kick.event { background: #7c5cff; color: #fff; }
.hb-txt h3 { margin: 6px 0 2px; font-family: "cb-dohyeon", var(--font); font-weight: 400; font-size: 23px; line-height: 1.15; letter-spacing: -0.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); word-break: keep-all; }
.hb-txt p { margin: 0; font-size: 12px; line-height: 1.45; color: #e6e0ee; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hb-cta { display: none; }
.hb-count { position: absolute; right: 12px; bottom: 12px; z-index: 3; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; pointer-events: none; }
.hb-count b { font-weight: 800; }
.hb-arrow { display: none; }

/* ── 캐릭터 카드: 제목 글씨 ───────────────── */
.f-char .f-cover::after { background: linear-gradient(to top, rgba(8, 6, 14, 0.82) 0%, rgba(8, 6, 14, 0.25) 30%, rgba(8, 6, 14, 0) 48%); }
.f-char .f-ttl, .f-style-tile .f-ttl { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; font-weight: 400; word-break: keep-all; letter-spacing: -0.01em; transition: opacity 0.2s; }
.f-cover[data-s="base"] .f-ttl { font-family: "cb-dohyeon", var(--font); font-size: 21px; line-height: 1.12; color: #fff; text-shadow: 0 0 10px rgba(255, 92, 160, 0.7), 0 2px 8px rgba(0, 0, 0, 0.8); }
.f-cover[data-s="a"]::after { background: linear-gradient(to top, rgba(252, 249, 244, 0.86) 0%, rgba(252, 249, 244, 0.35) 28%, rgba(252, 249, 244, 0) 46%); }
.f-cover[data-s="a"] .f-ttl { font-family: "cb-gowun", var(--serif); font-weight: 700; font-size: 18px; line-height: 1.25; color: #2b2334; text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
.f-cover[data-s="b"] .f-ttl { left: 8px; right: 8px; font-family: "cb-bhs", var(--font); font-size: 22px; line-height: 1.08; color: #fff36b; -webkit-text-stroke: 5px #111; paint-order: stroke fill; transform: rotate(-3deg); transform-origin: 0 100%; }
.f-cover[data-s="c"] .f-ttl { font-family: "cb-songmyung", var(--serif); font-size: 20px; line-height: 1.2; color: #f6ecd9; letter-spacing: 0.01em; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9); }
.f-cover[data-s="d"]::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 36%); }
.f-cover[data-s="d"] .f-ttl { right: auto; max-width: calc(100% - 20px); font-family: "cb-brush", var(--serif); font-size: 30px; line-height: 1.02; color: #fff; }
.f-cover[data-s="d"] .f-ttl { text-decoration: underline; text-decoration-color: rgba(226, 38, 64, 0.95); text-decoration-thickness: 7px; text-underline-offset: -3px; text-decoration-skip-ink: none; text-shadow: 0 0 2px #000, 0 0 6px #000; }
.f-cover[data-s="e"]::after { background: linear-gradient(to bottom, rgba(8, 10, 30, 0.6) 0%, rgba(8, 10, 30, 0) 34%), linear-gradient(to top, rgba(8, 6, 14, 0.4), rgba(8, 6, 14, 0) 30%); }
.f-cover[data-s="e"] .f-ttl { top: 12px; bottom: auto; text-align: center; font-family: "cb-myeongjo", var(--serif); font-weight: 800; font-size: 18px; line-height: 1.22; color: #fff; text-shadow: 0 0 14px rgba(110, 160, 255, 0.95), 0 2px 6px rgba(0, 0, 0, 0.7); }
.f-cover[data-s="e"] .f-badges { top: auto; bottom: 6px; }
.f-char h3 { margin-top: 8px; }

/* 6장 넘겨 보기 표시: 마우스를 올리면 그림체 이름과 점이 보입니다 */
.f-sty { position: absolute; right: 6px; top: 6px; z-index: 3; display: flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 999px; background: rgba(10, 8, 16, 0.66); opacity: 0.85; }
.f-sty i { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; margin-right: 2px; display: none; }
.f-sty s { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); text-decoration: none; }
.f-sty s.on { background: #fff; }
.f-char.cycling .f-sty { opacity: 1; }
.f-char.cycling .f-sty i { display: inline; }
.f-char.cycling .f-cover img { transform: none; }

/* ── 오직 창빙시에서만 ───────────────── */
.f-only { position: relative; flex: none; width: 80vw; max-width: 360px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--f-bg-3); text-align: left; cursor: pointer; }
.f-only img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.6s var(--ease-out); }
.f-only:hover img { transform: scale(1.04); }
.f-only::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 6, 14, 0.78) 0%, rgba(8, 6, 14, 0.2) 55%, rgba(8, 6, 14, 0) 75%); }
.f-only .only-logo { position: absolute; left: 16px; top: 18%; z-index: 1; max-width: 58%; font-family: "cb-songmyung", var(--serif); font-weight: 400; font-size: 27px; line-height: 1.1; color: #fff; word-break: keep-all; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.f-only[data-genre="romance"] .only-logo { font-family: "cb-myeongjo", var(--serif); font-weight: 800; color: #ffe1ea; }
.f-only[data-genre="modern"] .only-logo { font-family: "cb-bhs", var(--font); color: #e8f1ff; }
.f-only[data-genre="mystery"] .only-logo { font-family: "cb-brush", var(--serif); font-size: 36px; color: #f3e6c8; }
.f-only .tag { position: absolute; left: 16px; top: 10px; z-index: 1; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(6px); }
.f-only .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: rgba(10, 8, 16, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.f-only .bar span { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-only .bar i { flex: none; font-style: normal; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 7px; background: #fff; color: #120f19; }

/* ── 그림체로 고르기 ───────────────── */
.f-styles { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 16px 4px; scroll-snap-type: x proximity; }
.f-styles::-webkit-scrollbar { display: none; }
.f-style-tile { position: relative; flex: none; width: 46vw; max-width: 236px; padding: 0 0 10px; border-radius: 14px; background: var(--f-bg-2); border: 1px solid var(--f-line) !important; text-align: left; cursor: pointer; scroll-snap-align: start; overflow: hidden; }
.f-style-tile .fan { position: relative; height: 150px; margin-bottom: 4px; background: radial-gradient(120% 90% at 50% 100%, rgba(255, 255, 255, 0.07), transparent 70%); }
.f-style-tile .fan img { position: absolute; bottom: 8px; width: 46%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 18%; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); transition: transform 0.35s var(--ease-out); }
.f-style-tile .fan img:nth-child(1) { left: 6%; transform: rotate(-9deg); }
.f-style-tile .fan img:nth-child(2) { left: 27%; z-index: 1; bottom: 14px; }
.f-style-tile .fan img:nth-child(3) { left: 48%; transform: rotate(9deg); }
.f-style-tile:hover .fan img:nth-child(1) { transform: rotate(-13deg) translateX(-6px); }
.f-style-tile:hover .fan img:nth-child(3) { transform: rotate(13deg) translateX(6px); }
.f-style-tile .txt { position: relative; aspect-ratio: auto; height: 34px; margin: 0 12px; border-radius: 0; background: none; overflow: visible; }
.f-style-tile .txt::after { display: none; }
.f-style-tile .txt .f-ttl { left: 0; right: auto; bottom: 0; top: auto; text-align: left; transform: none; }
.f-style-tile .f-cover[data-s="a"] .f-ttl { color: #f2ecfa; text-shadow: none; }
.f-style-tile .f-cover[data-s="d"] .f-ttl { font-size: 32px; }
.f-style-tile small { display: block; margin: 4px 12px 0; font-size: 12px; color: var(--f-text-3); }
/* 줄 첫 카드가 왼쪽 여백에 맞춰 멈추도록(스크롤 맞춤이 여백을 무시해 첫 카드가 잘리던 문제) */
.f-row, .f-styles { scroll-padding-inline: 16px; }
.f-sec { scroll-margin-top: calc(var(--safe-t) + 104px); }
.f-style-tabs { display: flex; gap: 6px; padding: 0 16px; margin: -2px 0 14px; overflow-x: auto; scrollbar-width: none; }

/* ── 태그 타일 ───────────────── */
.f-tag { width: 38vw; max-width: 188px; aspect-ratio: 4 / 3; }
.f-tag img { filter: saturate(0.95) brightness(0.6); transition: transform 0.6s var(--ease-out); }
.f-tag:hover img { transform: scale(1.05); }
.f-tag b { left: 12px; bottom: 26px; font-family: "cb-dohyeon", var(--font); font-weight: 400; font-size: 21px; }
.f-tag small { position: absolute; left: 12px; bottom: 9px; font-size: 11.5px; font-weight: 600; color: #e6e0ee; }
.f-tag b:last-child { bottom: 12px; }

/* ── 데스크톱 ───────────────── */
@media (min-width: 1024px) {
  .hb { margin: 2px 28px 8px; }
  .hb-track { overflow: visible; height: clamp(250px, 21.5vw, 330px); scroll-snap-type: none; }
  .hb-slide { flex: 0 0 64px; height: 100%; aspect-ratio: auto; border-radius: 14px; display: none; cursor: pointer; transition: flex-basis 0.45s var(--ease-out); }
  .hb-slide.is-on, .hb-slide.is-peek { display: block; }
  .hb-slide.is-on { flex: 1 1 auto; cursor: default; }
  .hb-slide.is-peek img { object-position: 70% 50%; filter: saturate(0.85) brightness(0.8); }
  .hb-slide.is-peek::after { background: rgba(8, 6, 14, 0.15); }
  .hb-slide.is-peek .hb-txt { display: none; }
  .hb-slide.is-peek .hb-hit { display: none; }
  .hb-txt { left: 34px; bottom: 30px; max-width: 46%; }
  .hb-txt .kick { font-size: 12px; padding: 3px 8px; }
  .hb-txt h3 { margin: 10px 0 6px; font-size: 38px; }
  .hb-txt p { font-size: 14.5px; -webkit-line-clamp: 2; }
  .hb-cta { display: inline-block; margin-top: 14px; padding: 7px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.94); color: #120f19; font-size: 13px; font-weight: 800; }
  .hb-count { right: auto; left: auto; bottom: 16px; right: calc(4 * 72px + 16px); }
  .hb-arrow { display: grid; place-items: center; position: absolute; top: 50%; z-index: 4; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: rgba(13, 11, 19, 0.82) !important; color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45); }
  .hb-arrow.prev { display: none; }   /* 접힌 띠를 누르거나 다음 화살표·키보드로 넘깁니다(제목을 가리지 않게) */
  .hb-arrow.next { right: calc(4 * 72px - 6px); }
  .f-char { width: 184px; }
  .f-char .f-ttl { font-size: 1em; }
  .f-cover[data-s="base"] .f-ttl { font-size: 23px; }
  .f-cover[data-s="a"] .f-ttl { font-size: 19px; }
  .f-cover[data-s="b"] .f-ttl { font-size: 24px; }
  .f-cover[data-s="c"] .f-ttl { font-size: 22px; }
  .f-cover[data-s="d"] .f-ttl { font-size: 33px; }
  .f-cover[data-s="e"] .f-ttl { font-size: 19px; }
  .f-only { width: 380px; }
  .f-only .only-logo { font-size: 30px; }
  .f-styles { padding: 0 28px 4px; gap: 14px; }
  .f-row, .f-styles { scroll-padding-inline: 28px; }
  .f-sec { scroll-margin-top: 120px; }
  .f-style-tile { width: 236px; }
  .f-style-tile .fan { height: 176px; }
  .f-style-tabs { padding: 0 28px; }
  .f-tag { width: 188px; }
  .f-grid-char { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
}
@media (min-width: 1440px) { .f-char { width: 192px; } }
@media (max-width: 1023px) { .f-grid-char { grid-template-columns: repeat(2, minmax(0, 1fr)); } .f-grid-char .f-char { width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) {
  .hb-slide, .f-only img, .f-tag img, .f-style-tile .fan img { transition: none; }
}

/* 작품 카드(선택형·자유 대화형·창작 예시)에도 표지 제목 글씨를 얹습니다. 장르마다 글꼴: 로맨스=명조, 판타지=송명, 현대=검은고딕, 미스터리=붓 */
.f-card .f-cover > .f-ttl.work { position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 2; font-weight: 400; color: #fff; word-break: keep-all; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9); font-family: "cb-songmyung", var(--serif); font-size: 19px; line-height: 1.18; }
.f-card .f-cover:has(> .f-ttl.work)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(8, 6, 14, 0.78), rgba(8, 6, 14, 0) 45%); }
.f-card .f-cover > .f-ttl.work[data-g="romance"] { font-family: "cb-myeongjo", var(--serif); font-weight: 800; font-size: 17px; color: #ffe6ee; }
.f-card .f-cover > .f-ttl.work[data-g="modern"] { font-family: "cb-bhs", var(--font); font-size: 19px; color: #eef4ff; -webkit-text-stroke: 3px rgba(0, 0, 0, 0.75); paint-order: stroke fill; }
.f-card .f-cover > .f-ttl.work[data-g="mystery"] { font-family: "cb-brush", var(--serif); font-size: 27px; color: #f6ead0; }
