/* 반짝반짝 쥬엘리아! 공개 페이지 — 톤 정본: 디자인/대표님-지시-정본.md §1~4·§10, 레퍼 site/_mockups/page-ref-*.png
   글꼴은 세 자리에서만 정한다(빌드가 글자를 자리별로 모아 줄이기 때문): body = 본문, h1~h3·.f-title = 제목, .f-sans = 작은 글 */
@font-face { font-family: "J-Title"; src: url(fonts/j-title-400.6d32701f.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "J-Body"; src: url(fonts/j-body-400.7cee09f7.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "J-Sans"; src: url(fonts/j-sans-400.37ae29d7.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "J-Sans"; src: url(fonts/j-sans-600.9b3c86af.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --cream: #fef4ec;        /* Cloud Cream — 히어로 그림 아래 끝과 같은 색 */
  --paper: #fffaf5;
  --ink: #6a1340;          /* 크림 위 글자 */
  --ink-soft: #7f3358;
  --rose: #e8457f;         /* Jewel Rose */
  --rose-deep: #c2255c;
  --hero-pink: #ff2f86;    /* Hero Pink — 화면당 한 곳 */
  --pink-soft: #ffe3ee;    /* Soft Pink */
  --pink-line: #f4c4d6;
  --gold: #e3ac57;         /* Starlight Gold */
  --gold-deep: #b97c2a;
  --gold-ink: #85560f;      /* 크림 위 금빛 글자(대비 4.5 이상) */
  --plum: #4a1d5c;         /* Twilight Plum */
  --w: min(100% - 32px, 1040px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "J-Body", "J-Sans", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .f-title { font-family: "J-Title", "J-Body", -apple-system, "Apple SD Gothic Neo", sans-serif; font-weight: 400; }
.f-sans { font-family: "J-Sans", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
h2, h3 { text-wrap: balance; line-height: 1.3; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-deep); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button, summary, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 8px 14px; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 0 0 2px var(--gold); }
.skip:focus { top: 12px; }

/* ── 전체판 표시(공개판에는 통째로 없다) ── */
.edbar { padding: 6px 16px; background: var(--plum); color: #fbe9f3; font-size: 12.5px; text-align: center; line-height: 1.5; }
.only { position: relative; margin-top: 18px; padding: 22px 16px 14px; border-radius: 16px; border: 1.5px dashed var(--ink-soft); background: rgba(74, 29, 92, .045); }
.only[data-only="internal"] { border-color: var(--gold-ink); background: rgba(227, 172, 87, .1); }
.only-tag { position: absolute; top: -11px; left: 14px; padding: 1px 10px; border-radius: 10px; background: var(--plum); color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.7; }
[data-only="internal"] > .only-tag { background: var(--gold-ink); }
.only-i { border-bottom: 1.5px dashed var(--ink-soft); }
.only h3, .only h4 { font-size: 16px; margin: 10px 0 2px; }
.only > h3:first-of-type, .only > h4:first-of-type { margin-top: 0; }
.only p, .only li { font-size: 14.5px; line-height: 1.7; max-width: 48em; }
.only ul > li { position: relative; padding-left: 14px; }
.only ul > li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

/* ── 히어로: 밤하늘 + 보름달 + 분홍 커튼 ── */
.hero { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: 22px 16px 30px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(img/art/hero-bg.webp) top center / 100% auto no-repeat var(--cream); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; top: calc(150vw - 90px); height: 92px; background: linear-gradient(rgba(254, 244, 236, 0), var(--cream)); }
.logo { width: min(80vw, 330px); margin: 0 auto; filter: drop-shadow(0 8px 14px rgba(40, 10, 70, .35)); }
.logo img { width: 100%; }
.hero-tag { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; color: #fff; font-size: 14.5px; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(60, 10, 80, .7), 0 0 12px rgba(40, 10, 90, .8); white-space: nowrap; }
.hero-tag::before, .hero-tag::after { content: ""; width: 22px; height: 1.5px; background: linear-gradient(90deg, transparent, #ffd98a); }
.hero-tag::after { transform: scaleX(-1); }
.hero-compact { width: min(56vw, 232px); margin: 16px auto 0; filter: drop-shadow(0 14px 18px rgba(120, 20, 80, .32)); }
.hero-line { max-width: 22em; margin: 16px auto 0; font-size: 15.5px; line-height: 1.75; text-wrap: balance; }
.hero-line strong { display: block; font-weight: 400; font-size: 19px; color: var(--rose-deep); margin-bottom: 2px; }
.btn-wing { display: grid; place-items: center; width: 214px; aspect-ratio: 900 / 333; margin: 12px auto 0; padding-bottom: 2px; background: url(img/ui/btn-wing.webp) center / contain no-repeat; color: #fff; font-size: 19px; text-decoration: none; text-shadow: 0 2px 0 rgba(140, 10, 60, .6), 0 0 8px rgba(255, 190, 225, .9); filter: drop-shadow(0 6px 8px rgba(120, 10, 70, .28)); transition: transform .2s var(--ease); }
.btn-wing:active { transform: scale(.96); }

/* ── 섹션 바로가기(보석 탭, 붙박이) ── */
.tabs { position: sticky; top: 0; z-index: 20; background: rgba(254, 244, 236, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--pink-line); box-shadow: 0 6px 14px -12px rgba(120, 20, 70, .5); }
.tabs ul { display: flex; gap: 2px; width: max-content; max-width: 100%; margin: 0 auto; padding: 5px 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 60px; min-height: 52px; padding: 4px 8px 6px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.3; text-decoration: none; white-space: nowrap; border-radius: 12px; }
.tabs img { width: 27px; height: 27px; object-fit: contain; transition: transform .3s var(--ease); }
.tabs a[aria-current="true"] { color: var(--rose-deep); }
.tabs a[aria-current="true"] img { transform: scale(1.16); filter: drop-shadow(0 0 5px rgba(255, 120, 180, .9)); }
.tabs a[aria-current="true"]::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 1px; height: 2.5px; border-radius: 2px; background: var(--rose); }

/* ── 섹션 공통 ── */
main { overflow-x: clip; }
.sec { width: var(--w); margin: 0 auto; padding: 40px 0 8px; scroll-margin-top: 58px; }
.sec-title { --tw: 430px; display: grid; place-items: center; width: var(--tw); aspect-ratio: 1100 / 270; margin: 0 calc((100% - var(--tw)) / 2) 14px; padding-top: calc(var(--tw) * .034); background: url(img/art/title-plaque.webp) center / 100% 100% no-repeat; }
.sec-title span { font-size: 25px; line-height: 1; color: #fff; -webkit-text-stroke: 5.5px var(--rose); paint-order: stroke fill; text-shadow: 0 2.5px 0 var(--rose-deep); letter-spacing: .02em; white-space: nowrap; }
.sec-intro { max-width: 34em; margin: 0 auto 18px; text-align: center; font-size: 15px; color: var(--ink-soft); text-wrap: balance; }

/* 카드 판 — 크림 둥근 네모 + 금테 모서리(앱 .ui-panel 과 같은 그림) */
.panel { --c: 24px; position: relative; border: var(--c) solid transparent; border-image: url(img/ui/panel-plain.webp) 120 fill / var(--c) stretch; border-radius: 22px; box-shadow: 0 14px 22px -18px rgba(120, 20, 70, .55); }
.panel.heart::before, .panel.heart::after { content: ""; position: absolute; left: 50%; width: 58px; aspect-ratio: 216 / 132; transform: translateX(-50%); background: center / contain no-repeat; pointer-events: none; }
.panel.heart::before { top: calc(var(--c) * -1 - 18px); background-image: url(img/ui/panel-plain-top.webp); background-position: bottom center; }
.panel.heart::after { bottom: calc(var(--c) * -1 - 22px); background-image: url(img/ui/panel-plain-bot.webp); background-position: top center; }

/* ── 세계관 ── */
.world-lead { margin-top: 22px; text-align: center; padding: 6px 0 8px; }
.lead span { display: block; font-size: 17px; line-height: 1.85; }
.world-one { max-width: 24em; margin: 10px auto 0; padding-top: 10px; font-size: 14.5px; color: var(--ink-soft); background: linear-gradient(90deg, transparent, var(--gold), transparent) top / 60% 1.5px no-repeat; text-wrap: balance; }
.points { display: grid; gap: 20px 28px; margin-top: 34px; }
.points li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; }
.points img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(160, 30, 90, .25)); }
.points h3 { font-size: 18.5px; color: var(--rose-deep); }
.points p { font-size: 15px; }

/* ── 일곱 빛의 쥬엘리아 ── */
.ftabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 26px; }
.ftabs button { display: grid; justify-items: center; gap: 3px; min-height: 66px; padding: 4px 0 8px; position: relative; font-size: 11.5px; white-space: nowrap; color: var(--ink-soft); border-radius: 14px; }
.ftabs img { width: min(10.4vw, 44px); height: min(10.4vw, 44px); object-fit: contain; transition: transform .35s var(--ease); }
.ftabs [aria-selected="true"] { color: var(--rose-deep); }
.ftabs [aria-selected="true"] img { transform: scale(1.2) translateY(-2px); filter: drop-shadow(0 0 7px rgba(255, 130, 190, .95)); }
.ftabs [aria-selected="true"]::after { content: ""; position: absolute; bottom: 1px; left: 24%; right: 24%; height: 3px; border-radius: 2px; background: var(--fc, var(--rose)); }
.fcard { display: grid; gap: 16px; margin-bottom: 40px; }
.fart { position: relative; aspect-ratio: 4 / 5; max-height: 470px; width: 100%; border-radius: 18px; overflow: hidden; background: var(--pink-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.fart .fbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fart .fhero { position: absolute; left: 50%; bottom: 3%; height: 92%; width: auto; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(60, 10, 70, .25)); }
.fart::after { content: ""; position: absolute; inset: 5px; border-radius: 14px; border: 1.5px solid rgba(255, 236, 190, .9); pointer-events: none; }
.fadj { font-size: 14px; color: var(--ink-soft); text-align: center; }
.fname { text-align: center; font-size: 30px; line-height: 1.25; color: #fff; -webkit-text-stroke: 5px var(--fc, var(--rose)); paint-order: stroke fill; letter-spacing: .04em; text-shadow: 0 2.5px 0 rgba(90, 10, 60, .25); margin: 2px 0 12px; }
.spec { display: grid; grid-template-columns: max-content 1fr; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--pink-line); font-size: 14px; line-height: 1.55; }
.spec dt, .spec dd { padding: 8px 12px; border-top: 1px solid var(--pink-line); }
.spec dt:first-of-type, .spec dt:first-of-type + dd { border-top: 0; }
.spec dt { background: var(--pink-soft); color: var(--rose-deep); font-weight: 600; white-space: nowrap; }
.spec dd { background: rgba(255, 255, 255, .6); }
.spec a { text-underline-offset: 3px; }
.fblock { margin-top: 18px; }
.fblock h4 { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 16px; color: var(--rose-deep); }
.fblock h4::after { content: ""; flex: 1; height: 1.5px; background: linear-gradient(90deg, var(--gold), transparent); }
.fin-name { font-size: 20px; margin-top: 4px; }
.fin-desc { font-size: 14.5px; }
.spells { display: grid; gap: 8px; margin-top: 8px; }
.spells li { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: center; font-size: 14px; line-height: 1.5; }
.sp-shape { text-align: center; padding: 3px 0; border-radius: 10px; background: var(--pink-soft); color: var(--rose-deep); font-size: 12.5px; font-weight: 600; }
.sp-name { font-weight: 600; }
.sp-star { margin-left: 6px; padding: 0 7px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1.5px var(--fc, var(--rose)); color: var(--ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sp-wish { display: block; color: var(--ink-soft); }
.fclips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; max-width: 360px; }
.fclips figcaption { margin-top: 5px; text-align: center; font-size: 13px; color: var(--ink-soft); }

/* 영상 틀(모습 카드·영상 섹션 공용) */
.vframe { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #33184a; box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 5px #fff6ea, 0 0 0 6.5px var(--gold), 0 12px 18px -8px rgba(90, 20, 70, .45); margin: 7px; }
.vframe img, .vframe video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vplay { position: absolute; inset: 0; width: 100%; height: 100%; }
.vbtn { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--rose); font-size: 20px; box-shadow: 0 0 0 2px var(--gold), 0 4px 10px rgba(80, 10, 60, .35); transition: transform .25s var(--ease); }
.vbtn .ic { margin-left: 3px; }
.vplay:active .vbtn { transform: scale(.92); }
.fclips .vbtn { width: 42px; height: 42px; margin: -21px 0 0 -21px; font-size: 16px; }

/* 코드로 그린 조작 기호(재생·멈춤·앞뒤·화살표) */
.ic { display: block; width: 1em; height: 1em; background: currentColor; }
.ic-play { clip-path: polygon(16% 6%, 16% 94%, 94% 50%); }
.ic-pause { clip-path: polygon(16% 8%, 42% 8%, 42% 92%, 16% 92%, 16% 8%, 58% 8%, 84% 8%, 84% 92%, 58% 92%, 58% 8%); }
.ic-prev { clip-path: polygon(6% 10%, 20% 10%, 20% 44%, 94% 6%, 94% 94%, 20% 56%, 20% 90%, 6% 90%); }
.ic-next { clip-path: polygon(94% 10%, 80% 10%, 80% 44%, 6% 6%, 6% 94%, 80% 56%, 80% 90%, 94% 90%); }
.chev { flex: none; width: 9px; height: 9px; margin: 0 6px 3px; border-right: 2.5px solid var(--rose-deep); border-bottom: 2.5px solid var(--rose-deep); transform: rotate(45deg); transition: transform .25s var(--ease); }
details[open] > summary .chev { transform: rotate(-135deg) translate(-3px, -3px); }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ── 인물 ── */
.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.person-top { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.person.noart .person-top { grid-template-columns: 1fr; }
.por { width: 96px; aspect-ratio: 3 / 4; border-radius: 48px 48px 16px 16px; overflow: hidden; background: linear-gradient(#ffdcea, #fff4e6); box-shadow: inset 0 0 0 1.5px var(--gold); }
.por img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.por.fit img { object-fit: contain; object-position: center; padding: 8px 6px 4px; }
.person h3 { font-size: 22px; color: var(--rose-deep); }
.person-role { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.person-text { margin-top: 10px; display: grid; gap: 6px; font-size: 15px; }
.faces { display: flex; gap: 6px; margin-top: 12px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.faces::-webkit-scrollbar { display: none; }
.faces img { flex: none; width: 54px; height: 66px; object-fit: cover; object-position: top center; border-radius: 12px; background: linear-gradient(#ffe6f0, #fff6ea); box-shadow: inset 0 0 0 1px var(--pink-line); }
.faces.fit img { object-fit: contain; padding: 3px; }
.faces-cap { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.faces + .faces-cap + .faces { margin-top: 4px; }
.faces img.sp-face { box-shadow: inset 0 0 0 1.5px var(--ink-soft); outline: 1.5px dashed var(--ink-soft); outline-offset: -1.5px; }

/* ── 흐림이 도감 ── */
.hus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
.hu { --c: 12px; text-align: center; border-radius: 14px; }
.hu h3 { font-size: 16.5px; color: var(--rose-deep); white-space: nowrap; }
.hu-pair { display: grid; grid-template-columns: minmax(0, 1fr) 11px minmax(0, 1fr); align-items: center; gap: 1px; margin-top: 4px; }
.hu-pair img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.hu-pair figcaption { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
.hu-arrow { width: 11px; height: 13px; margin-bottom: 16px; background: var(--rose); clip-path: polygon(0 22%, 46% 22%, 46% 0, 100% 50%, 46% 100%, 46% 78%, 0 78%); }
.hu-ph { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: rgba(255, 227, 238, .7); color: var(--ink-soft); font-size: 11.5px; line-height: 1.35; padding: 4px; }
.hu-after { margin-top: 6px; font-size: 13.5px; line-height: 1.4; }
.hu-meta { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.hu-meta b { color: var(--rose-deep); font-weight: 600; }

/* ── 마법 도구 ── */
.tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.tool { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; }
.tool > img { width: 84px; height: 96px; object-fit: contain; filter: drop-shadow(0 5px 7px rgba(140, 30, 90, .25)); }
.tool h3 { font-size: 19px; color: var(--rose-deep); }
.tool p { font-size: 14.5px; margin-top: 2px; }
.tool-eps { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
.tool-eps a, .tool-eps span.n { margin-left: 4px; font-weight: 600; }
.base-spells { margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 227, 238, .6); font-size: 13px; line-height: 1.6; }
.base-spells b { color: var(--rose-deep); font-weight: 600; }

/* ── 이야기 ── */
.story { padding: 0; }
.part + .part, .part + .only, .only + .part { margin-top: 10px; }
.part > summary { display: flex; align-items: center; gap: 8px; min-height: 50px; padding: 8px 10px 8px 12px; border-radius: 14px; background: linear-gradient(#ffe9f1, #ffd9e8); box-shadow: inset 0 0 0 1px var(--pink-line); }
.part-no { flex: none; font-size: 17px; color: var(--rose-deep); white-space: nowrap; }
.part-name { font-size: 16px; line-height: 1.3; flex: 1; min-width: 0; }
.part-name small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.first-badge { flex: none; padding: 1px 8px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1.5px var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.eps { padding: 2px 2px 6px; }
.ep { scroll-margin-top: 70px; }
.ep > summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; min-height: 50px; padding: 8px 2px; border-bottom: 1px dashed var(--pink-line); }
.ep:last-child > summary { border-bottom: 0; }
.ep-no { min-width: 56px; padding: 3px 12px 3px 9px; font-size: 13px; line-height: 1.5; color: var(--ink); text-align: center; white-space: nowrap; background: linear-gradient(#ffd0e2, #ffa6c8); clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%, 6px 50%); }
.ep-t { font-size: 15.5px; line-height: 1.4; }
.ep-k { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.4; color: var(--ink-soft); font-weight: 600; }
.ep-body { padding: 10px 6px 14px 10px; margin: 0 0 4px; border-left: 2.5px solid var(--pink-line); font-size: 14.5px; line-height: 1.75; display: grid; gap: 7px; }
.ep-key { justify-self: start; padding: 1px 10px; border-radius: 10px; background: var(--pink-soft); color: var(--rose-deep); font-size: 12.5px; font-weight: 600; }
.ep-body ul, .ep-body ol { display: grid; gap: 5px; }
.ep-body li { position: relative; padding-left: 15px; }
.ep-body ul > li::before { content: ""; position: absolute; left: 3px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--rose); }
.ep-body ol { counter-reset: n; }
.ep-body ol > li { counter-increment: n; padding-left: 20px; }
.ep-body ol > li::before { content: counter(n); position: absolute; left: 0; top: .28em; width: 15px; height: 15px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 10px; font-weight: 600; line-height: 15px; text-align: center; }
.ep-body .only { margin-top: 4px; padding: 16px 10px 8px; }
.kbd { padding: 0 6px; border-radius: 6px; background: var(--pink-soft); font-size: .92em; }
.story-tail { margin-top: 14px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.ep-hook { color: var(--rose-deep); font-weight: 600; }
.ep-next { margin-top: 2px; justify-self: start; padding: 3px 12px; border-radius: 12px; background: var(--pink-soft); color: var(--rose-deep); font-size: 13.5px; }
.rules { list-style: decimal; padding-left: 20px; }
.rules > li { margin-top: 8px; padding-left: 2px; font-size: 14.5px; }
.only .rules > li::before { content: none; }
.rules ul { margin-top: 4px; display: grid; gap: 3px; }

/* ── 쥬크박스 ── */
.jk { display: grid; gap: 18px; margin-top: 6px; }
.cass { position: relative; width: min(100%, 420px); margin: 0 auto; aspect-ratio: 1200 / 603; background: url(img/art/cassette.webp) center / contain no-repeat; filter: drop-shadow(0 10px 12px rgba(120, 20, 80, .25)); }
.cass-title { position: absolute; left: 19.5%; right: 27.5%; top: 25%; height: 14.5%; display: flex; align-items: center; justify-content: center; font-size: clamp(12px, 3.9vw, 16.5px); line-height: 1; color: var(--rose-deep); white-space: nowrap; overflow: hidden; }
.jk-ctl { display: grid; grid-template-columns: 48px 48px 68px 48px 48px; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.jk-ctl::before { content: ""; }   /* 왼쪽 빈 칸 — 재생 단추가 가운데에 오게(오른쪽 끝이 한 곡 반복) */
.jb { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 28%, #fff, #fff1f6 60%, #ffdbe8); color: var(--rose); font-size: 17px; box-shadow: 0 0 0 2px var(--gold), 0 4px 8px rgba(120, 20, 70, .22); transition: transform .2s var(--ease); }
.jb:active { transform: scale(.93); }
.jb-play { width: 68px; height: 68px; font-size: 25px; color: #fff; background: radial-gradient(circle at 35% 25%, #ff9ac6, var(--hero-pink) 58%, #d81466); box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px var(--gold), 0 8px 14px rgba(190, 20, 100, .4); }
.jb-play .ic-play { margin-left: 4px; }
.ic-rep { width: 1.35em; height: 1.35em; display: block; }
.jb-rep.on { color: #fff; background: radial-gradient(circle at 35% 25%, #ff9ac6, var(--hero-pink) 58%, #d81466); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold), 0 4px 10px rgba(190, 20, 100, .4); }
.jk-bar { display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 12px auto 0; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.jk-bar span { min-width: 2.4em; }
.jk-bar span:last-child { text-align: right; }
#jk-seek { --p: 0%; flex: 1; min-width: 0; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#jk-seek::-webkit-slider-runnable-track { height: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--rose) var(--p), #f6d5e1 var(--p)); box-shadow: 0 0 0 1px rgba(201, 143, 58, .55); }
#jk-seek::-moz-range-track { height: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--rose) var(--p), #f6d5e1 var(--p)); box-shadow: 0 0 0 1px rgba(201, 143, 58, .55); }
#jk-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6.5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffeaf2 55%, #f2b9cf); box-shadow: 0 0 0 1.5px var(--gold), 0 2px 5px rgba(120, 20, 70, .35); }
#jk-seek::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ffeaf2 55%, #f2b9cf); box-shadow: 0 0 0 1.5px var(--gold), 0 2px 5px rgba(120, 20, 70, .35); }
.trks { --c: 22px; }
.trk { border-bottom: 1px dashed var(--pink-line); padding: 4px 0 8px; }
.trk:last-child { border-bottom: 0; padding-bottom: 0; }
.trk-play { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; column-gap: 8px; width: 100%; min-height: 46px; padding: 4px 6px; text-align: left; border-radius: 10px; }
.trk-no { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.trk-t { font-size: 16px; line-height: 1.35; }
.trk-role { display: block; font-size: 12px; line-height: 1.4; color: var(--rose-deep); font-weight: 600; }
.trk-d { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.trk.on .trk-play { background: linear-gradient(90deg, #ffdbe8, rgba(255, 219, 232, .25)); }
.trk.on .trk-no { color: transparent; position: relative; }
.trk.on .trk-no::after { content: ""; position: absolute; left: 3px; top: 50%; width: 11px; height: 12px; margin-top: -6px; background: var(--rose); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.trk-use { padding: 0 6px 0 40px; font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.lyr { margin: 4px 6px 0 40px; }
.lyr > summary { display: inline-flex; align-items: center; min-height: 32px; font-size: 12.5px; font-weight: 600; color: var(--rose-deep); }
.lyr > summary .chev { width: 7px; height: 7px; border-width: 2px; margin-left: 8px; }
.lyr-body { display: grid; gap: 12px; padding: 8px 0 8px; font-size: 14.5px; line-height: 1.8; }

/* ── 영상 ── */
.rail-wrap { position: relative; }
/* 🔴 9/30 대표님 「오른쪽으로 스크롤이 안 돼서 오른쪽 영상을 못 봐」 — 카드가 둘뿐이라 둘째 카드의 가운데 맞춤 자리까지 못 가는데
   scroll-snap mandatory + center 라서 아이폰 사파리가 손을 떼면 첫 카드로 되돌렸다. 맞춤(snap)을 빼고 그냥 밀리게 한다. */
.rail { display: flex; gap: 8px; margin: 0 -16px; padding: 4px 16px 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; scrollbar-width: none; }
.rail::after { content: ""; flex: 0 0 8px; } /* 끝까지 밀었을 때 마지막 카드가 가장자리에 붙지 않게 */
.rail::-webkit-scrollbar { display: none; }
.vcard { position: relative; flex: 0 0 min(62vw, 250px); }
.vcap { margin-top: 8px; text-align: center; line-height: 1.4; }
.vcap strong { display: block; font-size: 16px; font-weight: 400; }
.vcap span { font-size: 12.5px; color: var(--ink-soft); }
.vcard .only-tag { top: -2px; left: 12px; z-index: 2; }
.rail-arrow { position: absolute; top: 38%; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 2px var(--gold), 0 4px 10px rgba(120, 20, 70, .25); }
@media (hover: none) { .rail-arrow { display: none; } }
.rail-arrow.prev { left: -6px; } .rail-arrow.next { right: -6px; }
.rail-arrow i { width: 10px; height: 10px; border-left: 2.5px solid var(--rose-deep); border-bottom: 2.5px solid var(--rose-deep); transform: rotate(45deg); margin-left: 4px; }
.rail-arrow.next i { transform: rotate(-135deg); margin: 0 4px 0 0; }

/* ── 링크 ── */
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.plq { display: grid; place-content: center; justify-items: center; min-height: 64px; padding: 4px 0; border-style: solid; border-color: transparent; border-width: 0 26px; border-image: url(img/ui/plaque.webp) 0 150 fill / 0 26px stretch; text-decoration: none; color: var(--ink); text-align: center; line-height: 1.35; filter: drop-shadow(0 5px 6px rgba(120, 20, 70, .16)); transition: transform .2s var(--ease); }
a.plq:active { transform: scale(.97); }
.plq strong { font-weight: 400; font-size: 15.5px; white-space: nowrap; }
.plq span { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }

/* ── 제작 메모·바닥글 ── */
.memo h3 { font-size: 16px; color: var(--gold-ink); margin-top: 12px; }
.memo h3:first-of-type { margin-top: 0; }
.foot { margin-top: 44px; padding: 0 16px 40px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.foot img { width: 120px; margin: 0 auto 10px; }

/* ── 마우스를 올렸을 때 ── */
@media (hover: hover) {
  .tabs a:hover { color: var(--rose-deep); background: rgba(255, 227, 238, .7); }
  .ftabs button:hover img { transform: scale(1.12); }
  .btn-wing:hover { transform: translateY(-2px) scale(1.03); }
  .vplay:hover .vbtn, .jb:hover { transform: scale(1.07); }
  .trk-play:hover { background: rgba(255, 219, 232, .55); }
  .part > summary:hover { background: linear-gradient(#ffe3ee, #ffcfe2); }
  .ep > summary:hover .ep-t, .lyr > summary:hover { color: var(--rose-deep); }
  a.plq:hover { transform: translateY(-2px); }
  .rail-arrow:hover { background: var(--pink-soft); }
}

/* ── 넓은 화면 ── */
@media (min-width: 700px) {
  .hero { min-height: clamp(680px, 60vw, 860px); padding-top: 26px; }
  .hero::before { background: url(img/art/hero-bg-wide.webp) top center / cover no-repeat var(--cream); }
  .hero::after { top: auto; bottom: 0; height: 120px; }
  .logo { width: clamp(330px, 31vw, 430px); }
  .hero-tag { font-size: 17px; margin-top: 4px; }
  .hero-compact { width: clamp(180px, 16vw, 226px); margin-top: 14px; }
  .hero-line { margin-top: 10px; font-size: 16.5px; max-width: 30em; text-shadow: 0 0 10px #fff, 0 0 18px #fff, 0 0 26px #fff; }
  .hero-line strong { font-size: 22px; }
  .btn-wing { width: 226px; margin-top: 8px; font-size: 20px; }
  .tabs a { min-width: 78px; font-size: 13.5px; }
  .sec { padding-top: 56px; }
  .sec-title { --tw: 520px; margin-bottom: 20px; }
  .sec-title span { font-size: 30px; -webkit-text-stroke-width: 6px; }
  .panel { --c: 30px; }
  .lead span { font-size: 19px; }
  .points { grid-template-columns: 1fr 1fr; }
  .people { display: block; columns: 2; column-gap: 26px; }
  .person { break-inside: avoid; margin-bottom: 26px; }
  .hus { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 14px; }
  .hu { --c: 18px; }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 34px; }
  .links { grid-template-columns: repeat(4, 1fr); }
  .ftabs { max-width: 640px; margin-inline: auto; }
  .ftabs button { font-size: 14px; }
  .ftabs img { width: 52px; height: 52px; }
  .ep-t { font-size: 16.5px; }
  .vcard { flex-basis: 236px; }
  .rail { justify-content: safe center; }
}
@media (min-width: 900px) {
  .fcard { grid-template-columns: minmax(0, 400px) 1fr; gap: 30px; align-items: start; }
  .fart { max-height: none; }
  .fadj, .fname { text-align: left; }
  .fname { font-size: 38px; }
  .jk { grid-template-columns: 420px 1fr; gap: 34px; align-items: start; }
  .deck { position: sticky; top: 84px; }
  .story { max-width: 860px; margin-inline: auto; }
}

/* ── 움직임: 작게, 끌 수 있게 ── */
@media (prefers-reduced-motion: no-preference) {
  .logo, .hero-tag, .hero-compact, .hero-line, .btn-wing { animation: rise .9s var(--ease) both; }
  .hero-tag { animation-delay: .08s; } .hero-compact { animation-delay: .16s; } .hero-line { animation-delay: .24s; } .btn-wing { animation-delay: .3s; }
  .fcard:not([hidden]) .fart { animation: rise .5s var(--ease) both; }
  .jk.playing .cass { animation: floaty 3.2s ease-in-out infinite; }
}
@keyframes floaty { 50% { transform: translateY(-7px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ── 21화부터(전체판 spoiler 블록) — 새 모습·인물·흐림이·장난감·대본 요약 ── */
.nforms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 12px; }
.nform { padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px var(--fc, var(--rose)); }
.nf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nf-gem { width: 44px; height: 44px; object-fit: contain; }
.only .nf-en { font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.nf-badge { margin-left: 6px; padding: 0 7px; border-radius: 8px; background: var(--fc, var(--rose)); color: #fff; font-size: 11px; font-weight: 600; }
.only h4.nf-name { margin: 0; font-size: 20px; line-height: 1.3; color: var(--fc, var(--rose-deep)); }
.only .nf-text { margin-bottom: 8px; }
.nform .spec { font-size: 13.5px; }
.nform .spec dt { white-space: normal; }
.people-more .people { margin-top: 10px; }
.only .person h3 { font-size: 20px; }
.only .hu-more > li, .only .toy-more > li { margin-top: 6px; }
.hu-issue, .toy-kind { padding: 0 7px; border-radius: 8px; background: var(--pink-soft); color: var(--rose-deep); font-size: 12px; font-weight: 600; white-space: nowrap; }
.hu-look, .toy-eps { font-size: 13px; color: var(--ink-soft); }
.hu-look b { color: var(--rose-deep); font-weight: 600; }
.ep-retry { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--rose); color: var(--rose-deep); font-size: 10.5px; line-height: 1.5; white-space: nowrap; }
.ep-sum { padding: 8px 10px; border-radius: 12px; background: rgba(255, 227, 238, .55); font-size: 14px; line-height: 1.7; }
.ep-sum-tag { margin-right: 4px; padding: 0 7px; border-radius: 8px; background: #fff; color: var(--rose-deep); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ep-alt { color: var(--ink-soft); font-size: 12.5px; }
.ep-unlock { justify-self: start; padding: 1px 10px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1.5px var(--gold); color: var(--gold-ink); font-size: 12.5px; font-weight: 600; }
@media (min-width: 900px) { .nforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 21화부터 열리는 여섯 모습 — 탭 둘째 줄·카드 머리표(전체판만) */
.ftabs:has(+ .ftabs-cap) { margin-bottom: 6px; }
.ftabs-cap { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto 4px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.ftabs-cap::before, .ftabs-cap::after { content: ""; flex: 1; border-top: 1.5px dashed var(--ink-soft); opacity: .45; }
.ftabs-new { grid-template-columns: repeat(6, 1fr); }
.ftabs-new button { font-size: 11px; letter-spacing: -.02em; }
.fnew { justify-self: center; width: fit-content; margin: 0 auto 6px; padding: 1px 10px; border-radius: 10px; border: 1.5px dashed var(--ink-soft); color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.fclip-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }
@media (min-width: 700px) { .ftabs-new button { font-size: 13px; } }
@media (min-width: 900px) { .fnew { margin-left: 0; } }
/* 마법 도구 — 새 장난감 머리줄 · 이야기 속 미니게임 */
.tool .tool-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 2px; }
.games-title { margin: 40px 0 6px; text-align: center; font-size: 20px; color: var(--rose-deep); }
.games { display: grid; gap: 10px; max-width: 48em; margin: 0 auto; }
.games > li { padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px var(--pink-line); font-size: 14px; line-height: 1.65; }
.games strong, .toy-more strong { color: var(--rose-deep); font-weight: 600; margin-right: 4px; }
.only .tools { margin-top: 12px; }
.only .tools .tool p { font-size: 14px; }
.hu-more-wrap .hus { margin-top: 12px; }
@media (min-width: 700px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .ftabs button, .ftabs-new button { font-size: 10px; letter-spacing: -.05em; } }
