/* 커버 글자(제목·대표 줄·by — 위쪽의 「콤마,」·날짜·날씨 한 줄은 2026-11-10 없앰) — 글자 없는 그림 위에 그 자리에서 입힌다. 앱·공유 페이지·합성한 그림(cover.png, pipeline.compose_cover)이 함께 쓴다.
   크기는 커버 한 변을 100cqw 로 잰다(1080px 그림 기준 1cqw = 10.8px) — 커버를 담는 상자에 container-type:inline-size 가 있어야 한다(.cv · .player).
   틀(t-*)·글꼴(f-*)·글자색(c-*)은 곡마다 서버가 규칙으로 고른다(app/looks.py). 마크업은 face.js 의 faceHTML / pipeline.face_html. */
.cv,.player{container-type:inline-size}
.face{position:absolute;inset:0;pointer-events:none;color:#fff;overflow:hidden}
.face:before,.face:after{content:'';position:absolute;pointer-events:none}
.face .fb{position:absolute;z-index:2;display:flex;flex-direction:column}
.face .fk{font-size:3.15cqw;font-weight:700;opacity:.92;text-shadow:0 2px 8px rgba(0,0,0,.6);word-break:keep-all;line-height:1.4}
.face .ft{font-size:calc(var(--z,13.9cqw) * var(--k,1));line-height:1.05;word-break:keep-all;text-shadow:0 3px 12px rgba(0,0,0,.6)}
.face .ft.m{--z:11.1cqw}.face .ft.l{--z:8.9cqw}
.face .fy{font-size:2.8cqw;opacity:.85}
/* 글꼴 — --k 는 글꼴마다 다른 덩치를 맞추는 배율 */
.face.f-brush .ft{font-family:'Nanum Brush Script',cursive}
.face.f-pen .ft{font-family:'Nanum Pen Script',cursive;--k:1.04}
.face.f-serif .ft{font-family:'Gowun Batang',serif;font-weight:700;--k:.6;letter-spacing:-.03em;line-height:1.2}
.face.f-bold .ft{font-family:'Black Han Sans',sans-serif;--k:.64;line-height:1.15}
.face.c-yellow .ft{color:#ffe27a}.face.c-white .ft{color:#fff}
/* 일본어 곡(2026-11-17 요청 0032) — 같은 네 갈래를 일본어 글꼴로(한국어 글꼴에는 가나·한자가 없다). 글꼴은 face.js 가(합성한 그림·영상은 pipeline.JA_FONTS 를) 일본어 곡일 때만 불러온다.
   줄은 한국어처럼 빈칸(구절 사이)에서 바꾸되, 빈칸 없이 긴 말은 넘치지 않게 글자 사이에서도 바꾼다(overflow-wrap:anywhere · 일본어 줄 규칙 line-break:strict) */
.face.ja{font-family:'Noto Sans JP',sans-serif}
.face.ja .fk,.face.ja .ft{overflow-wrap:anywhere;line-break:strict}
.face.ja.f-brush .ft{font-family:'Yuji Syuku',serif;--k:.66}
.face.ja.f-pen .ft{font-family:'Klee One',cursive;font-weight:600;--k:.66}
.face.ja.f-serif .ft{font-family:'Shippori Mincho',serif;--k:.6;letter-spacing:0}
.face.ja.f-bold .ft{font-family:'Dela Gothic One',sans-serif;--k:.6}
/* 영어 곡(2026-11-17) — 같은 네 갈래를 라틴 글자에 맞는 글꼴로(붓 Caveat Brush · 펜 Caveat · 명조 Playfair Display · 굵은 고딕 Archivo Black). 불러오는 법은 일본어 곡과 같다(pipeline.EN_FONTS) */
.face.en.f-brush .ft{font-family:'Caveat Brush',cursive;--k:1.18}
.face.en.f-pen .ft{font-family:'Caveat',cursive;font-weight:700;--k:1.25}
.face.en.f-serif .ft{font-family:'Playfair Display',serif;font-weight:700;--k:.88;letter-spacing:-.01em}
.face.en.f-bold .ft{font-family:'Archivo Black',sans-serif;--k:.76;letter-spacing:-.01em}

/* low — 아래 제목(기본): 아래를 어둡게, 왼쪽 아래에 대표 줄 + 제목 */
.face.t-low:after{inset:auto 0 0 0;height:42%;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.62))}
.face.t-low .fb{left:5.6cqw;right:5.6cqw;bottom:5.9cqw}
.face.t-low .fk{margin-bottom:2cqw}.face.t-low .fy{margin-top:.9cqw}
.face.t-low.f-brush .ft,.face.t-low.f-pen .ft{transform:rotate(-3deg);transform-origin:left bottom}

/* mini — 작은 제목만: 그림을 살린다 */
.face.t-mini:after{inset:auto 0 0 0;height:30%;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.6))}
.face.t-mini .fb{left:5.6cqw;right:5.6cqw;bottom:5.9cqw}
.face.t-mini .fk{display:none}
.face.t-mini .ft{--z:7.4cqw}.face.t-mini .ft.m{--z:6.6cqw}.face.t-mini .ft.l{--z:5.8cqw}
.face.t-mini .fy{margin-top:1.2cqw}

/* top — 위 제목: 그림의 주인공이 아래에 있을 때 */
.face.t-top:before{inset:0 0 auto 0;height:56%;background:linear-gradient(rgba(0,0,0,.66),rgba(0,0,0,.34) 55%,rgba(0,0,0,0))}
.face.t-top:after{inset:auto 0 0 0;height:22%;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.4))}
.face.t-top .fb{left:5.6cqw;right:5.6cqw;top:6.5cqw}
.face.t-top .ft{order:1}.face.t-top .fk{order:2;margin-top:2.6cqw}.face.t-top .fy{order:3;margin-top:1.2cqw}

/* center — 가운데 큰 제목 */
.face.t-center:before{inset:0;background:radial-gradient(ellipse at center,rgba(0,0,0,.55),rgba(0,0,0,.22) 62%,rgba(0,0,0,.1))}
.face.t-center .fb{left:7cqw;right:7cqw;top:50%;transform:translateY(-50%);text-align:center;align-items:center}
.face.t-center .ft{order:1}.face.t-center .fk{order:2;margin-top:3cqw}.face.t-center .fy{order:3;margin-top:1.4cqw}

/* side — 세로쓰기 제목: 한쪽이 비어 있을 때(s-r 오른쪽 · s-l 왼쪽) */
.face.t-side:after{inset:auto 0 0 0;height:30%;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.55))}
.face.t-side.s-r:before{inset:0;background:linear-gradient(to left,rgba(0,0,0,.6),rgba(0,0,0,0) 46%)}
.face.t-side.s-l:before{inset:0;background:linear-gradient(to right,rgba(0,0,0,.6),rgba(0,0,0,0) 46%)}
.face.t-side .fb{inset:0;display:block}
.face.t-side .ft{position:absolute;top:6.5cqw;writing-mode:vertical-rl;max-height:80cqw;--z:12.4cqw;line-height:1.1}
.face.t-side .ft.m{--z:9cqw}
.face.t-side.s-r .ft{right:6.2cqw}.face.t-side.s-l .ft{left:6.2cqw}
.face.t-side .fk{position:absolute;bottom:10cqw;max-width:58cqw}.face.t-side .fy{position:absolute;bottom:5.9cqw}
.face.t-side.s-r .fk,.face.t-side.s-r .fy{left:5.6cqw}
.face.t-side.s-l .fk,.face.t-side.s-l .fy{right:5.6cqw;text-align:right}

/* frame — 액자: 그림 어디나 복잡할 때. 그림 색을 어둡게 한 여백(--mat)에 글자를 둔다 */
.face.t-frame:before{inset:0;border:5.6cqw solid var(--mat,#1b1a20);border-bottom-width:23cqw}
.face.t-frame .fb{left:5.6cqw;right:5.6cqw;bottom:3.5cqw;height:16cqw;justify-content:center}
.face.t-frame .fk{order:2;margin-top:1.4cqw;text-shadow:none;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.face.t-frame .ft{order:1;--z:9.6cqw;text-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.face.t-frame .ft.m{--z:8.2cqw}.face.t-frame .ft.l{--z:6.8cqw}
.face.t-frame .fy{display:none}
.face.t-frame.gift .fy{display:block;order:3;margin-top:1cqw;text-shadow:none;opacity:.75}  /* 선물 노래는 액자 틀에서도 받는 이(「○○에게」)를 보여 준다 */
.face.t-frame.gift .ft{--z:8.2cqw}.face.t-frame.gift .ft.m{--z:7.2cqw}.face.t-frame.gift .ft.l{--z:6.2cqw}  /* 한 줄이 더 들어가니 제목을 조금 줄인다 */

/* 따라 흐르는 가사가 제목과 겹치지 않게 틀마다 자리를 옮긴다(가사 상자 .ly 는 플레이어 쪽에 있다) */
.player:has(.face.t-top) .ly{top:66%}
.player:has(.face.t-center) .ly{top:84%}
.player:has(.face.t-frame) .ly{top:38%}
.player:has(.face.ja) .ly{overflow-wrap:anywhere;line-break:strict}  /* 일본어 곡의 따라 흐르는 가사 — 구절 사이(빈칸)에서 줄을 바꾸고, 빈칸 없이 긴 줄만 글자 사이에서 */
