/* cherish-skin — 구름정원 스킨 v5 (테마 3종 + 팝업 · 퀘스트 요약줄 + 앱바 · 랭킹 · 도전과제 + 소프트 글래스).
   정본: cherishpro scripts/showdown-fork/patch-skin.py — 여기 직접 고치지 말 것.
   크림 토큰 출처: apps/web/tailwind.config.ts (cherry/cream) + 웹 카드 computed style 실측. */

/* ── 팔레트: 🍒 크림 (기본) ─────────────────────────────────────────── */
html {
	--cw-bg: #fffdfb;
	--cw-mesh:
		radial-gradient(ellipse 80% 60% at 50% -20%, rgba(251, 113, 133, .35), transparent),
		radial-gradient(ellipse 60% 50% at 100% 0%, rgba(253, 224, 231, .9), transparent),
		radial-gradient(ellipse 50% 40% at 0% 100%, rgba(255, 237, 213, .7), transparent);
	--cw-ink: #881337;
	--cw-ink-soft: #be123c;
	--cw-ink-muted: #a8637a;
	--cw-line: rgba(254, 205, 211, .9);
	--cw-line-strong: #fda4af;
	--cw-surface: rgba(255, 255, 255, .88);
	--cw-white: #fff;
	--cw-tint: #fff1f3;
	--cw-tint-2: #ffe4e9;
	--cw-accent: #e11d48;
	--cw-accent-dark: #be123c;
	--cw-on-accent: #fff;
	--cw-tab-bg: rgba(255, 255, 255, .6);
	--cw-cta-glow: 0 8px 22px -8px rgba(225, 29, 72, .6);
	--cw-cta-grad: linear-gradient(135deg, #fb7185 0%, #e11d48 52%, #be123c 100%);
	/* 안쪽 테두리 — 위는 빛, 아래는 그늘. CTA 두께를 만드는 값이라 그림자 목록에 늘 함께 넣는다
	   (텍스처가 ::before 의 opacity 를 쓰므로 여기에 둬야 흐려지지 않는다) */
	--cw-cta-inset:
		inset 0 1px 0 rgba(255, 255, 255, .4),
		inset 0 -1px 0 rgba(0, 0, 0, .14),
		inset 0 0 0 1px rgba(255, 255, 255, .12);
	--cw-cta-shadow:
		0 10px 22px -12px rgba(190, 18, 60, .85),
		0 2px 5px -2px rgba(190, 18, 60, .35);
	--cw-cta-shadow-hover:
		0 16px 30px -12px rgba(190, 18, 60, .9),
		0 3px 8px -3px rgba(190, 18, 60, .4);
	--cw-card-shadow:
		0 0 0 1px rgba(254, 205, 211, .8),
		0 4px 24px -4px rgba(190, 18, 60, .12),
		0 2px 8px -2px rgba(0, 0, 0, .06);
	--cw-r: 20px;
	--cw-r-sm: 14px;
}

/* ── 팔레트: ☁️ 하늘 (시안 D — 라이트 색상 변형) ────────────────────── */
html[data-cw-theme="sky"]:not(.cw-dark) {
	--cw-bg: #eaf4fe;
	--cw-mesh: linear-gradient(180deg, #dceefe 0%, #eef7ff 40%, #fff6f8 100%);
	--cw-ink: #33415e;
	--cw-ink-soft: #5e739c;
	--cw-ink-muted: #7d8db1;
	--cw-line: #d5e2f5;
	--cw-line-strong: #b9cdec;
	--cw-surface: rgba(255, 255, 255, .72);
	--cw-white: #fff;
	--cw-tint: #e8f0fd;
	--cw-tint-2: #d8e7fb;
	--cw-accent: #e11d48;
	--cw-accent-dark: #be123c;
	--cw-on-accent: #fff;
	--cw-tab-bg: rgba(255, 255, 255, .5);
	--cw-cta-glow: 0 12px 30px -10px rgba(225, 29, 72, .5);
	--cw-cta-grad: linear-gradient(135deg, #fb7185 0%, #e11d48 52%, #b01238 100%);
	--cw-cta-inset:
		inset 0 1px 0 rgba(255, 255, 255, .4),
		inset 0 -1px 0 rgba(0, 0, 0, .14),
		inset 0 0 0 1px rgba(255, 255, 255, .12);
	--cw-cta-shadow:
		0 12px 26px -12px rgba(190, 18, 60, .7),
		0 2px 6px -3px rgba(90, 130, 190, .3);
	--cw-cta-shadow-hover:
		0 18px 34px -14px rgba(190, 18, 60, .8),
		0 3px 9px -3px rgba(90, 130, 190, .35);
	--cw-card-shadow:
		0 0 0 1px rgba(255, 255, 255, .9),
		0 8px 32px -12px rgba(90, 130, 190, .28);
}

/* ── 팔레트: 🌙 밤 (시안 F — 쇼다운 다크 모드 연동) ─────────────────── */
html.cw-dark {
	--cw-bg: #171126;
	--cw-mesh:
		radial-gradient(ellipse 70% 50% at 50% -15%, rgba(251, 113, 133, .12), transparent),
		radial-gradient(ellipse 55% 45% at 100% 0%, rgba(93, 63, 145, .25), transparent);
	--cw-ink: #e6def2;
	--cw-ink-soft: #fda4af;
	--cw-ink-muted: #8d7fa8;
	--cw-line: #322947;
	--cw-line-strong: rgba(251, 113, 133, .45);
	--cw-surface: rgba(33, 26, 51, .92);
	--cw-white: #191330;
	--cw-tint: #2c2344;
	--cw-tint-2: #3a2d55;
	--cw-accent: #e11d48;
	--cw-accent-dark: #9d174d;
	--cw-on-accent: #fff;
	--cw-tab-bg: rgba(255, 255, 255, .04);
	--cw-cta-glow: 0 0 34px -6px rgba(225, 29, 72, .55);
	--cw-cta-grad: linear-gradient(135deg, #f43f5e 0%, #be123c 52%, #831843 100%);
	--cw-cta-inset:
		inset 0 1px 0 rgba(255, 255, 255, .4),
		inset 0 -1px 0 rgba(0, 0, 0, .14),
		inset 0 0 0 1px rgba(255, 255, 255, .12);
	--cw-cta-shadow:
		0 0 30px -8px rgba(225, 29, 72, .55),
		0 6px 18px -10px rgba(0, 0, 0, .7);
	--cw-cta-shadow-hover:
		0 0 42px -6px rgba(225, 29, 72, .7),
		0 10px 24px -12px rgba(0, 0, 0, .8);
	--cw-card-shadow: 0 0 0 1px #322947, 0 8px 30px -8px rgba(0, 0, 0, .5);
}

/* ── 1) 배경 ─────────────────────────────────────────────────────────────
   PSBackground 가 body 에 인라인으로 아트워크를 박으므로 !important 로 덮는다. */
html, body {
	background-color: var(--cw-bg) !important;
	background-image: var(--cw-mesh) !important;
	background-attachment: fixed !important;
	background-repeat: no-repeat !important;
	background-size: cover !important;
	color: var(--cw-ink) !important;
}

/* ── 2) 섹션 패널 ──────────────────────────────────────────────────── */
.menugroup {
	background: var(--cw-surface);
	backdrop-filter: none;
	color: var(--cw-ink);
	text-shadow: none;
	border-radius: var(--cw-r);
	box-shadow: var(--cw-card-shadow);
	padding: 18px 18px 20px;
	margin: 0 auto 16px auto;
	text-align: left;
}
form.menugroup {
	text-align: center;
	background: none;
	box-shadow: none;
	padding: 4px 0 10px;
}

.menugroup h3 {
	color: var(--cw-ink);
	text-shadow: none;
	font-size: 19px;
	font-weight: normal;
	line-height: 1.35;
	margin: 0 0 6px;
}
.menugroup h3 small {
	color: var(--cw-ink-soft);
	font-size: 13px;
	font-weight: 500;
}
.menugroup > p {
	color: var(--cw-ink-muted);
	font-size: 13px;
	line-height: 1.6;
	margin: 0 0 14px;
	text-shadow: none;
}
.menugroup a { color: var(--cw-accent); }
.menugroup table { color: var(--cw-ink); }

/* ── 3) 버튼 — 광택·베벨 제거, 플랫 ────────────────────────────────────
   범위를 메인메뉴·패널·유저바로 한정한다. 배틀 화면의 기술/교체 버튼은
   타입 색을 배경으로 칠하므로 건드리면 안 된다. */
.menugroup .button,
.ps-room .pad .button,
.userbar .button {
	background: var(--cw-white);
	background-image: none;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	color: var(--cw-ink-soft);
	text-shadow: none;
}
.menugroup .button:hover,
.ps-room .pad .button:hover,
.userbar .button:hover {
	background: var(--cw-tint);
	border-color: var(--cw-line-strong);
	color: var(--cw-ink);
}
.menugroup .button:active,
.ps-room .pad .button:active,
.userbar .button:active { background: var(--cw-tint-2); }
.menugroup .button[disabled],
.ps-room .pad .button[disabled] { opacity: .45; }

/* 「배틀 시작!」 — 배경 색상에서 뽑아 주입되는 그라디언트(#mainmenubuttoncolors)를 덮는다 */
body .button.mainmenu1,
body .button.mainmenu1:hover,
body .button.mainmenu1:active {
	background: var(--cw-accent) !important;
	background-image: none !important;
	border: 1px solid var(--cw-accent) !important;
	border-radius: 18px !important;
	color: var(--cw-on-accent) !important;
	text-shadow: none !important;
	box-shadow: var(--cw-cta-glow) !important;
}
body .button.mainmenu1:hover { background: var(--cw-accent-dark) !important; }

/* ── 4) 상단 탭바 → §12 앱바로 이전 (2026-09-05). 여기 남는 건 유저 이름 색뿐. ── */
.tabbar { text-shadow: none; }
.userbar .username {
	color: var(--cw-ink) !important;
	text-shadow: none !important;
}

/* ── 5) 카드 / 타일 ──────────────────────────────────────────────────── */
.cw-card {
	min-width: 210px;
	padding: 12px 14px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	background: var(--cw-white);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.cw-card-on {
	border-color: var(--cw-line-strong);
	background: var(--cw-tint);
}
.cw-card-off { opacity: .5; }

.cw-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	padding: 10px 6px 8px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	background: var(--cw-white);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	color: var(--cw-ink);
	text-shadow: none;
	cursor: pointer;
}
.cw-tile:hover {
	border-color: var(--cw-line-strong);
	background: var(--cw-tint);
}
.cw-tile-trainer { width: 130px; }
.cw-tile-mon { width: 150px; }
.cw-tile-on {
	border: 2px solid var(--cw-accent);
	background: var(--cw-tint);
}

/* ── 6) 테마 칩 (홈 하단) ───────────────────────────────────────────── */
.cw-theme-row {
	text-align: center;
	font-size: 12px;
	color: var(--cw-ink-muted);
	margin: 2px 0 14px;
}
.cw-theme-chip {
	background: var(--cw-white);
	border: 1px solid var(--cw-line);
	border-radius: 99px;
	color: var(--cw-ink-soft);
	font-size: 12px;
	padding: 4px 12px;
	margin: 0 2px;
	cursor: pointer;
}
.cw-theme-chip:hover { border-color: var(--cw-line-strong); color: var(--cw-ink); }
.cw-theme-chip.on {
	border-color: var(--cw-accent);
	color: var(--cw-accent);
	font-weight: 700;
	background: var(--cw-tint);
}

/* -- 7) 팝업 (PS.alert / 확인창) -----------------------------------
   원본은 #E1E8E8 회색 바탕 + `inset 1px 1px 0 #fff` 베벨이라 2000년대 대화상자처럼 보인다.
   버튼 재정의 범위(.menugroup / .ps-room .pad / .userbar)에서 빠져 있어 광택 버튼도 그대로였다. */
.ps-popup {
	background: var(--cw-white);
	color: var(--cw-ink);
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	box-shadow: var(--cw-card-shadow);
	text-shadow: none;
	padding: 14px 18px;
}
.ps-overlay .ps-popup { max-width: 360px; }
.ps-popup p,
.ps-popup h3,
.ps-popup label { color: var(--cw-ink); text-shadow: none; }
.ps-popup h3 { font-weight: normal; }
.ps-popup p.error { color: var(--cw-accent); }
.ps-popup .button {
	background: var(--cw-white);
	background-image: none;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	color: var(--cw-ink-soft);
	text-shadow: none;
	padding: 5px 16px;
}
.ps-popup .button:hover {
	background: var(--cw-tint);
	border-color: var(--cw-line-strong);
	color: var(--cw-ink);
}
.ps-popup .button:active { background: var(--cw-tint-2); }
/* 기본 동작 버튼(확인·전송)은 액센트로 — 원본은 굵기만 달라 구분이 약하다 */
.ps-popup button[type="submit"] {
	background: var(--cw-accent);
	border-color: var(--cw-accent);
	color: var(--cw-on-accent);
}
.ps-popup button[type="submit"]:hover {
	background: var(--cw-accent-dark);
	border-color: var(--cw-accent-dark);
	color: var(--cw-on-accent);
}
.ps-popup .textbox,
.ps-popup input[type="text"],
.ps-popup input[type="password"] {
	background: var(--cw-white);
	border: 1px solid var(--cw-line);
	border-radius: 10px;
	color: var(--cw-ink);
}
/* 원본 .dark 규칙이 우리 밤 테마를 덮지 않게 (쇼다운은 body.dark, 우리는 html.cw-dark) */
.dark .ps-popup { background: var(--cw-white); color: var(--cw-ink); }

/* -- 8) 홈 퀘스트 요약 줄 --------------------------------------------
   전체 목록은 도전과제 탭으로 옮기고 홈에는 한 줄만 남긴다 (2026-09-02). */
.menugroup.cw-questbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 10px 14px;
}
.menugroup.cw-questbar .button { margin: 0; }
.cw-questbar-main { flex: 1 1 auto; text-align: left; }
.cw-questbar-main small { color: var(--cw-ink-muted); margin-left: 6px; }
.menugroup.cw-questbar .cw-questbar-claim,
.menugroup.cw-questbar .cw-questbar-claim:hover {
	background: var(--cw-accent);
	border-color: var(--cw-accent);
	color: var(--cw-on-accent);
}
.menugroup.cw-questbar .cw-questbar-claim:hover { background: var(--cw-accent-dark); }

/* -- 9) 트레이너 아바타 위치 보정 -------------------------------------
   전신(96x144)은 원본(86x90)보다 트레이너 블록을 64px 높인다(187 -> 251px).
   바가 몇 명을 담느냐로 두 갈래다 (클래스는 patch-battle-view.py 가 붙인다).

   [1인 = 1대1] cw-fullavatar / 블록 251px
   .trainer-far 는 bottom:232px 기준이라 블록 top 이 -32px 이 되고
   .battle{overflow:hidden} 에 잘려 상대 닉네임이 통째로, 정수리가 15px 사라졌다.
   bottom 을 190px 로 내리면 이름 top +10px / 정수리 +27px 로 들어온다 (실측).

   WARN 보이는 높이는 **360px** 이다 -- .battle 이 640x360 overflow:hidden 이고 바(450px)의 아래 90px 는
        언제나 잘린다. bottom 값은 바 기준이므로 「bottom >= 90」 이어야 보인다 (2026-09-06 실측 정정).

   [2인 = 2대2 멀티 · 난투전] cw-halfavatar / 스프라이트 90px, 블록 ≈171px (이름 알약 21 + 90 + 아이콘 60)
   예전 「위 238 / 아래 6」 은 아래 블록의 팀 아이콘(아래 60px)이 잘리는 영역에 통째로 들어갔다 --
   2대2 에서 아래 두 트레이너만 보유 포켓몬이 안 보이던 원인. 위 266 / 아래 92 로 두면
   위 [266,437] · 아래 [92,263] -> 화면 좌표 [13,184] · [187,358] 로 둘 다 보이고 3px 사이.
   [1인 = 1대1] near 도 기본 75 면 아이콘 아랫줄 15px 가 잘려 92 로 올린다 ([92,343] -> 화면 [107,358]).

   WARN 실측 보정 (2026-09-06): **실제 배틀 DOM 은 정적 목업(preview/battle-sidebar.html)보다 25px 위에 그려진다.**
        1대1 far bottom:190 이 목업에선 이름 top 35 인데 실배틀 실측은 +10 이었고, 2대2 위 266 은 목업 top 13 인데
        실배틀에선 이름이 잘렸다(top -12). 원인은 못 찾았고(바 450 규칙 그대로) 사실상 바가 425px 인 셈이다.
        그래서 2인 바 값은 목업 계산값(266/92)이 아니라 **실측 기준 248/69** 다. 위 [248,419]·아래 [69,240]
        -> 실화면 top 6 / 185, 아래 블록 바닥 356. 여기 값을 바꿀 땐 목업이 아니라 실배틀 스크린샷으로 확인할 것. */
.trainer.cw-fullavatar.trainer-far,
.trainer.cw-fullavatar.trainer-near2 {
	bottom: 190px;
}
.trainer.cw-fullavatar.trainer-near,
.trainer.cw-fullavatar.trainer-far2 {
	bottom: 92px;
}
.trainer.cw-halfavatar.trainer-far,
.trainer.cw-halfavatar.trainer-near2 {
	bottom: 248px;
}
.trainer.cw-halfavatar.trainer-near,
.trainer.cw-halfavatar.trainer-far2 {
	bottom: 69px;
}

/* -- 9b) 더블(2대2) 상태바 가로 벌리기 ---------------------------------
   scene.pos() 기준 far(z=200, scale 1) 슬롯 간격 75px, near(z=0, scale 1.5) 112px 인데 상태바 폭은 154px 라
   79 / 42px 겹친다. 위쪽 슬롯의 HP 바가 옆 포켓몬 이름 알약을 덮었다 (2026-09-06 2대2 실측).
   표식 cherish-dbl 은 patch-battle-view.py 가 activeCount>1 일 때만 붙인다. 클래스 의미:
   lstatbar=far(상대) / rstatbar=near(나), leftstatbar=slot0 / rightstatbar=slot1.
   far 는 x 가 뒤집혀 slot0 이 화면 오른쪽이다. 절대 배치라 margin-left 가 그대로 이동량이 된다. */
.statbar.cherish-dbl.lstatbar.leftstatbar { margin-left: 40px; }   /* far slot0 (오른쪽) */
.statbar.cherish-dbl.lstatbar.rightstatbar { margin-left: -40px; } /* far slot1 (왼쪽) */
.statbar.cherish-dbl.rstatbar.leftstatbar { margin-left: -12px; }  /* near slot0 (왼쪽, 사이드바에 너무 얹히지 않게 작게) */
.statbar.cherish-dbl.rstatbar.rightstatbar { margin-left: 30px; }  /* near slot1 (오른쪽) */

/* -- 10) 배틀 조작부 크기 · 순서 -------------------------------------
   (a) 버튼을 로그 위로. .battle-log 는 이미 flex column 이라 order 로 뒤집고,
       스크롤 컨테이너이므로 sticky 로 붙여 로그가 흘러도 안 밀려난다.
   (b) PC(.wide-controls)에서 기술 · 교체 버튼이 화면 대비 너무 작았다.
   (c) 선봉 선택 카드는 PC · 모바일 공통으로 키운다 (세로 카드 + gen5 96x96 스프라이트).
       그림은 40x30 파티 아이콘이 아니라 실제 배틀 스프라이트다 — patch-teampreview-class.py 가
       .picon 대신 .cherish-tpart 를 그린다. 교체 메뉴도 2026-09-06 부터 카드 (patch-switch-cards.py, 기절은 .cherish-fainted). */

/* ⚠️ .controls 는 ChatLog 가 children 을 담는 자루다. 레이아웃마다 내용물이 다르다 —
   top-and-bottom(우리 기본)은 .battle-controls 하나뿐이지만, scrolling 레이아웃(창 높이가
   아주 낮을 때)은 유저목록 · 입력창 · **배틀 화면 자체**까지 이 안에 들어간다.
   무조건 sticky 를 걸면 거기선 배틀 화면이 통째로 붙어버린다.
   scrolling 쪽 .battle-controls 에만 붙는 .inline-battle 로 걸러낸다.
   :has() 를 못 쓰는 브라우저에서는 규칙이 통째로 죽어 현행 동작 그대로다 (안전한 실패). */
.battle-log > .controls:has(> .battle-controls:not(.inline-battle)) {
	order: -1;
	position: sticky;
	top: 0;
	z-index: 3;
	/* 로그가 밑으로 흐르므로 반투명이면 글자가 비친다 — 테마별 불투명 배경 */
	background: var(--cw-white, #EEF2F5);
	box-shadow: 0 3px 8px -3px rgba(0,0,0,.28);
}
.battle-log > .controls:has(> .battle-controls:not(.inline-battle)) .inline-controls {
	border-top: 0;
	border-bottom: 1px solid #AAA;
	padding-bottom: 10px;
}

/* (b) PC 조작 버튼 확대 */
.wide-controls .movecontrols,
.wide-controls .switchcontrols {
	max-width: 860px;
}
.wide-controls .movebutton {
	width: 202px;
	height: 56px;
	font-size: 12pt;
	padding: 9px 6px 0 6px;
}
.wide-controls .movebutton small.type,
.wide-controls .movebutton small.pp {
	font-size: 9.5pt;
	padding-top: 5px;
}
.wide-controls .switchmenu button {
	width: 138px;
	min-height: 44px;
	font-size: 10.5pt;
	padding: 8px 6px 8px 0;
}
.wide-controls .switchmenu.cherish-sw button {
	min-height: 56px;
	padding-bottom: 11px;
}
.wide-controls .switchmenu button .picon {
	transform: scale(1.25);
	transform-origin: 50% 50%;
	margin: -6px 2px -6px 0;
}
.wide-controls .shiftselect,
.wide-controls .moveselect,
.wide-controls .switchselect {
	font-size: 14pt;
}

/* (c) 선봉 선택 카드 · 교체 카드 — 컴팩트 세로 카드 + HQ 일러스트. PC · 모바일 공통
   (2026-09-06 사용자 결정 V2a: 교체 메뉴도 카드(patch-switch-cards.py). gen5 96px 는 그림이 상자의 40% 라 카드에서
   작아 보였다 → /cherish/sprite 320px 일러스트를 <img> 로, 여백은 깎고 그림이 칸을 거의 채운다. 시안 preview/switch-cards.html) */
/* float 대신 inline-block — 카드 수가 적어도 가운데 정렬된다 */
.switchmenu.cherish-tp {
	text-align: center;
	margin-right: 0;
	padding-left: 0;
}
.switchmenu.cherish-tp button {
	float: none;
	display: inline-block;
	vertical-align: top;
	/* 모바일: .switchcontrols 가 max-width 330px 이라 3장이 한 줄에 들어가야 한다
	   (100 + 좌우 3 = 106, ×3 = 318). 124px 로 잡으면 2+1 로 깨진다. */
	width: 100px;
	min-height: 0;
	padding: 4px 3px 11px;
	font-size: 10.5pt;
	line-height: 1.15;
	white-space: normal;
	margin: 3px 3px 0;
}
.switchmenu.cherish-tp button .cherish-tpart {
	display: block;
	width: 92px;
	height: 92px;
	margin: 0 auto 1px;
	overflow: hidden;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}
.switchmenu.cherish-tp button .cherish-tpart img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
/* HQ 가 404 로 gen5 폴백이 걸리면(onError) 원본 96px 를 1.8배 — 픽셀아트라 계단을 살린다 */
.switchmenu.cherish-tp button .cherish-tpart img.cherish-tpart-g5 {
	image-rendering: pixelated;
	transform: scale(1.8);
}
/* 기절 = 클래스로 회색조 (아이콘 문자열에 붙어 있던 회색조의 대체). 부활의소원 화면도 같은 규칙 */
.switchmenu button.cherish-fainted .cherish-tpart { opacity: .3; filter: grayscale(100%) brightness(.5); }
.switchmenu button.cherish-fainted { color: #9a8f93; }
.switchmenu.cherish-tp button .hpbar {
	left: 10px;
	right: 10px;
	bottom: 5px;
	height: 3px;
	overflow: hidden; /* 안쪽 span 은 px 폭(최대 92)이라 좁은 카드에서 넘친다 */
}
.switchmenu.cherish-tp button .hpbar span { height: 3px; max-width: 100%; }
.switchmenu.cherish-tp button .status { bottom: 4px; right: 5px; }
.switchmenu.cherish-tp button .cherish-sw { margin-top: 1px; }
/* 이름은 2026-09-21 부터 `<span class="cherish-tpname">` 이다 (patch-switch-cards.py STEP D).
   세로 카드에서는 규칙을 하나도 안 준다 — inline 이라 그전의 텍스트 노드와 흐름이 같고,
   긴 이름 줄바꿈도 button 의 white-space: normal 이 그대로 한다. 이 클래스가 실제로 쓰이는 자리는
   §31-b 의 가로 압축 줄뿐이다(말줄임을 걸려면 요소여야 해서 만들었다). */
.wide-controls .switchmenu.cherish-tp button {
	width: 128px;
	min-height: 0;
	font-size: 11.5pt;
	padding: 5px 4px 12px;
	margin: 3px 4px 0;
}
.wide-controls .switchmenu.cherish-tp button .cherish-tpart {
	width: 118px;
	height: 118px;
}
/* 2대2 동료 카드는 한 단계 작게 (2026-09-08 사용자). 업스트림이 `myAllyPokemon` 을 같은 목록에 disabled 로 끼워 넣는데,
   같은 크기라 「앞 3장만 내가 낼 수 있다」가 안 보였다. 동료 버튼은 cmd 가 비어 있는 유일한 카드다(내 아이는 기절해도 `/switch N` 을 달고 있다) —
   preact 가 빈 문자열을 attribute 로 찍든 빼든 걸리게 `:not([data-cmd^="/"])` 로 잡는다.
   ⚠️ 대기 중 「내 팀」(.cherish-teamlist)은 전부 cmd 가 비어 있으므로 제외. 크기는 각 문맥 카드의 8할. */
.switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) {
	width: 80px;
	font-size: 9.5pt;
	padding: 3px 3px 10px;
}
.switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) .cherish-tpart {
	width: 72px;
	height: 72px;
}
.wide-controls .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) {
	width: 102px;
	font-size: 10.5pt;
	padding: 4px 4px 11px;
}
.wide-controls .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) .cherish-tpart {
	width: 94px;
	height: 94px;
}

/* (d) 모바일 (2026-09-06 사용자 지적 「교체 카드가 커지니 배틀 로그가 아예 안 보인다」)
   조작부(.controls, sticky)가 .battle-log 를 다 먹지 않게 상한 — 로그가 최소 110px 은 보이고, 넘치면 조작부 안에서 스크롤.
   %는 .battle-log(absolute, top/bottom 확정) 기준. 대기 중 「내 팀」은 로그를 읽는 시간이라 카드를 작게 그린다.
   ⚠️ 2026-09-06 실기기 제보(안드로이드, 플래그 없음): 조작부가 「어떻게 할까?」 + 소제목 높이(≈63px)로 눌리고 기술·교체가 안 보였다.
   기술 버튼은 float 라 .movecontrols 높이에 안 잡힌다 — (d) 의 overflow 상자가 그 높이로 잘리면 딱 그 그림이다. 메뉴 상자를 flow-root 로
   float 를 품게 한다(PC .movemenu flex 는 §28 이 뒤에서 덮으므로 영향 없음). */
.battle-controls .movecontrols, .battle-controls .switchcontrols, .battle-controls .targetcontrols, .battle-controls .teamcontrols { display: flow-root; }
/* (d) 의 상한 규칙(.controls max-height + overflow)은 2026-09-06 밤 껍데기 A 가 전원에게 켜지면서 **제거** — 로그 패널이 없으니 존재 이유가 없고,
   실기기에서 기술·교체를 잘라 먹던 규칙이었다. (a) 의 sticky 규칙은 ?cwpreview=0 탈출구(옛 화면)에서만 살아 있다. 아래는 「내 팀」 소형 카드만 남긴다. */
/* 대기 중 「내 팀」 소형 카드 — 2026-09-22 부터 **PC 도 같이** 작게 (사용자: 이 자리에 채팅창이 들어온다).
   09-06 에 모바일만 줄인 건 로그 패널이 눌리는 걸 막으려던 것이고, 09-21 교체 줄 압축이 이 화면을
   제외한 건 「자리가 남으니 크게 둔다」는 이유였다. 자리를 쓸 데가 생겼으니 그 전제가 바뀌었다.
   ⚠️ 여기는 **대기 중 목록(.cherish-teamlist)뿐**이다. 기술 화면의 교체 목록은 §31-b 가 따로 눕힌다 —
   둘을 합치면 선봉 선택·기절 뒤 교체 전용 화면까지 같이 줄어든다(거기는 화면이 통째로 그 용도다).

   ⚠️ **PC 에서 안 먹고 있었다 (2026-09-22 실측으로 발견, 같은 날 고침).** 클래스 둘짜리 선택자
   `.switchmenu.cherish-teamlist button`(0,2,1) 이 §10 (c) 의 `.wide-controls .switchmenu.cherish-tp
   button`(0,3,1) 에 졌다 — 주석은 「PC 도 같이 작게」인데 PC 는 그대로 128px 이었고, 그 바람에
   노트북(1280×800)에서 2대2·6대6 **대기 화면이 107px 넘쳐 있었다**(입력칸을 넣기 전부터).
   그래서 `html.cw-bshell .cw-bpanel` 로 감싸 특정도를 올렸다(0,4,2). 고친 뒤 실측:
   조작부 420 → **198px** · 넘침 −152 → **여유 +55**. 값을 다시 만질 땐 특정도부터 확인할 것. */
html.cw-bshell .cw-bpanel .switchmenu.cherish-teamlist button { width: 72px; padding: 3px 2px 9px; margin: 2px 2px 0; font-size: 9pt; }
html.cw-bshell .cw-bpanel .switchmenu.cherish-teamlist button .cherish-tpart { width: 64px; height: 64px; }
html.cw-bshell .cw-bpanel .switchmenu.cherish-teamlist button .hpbar { left: 6px; right: 6px; }
/* 껍데기 밖(?cwpreview=0 탈출구)에서는 종전 규칙 그대로 — 거기는 로그 패널이 살아 있다. */
.switchmenu.cherish-teamlist button { width: 72px; padding: 3px 2px 9px; margin: 2px 2px 0; font-size: 9pt; }
.switchmenu.cherish-teamlist button .cherish-tpart { width: 64px; height: 64px; }
.switchmenu.cherish-teamlist button .hpbar { left: 6px; right: 6px; }

/* -- 10) 홈 CTA -- 자동매칭 시작 · 모드 세그먼트 ----------------------
   업스트림 광택 버튼(.button.mainmenu1)을 쓰지 않고 자체 마크업으로 세웠다.
   클래스는 patch-ffa-client.py 가 붙이고 외형은 여기가 소유한다.

   v2 (2026-09-05) -- 사용자: 「여전히 투박하다」. 1차의 문제는 셋이었다:
    - 꽉 찬 붉은 판 하나가 화면을 가로지르는 모양이라 버튼이 아니라 「띠」로 읽혔다.
    - 모드 토글이 넓은 알약 3개로 헐겁게 놓여 비활성 입력칸처럼 보였다.
    - 그라디언트 한 겹뿐이라 재질이 없었다.
   그래서 토글을 **세그먼트 컨트롤 한 덩어리**로 묶고, CTA 에는 아이콘 뒤 방사형 빛과
   위아래 안쪽 테두리를 넣어 두께를 만들었다.

   WARN `<p>` 로 만든 블록(.cw-modes/.cw-cta-hint)은 `.menugroup > p`(0,1,1)에 여백을
        뺏긴다. 반드시 `.menugroup > p.xxx`(0,2,1)로 잡을 것 -- 1차에서 이걸 놓쳐
        토글 위 여백이 0 이 되고 CTA 그림자에 칩이 깔렸다.
   WARN 애니메이션은 transform/opacity 만 건드린다. box-shadow 키프레임은 저사양에서
        매 프레임 리페인트를 만든다. */
/* cw-cta-centered: 아이콘+글자를 한 덩어리로 가운데. 셰브론은 흐름 밖(아래 .cw-cta-go). */
.cw-cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	width: 100%;
	margin: 0;
	/* 오른쪽 셰브론이 절대 배치라 좌우 패딩을 같게 둬도 글자 묶음이 안 밀린다 */
	padding: 13px 44px;
	border: 0;
	border-radius: 16px;
	/* 그린 배경이 정본, CSS 그라데이션은 그림을 못 받았을 때의 폴백으로 밑에 깐다.
	   100% 100% 로 늘린다 — 그림에 또렷한 형태가 없어서 폭이 3배 달라져도 티가 안 난다
	   (그 제약은 docs/showdown-home-assets.md §2-4 가 소유한다). */
	background:
		url('/cherish/ui/cta-bg.png?v=1') center / 100% 100% no-repeat,
		var(--cw-cta-grad);
	color: var(--cw-on-accent);
	font: inherit;
	text-align: left;
	text-shadow: none;
	cursor: pointer;
	overflow: hidden;
	box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset);
	transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
/* 질감 -- 128px 타일을 옅게 반복. 배경 그림은 늘어나지만 이 타일은 반복이라 안 늘어난다.
   그래서 「또렷해도 되는 무늬」는 전부 이쪽이 담당한다.
   ⚠️ 세기를 opacity 로 주므로 이 요소에 box-shadow 를 두면 그림자까지 흐려진다.
      안쪽 테두리는 .cw-cta 본체의 box-shadow(--cw-cta-inset)로 옮겨 뒀다.
   ⚠️ 예전에 있던 방사형 하이라이트는 뺐다 — 배경 그림에 자체 명암이 생겨 광원이 둘이 됐다. */
.cw-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: url('/cherish/ui/cta-texture.png?v=1') repeat 0 0 / 128px 128px;
	opacity: .14;
	pointer-events: none;
}
/* 호버에 한 번 지나가는 빛 */
.cw-cta::after {
	content: "";
	position: absolute;
	top: -60%;
	bottom: -60%;
	left: 0;
	width: 38%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .24), transparent);
	transform: translateX(-280%) skewX(-16deg);
	pointer-events: none;
}
.cw-cta:hover {
	transform: translateY(-2px);
	box-shadow: var(--cw-cta-shadow-hover), var(--cw-cta-inset);
}
.cw-cta:hover::after {
	transition: transform .75s ease;
	transform: translateX(440%) skewX(-16deg);
}
.cw-cta:active { transform: translateY(0); filter: brightness(.96); }
.cw-cta:focus-visible { outline: 3px solid var(--cw-line-strong); outline-offset: 3px; }

/* 아이콘 -- 원형 배지. 안에 포켓볼 SVG 가 들어온다 (마크업 소유) */
.cw-cta-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, .34),
		0 1px 2px rgba(0, 0, 0, .14);
	color: var(--cw-on-accent);
}
.cw-cta-icon svg { display: block; }
.cw-cta-body { flex: 0 1 auto; min-width: 0; text-align: center; }
.cw-cta-title {
	display: block;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.2;
}
/* 켜둔 모드 목록 -- 길어지면 줄바꿈 대신 말줄임 (버튼 높이가 흔들리면 안 된다) */
.cw-cta-sub {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .01em;
	opacity: .78;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cw-cta-go {
	position: absolute;
	top: 50%;
	right: 15px;
	font-size: 13px;
	opacity: .6;
	/* translateY 로 세로 가운데를 잡으므로 호버 이동도 같은 transform 안에서 처리한다 */
	transform: translateY(-50%);
	transition: transform .16s ease, opacity .16s ease;
}
.cw-cta:hover .cw-cta-go { transform: translateY(-50%) translateX(3px); opacity: 1; }

/* 대기 중 -- is-waiting 는 **기본 상태를 물려받는다** (배경 그림·가운데 정렬 그대로).
   달라지는 건 아이콘(도는 화살표)·문구·바닥 진행 줄, 그리고 오른쪽 취소 알약뿐이다.

   예전엔 색을 빼고(흰 카드) 왼쪽 정렬이었다. 「계속 띄워 두는 상태라 조용해야 한다」는
   판단이었는데, 배경 그림이 들어오면서 같은 버튼이 누르면 딴 것으로 바뀌는 것처럼 보였다
   (2026-09-05 사용자 지적).

   ⚠️ 취소 알약이 절대 배치라 좌우 패딩을 그 폭만큼 **대칭으로** 벌린다. 안 그러면 가운데
        묶음이 알약 밑으로 파고든다. 라벨이 「대기 취소」가 아니라 「취소」인 것도 그 폭 때문. */
.cw-cta.is-waiting { padding: 13px 62px; }
/* 호버 광택은 끈다 -- 대기 중에 눌러 봐야 취소지 시작이 아니다 */
.cw-cta.is-waiting::after { display: none; }
.cw-cta.is-waiting:hover { transform: none; box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset); }
/* 취소 -- 셰브론 자리를 알약이 대신한다 (같은 절대 배치를 물려받는다) */
.cw-cta.is-waiting .cw-cta-go {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
	font-size: 11.5px;
	font-weight: 600;
	color: var(--cw-on-accent);
	opacity: 1;
	transition: background .14s ease;
}
.cw-cta.is-waiting .cw-cta-go i { font-size: 9px; }
.cw-cta.is-waiting:hover .cw-cta-go {
	transform: translateY(-50%);
	background: rgba(255, 255, 255, .32);
}
/* 바닥 진행 줄 -- 남은 시간을 모르니 좌우로 오가며 「돌고 있다」만 알린다 */
.cw-cta-wait-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	overflow: hidden;
	background: rgba(0, 0, 0, .18);
}
.cw-cta-wait-bar::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 38%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
	animation: cw-cta-sweep 1.5s ease-in-out infinite;
}
@keyframes cw-cta-sweep {
	from { transform: translateX(-100%); }
	to { transform: translateX(265%); }
}

/* cw-modes-seg: 모드 토글 = **세그먼트 컨트롤**. 알약 3개를 따로 띄우면 헐거워 보여서 한 덩어리로 묶었다.
   특이도는 `.menugroup > p` 를 이기도록 p 를 포함시킨다 (위 WARN 참조). */
.menugroup > p.cw-modes {
	display: flex;
	gap: 3px;
	margin: 10px 0 0;
	padding: 3px;
	border: 1px solid var(--cw-line);
	border-radius: 13px;
	background: var(--cw-tint);
}
.cw-modechip {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 7px 4px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--cw-ink-muted);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	text-shadow: none;
	cursor: pointer;
	transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.cw-modechip:hover:not(:disabled):not(.on) { background: var(--cw-white); color: var(--cw-ink); }
/* 켜진 칸 = **색 채움** (2026-09-05 사용자: 흰 알약은 꺼진 칸과 구분이 안 갔다). CTA 와 같은 붉은 그라데이션 +
   흰 글자. 꺼진 칸은 바탕색 그대로 + 회색 글자. §15 소프트 글래스에도 같은 규칙이 있다 -- 둘 다 고칠 것. */
.cw-modechip.on {
	background: var(--cw-cta-grad);
	color: var(--cw-on-accent);
	box-shadow: 0 4px 10px -6px rgba(190, 18, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.cw-modechip.on .cw-modechip-crowd { background: var(--cw-white); color: var(--cw-accent); }
.cw-modechip:disabled { cursor: default; opacity: .55; }
/* 잠긴 칸(6대6 자격 미달) -- 흐리게만 두면 「대기 중이라 잠긴 것」과 구별이 안 되어 점선을 같이 준다.
   2026-09-22 평면화로 하위 칸이 사라지면서 **큰 칸이 그대로 물려받았다**. */
.cw-modechip.is-locked {
	opacity: .7;
	outline: 1px dashed var(--cw-line-strong);
	outline-offset: -2px;
}
/* 잠긴 이유 한 줄 -- **여섯 마리가 모이면 줄째로 사라진다**(상시 문구가 아니다).
   title 툴팁만 두면 모바일에서 영영 안 보여서 줄로도 적는다. */
.menugroup > p.cw-submodes-note { margin: 4px 0 0 5px; font-size: 11px; color: var(--cw-ink-muted); }
/* 모드 엠블럼 -- 예전엔 체크(✓)가 있던 자리다 (2026-09-05 사용자 확정으로 교체).
   켜짐·꺼짐은 이미 알약 배경과 글자색이 보여주므로 체크는 중복이었고, 그 자리를 엠블럼이 받았다.
   그림의 알파만 쓰고 색은 currentColor 가 칠한다 -- 그래서 흰색 PNG 한 장으로
   켜짐(액센트)·꺼짐(회색)·붉은 CTA 위(흰색)가 전부 해결된다. */
.cw-modechip-mark {
	flex: 0 0 auto;
	width: 13px;
	height: 13px;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}
.cw-modechip-mark.is-ffa {
	-webkit-mask-image: url('/cherish/ui/mode-ffa.png?v=1');
	mask-image: url('/cherish/ui/mode-ffa.png?v=1');
}
.cw-modechip-mark.is-solo {
	-webkit-mask-image: url('/cherish/ui/mode-solo.png?v=1');
	mask-image: url('/cherish/ui/mode-solo.png?v=1');
}
.cw-modechip-mark.is-multi {
	-webkit-mask-image: url('/cherish/ui/mode-multi.png?v=1');
	mask-image: url('/cherish/ui/mode-multi.png?v=1');
}
/* 세 칸을 **균등**하게 만드는 장치. flex:1 1 0 만으로는 안 된다 -- 플렉스 아이템은
   min-content 아래로 줄지 않아서, N/4 배지가 붙은 칸만 넓어진다 (실측). */
.cw-modechip-label {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
}
.cw-modechip-crowd {
	flex: 0 0 auto;
	padding: 1px 5px;
	border-radius: 6px;
	background: var(--cw-accent);
	color: var(--cw-on-accent);
	font-size: 10px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.menugroup > p.cw-cta-hint {
	margin: 8px 0 0;
	text-align: center;
	font-size: 11px;
	line-height: 1.5;
	color: var(--cw-ink-muted);
}
/* 파티 비리더 -- 버튼 자리에 들어가는 읽기 전용 카드 */
.cw-cta-passive {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 13px 15px;
	border: 1px dashed var(--cw-line-strong);
	border-radius: 16px;
	background: var(--cw-tint);
}
.cw-cta-passive .cw-cta-icon {
	background: var(--cw-white);
	box-shadow: inset 0 0 0 1px var(--cw-line);
	color: var(--cw-accent);
}
.cw-cta-passive .cw-cta-title { color: var(--cw-ink); font-size: 15px; }
.cw-cta-passive .cw-cta-sub { color: var(--cw-ink-muted); opacity: 1; white-space: normal; }
/* 「배틀 진행 중」 카드는 버튼이다 (눌러서 그 배틀로 돌아간다). 브라우저 기본 버튼
   스타일이 폭·정렬·글꼴을 덮으므로 여기서 되돌린다. 점선 테두리는 그대로 둔다 —
   「지금은 못 누르는 자리」가 아니라 「다른 곳으로 가는 자리」라는 결이 맞다. */
button.cw-cta-passive {
	width: 100%;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .18s ease, background .18s ease;
}
button.cw-cta-passive:hover {
	border-color: var(--cw-accent);
	background: var(--cw-tint-2);
}
button.cw-cta-passive:hover .cw-cta-go { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.cw-cta, .cw-cta-go { transition: none; }
	.cw-cta:hover { transform: none; }
	.cw-cta:hover::after { transition: none; transform: translateX(-280%) skewX(-16deg); }
	.cw-cta:hover .cw-cta-go { transform: none; }
	.cw-cta-wait-bar::after { animation: none; transform: translateX(80%); }
}

/* -- 10b) 자동매칭 첫 안내 팝업 (2026-09-05) --------------------------
   첫 「자동매칭 시작」 에서 한 번 뜬다 (localStorage cherish-mode-intro-seen-2). 세 모드를 설명하고
   원하는 것만 골라 돌릴 수 있음을 알린다. 2대2·난투전에 「추천」 -- 초보를 그쪽으로 유도.
   마크업은 patch-ffa-client.py renderCherishIntro 가 만든다. 모드 칸 오른쪽 「?」 로 다시 연다.
   WARN 카드는 <button> 이라 .ps-room .pad .button 규칙을 안 탄다 (클래스가 다르다). */
.cw-intro-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(60, 8, 24, .45);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
.cw-intro {
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 18px 18px 14px;
	border-radius: var(--cw-r);
	background: var(--cw-white);
	color: var(--cw-ink);
	box-shadow: var(--cw-card-shadow), 0 24px 48px -16px rgba(60, 8, 24, .5);
	text-align: left;
}
.cw-intro-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--cw-ink); }
.cw-intro-lead { margin: 6px 0 12px; font-size: 13px; line-height: 1.5; color: var(--cw-ink-muted); }
.cw-intro-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0 0 8px;
	padding: 11px 12px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	background: var(--cw-tint);
	color: var(--cw-ink-muted);
	font: inherit;
	text-align: left;
	text-shadow: none;
	cursor: pointer;
	transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.cw-intro-card:hover { border-color: var(--cw-line-strong); }
/* 잠긴 안내 카드 (6대6 자격 미달) -- 설명 자리에 사유가 들어간다 (cherishSixNote). */
.cw-intro-card.is-locked {
	border-style: dashed;
	opacity: .6;
	cursor: default;
}
.cw-intro-card.is-locked:hover { border-color: var(--cw-line); }
.cw-intro-card.is-locked .cw-intro-check { visibility: hidden; }
.cw-intro-card.on {
	background: var(--cw-white);
	border-color: var(--cw-line-strong);
	color: var(--cw-ink);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.cw-intro-check {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--cw-line-strong);
	border-radius: 6px;
	background: var(--cw-white);
	color: transparent;
	font-size: 11px;
	font-weight: 700;
}
.cw-intro-card.on .cw-intro-check { background: var(--cw-accent); border-color: var(--cw-accent); color: var(--cw-on-accent); }
.cw-intro-body { flex: 1 1 auto; min-width: 0; display: block; }
.cw-intro-head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.cw-intro-head .cw-modechip-mark { width: 14px; height: 14px; }
.cw-intro-sub { font-size: 12px; font-weight: 500; color: var(--cw-ink-muted); }
.cw-intro-rec {
	margin-left: auto;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--cw-accent);
	color: var(--cw-on-accent);
	font-size: 10px;
	font-weight: 700;
}
.cw-intro-desc { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--cw-ink-muted); }
.cw-intro-card.on .cw-intro-desc { color: var(--cw-ink); opacity: .85; }
/* 발: 문구 한 줄, 그 아래 버튼(오른쪽 정렬). 한 줄에 같이 두면 문구가 버튼 옆에 끼어 어색하다 -- 2026-09-05 사용자 지적 */
.cw-intro-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; }
.cw-intro-note { flex: 0 0 100%; margin: 0 0 2px; font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-intro-go {
	flex: 0 0 auto;
	padding: 9px 16px;
	border: 0;
	border-radius: 12px;
	background: var(--cw-cta-grad);
	color: var(--cw-on-accent);
	font: inherit;
	font-weight: 700;
	text-shadow: none;
	cursor: pointer;
	box-shadow: var(--cw-cta-shadow);
}
.cw-intro-go:hover { box-shadow: var(--cw-cta-shadow-hover); }
.cw-intro-close {
	flex: 0 0 auto;
	padding: 9px 12px;
	border: 1px solid var(--cw-line);
	border-radius: 12px;
	background: var(--cw-white);
	color: var(--cw-ink-muted);
	font: inherit;
	text-shadow: none;
	cursor: pointer;
}
.cw-intro-close:hover { background: var(--cw-tint-2); color: var(--cw-ink); }
/* 모드 칸 오른쪽 「?」 -- 칩은 flex:1 이라 이 칸만 고정폭. 대기 중에도 눌린다 (설명만 띄운다). */
.cw-modes-help {
	flex: 0 0 auto;
	width: 26px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--cw-ink-muted);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	text-shadow: none;
	cursor: pointer;
}
.cw-modes-help:hover { background: var(--cw-tint-2); color: var(--cw-ink); }
/* -- 11) 오늘의 배틀 점수 (0282) --------------------------------------
   홈 CTA 바로 아래. 「눌러야 할 이유」를 버튼 옆에 두는 자리다.
   마크업은 patch-battle-points.py 가 소유하고 외형만 여기 있다.

   진행 바는 **지금 단계 안에서의 진행**을 그린다 (0 → 다음 임계값이 아니라
   직전 임계값 → 다음 임계값). 곡선이 뒤로 갈수록 가팔라서 절대값으로 그리면
   2단계 이후로는 바가 거의 안 움직여 「해도 소용없다」로 읽힌다. */
.menugroup.cw-bp { padding: 13px 16px 14px; }
.menugroup > p.cw-bp-head {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 9px;
}
.cw-bp-title {
	flex: 1 1 auto;
	font-size: 13px;
	font-weight: 700;
	color: var(--cw-ink);
}
.cw-bp-score {
	flex: 0 0 auto;
	font-size: 19px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--cw-accent);
	/* 점수가 오를 때 자릿수가 흔들리지 않게 */
	font-variant-numeric: tabular-nums;
}
.cw-bp-score small {
	font-size: 12px;
	font-weight: 600;
	margin-left: 2px;
	opacity: .7;
}
/* cw-bp-fill 에 CTA 그림을 재사용한다 -- 버튼과 같은 재질이 흘러야 한 화면으로 읽힌다.
   안쪽 그림자로 트랙을 파인 홈처럼 만들어 채움이 얹힌 느낌을 준다. */
.cw-bp-track {
	position: relative;
	height: 9px;
	border-radius: 999px;
	background: var(--cw-tint-2);
	box-shadow: inset 0 1px 2px rgba(136, 19, 55, .1);
	overflow: hidden;
}
.cw-bp-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-radius: 999px;
	/* cover 라 바가 짧아도 그림의 가운데(가장 진한 곳)가 아니라 왼쪽 결이 보인다 */
	background: url('/cherish/ui/cta-bg.png?v=1') center / cover;
	transition: width .55s ease;
}
.menugroup > p.cw-bp-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 9px 0 0;
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--cw-ink-muted);
}
.cw-bp-left { flex: 1 1 auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cw-bp-reset { flex: 0 0 auto; opacity: .85; white-space: nowrap; }
/* 알 아이콘 -- 이모지(🥚)는 OS 마다 다르게 그려져서 자체 그림으로 통일했다.
   마스크라 색은 CSS 가 칠한다. */
.cw-egg-ic {
	display: inline-block;
	width: 16px;
	height: 16px;
	vertical-align: -3px;
	background-color: currentColor;
	-webkit-mask: url('/cherish/ui/egg.png?v=1') no-repeat center / contain;
	mask: url('/cherish/ui/egg.png?v=1') no-repeat center / contain;
}
.cw-bp-title .cw-egg-ic { color: var(--cw-accent); margin-right: 4px; }
.cw-bp-eggs .cw-egg-ic { width: 13px; height: 13px; vertical-align: -2px; }
/* 받은 알 -- 같은 그림을 깐 칩. 연분홍 알약이던 시절엔 「정보」로 읽혔는데,
   이건 「받았다」로 읽힌다. 배경이 진해지므로 글자·아이콘을 흰색으로 뒤집는다. */
.cw-bp-eggs {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px;
	border-radius: 999px;
	background: url('/cherish/ui/cta-bg.png?v=1') center / cover;
	box-shadow: 0 2px 6px -3px rgba(190, 18, 60, .7);
	color: var(--cw-on-accent);
	font-weight: 700;
}
.cw-bp-eggs .cw-egg-ic { color: var(--cw-on-accent); }
/* 게이지 끝 「알 +1」 목표 배지 (2026-09-05) -- 「채우면 알」을 글자가 아니라 그림으로.
   지금은 egg.png 실루엣(마스크)을 CTA 재질 원판 위에 흰색으로 얹는다. 색 있는 알 그림(egg-goal.png, 96×96)이 오면
   .cw-bp-goal.has-img 가 그걸 원판 없이 그대로 쓴다 (install-ui-assets.py OPTIONAL). 설치 때 patch-battle-points.py 마크업의
   cw-bp-goal 에 has-img 를 붙여 빌드하면 끝. */
.cw-bp-row { display: flex; align-items: center; gap: 10px; }
.cw-bp-row .cw-bp-track { flex: 1 1 auto; }
.cw-bp-goal { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: url('/cherish/ui/cta-bg.png?v=1') center / cover; box-shadow: 0 8px 16px -8px rgba(190, 18, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 3px var(--cw-white); }
.cw-bp-goal-egg { display: block; width: 20px; height: 22px; background-color: #fff; -webkit-mask: url('/cherish/ui/egg.png?v=1') no-repeat center / contain; mask: url('/cherish/ui/egg.png?v=1') no-repeat center / contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.cw-bp-goal b { position: absolute; top: -6px; right: -8px; padding: 1px 6px; border-radius: 999px; background: #fff; color: var(--cw-accent); font-size: 11px; font-weight: 800; line-height: 1.4; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .35); border: 1px solid var(--cw-line); }
.cw-bp-goal.has-img { background: url('/cherish/ui/egg-goal.png?v=1') center / contain no-repeat; box-shadow: none; width: 44px; height: 44px; }
.cw-bp-goal.has-img .cw-bp-goal-egg { display: none; }
/* 체리 보상 단계의 목표 배지 (2026-09-07 개편) -- 중간 단계는 알이 아니라 체리가 나온다.
   체리 그림 파일이 없어 CSS 로 그린다: 흰 원(열매) + 굽은 선(꼭지). 알 실루엣과 같은 20x22 자리를 쓴다. */
.cw-bp-goal-cherry { position: relative; display: block; width: 20px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.cw-bp-goal-cherry::before { content: ''; position: absolute; left: 2px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.cw-bp-goal-cherry::after { content: ''; position: absolute; left: 8px; top: 2px; width: 9px; height: 8px; border-top: 2px solid #fff; border-right: 2px solid #fff; border-top-right-radius: 9px; }
.cw-bp-goal.has-img .cw-bp-goal-cherry { display: none; }
/* 베리 보상 단계의 목표 배지 (2026-09-09 개편 · 2026-09-16 모양 교체) -- 중간 단계의 체리가 베리로 옮겨졌다.
   그림 파일 없이 CSS 로 그린다: 둥근 열매 두 알(큰 것 + 작은 것). 알·체리와 같은 20x22 자리.
   ⚠ 2026-09-09～16 에는 사각별 둘(✨ 별가루의 결)이었다. 09-15 화폐 통합으로 별가루가 베리에 흡수됐는데
   글자만 🫐 로 바뀌고 이 도형이 남아 「보상은 베리인데 그림은 별가루」가 됐다(사용자 신고).
   클래스·필드 이름의 dust 는 api 응답 키(pendingDust · stageRewards[].dust)라 레거시로 그냥 둔다 —
   이름을 바꾸면 클라·api 동시 배포가 강제되고 CDN 에 남은 옛 js 가 빈 값을 읽는다.
   체리(원 + 갈고리 꼭지)와 헷갈리지 않게 **꼭지를 그리지 않는 것**이 구분점이다. */
.cw-bp-goal-dust { position: relative; display: block; width: 20px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.cw-bp-goal-dust::before { content: ''; position: absolute; left: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.cw-bp-goal-dust::after { content: ''; position: absolute; right: 0; top: 1px; width: 11px; height: 11px; border-radius: 50%; background: #fff; opacity: .9; }
.cw-bp-goal.has-img .cw-bp-goal-dust { display: none; }
/* 발의 「오늘 체리 N」·「오늘 베리 N」 칩 -- 알 칩(.cw-bp-eggs)과 나란히 서지만 무게는 한 단계 낮춘다
   (알이 주된 보상이고 체리·베리는 곁들이라는 위계를 색으로 보여 준다). */
.cw-bp-cherries, .cw-bp-dusts {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	border: 1px solid var(--cw-line);
	background: var(--cw-tint);
	color: var(--cw-ink-muted);
	font-weight: 700;
}
/* 베리는 상점·알 탭과 같은 보라 계열로 둔다 (.cw-egg-row.is-dust 와 같은 색). */
.cw-bp-dusts { color: #6d5bc9; border-color: #ddd6f5; background: #f7f5ff; }
@keyframes cw-bp-near { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.cw-bp-goal.is-near { animation: cw-bp-near 1.6s ease-in-out infinite; }
.cw-bp.is-done .cw-bp-goal { filter: saturate(.45) brightness(1.12); animation: none; }
.cw-bp.is-done .cw-bp-goal b { color: #2ec27e; }
.cw-bp-left b { color: var(--cw-ink); font-weight: 700; }
html.cw-bnav .cw-bp-hint { display: none; } /* 폰에선 배지가 말해 주므로 발 문구를 줄인다 */
html.cw-bnav .cw-bp-goal { width: 36px; height: 36px; }
@media (prefers-reduced-motion: reduce) { .cw-bp-goal.is-near { animation: none; } }
/* 마지막 단계까지 다 채운 날 — 바를 가득 채우고 색을 눕힌다 (더 밀 곳이 없다) */
/* 다 채운 날 -- 더 밀 곳이 없으니 채도를 내려 「끝났다」를 표시한다
   (그림 배경이라 단색으로 덮는 대신 필터를 쓴다) */
.cw-bp.is-done .cw-bp-fill { filter: saturate(.45) brightness(1.12); }

@media (prefers-reduced-motion: reduce) {
	.cw-bp-fill { transition: none; }
}

/* ── 12) 앱바 ──────────────────────────────────────────────────────────
   업스트림은 「브라우저 탭」 은유(28px 탭 + 6px 선반)였다. 게임 런처처럼 **알약 내비 + 브랜드 마크 +
   유저 칩** 세 덩어리로 바꾼다. 마크업은 panel-topbar.tsx(patch-appbar.py)가 소유하고 외형만 여기.
   ⚠️ handleResize 가 `div.userbar .icon.button` 의 left 로 탭바 오른쪽 여백을 잡는다. 유저 칩 안에서
      아이콘 버튼이 **가장 왼쪽**에 오도록 order 로 이름을 뒤로 보낸다 — 안 그러면 탭이 이름 밑에 깔린다. */
.header {
	background: var(--cw-surface) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
.header .maintabbarbottom {
	top: 49px;
	height: 1px;
	margin: 0;
	border: 0;
	background: var(--cw-line);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
/* 브랜드 마크 — 왼쪽 끝. 그림(brand-mark.png)이 오면 .has-img 로 갈아끼운다 */
.cw-brand {
	position: absolute;
	left: 14px;
	top: 0;
	height: 50px;
	display: flex;
	align-items: center;
	gap: 9px;
	color: var(--cw-ink);
	text-decoration: none;
	z-index: 2;
}
.cw-brand:hover { text-decoration: none; }
.cw-brand-mark {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cw-on-accent);
	background: url('/cherish/ui/cta-bg.png?v=1') center / cover, var(--cw-cta-grad);
	box-shadow: 0 4px 10px -4px rgba(190, 18, 60, .7), inset 0 0 0 1px rgba(255, 255, 255, .25);
	transition: transform .16s ease;
}
.cw-brand:hover .cw-brand-mark { transform: rotate(-12deg) scale(1.06); }
.cw-brand-mark svg { display: block; }
.cw-brand-mark.has-img {
	background: url('/cherish/ui/brand-mark.png?v=1') center / contain no-repeat;
	box-shadow: none;
}
.cw-brand-mark.has-img svg { display: none; }
.cw-brand-name {
	font-family: 'Cafe24Dongdong', 'Pretendard', sans-serif;
	font-size: 18px;
	line-height: 1;
	letter-spacing: .01em;
	white-space: nowrap;
}
.cw-brand-name small {
	display: block;
	margin-top: 3px;
	font-family: 'Pretendard', sans-serif;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: .16em;
	color: var(--cw-ink-muted);
}
/* 탭바 — 브랜드 자리만큼 왼쪽을 비운다 */
.tabbar.maintabbar { padding-left: 150px; }
.maintabbar .inner-1 { height: 50px; line-height: 50px; }
.tabbar li { vertical-align: middle; }
.maintabbar .button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 34px;
	min-width: 0;
	margin: 0 4px 0 0;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: var(--cw-ink-soft);
	font-size: 13px;
	font-weight: 600;
	line-height: 32px;
	text-shadow: none;
	transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.tabbar li:first-child .button,
.tabbar li.home-li .button,
.tabbar li.home-li + li .button,
.tabbar li:last-child .button,
.tabbar .button-first,
.tabbar .button-last {
	margin-left: 0;
	border-radius: 999px;
}
.tabbar .button i {
	display: inline-block;
	height: auto;
	margin: 0;
	font-size: 15px;
	line-height: 1;
}
.maintabbar .button:hover { background: var(--cw-tint); color: var(--cw-ink); }
.maintabbar .button.cur,
.maintabbar .button.cur:hover {
	padding: 0 14px;
	border-bottom: 1px solid transparent;
	background: var(--cw-accent);
	color: var(--cw-on-accent);
	box-shadow: 0 6px 14px -8px rgba(190, 18, 60, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
/* 고정 내비가 아닌 방 탭(배틀·채팅) — 흰 칩. 닫기 버튼 자리를 오른쪽에 비운다 */
.maintabbar li:not(.cw-nav-li) .button {
	background: var(--cw-white);
	border-color: var(--cw-line);
	font-weight: 500;
	font-size: 12.5px;
}
.maintabbar li:not(.cw-nav-li) .button:hover { background: var(--cw-tint); }
.maintabbar li:not(.cw-nav-li) .button.cur { border-color: transparent; background: var(--cw-accent); }
.tabbar .button i.text {
	margin-right: 0;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--cw-tint-2);
	color: var(--cw-accent);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .02em;
	line-height: 1.2;
}
.tabbar .button.cur i.text { background: rgba(255, 255, 255, .22); color: var(--cw-on-accent); }
.tabbar .button i.text + span { margin-right: 0; }
.tabbar a.closable { padding-right: 30px; }
.tabbar .closebutton {
	top: 0;
	height: 34px;
	width: 22px;
	margin: 0 4px 0 -30px;
	padding: 0;
	line-height: 34px;
	text-align: center;
	vertical-align: middle;
	color: var(--cw-ink-muted);
	font-size: 13px;
}
.tabbar .closebutton:hover { color: var(--cw-accent); }
.tabbar a.cur + .closebutton { top: 0; color: rgba(255, 255, 255, .85); }
.tabbar a.cur + .closebutton:hover { color: #fff; }
/* 유저 칩 */
.header .userbar {
	top: 8px;
	right: 14px;
	display: flex;
	align-items: center;
	gap: 2px;
	height: 34px;
	padding: 0 12px 0 4px;
	border-radius: 999px;
	background: var(--cw-white);
	box-shadow: 0 0 0 1px var(--cw-line), 0 2px 6px -2px rgba(0, 0, 0, .08);
}
.header .userbar .username {
	order: 3;
	margin-left: 4px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}
.userbar button.icon {
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--cw-ink-muted);
	font-size: 14px;
	line-height: 28px;
}
.userbar button.icon i { margin: 0; }
.userbar button.icon:hover { background: var(--cw-tint); color: var(--cw-ink); }
/* 넘침 버튼(탭이 많을 때) */
.header .overflow .button {
	height: 34px;
	width: 34px;
	margin: 8px 0 0;
	border-radius: 50%;
	border-color: var(--cw-line);
	background: var(--cw-white);
	color: var(--cw-ink-soft);
}
/* 모바일 세로 헤더 — 같은 알약을 세로로 */
.header-vertical { background: var(--cw-surface) !important; }
.header-vertical .maintabbarbottom { width: 1px; border: 0; background: var(--cw-line); box-shadow: none; }
.header-vertical .cw-brand {
	position: static;
	height: auto;
	padding: 14px 12px 8px;
}
.header-vertical .tablist ul { padding: 4px 6px; }
.header-vertical .tablist li .button {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 2px 0;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: var(--cw-ink-soft);
	font-size: 13px;
	font-weight: 600;
	text-shadow: none;
}
.header-vertical .tablist li .button:hover { background: var(--cw-tint); color: var(--cw-ink); }
.header-vertical .tablist li .button.cur,
.header-vertical .tablist li .button.cur:hover {
	margin: 2px 0;
	background: var(--cw-accent);
	color: var(--cw-on-accent);
	box-shadow: 0 6px 14px -8px rgba(190, 18, 60, .85);
}
.header-vertical .tablist li:not(.cw-nav-li) .button { background: var(--cw-white); border-color: var(--cw-line); font-weight: 500; }
.header-vertical .tablist li:not(.cw-nav-li) .button.cur { background: var(--cw-accent); border-color: transparent; }
.header-vertical .tablist .button i { display: inline-block; width: 18px; text-align: center; margin: 0; }
.header-vertical .tablist .closebutton { margin-top: -33px; margin-right: 8px; color: var(--cw-ink-muted); }
.header-vertical .userbar {
	display: flex;
	align-items: center;
	gap: 2px;
	height: 34px;
	padding: 0 12px 0 4px;
	border-radius: 999px;
	background: var(--cw-white);
	box-shadow: 0 0 0 1px var(--cw-line), 0 2px 6px -2px rgba(0, 0, 0, .08);
}
.header-vertical .userbar .username { order: 3; margin-left: 4px; font-size: 13px; font-weight: 700; }
.header-vertical .userbar > div { display: contents; }

/* 밤 테마 — 업스트림 `.dark .tabbar .button`(0,3,1) 이 안쪽 흰 광택을 다시 얹는다.
   같은 특이도로 뒤에 선언해 이긴다 (이 파일이 맨 마지막에 로드된다). */
html.cw-dark .maintabbar .button,
html.cw-dark .maintabbar .button:hover,
html.cw-dark .header-vertical .tablist li .button,
html.cw-dark .header-vertical .tablist li .button:hover {
	box-shadow: none;
	background-image: none;
	text-shadow: none;
}
html.cw-dark .maintabbar .button,
html.cw-dark .header-vertical .tablist li .button { background: transparent; color: var(--cw-ink-soft); }
html.cw-dark .maintabbar .button:hover,
html.cw-dark .header-vertical .tablist li .button:hover { background: var(--cw-tint); color: var(--cw-ink); }
html.cw-dark .maintabbar li:not(.cw-nav-li) .button,
html.cw-dark .header-vertical .tablist li:not(.cw-nav-li) .button { background: var(--cw-white); border-color: var(--cw-line); color: var(--cw-ink); }
html.cw-dark .maintabbar li:not(.cw-nav-li) .button:hover,
html.cw-dark .header-vertical .tablist li:not(.cw-nav-li) .button:hover { background: var(--cw-tint); }
html.cw-dark .maintabbar .button.cur,
html.cw-dark .maintabbar .button.cur:hover,
html.cw-dark .header-vertical .tablist li .button.cur,
html.cw-dark .header-vertical .tablist li .button.cur:hover {
	background: var(--cw-accent);
	border-color: transparent;
	color: var(--cw-on-accent);
	box-shadow: 0 0 22px -6px rgba(225, 29, 72, .8);
}
html.cw-dark .tabbar .button i.text { background: rgba(255, 255, 255, .08); }
html.cw-dark .tabbar .button.cur i.text { background: rgba(255, 255, 255, .22); }
html.cw-dark .userbar button.icon { background: transparent; box-shadow: none; }
html.cw-dark .userbar button.icon:hover { background: var(--cw-tint); }

/* 고정 탭 우상단 「새로고침」(patch-cherish-tabs.py v2, float:right) — 플렉스 컨테이너(BFC)는 float 옆에서
   폭이 깎이므로 아래로 내려 세운다. 버튼 자체는 조용한 고스트 칩으로. */
.ps-room .pad > .cw-rank,
.ps-room .pad > .cw-sec { clear: both; }
.ps-room .pad > button.button[style*="float:right"] {
	margin: 4px 0 0;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	background: transparent;
	border-color: transparent;
	box-shadow: none;
	color: var(--cw-ink-muted);
}
.ps-room .pad > button.button[style*="float:right"]:hover { background: var(--cw-tint); color: var(--cw-ink); }

/* ── 공통 부품: 눈썹 라벨 · 섹션 헤더 · 세그먼트 · 진행 트랙 ──────────── */
.cw-eyebrow {
	display: block;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cw-accent);
}
.cw-sec { margin: 0 0 18px; }
.cw-sec-head {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin: 6px 0 12px;
}
.cw-sec-head-text { flex: 1 1 auto; min-width: 0; }
.cw-sec-title {
	margin: 2px 0 0;
	font-family: 'Cafe24Dongdong', 'Pretendard', sans-serif;
	font-size: 22px;
	font-weight: normal;
	line-height: 1.15;
	color: var(--cw-ink);
	text-shadow: none;
}
.cw-sec-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--cw-ink-muted); }
.cw-sec-count {
	flex: 0 0 auto;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--cw-tint);
	color: var(--cw-ink-soft);
	font-size: 12.5px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.cw-seg {
	display: inline-flex;
	gap: 3px;
	padding: 3px;
	border-radius: 13px;
	background: var(--cw-tint);
	box-shadow: inset 0 0 0 1px var(--cw-line);
}
.cw-seg-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--cw-ink-muted);
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: none;
	cursor: pointer;
	transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.cw-seg-btn:hover:not(.on) { background: var(--cw-tint-2); color: var(--cw-ink); }
.cw-seg-btn.on {
	background: var(--cw-white);
	color: var(--cw-accent);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 1px var(--cw-line-strong);
}
/* 붉은 바탕(히어로) 위의 세그먼트 */
.cw-seg.on-accent { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.cw-seg.on-accent .cw-seg-btn { color: rgba(255, 255, 255, .85); }
.cw-seg.on-accent .cw-seg-btn:hover:not(.on) { background: rgba(255, 255, 255, .14); color: #fff; }
.cw-seg.on-accent .cw-seg-btn.on { background: #fff; color: var(--cw-accent); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.cw-track {
	position: relative;
	height: 7px;
	border-radius: 999px;
	background: var(--cw-tint-2);
	box-shadow: inset 0 1px 2px rgba(136, 19, 55, .1);
	overflow: hidden;
}
.cw-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	border-radius: 999px;
	background: url('/cherish/ui/cta-bg.png?v=1') center / cover, var(--cw-cta-grad);
	transition: width .55s ease;
}

/* ── 13) 랭킹 탭 ────────────────────────────────────────────────────── */
.cw-rank { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 24px; }
.cw-rank-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 18px;
	border-radius: var(--cw-r);
	overflow: hidden;
	color: var(--cw-on-accent);
	background: linear-gradient(90deg, rgba(50, 8, 28, .18), rgba(50, 8, 28, 0) 45%, rgba(50, 8, 28, .38)), url('/cherish/ui/rank-hero.webp?v=1') center / cover no-repeat, var(--cw-cta-grad); /* 오른쪽이 밝은 복숭아색이라 세그먼트 글자용으로 살짝 눌러 준다 */
	box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset);
}
.cw-rank-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url('/cherish/ui/cta-texture.png?v=1') repeat 0 0 / 128px 128px;
	opacity: .12;
	pointer-events: none;
}
.cw-rank-hero > * { position: relative; }
.cw-rank-hero .cw-eyebrow { color: rgba(255, 255, 255, .8); }
.cw-rank-title {
	margin: 4px 0 6px;
	font-family: 'Cafe24Dongdong', 'Pretendard', sans-serif;
	font-size: 30px;
	font-weight: normal;
	line-height: 1.05;
	color: inherit;
	text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.cw-rank-meta { font-size: 12.5px; line-height: 1.5; opacity: .88; }
.cw-rank-meta b { font-weight: 800; }
.cw-rank-hero .cw-seg { flex: 0 0 auto; }
.cw-rank-hero .cw-seg-btn .cw-modechip-mark { width: 13px; height: 13px; }
/* 내 카드 */
.cw-rank-me {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 6px 16px;
	align-items: center;
	padding: 14px 18px 14px 16px;
	border-radius: var(--cw-r-sm);
	background: var(--cw-white);
	box-shadow: var(--cw-card-shadow);
}
.cw-tier-lg { width: 56px; height: 56px; display: block; }
.cw-rank-me-name { font-size: 16px; font-weight: 800; color: var(--cw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-rank-me-sub { margin-top: 3px; font-size: 12px; color: var(--cw-ink-muted); }
.cw-rank-me-sub b { color: var(--cw-ink-soft); font-weight: 700; }
.cw-rank-elo {
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--cw-accent);
	font-variant-numeric: tabular-nums;
	text-align: right;
}
.cw-rank-elo small { font-size: 12px; font-weight: 700; margin-left: 2px; opacity: .7; }
.cw-rank-prog { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-rank-prog .cw-track { flex: 1 1 auto; }
.cw-rank-prog b { color: var(--cw-ink-soft); }
/* 포디움 */
.cw-podium {
	display: grid;
	grid-template-columns: 1fr 1.18fr 1fr;
	gap: 10px;
	align-items: end;
	padding-top: 12px;
}
.cw-podium-slot {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 22px 12px 14px;
	border-radius: var(--cw-r-sm);
	background: var(--cw-white);
	box-shadow: var(--cw-card-shadow);
	text-align: center;
	min-width: 0;
}
.cw-podium-slot.is-1 {
	padding-top: 28px;
	padding-bottom: 18px;
	background: linear-gradient(180deg, var(--cw-tint) 0%, var(--cw-white) 60%);
	box-shadow: var(--cw-card-shadow), 0 0 0 2px var(--cw-line-strong);
}
.cw-podium-slot.is-1::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 8px;
	width: 200px;
	height: 200px;
	transform: translateX(-50%);
	background: radial-gradient(circle, rgba(251, 113, 133, .28), transparent 62%);
	pointer-events: none;
}
.cw-podium-slot.is-me { box-shadow: var(--cw-card-shadow), 0 0 0 2px var(--cw-accent); }
.cw-podium-slot > * { position: relative; }
.cw-podium-no {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	color: #fff;
	box-shadow: 0 3px 8px -3px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.is-1 .cw-podium-no { background: linear-gradient(160deg, #ffd76a, #e0a400); width: 30px; height: 30px; top: -14px; font-size: 13px; }
.is-2 .cw-podium-no { background: linear-gradient(160deg, #d9dee3, #9aa5b0); }
.is-3 .cw-podium-no { background: linear-gradient(160deg, #e1a983, #a86a3b); }
.cw-podium-badge { width: 64px; height: 64px; display: block; margin-bottom: 4px; }
.is-1 .cw-podium-badge { width: 84px; height: 84px; }
.cw-podium-name { max-width: 100%; font-size: 15px; font-weight: 800; color: var(--cw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-1 .cw-podium-name { font-size: 17px; }
.cw-podium-tier { font-size: 11.5px; font-weight: 600; color: var(--cw-ink-muted); }
.cw-podium-elo { margin-top: 6px; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--cw-accent); font-variant-numeric: tabular-nums; }
.is-1 .cw-podium-elo { font-size: 26px; }
.cw-podium-elo small { font-size: 11px; font-weight: 700; opacity: .7; margin-left: 1px; }
.cw-podium-rec { margin-top: 4px; font-size: 11.5px; color: var(--cw-ink-muted); font-variant-numeric: tabular-nums; }
/* 4위 이하 */
.cw-rank-list { display: flex; flex-direction: column; gap: 6px; }
.cw-rank-row {
	display: grid;
	grid-template-columns: 30px 34px minmax(0, 1fr) auto 128px;
	gap: 12px;
	align-items: center;
	padding: 9px 16px 9px 12px;
	border-radius: 14px;
	background: var(--cw-white);
	box-shadow: 0 0 0 1px var(--cw-line);
	transition: box-shadow .14s ease, transform .14s ease;
}
.cw-rank-row:hover { box-shadow: 0 0 0 1px var(--cw-line-strong), 0 6px 16px -10px rgba(190, 18, 60, .35); transform: translateY(-1px); }
.cw-rank-row.is-me { background: var(--cw-tint); box-shadow: 0 0 0 2px var(--cw-accent); }
.cw-rank-no { font-size: 15px; font-weight: 800; color: var(--cw-ink-muted); text-align: center; font-variant-numeric: tabular-nums; }
.cw-rank-row .cw-tier-sm { width: 34px; height: 34px; display: block; }
.cw-rank-who { min-width: 0; }
.cw-rank-name { font-size: 14px; font-weight: 700; color: var(--cw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-rank-tier { font-size: 11px; font-weight: 600; color: var(--cw-ink-muted); }
.cw-rank-row .cw-rank-elo { font-size: 17px; }
.cw-rank-rec { font-size: 11.5px; color: var(--cw-ink-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-rank-rec .cw-track { height: 5px; margin-top: 5px; }
.cw-rank-rec b { color: var(--cw-ink-soft); }
.cw-rank-empty {
	padding: 36px 20px;
	border: 1px dashed var(--cw-line-strong);
	border-radius: var(--cw-r-sm);
	text-align: center;
	font-size: 13px;
	color: var(--cw-ink-muted);
}
.cw-rank-note { margin: 2px 0 0; text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--cw-ink-muted); }
.cw-rank-loading { padding: 28px; text-align: center; font-size: 13px; color: var(--cw-ink-muted); }
@media (max-width: 640px) {
	.cw-rank-hero { flex-direction: column; align-items: stretch; padding: 18px 18px 14px; }
	.cw-rank-hero .cw-seg { display: flex; }
	.cw-rank-hero .cw-seg-btn { flex: 1 1 0; justify-content: center; }
	.cw-rank-title { font-size: 26px; }
	.cw-rank-row { grid-template-columns: 26px 30px minmax(0, 1fr) auto; gap: 10px; }
	.cw-rank-row .cw-rank-rec { display: none; }
	.cw-podium { gap: 6px; }
	.cw-podium-badge { width: 48px; height: 48px; }
	.is-1 .cw-podium-badge { width: 64px; height: 64px; }
	.cw-podium-name { font-size: 13px; }
	.is-1 .cw-podium-name { font-size: 14px; }
	.cw-podium-elo { font-size: 18px; }
	.is-1 .cw-podium-elo { font-size: 21px; }
	.cw-podium-rec { display: none; }
}

/* ── 14) 도전과제 탭 ───────────────────────────────────────────────── */
.cw-ach-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	gap: 10px;
}
.cw-ach-card {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-r-sm);
	background: var(--cw-white);
	transition: box-shadow .14s ease, transform .14s ease;
}
.cw-ach-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -12px rgba(190, 18, 60, .35); }
.cw-ach-card.is-earned {
	border-color: var(--cw-line-strong);
	background: linear-gradient(135deg, var(--cw-tint) 0%, var(--cw-white) 70%);
	box-shadow: 0 6px 18px -12px rgba(190, 18, 60, .5);
}
.cw-ach-card.is-locked { border-style: dashed; background: transparent; }
.cw-ach-ic {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	background: var(--cw-tint);
	color: var(--cw-ink-muted);
}
.is-earned .cw-ach-ic {
	background: url('/cherish/ui/cta-bg.png?v=1') center / cover, var(--cw-cta-grad);
	color: var(--cw-on-accent);
	box-shadow: 0 4px 10px -5px rgba(190, 18, 60, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.is-locked .cw-ach-ic { background: transparent; border: 1px dashed var(--cw-line-strong); font-size: 15px; }
.cw-ach-body { min-width: 0; flex: 1 1 auto; }
.cw-ach-title { font-size: 13.5px; font-weight: 800; line-height: 1.3; color: var(--cw-ink); }
.is-locked .cw-ach-title { color: var(--cw-ink-muted); }
.cw-ach-desc { margin: 3px 0 5px; font-size: 12px; line-height: 1.45; color: var(--cw-ink-soft); }
.is-locked .cw-ach-desc { color: var(--cw-ink-muted); }
.cw-ach-foot { font-size: 11px; font-weight: 600; color: var(--cw-ink-muted); }
.is-earned .cw-ach-foot { color: var(--cw-accent); }
.cw-ach-foot i { margin-right: 3px; font-size: 10px; }
.cw-ach-prog { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-ach-prog .cw-track { flex: 1 1 auto; }
.cw-ach-prog b { color: var(--cw-ink-soft); }

/* 티어 아이콘 자리표시 — 배치중(icon 0)은 그림이 없다. 크기는 img 와 같은 클래스가 준다. */
.cw-tier-ph,
.cw-rank-row .cw-tier-ph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--cw-tint-2);
	color: var(--cw-ink-muted);
	font-weight: 800;
	font-size: 15px;
}

/* ── 15) 소프트 글래스 (2026-09-05 채택) ───────────────────────────────
   디자인 캔버스에서 레이아웃 A + 스타일 1(소프트 글래스)을 고른 뒤 ?cwpreview=1 프리뷰로 실물 검수해 채택.
   토큰을 덮어 카드가 유리(반투명·블러·흰 하이라이트 선)가 되고 바탕 번짐이 4색이 된다.
   CTA 배경 그림은 그대로(사용자: 그림이 더 낫다), 섹션 앞 아이콘은 없음(사용자 확정).
   프리뷰 장치(patch-skin-preview.py, index 의 cherish-preview 블록)는 채택과 함께 제거했다. */
/* ── 토큰 덮기 ───────────────────────────────────────────────────────── */
html:not(.cw-dark) {
	--cw-bg: #fff6f7;
	--cw-mesh:
		radial-gradient(ellipse 55% 45% at 18% 0%, rgba(251, 113, 133, .42), transparent 70%),
		radial-gradient(ellipse 45% 40% at 92% 8%, rgba(255, 205, 160, .7), transparent 70%),
		radial-gradient(ellipse 50% 40% at 75% 100%, rgba(196, 181, 253, .42), transparent 70%),
		radial-gradient(ellipse 40% 35% at 5% 90%, rgba(190, 242, 230, .45), transparent 70%);
	--cw-surface: rgba(255, 255, 255, .58);
	--cw-white: rgba(255, 255, 255, .75);
	--cw-line: rgba(255, 255, 255, .95);
	--cw-line-strong: rgba(253, 164, 175, .8);
	--cw-tint: rgba(255, 255, 255, .45);
	--cw-r: 24px;
	--cw-r-sm: 16px;
	--cw-card-shadow: 0 24px 48px -28px rgba(190, 18, 60, .35), 0 2px 6px -2px rgba(190, 18, 60, .08);
	--cw-cta-grad:
		radial-gradient(ellipse 60% 120% at 50% 130%, rgba(255, 255, 255, .22), transparent 60%),
		radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .35), transparent 40%),
		linear-gradient(135deg, #ff8aa0 0%, #f0345f 50%, #c4123f 100%);
	--cw-cta-shadow: 0 22px 36px -18px rgba(190, 18, 60, .85), 0 3px 8px -3px rgba(190, 18, 60, .4);
	--cw-cta-inset: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(0, 0, 0, .14), inset 0 0 0 1px rgba(255, 255, 255, .14);
}
/* (구름 두 장은 2026-09-05 제거 — 가운데가 뿌옇게 보인다는 지적) */

/* ── 홈 폭·카드 ──────────────────────────────────────────────────────── */
.ps-room .pad[style*="max-width:1100px"] { max-width: 790px !important; }
.menugroup {
	position: relative;
	border: 1px solid var(--cw-line);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	padding: 16px 18px 18px;
	margin-bottom: 14px;
}
.menugroup::before {
	content: "";
	position: absolute;
	left: 18px; right: 18px; top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
	pointer-events: none;
}
form.menugroup { border: 0; backdrop-filter: none; }
form.menugroup::before { display: none; }
.menugroup h3 { font-size: 20px; margin: 0 0 8px; }
.menugroup h3 small .button { vertical-align: 2px; }

/* 버튼·칩 — 유리 알약 */
.menugroup .button,
.ps-room .pad .button,
.userbar .button {
	border: 1px solid rgba(255, 255, 255, .95);
	border-radius: 999px;
	background: rgba(255, 255, 255, .75);
	box-shadow: 0 6px 14px -10px rgba(190, 18, 60, .5), inset 0 1px 0 #fff;
	font-weight: 700;
}
.menugroup .button:hover,
.ps-room .pad .button:hover { background: #fff; border-color: #fff; box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .6), inset 0 1px 0 #fff; }

/* ── 헤더 ───────────────────────────────────────────────────────────── */
.header { background: rgba(255, 255, 255, .42) !important; backdrop-filter: blur(16px); box-shadow: 0 8px 24px -20px rgba(190, 18, 60, .35); }
.header .maintabbarbottom { background: rgba(255, 255, 255, .95); }
.maintabbar .button { height: 36px; line-height: 34px; font-weight: 700; }
.maintabbar .button.cur,
.maintabbar .button.cur:hover {
	background: linear-gradient(145deg, #ff7c96, #e11d48 65%, #c4123f);
	box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.maintabbar li:not(.cw-nav-li) .button { background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .95); box-shadow: 0 4px 12px -8px rgba(190, 18, 60, .4); }
.header .userbar { height: 36px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(255, 255, 255, .95), 0 4px 12px -8px rgba(190, 18, 60, .4); }
.cw-brand-mark { background: linear-gradient(145deg, #ff8aa0, #e11d48 60%, #b0123f); box-shadow: 0 8px 16px -8px rgba(190, 18, 60, .8), inset 0 -2px 0 rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .5); overflow: hidden; }
.cw-brand-mark::after { content: ""; position: absolute; left: 4px; top: 3px; width: 14px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(1px); }
.cw-brand-mark { position: relative; }

/* ── CTA ─────────────────────────────────────────────────────────────── */
/* 배경 그림(cta-bg.png + cta-texture.png)은 정식 스킨 것을 그대로 쓴다 — 그림이 CSS 그라데이션보다 낫다 (사용자 확정 2026-09-05) */
.cw-cta {
	padding: 17px 52px;
	border-radius: 20px;
}
.cw-cta-icon {
	position: relative;
	width: 46px; height: 46px;
	background: linear-gradient(160deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, .12));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 4px 10px rgba(0, 0, 0, .18);
	overflow: hidden;
}
.cw-cta-icon::after { content: ""; position: absolute; left: 7px; top: 5px; width: 18px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); filter: blur(1.5px); }
.cw-cta-icon svg, .cw-cta-icon i { position: relative; z-index: 1; }
.cw-cta-title { font-size: 19px; text-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.cw-cta-sub { opacity: .86; margin-top: 4px; }
/* 셰브론 원(28px)은 **passive 카드(배틀 진행 중)만**. 대기 중 「✕ 취소」 알약까지 원으로 굳히면
   글자가 세로로 꺾인다(취/소) -- 2026-09-05 실측. */
.cw-cta-passive .cw-cta-go {
	right: 14px;
	width: 28px; height: 28px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .18);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
	opacity: 1;
	font-size: 12px;
}
.cw-cta.is-waiting .cw-cta-go { right: 14px; width: auto; height: auto; white-space: nowrap; }
.menugroup > p.cw-modes {
	gap: 4px; padding: 4px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .45);
	border: 1px solid rgba(255, 255, 255, .95);
	box-shadow: inset 0 1px 3px rgba(190, 18, 60, .08);
}
.cw-modechip { border-radius: 12px; padding: 8px 4px; font-size: 12.5px; }
.cw-modechip.on {
	background: linear-gradient(160deg, #ff7c96, #e11d48 60%, #be123c);
	color: #fff;
	box-shadow: 0 6px 14px -8px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.cw-modechip-crowd { border-radius: 7px; padding: 1px 6px; background: linear-gradient(160deg, #ff7c96, #d61a45); box-shadow: 0 2px 4px -2px rgba(190, 18, 60, .8); }
.cw-modechip.on .cw-modechip-crowd { background: #fff; color: #d61a45; box-shadow: none; }
/* 잠긴 칸은 유리 위에서 **흰 윤곽이면 안 보인다** -- 켜진 흰 알약과 구별이 안 간다.
   붉은 계열 점선으로 그리고 더 흐리게 둔다. (2026-09-22 평면화로 큰 칸이 물려받았다) */
.cw-modechip.is-locked { opacity: .55; outline-color: rgba(190, 18, 60, .32); }

/* 퀘스트 요약줄 — 유리 바 (아이콘 없음, 사용자 확정) */
.menugroup.cw-questbar { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.menugroup.cw-questbar .cw-questbar-main { background: transparent; border: 0; box-shadow: none; padding: 0; font-weight: 800; font-size: 14px; }
.menugroup.cw-questbar .cw-questbar-main:hover { background: transparent; }
.menugroup.cw-questbar .cw-questbar-claim,
.menugroup.cw-questbar .cw-questbar-claim:hover {
	background: linear-gradient(160deg, #ff7c96, #e11d48 60%, #c4123f);
	border-color: transparent;
	box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .12);
}

/* 배틀 방 카드 (인라인 회색 테두리를 유리로) */
.menugroup div[style*="border:1px solid #d0d5dc"] {
	border-color: rgba(255, 255, 255, .95) !important;
	border-radius: 16px !important;
	background: rgba(255, 255, 255, .65);
	box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5);
}
.menugroup .blocklink { border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .95); }

/* 트레이너 타일 */
.cw-tile {
	border: 1px solid rgba(255, 255, 255, .95);
	border-radius: 18px;
	background: rgba(255, 255, 255, .65);
	box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5), inset 0 1px 0 #fff;
	transition: transform .16s ease, box-shadow .16s ease;
}
.cw-tile:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .9); box-shadow: 0 16px 28px -18px rgba(190, 18, 60, .55), inset 0 1px 0 #fff; }

/* 테마 칩 */
.cw-theme-chip { border-radius: 999px; border-color: rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .55); }
.cw-theme-chip.on { background: #fff; box-shadow: 0 4px 10px -8px rgba(190, 18, 60, .6); }

/* 밤 테마에서는 유리 대신 기존 어두운 면을 유지 */
html.cw-dark .menugroup { backdrop-filter: none; border-color: var(--cw-line); }
html.cw-dark .menugroup::before { display: none; }

/* ── 16) 고정 탭 유리 통일 (2026-09-05) ─────────────────────────────────
   §15 가 홈에 준 재질(반투명 카드·흰 하이라이트 선·블러·유리 알약)을 랭킹·도전과제·내 포켓몬 탭에도 같게.
   토큰(--cw-white/--cw-line/--cw-card-shadow)은 §15 가 이미 덮었으므로 여기선 블러·하이라이트·
   인라인 회색 상자(알 탭·알 상점)만 유리로 바꾼다. 마크업은 손대지 않는다. */
.cw-rank-me, .cw-podium-slot, .cw-rank-row, .cw-ach-card, .cw-card, .cw-tile {
	position: relative;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}
.cw-rank-me::before, .cw-podium-slot::before, .cw-ach-card::before, .cw-card::before {
	content: "";
	position: absolute;
	left: 16px; right: 16px; top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
	pointer-events: none;
}
/* 포디움 1위는 자체 ::before(방사형 빛)를 쓴다 — 하이라이트 선 대신 그대로 둔다 */
.cw-podium-slot.is-1::before { left: 50%; right: auto; top: 8px; height: 200px; background: radial-gradient(circle, rgba(251, 113, 133, .28), transparent 62%); }
.cw-rank-row { border: 1px solid var(--cw-line); box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5); }
.cw-rank-row.is-me { box-shadow: 0 0 0 2px var(--cw-accent), 0 6px 16px -14px rgba(190, 18, 60, .5); }
.cw-ach-card { box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5); }
.cw-ach-card.is-locked { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .25); }
.cw-card { border-radius: 18px; box-shadow: 0 16px 36px -24px rgba(190, 18, 60, .4), inset 0 1px 0 #fff; }
/* 내 포켓몬 타일의 자리 번호 배지 — 출전(붉음)·후보(회색) 인라인 색을 광택 알약으로 */
.cw-tile-mon > span[style*="background:#e0525f"] { background: linear-gradient(160deg, #ff7c96, #d61a45) !important; box-shadow: 0 4px 8px -4px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.cw-tile-mon > span[style*="background:#98a0ad"] { background: rgba(255, 255, 255, .85) !important; color: var(--cw-ink-muted) !important; box-shadow: 0 0 0 1px var(--cw-line-strong), 0 3px 6px -4px rgba(0, 0, 0, .3); }
/* 알 탭 — 품기 슬롯·알 상점의 인라인 회색 상자를 유리로 */
.menugroup div[style*="border:1px solid #cfd4dc"] {
	border-color: var(--cw-line) !important;
	border-radius: 16px !important;
	background: rgba(255, 255, 255, .65) !important;
	box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5), inset 0 1px 0 #fff;
}
.menugroup div[style*="background:#e6e9ee"] { background: rgba(225, 29, 72, .12) !important; box-shadow: inset 0 1px 2px rgba(190, 18, 60, .15); }
/* 밤 테마 — 블러는 두고 하이라이트 선만 끈다 (어두운 면 위 흰 선은 튄다) */
html.cw-dark .cw-rank-me::before, html.cw-dark .cw-podium-slot:not(.is-1)::before, html.cw-dark .cw-ach-card::before, html.cw-dark .cw-card::before { display: none; }
html.cw-dark .menugroup div[style*="border:1px solid #cfd4dc"] { background: var(--cw-white) !important; }

/* ── 17) 좁은 화면 하단 알약 내비 (2026-09-05, v2) ─────────────────────
   마크업 patch-appbar.py v2 (renderCherishBottomNav, 세로 헤더 안 <ul class="cw-bnav">).
   표시 여부는 **JS 스위치 html.cw-bnav** 만 본다 (PSView.narrowMode ≤700 && 배틀 화면 아님). 처음엔
   @media (max-width:700px) 도 같이 걸었는데 폰에서 안 떠서 조건을 하나로 줄였다 — JS 가 켰으면 무조건 그린다.
   폭은 마크업 인라인(뷰포트 clientWidth-20)이 정한다: 쇼다운이 html 폭을 뷰포트+280 으로 늘려 두므로
   left/right 로 잡으면 모바일 사파리에서 넓어진 레이아웃 뷰포트 기준으로 밀릴 수 있다.
   ⚠️⚠️ 스위치 클래스(html.cw-bnav)와 바 클래스(ul.cw-bnav)가 이름이 같다. 바 안쪽 규칙은 반드시 **ul.cw-bnav** 로
   시작할 것 — `.cw-bnav .button` 처럼 쓰면 html.cw-bnav 아래 **모든 버튼**에 width:100%/display:flex 가 먹어
   내 포켓몬 탭 기술 줄이 세로로 무너졌다 (2026-09-05 실사고, 폰 스크린샷으로 발견). */
ul.cw-bnav { display: none; }
html.cw-bnav ul.cw-bnav {
	position: fixed;
	left: 10px;
	bottom: 10px;
	z-index: 60;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 6px;
	list-style: none;
	border-radius: 22px;
	background: rgba(255, 255, 255, .78);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, .95);
	box-shadow: 0 18px 30px -18px rgba(190, 18, 60, .5), 0 2px 8px -4px rgba(0, 0, 0, .12);
}
ul.cw-bnav li { flex: 1 1 0; min-width: 0; display: block; margin: 0; }
ul.cw-bnav .button {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 7px 2px 6px;
	border: 0;
	border-radius: 16px;
	background: transparent;
	background-image: none;
	box-shadow: none;
	color: var(--cw-ink-soft);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-shadow: none;
}
ul.cw-bnav .button i { display: block; height: auto; margin: 0; font-size: 19px; line-height: 1; }
ul.cw-bnav .button.cur,
ul.cw-bnav .button.cur:hover {
	background: linear-gradient(145deg, #ff7c96, #e11d48 65%, #c4123f);
	color: var(--cw-on-accent);
	box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
}
html.cw-bnav .ps-room { bottom: 72px; }
html.cw-bnav .header-vertical .tablist li.cw-nav-li { display: none; }
/* 폰은 가로 헤더다 — 바가 뜨면 상단 알약 탭 4개를 숨기고 브랜드·방 칩·유저 칩만 남긴다 (v5) */
html.cw-bnav .maintabbar li.cw-nav-li { display: none; }
html.cw-bnav .tabbar.maintabbar { padding-left: 150px; }
/* ⚠️ 가로 헤더 .header 의 backdrop-filter 가 fixed 의 기준(containing block)을 헤더로 바꿔 바가 헤더 위에 붙었다
   (실측 2026-09-05: bottom:10px 인데 y=-21). 바가 뜨는 동안은 헤더 블러를 끄고 대신 더 불투명하게. */
html.cw-bnav .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .82) !important; }
html.cw-bnav.cw-dark .header { background: rgba(33, 26, 51, .94) !important; }
/* 모바일에선 고정 탭 우상단 「새로고침」 버튼을 숨긴다 (2026-09-05 사용자: 불필요). 탭을 오갈 때 자동 재조회가 있다. */
html.cw-bnav .ps-room .pad > button.button[style*="float:right"] { display: none; }
html.cw-dark ul.cw-bnav { background: rgba(29, 21, 48, .88); border-color: var(--cw-line); }

/* ── 18) 랭킹 아바타 (2026-09-05) ───────────────────────────────────────
   포디움 1~3위 = 전신(-full.png), 4위~ = 얼굴(정사각 상반신). 티어 아이콘은 아바타 모서리 배지로.
   마크업 patch-ranking-v2.py. 그림은 api 가 유저 장착 아바타로 만든다(1시간 캐시). */
.cw-podium-ava { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 150px; margin-bottom: 8px; }
.is-1 .cw-podium-ava { height: 186px; }
.cw-podium-full { display: block; height: 100%; width: auto; max-width: 150px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(190, 18, 60, .22)); }
.cw-podium-tier-ic { position: absolute; right: 0; top: 6px; width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.is-1 .cw-podium-tier-ic { width: 38px; height: 38px; }
.cw-rank-face-wrap { position: relative; flex: 0 0 auto; width: 38px; height: 38px; }
.cw-rank-face-wrap.is-lg { width: 60px; height: 60px; }
.cw-rank-face {
	display: block;
	width: 100%; height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: var(--cw-tint-2);
	box-shadow: 0 0 0 2px #fff, 0 3px 8px -3px rgba(0, 0, 0, .35);
}
.cw-tier-xs { position: absolute; right: -7px; bottom: -6px; width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.cw-rank-face-wrap.is-lg .cw-tier-xs { width: 26px; height: 26px; right: -8px; bottom: -6px; }
.cw-tier-ph.cw-tier-xs { font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.cw-rank-row { grid-template-columns: 30px 38px minmax(0, 1fr) auto 128px; }
@media (max-width: 640px) {
	.cw-rank-row { grid-template-columns: 26px 34px minmax(0, 1fr) auto; }
	.cw-rank-face-wrap { width: 34px; height: 34px; }
	.cw-podium-ava { height: 104px; margin-bottom: 4px; }
	.is-1 .cw-podium-ava { height: 130px; }
	.cw-podium-full { max-width: 100%; }
	.cw-podium-tier-ic { width: 24px; height: 24px; top: 0; }
	.is-1 .cw-podium-tier-ic { width: 28px; height: 28px; }
}

/* ── 19) 브랜드 마크 = 파비콘 그림 (2026-09-05) ────────────────────────
   사용자: 「고품질 아이콘을 이미 줬는데 왜 SVG 로 돌아갔나」. favicon-256.png(포켓볼) 를 그대로 쓴다.
   마크업은 patch-appbar.py v3 이 .cw-brand-mark 에 has-img 를 붙인다. 스탬프는 patch-favicon.py 와 같이 간다. */
.cw-brand-mark.has-img {
	background: url('/favicon-256.png?v=20260903e') center / contain no-repeat;
	box-shadow: none;
	overflow: visible;
	filter: drop-shadow(0 4px 8px rgba(190, 18, 60, .35));
}
.cw-brand-mark.has-img::after { display: none; }
.cw-brand-mark.has-img svg { display: none; }
.cw-brand:hover .cw-brand-mark.has-img { transform: rotate(-12deg) scale(1.08); }

/* ── 20) 모바일 내 포켓몬 — 3열 축소 타일 + 상세 바텀 시트 (2026-09-05) ─────────
   폰에서 포켓몬이 많으면 상세(기술 목록)가 맨 아래로 밀려 한참 내려야 했다. 타일을 3열로 줄이고(30마리 = 10줄),
   상세 카드(.cw-mon-detail, 마크업 patch-mon-detail.py)는 아래에서 올라오는 고정 시트로 띄운다.
   ⚠️ 모바일에선 카드 블러(backdrop-filter)를 전부 끈다 — 저사양에 무겁고, 무엇보다 backdrop-filter 는 fixed 의
   기준(containing block)이 되어 시트가 카드 안에 갇힌다 (헤더 블러에서 이미 겪은 함정). */
html.cw-bnav .menugroup, html.cw-bnav .cw-card, html.cw-bnav .cw-tile,
html.cw-bnav .cw-rank-me, html.cw-bnav .cw-podium-slot, html.cw-bnav .cw-rank-row, html.cw-bnav .cw-ach-card {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
html.cw-bnav .cw-tile-mon { box-sizing: border-box; width: calc((100% - 16px) / 3); padding: 8px 3px 6px; } /* border-box 아니면 테두리·여백이 더해져 2열로 떨어진다 */
html.cw-bnav .cw-tile-mon img[width="120"] { width: 78px; height: 78px; }
html.cw-bnav .cw-tile-mon > span { max-width: 100% !important; }
html.cw-bnav .cw-mon-slot { font-size: 9.5px; padding: 2px 6px; top: 5px; left: 5px; }
html.cw-bnav .cw-mon-away { font-size: 8.5px; padding: 1px 5px; bottom: 0; }
.cw-sheet-close { display: none; }
html.cw-bnav .cw-mon-detail {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 58;
	max-height: 78vh;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 !important;
	padding: 12px 16px 92px;
	border-radius: 22px 22px 0 0;
	border: 0;
	background: #fff;
	box-shadow: 0 -18px 40px -20px rgba(190, 18, 60, .5), 0 0 0 1px var(--cw-line);
}
/* 하이라이트 선(§16 ::before) 대신 시트 손잡이 */
html.cw-bnav .cw-mon-detail::before {
	left: 50%; right: auto; top: 8px;
	width: 40px; height: 4px;
	transform: translateX(-50%);
	border-radius: 999px;
	background: var(--cw-line-strong);
}
html.cw-bnav .cw-sheet-close {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	margin: 0 0 4px auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--cw-tint-2);
	color: var(--cw-ink-soft);
	font: 700 20px/1 Pretendard, sans-serif;
	cursor: pointer;
}
html.cw-bnav.cw-dark .cw-mon-detail { background: var(--cw-white); }

/* ── 21) 배틀 명단 자리표 · 목록 정렬 (2026-09-05, 2026-09-21 개정) ───────────────
   마크업 patch-mon-detail.py (renderCherishTeamSlots / renderCherishRosterBar). 칸 = 출전 1~3(체리) · 후보 1~3(회색).
   ⚠️ 2026-09-21 에 **그리드 위 6칸 스트립(.cw-roster-slots)은 마크업째 사라졌다.** 자리표와 똑같이 생겨
   「1~6번이 위에도 아래에도 있다」는 말을 두 번 들었다(09-07 의 제목 가르기로는 안 풀렸다).
   .cw-roster 는 이제 정렬 한 줄만 든 얇은 도구 줄이다. */
.cw-roster { margin: 4px 0 12px; padding: 7px 12px; border-radius: var(--cw-r-sm); background: var(--cw-tint); border: 1px solid var(--cw-line); }
.cw-slots-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cw-roster-sort .lab { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--cw-accent); }
.cw-slots-head small { font-size: 11.5px; color: var(--cw-ink-muted); }
/* 9칸(2026-09-22): 3열 3행. 한 행이 구역 하나다 (1~3 출전 · 4~6 출전(6대6) · 7~9 후보).
   구역 제목은 넣지 않는다(사용자 확정). 행 구분과 라벨 색만으로 읽힌다. */
.cw-slots-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cw-slot {
	position: relative;
	display: flex; flex-direction: column; align-items: center; gap: 2px;
	min-width: 0; padding: 6px 4px 5px;
	border: 1px solid var(--cw-line);
	border-radius: 12px;
	background: var(--cw-white);
	color: var(--cw-ink);
	font: inherit;
	text-shadow: none;
	cursor: pointer;
	transition: box-shadow .14s ease, transform .14s ease;
}
.cw-slot small { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; color: var(--cw-accent); }
.cw-slot.is-out2 small { color: #7c3aed; } /* 4~6 = 6대6 에서 더 나가는 자리. 라벨 글자는 「출전 N」으로 같고 색만 다르다 */
.cw-slot.is-sub small { color: var(--cw-ink-muted); }
.cw-slot img { display: block; width: 36px; height: 36px; image-rendering: auto; }
.cw-slot i { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-style: normal; font-size: 10px; color: var(--cw-ink-muted); border: 1px dashed var(--cw-line-strong); border-radius: 50%; }
.cw-slot b { max-width: 100%; font-size: 10.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 13px; }
.cw-slot:hover:not(:disabled) { box-shadow: 0 6px 14px -10px rgba(190, 18, 60, .6); transform: translateY(-1px); }
.cw-slot.is-empty { background: transparent; border-style: dashed; }
.cw-slot.is-me { border-color: var(--cw-accent); box-shadow: 0 0 0 1px var(--cw-accent); }
.cw-slot.is-out2.is-me { border-color: #7c3aed; box-shadow: 0 0 0 1px #7c3aed; }
.cw-slot.is-dead, .cw-slot:disabled { cursor: default; }
.cw-slot.is-dead { opacity: .35; }
.cw-roster-sort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cw-seg.cw-seg-sm { padding: 2px; border-radius: 10px; }
.cw-seg.cw-seg-sm .cw-seg-btn { padding: 5px 9px; font-size: 11.5px; border-radius: 8px; }
.cw-slots { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--cw-tint); border: 1px solid var(--cw-line-strong); }
.cw-slots-head b { font-size: 12.5px; font-weight: 800; }
.cw-slots-row .cw-slot.is-me { background: linear-gradient(180deg, #fff, var(--cw-tint)); }
.menugroup .button.cw-slots-remove, .ps-room .pad .button.cw-slots-remove { margin-top: 8px; font-size: 12px; }
@media (max-width: 700px) {
	.cw-slots-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cw-roster { padding: 8px 10px; }
	.cw-seg.cw-seg-sm { display: flex; flex-wrap: wrap; }
}

/* ── 22) 내 포켓몬 하위탭(포켓몬/알) 세그먼트 + 알 구매 안내 카드 (2026-09-05) ─────
   마크업 patch-egg-tab.py renderCherishTeamTabs v2. 켜진 칸은 체리 채움, 부화 가능은 배지. */
.cw-subtabs { display: flex; gap: 6px; margin: 0 0 12px; padding: 5px; border-radius: 18px; background: var(--cw-tint); border: 1px solid var(--cw-line); }
.cw-subtab {
	flex: 1 1 0; min-width: 0;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 10px;
	border: 0; border-radius: 14px;
	background: transparent;
	color: var(--cw-ink-muted);
	font: inherit; font-size: 15px; font-weight: 800; letter-spacing: -.01em;
	text-shadow: none; cursor: pointer;
	transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.cw-subtab b { font-weight: 800; }
.cw-subtab small { font-size: 12px; font-weight: 600; opacity: .85; }
.cw-subtab em { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--cw-accent); color: var(--cw-on-accent); box-shadow: 0 2px 6px -3px rgba(190, 18, 60, .8); }
.cw-subtab .cw-egg-ic { width: 15px; height: 15px; vertical-align: -2px; }
.cw-subtab:hover:not(.on) { background: var(--cw-tint-2); color: var(--cw-ink); }
.cw-subtab.on {
	background: linear-gradient(145deg, #ff7c96, #e11d48 65%, #c4123f);
	color: var(--cw-on-accent);
	box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.cw-subtab.on em { background: #fff; color: var(--cw-accent); }
.cw-egg-promo {
	display: flex; align-items: center; gap: 10px;
	margin: 0 0 12px; padding: 11px 12px 11px 14px;
	border-radius: var(--cw-r-sm);
	background: linear-gradient(135deg, var(--cw-tint), rgba(255, 255, 255, .9));
	border: 1px solid var(--cw-line-strong);
}
.cw-egg-promo > .cw-egg-ic { width: 22px; height: 22px; color: var(--cw-accent); flex: 0 0 auto; }
.cw-egg-promo > span { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 700; }
.menugroup .button.cw-egg-promo-go, .ps-room .pad .button.cw-egg-promo-go,
.ps-room .pad .button.cw-egg-promo-go:hover {
	flex: 0 0 auto;
	background: linear-gradient(160deg, #ff7c96, #e11d48 60%, #c4123f);
	border-color: transparent;
	color: var(--cw-on-accent);
	font-size: 12.5px;
	box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cw-egg-promo-x { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--cw-ink-muted); font: 700 18px/1 Pretendard, sans-serif; cursor: pointer; }
.cw-egg-promo-x:hover { background: var(--cw-tint-2); color: var(--cw-ink); }
@media (max-width: 700px) {
	.cw-subtab { font-size: 14px; padding: 11px 6px; gap: 6px; }
	.cw-subtab small { font-size: 11px; }
	.cw-egg-promo { flex-wrap: wrap; }
	.cw-egg-promo > span { flex-basis: calc(100% - 44px); }
}

/* ── 23) 내 포켓몬 탭 디테일 v3 (2026-09-05) ──────────────────────────────
   타일: 타입색 원광(--glow) · 한글 타입 칩(Dex.getTypeIcon 배지를 알약으로) · 광택 자리 배지 · SVG 하트 · 이로치 금테.
   상세: 아트 배경 · 칭호→이름→종 위계 · 특성/애정 칩 · SVG 아이콘 버튼. 알 탭: 진행 링·상점 카드·내 알 그리드.
   마크업 patch-mon-detail.py(타일·상세) / patch-egg-tab.py(알 탭). */
.cw-tile-mon { padding: 12px 8px 10px; overflow: hidden; }
.cw-tile-mon.cw-tile-on { border: 1px solid var(--cw-accent); background: var(--cw-white); box-shadow: 0 0 0 2px var(--cw-accent), 0 14px 26px -16px rgba(190, 18, 60, .6); transform: translateY(-2px); }
.cw-tile-mon.is-shiny { box-shadow: 0 0 0 1px #f5d27a, 0 8px 18px -12px rgba(245, 179, 1, .75); }
.cw-tile-mon.is-shiny.cw-tile-on { box-shadow: 0 0 0 2px var(--cw-accent), 0 0 0 4px #f5d27a, 0 14px 26px -16px rgba(190, 18, 60, .6); }
.cw-mon-art { position: relative; display: block; width: 120px; height: 120px; max-width: 100%; }
.cw-mon-art::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle, var(--glow, #fda4af) 0%, transparent 70%); opacity: .3; filter: blur(6px); }
.cw-mon-art img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.cw-mon-slot { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: var(--cw-on-accent); background: linear-gradient(160deg, #ff7c96, #d61a45); box-shadow: 0 4px 8px -4px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.cw-mon-slot.is-out2 { background: linear-gradient(160deg, #a78bfa, #7c3aed); box-shadow: 0 4px 8px -4px rgba(109, 40, 217, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.cw-mon-slot.is-sub { background: rgba(255, 255, 255, .92); color: var(--cw-ink-muted); box-shadow: 0 0 0 1px var(--cw-line-strong); }
.cw-mon-partner { position: absolute; top: 8px; right: 8px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--cw-accent); box-shadow: 0 2px 6px -2px rgba(190, 18, 60, .6); }
/* 어린이집 등원 배지 (2026-09-07) — 왼쪽 위는 출전 자리, 오른쪽 위는 파트너라 그림 아래쪽에 띠로 */
.cw-mon-away { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); z-index: 1; padding: 1px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; white-space: nowrap; color: #4b5563; background: rgba(255, 255, 255, .94); box-shadow: 0 0 0 1px rgba(71, 85, 105, .28), 0 3px 6px -4px rgba(0, 0, 0, .35); }
.cw-tile-mon.is-away .cw-mon-art img { opacity: .55; filter: grayscale(.3); }
.cw-slot.is-away img { opacity: .5; filter: grayscale(.35); }
.cw-chip.is-away { color: #4b5563; background: rgba(148, 163, 184, .18); }
.cw-mon-epithet { max-width: 100%; margin-top: 2px; font-size: 10.5px; color: var(--cw-accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-mon-name { display: flex; align-items: center; justify-content: center; gap: 3px; max-width: 100%; margin-top: 3px; font-size: 13px; font-weight: 800; }
.cw-mon-name-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-shiny-ic { flex: 0 0 auto; width: 12px; height: 12px; fill: #f5b301; filter: drop-shadow(0 0 2px rgba(245, 179, 1, .8)); }
.cw-mon-types { display: flex; gap: 3px; margin-top: 5px; }
.cw-mon-types .cherish-type, .cw-md-chips .cherish-type { min-width: 0 !important; height: 16px !important; line-height: 16px !important; padding: 0 7px !important; border-radius: 999px !important; font-size: 9.5px !important; text-shadow: none !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
/* 상세 헤더 */
.cw-md-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cw-md-art { position: relative; flex: 0 0 auto; width: 108px; height: 108px; display: flex; align-items: center; justify-content: center; border-radius: 22px; background: var(--cw-tint); overflow: hidden; }
.cw-md-art::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle, var(--glow, #fda4af) 0%, transparent 70%); opacity: .35; filter: blur(8px); }
.cw-md-art img { position: relative; display: block; }
.cw-md-body { flex: 1 1 auto; min-width: 200px; }
.cw-md-epithet { display: block; font-size: 11.5px; font-weight: 700; color: var(--cw-accent); }
.cw-md-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 19px; font-weight: 900; letter-spacing: -.01em; color: var(--cw-ink); }
.cw-md-name .cw-shiny-ic { width: 15px; height: 15px; }
.cw-md-name small { font-size: 12px; font-weight: 600; color: var(--cw-ink-muted); }
.cw-md-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.cw-chip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; background: var(--cw-tint); border: 1px solid var(--cw-line); font-size: 11.5px; color: var(--cw-ink-soft); }
.cw-chip b { font-weight: 800; color: var(--cw-ink); }
.cw-chip.is-love { background: #fff1f3; color: var(--cw-accent); border-color: var(--cw-line-strong); font-weight: 700; }
.cw-md-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ps-room .pad .button.cw-act, .menugroup .button.cw-act { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 6px 12px; }
.ps-room .pad .button.cw-act.is-on { color: var(--cw-accent); border-color: var(--cw-line-strong); background: #fff1f3; }
.cw-rec { display: inline-block; margin-right: 5px; padding: 1px 6px; border-radius: 999px; background: linear-gradient(160deg, #ffd76a, #e0a400); color: #5a3d00; font-style: normal; font-size: 9.5px; font-weight: 800; vertical-align: 1px; }
/* 알 탭 */
.cw-eggs .cw-sec-head { margin: 0 0 10px; }
.cw-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: #fff7e8; border: 1px solid #f3d9a8; font-size: 12.5px; color: #6b4a1f; }
.cw-note.is-warn { background: #fff0f2; border-color: var(--cw-line-strong); color: var(--cw-ink); }
.cw-empty { padding: 22px 16px; border: 1px dashed var(--cw-line-strong); border-radius: var(--cw-r-sm); text-align: center; font-size: 13px; color: var(--cw-ink-muted); }
.cw-egg-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.cw-egg-slot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--cw-white); border: 1px solid var(--cw-line); box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5); }
.cw-egg-slot.is-on { border-color: var(--cw-line-strong); }
.cw-egg-ring { --p: 0; position: relative; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--cw-accent) calc(var(--p) * 1%), var(--cw-tint-2) 0); }
.cw-egg-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.cw-egg-ring .cw-egg-ic { position: relative; width: 24px; height: 24px; color: var(--cw-ink-muted); }
.cw-egg-ring.sm { width: 48px; height: 48px; } .cw-egg-ring.sm .cw-egg-ic { width: 20px; height: 20px; }
.cw-egg-ic.g1 { color: #d98a9e; } .cw-egg-ic.g2 { color: #e0a400; } .cw-egg-ic.g3 { color: #7c5cd6; } .cw-egg-ic.g4 { color: #e11d48; }
.cw-egg-slot-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-egg-slot-body small { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cw-accent); }
.cw-egg-slot-body b { font-size: 13.5px; font-weight: 800; }
.cw-egg-slot-body b.is-empty { color: var(--cw-ink-muted); font-weight: 600; }
.cw-egg-slot-body span { font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-egg-shop { padding: 12px 14px; margin: 0 0 14px; border-radius: 16px; background: var(--cw-tint); border: 1px solid var(--cw-line); }
.cw-egg-shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cw-egg-shop-head b { font-size: 14px; font-weight: 800; }
.cw-egg-shop-head small { font-size: 12px; color: var(--cw-ink-muted); } .cw-egg-shop-head strong { color: var(--cw-accent); }
.cw-egg-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 9px 12px; border-radius: 12px; background: var(--cw-white); border: 1px solid var(--cw-line); }
.cw-egg-row > .cw-egg-ic { flex: 0 0 auto; width: 26px; height: 26px; }
.cw-egg-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cw-egg-row-body b { font-size: 13.5px; font-weight: 800; }
.cw-egg-row-body span { font-size: 12px; color: var(--cw-ink-soft); } .cw-egg-row-body span strong { color: var(--cw-accent); font-weight: 800; }
.cw-egg-row-body small { font-size: 11px; color: var(--cw-ink-muted); }
.ps-room .pad .button.cw-buy, .ps-room .pad .button.cw-hatch, .ps-room .pad .button.cw-buy:hover, .ps-room .pad .button.cw-hatch:hover { flex: 0 0 auto; background: linear-gradient(160deg, #ff7c96, #e11d48 60%, #c4123f); border-color: transparent; color: var(--cw-on-accent); font-size: 12.5px; box-shadow: 0 10px 18px -10px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
.ps-room .pad .button.cw-buy.disabled, .ps-room .pad .button.cw-hatch.disabled { background: var(--cw-tint-2); color: var(--cw-ink-muted); box-shadow: none; opacity: 1; }
.cw-egg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cw-egg-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; background: var(--cw-white); border: 1px solid var(--cw-line); text-align: center; }
.cw-egg-card.is-ready { border-color: var(--cw-line-strong); background: linear-gradient(180deg, #fff1f3, #fff 70%); }
.cw-egg-card b { font-size: 12.5px; font-weight: 800; }
.cw-egg-card span { font-size: 11px; color: var(--cw-ink-muted); }
.cw-egg-card em { font-style: normal; font-size: 11px; color: var(--cw-ink-muted); }
.cw-egg-card .button { margin-top: 4px; font-size: 12px; padding: 4px 12px; }
/* cherish-egg-collect-cta:start */
/* 알 모으기 — 내 알 목록 위에서 여러 알을 고르는 모드를 연다. */
.ps-room .pad .button.cw-egg-collect, .menugroup .button.cw-egg-collect,
.ps-room .pad .button.cw-egg-collect:hover, .menugroup .button.cw-egg-collect:hover {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 156px; max-width: 100%; min-height: 48px;
	margin: 0; padding: 7px 16px; border: 1px solid transparent; border-radius: 13px;
	background: linear-gradient(135deg, #ff7491 0%, #e11d48 58%, #bd123e 100%);
	color: #fff; text-shadow: none; box-shadow: 0 8px 16px -8px rgba(190, 18, 60, .85), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.cw-egg-collect-ic { flex: 0 0 auto; width: 42px; height: 30px; margin: 0; background: url('/cherish/ui/egg-collect-cta.png?v=2') center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(109, 18, 43, .25)); }
.button.cw-egg-collect > span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; color: inherit; }
.cw-egg-collect > span > b { font-size: 13px; font-weight: 900; letter-spacing: -.02em; }
.ps-room .pad .button.cw-egg-collect:hover, .menugroup .button.cw-egg-collect:hover { transform: translateY(-1px); filter: saturate(1.08) brightness(1.03); }
.ps-room .pad .button.cw-egg-collect.disabled, .menugroup .button.cw-egg-collect.disabled { background: var(--cw-tint-2); border-color: var(--cw-line); color: var(--cw-ink-muted); box-shadow: none; filter: none; }
.cw-egg-collect.disabled .cw-egg-collect-ic { opacity: .45; filter: grayscale(.65); }
/* cherish-egg-collect-cta:stop */
/* 베리 (2026-09-09) — 체리와 나란히 놓이므로 값마다 🍒/🫐 를 붙이고, 잔액은 상점 머리에 둘 다. */
.cw-wallet { display: inline-flex; align-items: baseline; gap: 10px; }
.cw-wallet span { white-space: nowrap; }
.cw-wallet span:last-child strong { color: #7c6bd6; }
/* 베리로만 파는 알 — 체리 행과 재질을 갈라 「모아야 닿는 자리」로 읽히게 한다. */
.cw-egg-row.is-dust { background: linear-gradient(180deg, #f7f5ff, var(--cw-white) 70%); border-color: #ddd6f5; }
.cw-egg-row.is-dust .cw-egg-row-body span strong { color: #6d5bc9; }
.ps-room .pad .cw-egg-row.is-dust .button.cw-buy, .ps-room .pad .cw-egg-row.is-dust .button.cw-buy:hover { background: linear-gradient(160deg, #a99af0, #6d5bc9 60%, #57459f); box-shadow: 0 10px 18px -10px rgba(87, 69, 159, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }
/* 알 모으기 (2026-09-19) — 「내 알」 머리 바로 아래 한 줄. 좁은 화면에서 줄바꿈되게 wrap.
   ⚠️ 여기에 확률 수치를 띄우는 자리를 만들지 말 것 (사용자 확정) — 구간 라벨만 나간다. */
.cw-egg-fuse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 9px 12px; border-radius: 14px; background: var(--cw-tint-1); border: 1px solid var(--cw-line); }
.cw-egg-fuse b { font-size: 12.5px; font-weight: 800; }
.cw-egg-fuse span { flex: 1 1 160px; font-size: 11px; color: var(--cw-ink-muted); }
.ps-room .pad .cw-egg-fuse .button { flex: 0 0 auto; margin: 0; font-size: 12px; padding: 4px 12px; }
/* 모은 알 배지 — 알 이름 옆에 작게. 등급색과 겹치지 않게 먹색 계열로 둔다. */
.cw-egg-fuse-badge { font-size: 10.5px; font-weight: 700; color: #6d5bc9; }
/* 팔기는 부화·품기보다 한 단계 약하게 — 이 탭의 주된 행동은 까는 것이다. */
.ps-room .pad .button.cw-egg-sell, .ps-room .pad .button.cw-egg-sell:hover { flex: 0 0 auto; margin-top: 3px; padding: 3px 10px; font-size: 11.5px; background: var(--cw-tint-2); border-color: var(--cw-line); color: var(--cw-ink-soft); box-shadow: none; }
.ps-room .pad .button.cw-egg-sell:hover { color: #6d5bc9; border-color: #ddd6f5; }
@media (max-width: 700px) {
	.cw-egg-slots { grid-template-columns: 1fr; }
	.cw-md-art { width: 88px; height: 88px; } .cw-md-art img { width: 80px; height: 80px; }
	.cw-md-body { min-width: 0; }
	html.cw-bnav .cw-tile-mon { padding: 8px 3px 6px; }
	html.cw-bnav .cw-mon-art { width: 78px; height: 78px; }
	html.cw-bnav .cw-mon-types .cherish-type { font-size: 8.5px !important; padding: 0 5px !important; height: 14px !important; line-height: 14px !important; }
}

/* ── 24) 도전과제 탭 디테일 (2026-09-05) ─────────────────────────────────
   도전과제 카드 v4(patch-achievement-panel.py): 카테고리 칩 · 달성 도장 · 잠김 실루엣 · SVG 아이콘.
   퀘스트 목록 v2(patch-quest-panel.py): 섹션 헤더 · 카드 · 진행 바 · 보상 칩 · 받기 버튼. */
.cw-ach-card { align-items: stretch; }
.cw-ach-ic svg { display: block; }
.cw-ach-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cw-ach-cat { flex: 0 0 auto; padding: 1px 7px; border-radius: 999px; background: var(--cw-tint-2); color: var(--cw-accent); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.is-locked .cw-ach-cat { background: var(--cw-tint); color: var(--cw-ink-muted); }
.cw-ach-stamp { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 8px 3px 6px; border-radius: 999px; border: 1.5px solid var(--cw-accent); color: var(--cw-accent); font-size: 10.5px; font-weight: 800; letter-spacing: .02em; transform: rotate(-2deg); background: rgba(255, 255, 255, .7); }
.cw-ach-stamp b { font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.cw-ach-foot.is-locked { color: var(--cw-ink-muted); font-style: italic; font-weight: 500; }
.is-locked .cw-ach-ic { background: var(--cw-tint); border: 0; color: var(--cw-line-strong); }
.is-locked .cw-ach-title { letter-spacing: .2em; }
/* 퀘스트 */
.cw-quests { margin-bottom: 22px; }
.cw-quest-group { margin: 0 0 14px; }
.cw-quest-group-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.cw-quest-group-head b { font-size: 13.5px; font-weight: 800; }
.cw-quest-group-head small { font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-quest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.cw-quest { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--cw-line); border-radius: var(--cw-r-sm); background: var(--cw-white); box-shadow: 0 6px 16px -14px rgba(190, 18, 60, .5); }
.cw-quest.is-done { border-color: var(--cw-line-strong); background: linear-gradient(135deg, #fff1f3, #fff 70%); }
.cw-quest.is-claimed { opacity: .8; }
.cw-quest-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cw-quest-top b { font-size: 13.5px; font-weight: 800; color: var(--cw-ink); }
.cw-quest-reward { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: #fff7e8; border: 1px solid #f3d9a8; color: #8a5a00; font-size: 10.5px; font-weight: 800; }
.cw-quest-desc { font-size: 12px; line-height: 1.45; color: var(--cw-ink-soft); }
.cw-quest-foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.cw-quest-foot .cw-track { flex: 1 1 auto; height: 6px; }
.cw-quest-state { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--cw-ink-muted); font-variant-numeric: tabular-nums; }
.cw-quest-state.is-claimed { display: inline-flex; align-items: center; gap: 3px; color: #1f8a4d; }
.ps-room .pad .button.cw-quest-claim, .ps-room .pad .button.cw-quest-claim:hover { flex: 0 0 auto; padding: 4px 12px; font-size: 12px; background: linear-gradient(160deg, #ff7c96, #e11d48 60%, #c4123f); border-color: transparent; color: var(--cw-on-accent); box-shadow: 0 8px 16px -8px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .45); }

/* ── 25) 랭킹 마무리 (2026-09-05) — 내 카드 승률 링 · 1위 왕관 ────────────── */
.cw-rank-me { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.cw-rank-ring { --p: 0; position: relative; width: 58px; height: 58px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: conic-gradient(var(--cw-accent) calc(var(--p) * 1%), var(--cw-tint-2) 0); }
.cw-rank-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.cw-rank-ring b { position: relative; font-size: 13px; font-weight: 900; line-height: 1; color: var(--cw-ink); font-variant-numeric: tabular-nums; }
.cw-rank-ring small { position: relative; font-size: 9px; font-weight: 700; color: var(--cw-ink-muted); margin-top: 2px; }
html.cw-dark .cw-rank-ring::before { background: var(--cw-white); }
.cw-podium { padding-top: 30px; }
.cw-crown { position: absolute; top: -34px; left: 50%; width: 40px; height: 30px; transform: translateX(-50%) rotate(-4deg); filter: drop-shadow(0 4px 6px rgba(224, 164, 0, .45)); z-index: 1; }
@media (max-width: 640px) {
	.cw-rank-me { grid-template-columns: auto minmax(0, 1fr) auto; }
	.cw-rank-ring { grid-column: 1; grid-row: 2; width: 48px; height: 48px; justify-self: center; }
	.cw-rank-ring b { font-size: 11px; } .cw-rank-ring small { font-size: 8px; }
	.cw-rank-prog { grid-column: 2 / -1; grid-row: 2; }
	.cw-crown { width: 30px; height: 22px; top: -24px; }
	.cw-podium { padding-top: 22px; }
}

/* ── 26) 모션 · 로딩 스켈레톤 (2026-09-05, 상업 퀄리티 1단계) ─────────────────
   진입: 탭을 열 때 카드가 살짝 떠오르며 나타난다(같은 노드는 Preact 가 재사용하므로 한 번만). 눌림: 버튼·칩 scale.
   스켈레톤: 「불러오는 중...」 대신 shimmer 자리 카드 (마크업 patch-motion.py renderCherishSkeleton).
   prefers-reduced-motion 이면 전부 끈다. transform/opacity 만 애니메이션한다 (box-shadow 키프레임 금지, 저사양).
   ⚠️ fill-mode 는 backwards — both/forwards 면 끝난 뒤 transform:none 이 남아 선택 타일의 translateY 를 덮는다. */
@keyframes cw-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes cw-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ps-room .pad > .menugroup, .ps-room .pad > .cw-rank, .ps-room .pad > .cw-sec, .ps-room .pad > .cw-eggs, .ps-room .pad > div > .cw-subtabs, .ps-room .pad > div > .cw-egg-promo {
	animation: cw-in .5s cubic-bezier(.2, .7, .2, 1) backwards;
}
.cw-tile, .cw-ach-card, .cw-quest, .cw-rank-row, .cw-podium-slot, .cw-egg-card, .cw-egg-slot, .cw-egg-row, .cw-rank-me, .cw-rank-hero, .cw-roster, .cw-mon-detail {
	animation: cw-in .45s cubic-bezier(.2, .7, .2, 1) backwards;
}
/* 격자 안에서 순서대로 살짝 늦게 (8개까지) */
.cw-tile:nth-child(2), .cw-ach-card:nth-child(2), .cw-quest:nth-child(2), .cw-rank-row:nth-child(2), .cw-egg-card:nth-child(2) { animation-delay: .06s; }
.cw-tile:nth-child(3), .cw-ach-card:nth-child(3), .cw-quest:nth-child(3), .cw-rank-row:nth-child(3), .cw-egg-card:nth-child(3) { animation-delay: .12s; }
.cw-tile:nth-child(4), .cw-ach-card:nth-child(4), .cw-quest:nth-child(4), .cw-rank-row:nth-child(4), .cw-egg-card:nth-child(4) { animation-delay: .18s; }
.cw-tile:nth-child(5), .cw-ach-card:nth-child(5), .cw-quest:nth-child(5), .cw-rank-row:nth-child(5), .cw-egg-card:nth-child(5) { animation-delay: .24s; }
.cw-tile:nth-child(6), .cw-ach-card:nth-child(6), .cw-quest:nth-child(6), .cw-rank-row:nth-child(6), .cw-egg-card:nth-child(6) { animation-delay: .3s; }
.cw-tile:nth-child(7), .cw-ach-card:nth-child(7), .cw-quest:nth-child(7), .cw-rank-row:nth-child(7), .cw-egg-card:nth-child(7) { animation-delay: .36s; }
.cw-tile:nth-child(n+8), .cw-ach-card:nth-child(n+8), .cw-quest:nth-child(n+8), .cw-rank-row:nth-child(n+8), .cw-egg-card:nth-child(n+8) { animation-delay: .42s; }
.cw-podium-slot.is-2 { animation-delay: .06s; } .cw-podium-slot.is-1 { animation-delay: 0s; } .cw-podium-slot.is-3 { animation-delay: .12s; }
/* 모바일 바텀 시트는 아래에서 올라온다 */
@keyframes cw-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
html.cw-bnav .cw-mon-detail { animation: cw-up .3s cubic-bezier(.2, .7, .2, 1) backwards; }
/* 눌림 */
.ps-room .pad .button:active, .menugroup .button:active, .cw-seg-btn:active, .cw-subtab:active, .cw-slot:active:not(:disabled), .cw-modechip:active:not(:disabled), .cw-theme-chip:active, .cw-tile:active, ul.cw-bnav .button:active, .maintabbar .button:active {
	transform: scale(.97);
	transition: transform .08s ease;
}
.cw-cta:active { transform: scale(.985); }
/* 스켈레톤 */
.cw-skel { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 14px; }
.cw-skel i, .cw-skel-tile { display: block; border-radius: 12px; background: linear-gradient(90deg, var(--cw-tint) 0%, rgba(255, 255, 255, .95) 45%, var(--cw-tint) 90%); background-size: 200% 100%; animation: cw-shimmer 1.3s linear infinite; }
.cw-skel-line { height: 14px; width: 50%; }
.cw-skel-card { height: 78px; border-radius: 18px; }
.cw-skel-card.is-tall { height: 150px; }
.cw-skel-row { height: 52px; border-radius: 14px; }
.cw-skel-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 14px; }
.cw-skel-tile { width: 150px; height: 186px; border-radius: 14px; }
html.cw-bnav .cw-skel-tile { width: calc((100% - 16px) / 3); height: 132px; }
@media (prefers-reduced-motion: reduce) {
	.ps-room .pad > *, .cw-tile, .cw-ach-card, .cw-quest, .cw-rank-row, .cw-podium-slot, .cw-egg-card, .cw-egg-slot, .cw-egg-row, .cw-rank-me, .cw-rank-hero, .cw-roster, .cw-mon-detail, html.cw-bnav .cw-mon-detail, .ps-room .pad > div > .cw-subtabs, .ps-room .pad > div > .cw-egg-promo { animation: none; }
	.cw-skel i, .cw-skel-tile { animation: none; }
}

/* ── 27) 홈 대시보드 「오늘의 나」 · 첫걸음 안내 · 접속 트레이너 카드 (2026-09-05, 상업 퀄리티 2단계) ──
   마크업 patch-home-dash.py. 대시보드는 CTA 위, 첫걸음은 배틀 점수 아래, 트레이너 카드는 옛 보드를 override.
   h3 는 .menugroup h3 (0,1,1) 가 이기므로 .cw-guide h3.cw-guide-title 처럼 특이도를 올려 덮는다. */
.cw-home { padding: 16px 18px 14px; }
.cw-home-top { display: flex; align-items: center; gap: 14px; }
.cw-home-face-wrap { position: relative; flex: 0 0 auto; width: 64px; height: 64px; }
.cw-home-face { display: block; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--cw-tint); border: 2px solid var(--cw-line); box-shadow: 0 8px 16px -10px rgba(190, 18, 60, .55); }
.cw-home-face-wrap .cw-tier-xs { position: absolute; right: -5px; bottom: -3px; }
.cw-home-who { flex: 1 1 auto; min-width: 0; }
.cw-home-name { font-size: 20px; font-weight: 800; color: var(--cw-ink); line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
/* 이름 옆 익명 칩 (2026-09-15) — 옛 익명 섹션이 쓰던 한 칸을 회수하고 여기로 옮겼다. */
.cw-home-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cw-anon-chip { flex: 0 0 auto; display: inline-flex; align-items: center; border: 1px solid var(--cw-line); background: var(--cw-tint, #f6f1f2); color: var(--cw-ink-3); border-radius: 999px; padding: 2px 9px; font: inherit; font-size: 11px; line-height: 1.5; cursor: pointer; }
.cw-anon-chip:hover, .cw-anon-chip:focus { border-color: var(--cw-line-strong, #d9c8c9); color: var(--cw-ink-2); outline: none; }
/* 익명으로 접속 중인 상태 (2026-09-22) — 칩 하나가 켜기·끄기를 다 맡으면서 **아래 띠는 없앴다**.
   09-15 에 회수한 자리를 끄기 버튼이 도로 쓰고 있었다(사용자 지적). 지금 내가 가명이라는 신호는
   이 켜진 칩이 맡는다 — 붉게 채워 두면 이름 옆이라 오히려 더 잘 보인다. */
.cw-anon-chip.is-on { border-color: var(--cw-accent); background: var(--cw-accent); color: var(--cw-on-accent, #fff); }
.cw-anon-chip.is-on:hover, .cw-anon-chip.is-on:focus { border-color: var(--cw-accent); color: var(--cw-on-accent, #fff); filter: brightness(1.06); }
.cw-home-sub { font-size: 13px; color: var(--cw-ink-muted); margin-top: 3px; }
.cw-home-sub b { color: var(--cw-ink); font-weight: 700; }
.cw-home-elo { flex: 0 0 auto; font-size: 30px; font-weight: 800; color: var(--cw-accent); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.cw-home-elo small { font-size: 12px; font-weight: 600; margin-left: 2px; color: var(--cw-ink-muted); }
.cw-home-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.cw-home-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; border-radius: 14px; background: var(--cw-white); border: 1px solid var(--cw-line); color: var(--cw-ink); text-decoration: none; min-width: 0; }
.menugroup a.cw-home-stat { color: var(--cw-ink); }
a.cw-home-stat:hover { border-color: var(--cw-line-strong); background: var(--cw-tint); text-decoration: none; }
.cw-home-stat b { font-size: 17px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cw-home-stat b em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--cw-ink-muted); }
.cw-home-stat small { font-size: 11px; color: var(--cw-ink-muted); white-space: nowrap; }
.cw-home .cw-skel { padding: 0; }
.cw-home .cw-skel-card { height: 64px; }
html.cw-bnav .cw-home { padding: 14px 14px 12px; }
html.cw-bnav .cw-home-stats { gap: 6px; margin-top: 12px; }
html.cw-bnav .cw-home-stat { padding: 8px 2px 7px; border-radius: 12px; }
html.cw-bnav .cw-home-stat b { font-size: 15px; }
html.cw-bnav .cw-home-stat small { font-size: 10px; }
html.cw-bnav .cw-home-elo { font-size: 24px; }
html.cw-bnav .cw-home-name { font-size: 17px; }
html.cw-bnav .cw-home-face-wrap, html.cw-bnav .cw-home-face { width: 54px; height: 54px; }

/* 첫걸음 */
.cw-guide { padding: 16px 18px; border-color: var(--cw-line-strong); }
.cw-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cw-guide h3.cw-guide-title { font-size: 18px; font-weight: 800; margin: 2px 0 0; color: var(--cw-ink); line-height: 1.3; }
.cw-guide-count { flex: 0 0 auto; font-size: 13px; color: var(--cw-ink-muted); padding: 5px 11px; border-radius: 999px; background: var(--cw-white); border: 1px solid var(--cw-line); white-space: nowrap; }
.cw-guide-count b { color: var(--cw-accent); font-size: 15px; }
.cw-guide-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cw-guide-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--cw-white); border: 1px solid var(--cw-line); }
.cw-guide-step.is-now { border-color: var(--cw-line-strong); background: var(--cw-tint); box-shadow: 0 12px 22px -18px rgba(190, 18, 60, .6); }
.cw-guide-step.is-done { opacity: .62; }
.cw-guide-no { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--cw-tint); color: var(--cw-ink-soft); border: 1px solid var(--cw-line); }
.cw-guide-step.is-now .cw-guide-no { background: var(--cw-accent); color: #fff; border-color: transparent; box-shadow: 0 6px 12px -6px rgba(190, 18, 60, .7); }
.cw-guide-step.is-done .cw-guide-no { background: #2ec27e; color: #fff; border-color: transparent; }
.cw-guide-no svg { width: 14px; height: 14px; }
.cw-guide-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cw-guide-body b { font-size: 14px; color: var(--cw-ink); }
.cw-guide-body small { font-size: 12px; color: var(--cw-ink-muted); line-height: 1.4; }
.cw-guide-step.is-done .cw-guide-body b { text-decoration: line-through; }
.cw-guide .cw-guide-go.button { flex: 0 0 auto; font-size: 12px; padding: 5px 13px; border-radius: 999px; }

/* 접속 트레이너 카드 */
.cw-board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cw-board h3.cw-board-title { font-size: 19px; font-weight: 700; margin: 0; }
.cw-board .cw-board-sub { font-size: 13px; color: var(--cw-ink-muted); margin: 2px 0 0; }
.cw-board-count { font-size: 13px; color: var(--cw-ink-muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.cw-board-count b { color: var(--cw-ink); font-size: 15px; }
.cw-board-battling { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--cw-accent); font-weight: 600; }
.cw-board-battling i { width: 7px; height: 7px; border-radius: 50%; background: var(--cw-accent); box-shadow: 0 0 0 3px rgba(225, 29, 72, .18); }
.cw-trainers { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.cw-trainer { position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 6px 10px; border: 1px solid var(--cw-line); border-radius: var(--cw-r-sm); background: var(--cw-white); color: var(--cw-ink); text-shadow: none; cursor: pointer; font: inherit; min-width: 0; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.cw-trainer:hover { border-color: var(--cw-line-strong); background: var(--cw-tint); transform: translateY(-2px); box-shadow: 0 14px 24px -18px rgba(190, 18, 60, .6); }
.cw-trainer.is-me { border-color: var(--cw-line-strong); box-shadow: inset 0 0 0 1px var(--cw-line-strong); }
.cw-trainer-ava { position: relative; width: 96px; height: 128px; display: block; }
.cw-trainer-ava > img:first-child { width: 96px; height: 128px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .14)); }
.cw-trainer-status { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 700; padding: 3px 7px 3px 6px; border-radius: 999px; background: var(--cw-white); border: 1px solid var(--cw-line); color: var(--cw-ink-muted); display: inline-flex; align-items: center; gap: 4px; line-height: 1.2; }
.cw-trainer-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #2ec27e; }
.cw-trainer.is-battling .cw-trainer-status { color: var(--cw-accent); border-color: rgba(225, 29, 72, .35); }
.cw-trainer.is-battling .cw-trainer-status::before { background: var(--cw-accent); animation: cw-pulse 1.4s ease-in-out infinite; }
@keyframes cw-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
.cw-trainer-name { margin-top: 6px; margin-bottom: 2px; font-size: 13px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-board .cw-board-empty { margin: 4px 0 0; }
.cw-trainer { animation: cw-in .45s cubic-bezier(.2, .7, .2, 1) backwards; }
html.cw-bnav .cw-trainers { grid-template-columns: repeat(3, 1fr); gap: 6px; }
html.cw-bnav .cw-trainer { padding: 8px 4px 8px; border-radius: 12px; }
html.cw-bnav .cw-trainer-ava, html.cw-bnav .cw-trainer-ava > img:first-child { width: 72px; height: 96px; }
html.cw-bnav .cw-trainer-status { left: 5px; top: 5px; font-size: 9.5px; padding: 2px 5px; }
html.cw-bnav .cw-trainer-name { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .cw-trainer, .cw-trainer.is-battling .cw-trainer-status::before, .cw-home, .cw-guide { animation: none; } }

/* ── 28) 배틀 화면 소프트 글래스 (2026-09-05, 상업 퀄리티 3단계 ④ — 시안 2 「타입 색 카드」 사용자 확정) ────
   배틀 박스·트레이너 칸·턴/타이머 알약·HP 바·조작부(기술 2×2 카드, 교체 카드)·로그 패널·페이지 바탕. 마크업 무수정, CSS 만.
   기술 카드는 타입 색으로 옅게 물들인다(color-mix, 미지원 브라우저는 앞 줄 흰 카드로 폴백). 타입 색은 .type-<Type> 의 --tc.
   ⚠️ .movebutton 높이는 auto(min-height) — 업스트림 40px 고정이면 타입 칩 줄이 넘친다. PC(.wide-controls)는 2×2 (flex wrap).
   목업 scratchpad mock/battle.html 로 검수 (실 CSS 링크 + 재현 마크업). 시안 1(흰 카드 + 타입 띠)은 기각. */
/* 페이지 바탕 — 홈과 같은 번짐 배경 */
.ps-room.ps-room-opaque, .ps-room-opaque { background: var(--cw-bg); background-image: var(--cw-mesh); background-attachment: fixed; color: var(--cw-ink); }
/* 배틀 박스 */
.battle { left: 0; top: 10px; border: 1px solid var(--cw-line); border-radius: 18px; box-shadow: var(--cw-card-shadow), 0 0 0 4px rgba(255, 255, 255, .35); background: #cfd5da; }
.innerbattle { border-radius: 17px; overflow: hidden; }
.leftbar, .rightbar { background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .28)); border-color: rgba(255, 255, 255, .7); backdrop-filter: blur(5px); color: var(--cw-ink-muted); }
.trainer strong { display: block; margin: 0 auto 2px; width: max-content; max-width: 90px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--cw-ink); font-size: 11px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); text-shadow: none; }
.trainer div.teamicons { opacity: .95; }
/* 턴 · 타이머 */
.turn { top: 10px; left: 110px; padding: 4px 13px; border: 0; border-radius: 999px; background: rgba(24, 20, 30, .74); color: #fff; font-size: 12pt; font-weight: 800; letter-spacing: .02em; backdrop-filter: blur(4px); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); }
.cherish-timerhud { top: 46px; background: rgba(24, 20, 30, .66); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
/* HP 바 */
.statbar strong { display: table; margin: 0 auto 4px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--cw-ink); font-size: 12px; font-weight: 700; line-height: 1.45; text-shadow: none; box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .3); white-space: nowrap; }
.statbar .hpbar { border: 0; padding: 2px; height: 10px; width: 151px; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 5px -1px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.statbar .hpbar .prevhp { border-radius: 999px; }
.statbar .hpbar .hp { height: 6px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #5ee08a, #16a34a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
.statbar .hpbar .hp-yellow { background: linear-gradient(180deg, #fde047, #ca8a04); }
.statbar .hpbar .hp-red { background: linear-gradient(180deg, #fb7185, #dc2626); }
.statbar .hpbar .hptext { font-weight: 700; color: var(--cw-ink); text-shadow: none; }
.statbar .status { margin-top: 4px; }
.statbar span { border: 0; border-radius: 999px; padding: 1px 7px; font-size: 10px; font-weight: 700; line-height: 1.5; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); text-shadow: none; }
.statbar strong .cherish-types .cherish-type { box-shadow: none; }
/* 조작부 */
.battle-controls .controls { padding: 4px 6px 10px; }
.battle-controls .whatdo { font-size: 13px; color: var(--cw-ink-muted); line-height: 1.7; padding: 2px 6px 6px; }
.battle-controls .whatdo b, .battle-controls .whatdo strong { color: var(--cw-ink); }
.battle-controls .moveselect, .battle-controls .switchselect, .battle-controls .shiftselect { font-size: 12px !important; color: var(--cw-ink-muted); font-weight: 700; padding: 8px 6px 4px; letter-spacing: .02em; }
.battle-controls .button.timerbutton { border-radius: 999px; background: var(--cw-white); border: 1px solid var(--cw-line); color: var(--cw-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); padding: 4px 12px; }
.battle-controls .button.timerbutton-on { border-color: var(--cw-line-strong); }
.battle-controls .button.timerbutton small { color: var(--cw-ink-muted); font-weight: 500; }
/* 기술 카드 — 흰 카드 + 왼쪽 타입 띠 */
.movebutton, .wide-controls .movebutton { position: relative; border: 1px solid var(--cw-line); border-radius: 14px; background: var(--cw-white); background: linear-gradient(135deg, color-mix(in srgb, var(--tc, #9aa) 26%, #fff), color-mix(in srgb, var(--tc, #9aa) 8%, #fff)); border-color: color-mix(in srgb, var(--tc, #9aa) 45%, #fff); color: var(--cw-ink); font-weight: 800; text-align: left; padding: 9px 10px 6px 12px; height: auto; min-height: 48px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; text-shadow: none; }
.wide-controls .movecontrols { max-width: none; }
.wide-controls .movebutton { width: calc(50% - 10px); margin: 0 5px 6px; min-height: 58px; font-size: 14px; }
.wide-controls .movemenu { margin-right: 0; padding-left: 0; display: flex; flex-wrap: wrap; }
.movebutton:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--tc, #9aa) 36%, #fff), color-mix(in srgb, var(--tc, #9aa) 14%, #fff)); border-color: color-mix(in srgb, var(--tc, #9aa) 65%, #fff); transform: translateY(-1px); box-shadow: 0 12px 22px -14px color-mix(in srgb, var(--tc, #9aa) 70%, #000); }
.movebutton small.type, .wide-controls .movebutton small.type { display: inline-block; float: left; margin-top: 4px; padding: 1px 8px 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: var(--tc, #9aa); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); line-height: 1.45; }
.movebutton small.pp, .wide-controls .movebutton small.pp { float: right; margin-top: 5px; font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--tc, #9aa) 70%, #333); font-variant-numeric: tabular-nums; }
.movebutton.disabled, .movebutton:disabled { background: rgba(255, 255, 255, .55) !important; border-color: var(--cw-line) !important; color: var(--cw-ink-muted) !important; box-shadow: none !important; }
.movebutton .cherish-eff { top: -8px; left: 8px; border-radius: 999px; box-shadow: 0 2px 5px -1px rgba(0, 0, 0, .35), 0 0 0 2px #fff; }
/* ⚠️ 위 규칙의 left:8px 가 client2 의 .cherish-eff-r{left:auto} 를 덮는다 — left:auto 를 여기서 다시 줘야 오른쪽 배지가
   버튼 폭 전체 띠로 늘어나 왼쪽 배지 위에 얹히지 않는다 (2026-09-06 실측, 더블에서 배지가 하나만 보이던 원인). */
.movebutton .cherish-eff-r { left: auto; right: 8px; }
.movebutton .cherish-eff-c { left: 50%; right: auto; }
/* 난투전 아래 모서리 배지 (patch-effect-badge.py) — 위 배지와 대칭 */
.movebutton .cherish-eff-bl { top: auto; bottom: -8px; left: 8px; right: auto; }
.movebutton .cherish-eff-br { top: auto; bottom: -8px; left: auto; right: 8px; }
/* 타입 색 */
.type-Normal { --tc: #a8a77a; } .type-Fire { --tc: #ee8130; } .type-Water { --tc: #6390f0; } .type-Electric { --tc: #e2b800; } .type-Grass { --tc: #5fb53a; } .type-Ice { --tc: #4fb8c9; } .type-Fighting { --tc: #c22e28; } .type-Poison { --tc: #a33ea1; } .type-Ground { --tc: #d1a642; } .type-Flying { --tc: #8f7cf0; } .type-Psychic { --tc: #f95587; } .type-Bug { --tc: #97a51b; } .type-Rock { --tc: #b6a136; } .type-Ghost { --tc: #735797; } .type-Dragon { --tc: #6f35fc; } .type-Dark { --tc: #705746; } .type-Steel { --tc: #8f8fb0; } .type-Fairy { --tc: #d685ad; } .type-Stellar { --tc: #40b5a5; }
/* 교체 카드 */
.switchmenu button, .wide-controls .switchmenu button, .wide-controls .switchmenu.cherish-sw button { position: relative; border: 1px solid var(--cw-line); border-radius: 14px; background: var(--cw-white); color: var(--cw-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; text-shadow: none; }
.switchmenu button:hover { background: var(--cw-tint); border-color: var(--cw-line-strong); transform: translateY(-1px); box-shadow: 0 12px 22px -16px rgba(190, 18, 60, .55); }
.switchmenu button.disabled, .switchmenu button:disabled { background: rgba(255, 255, 255, .55) !important; border-color: var(--cw-line) !important; color: var(--cw-ink-muted) !important; box-shadow: none !important; }
.switchmenu button .hpbar { left: 10px; right: 10px; bottom: 6px; height: 4px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, .08); opacity: 1; }
.switchmenu button .hpbar span { height: 4px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #5ee08a, #16a34a); }
.switchmenu button .hpbar-yellow span { background: linear-gradient(180deg, #fde047, #ca8a04); }
.switchmenu button .hpbar-red span { background: linear-gradient(180deg, #fb7185, #dc2626); }
.switchmenu button .status { right: 8px; bottom: 5px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid #fff; }
.switchmenu button .cherish-sw .cherish-eff { border-radius: 999px; }
.switchmenu.cherish-tp button { border-radius: 18px; }
/* 로그 */
.battle-log { background: var(--cw-white); border-left: 1px solid var(--cw-line); color: var(--cw-ink); }
/* 배틀 로그 글자: PC 15px (2026-09-06 사용자: 13px 는 너무 작다). 모바일은 13px 그대로 -- 폭 360 에서 줄바꿈이 늘어난다.
   WARN 모바일 판정은 폭 미디어 쿼리다. html.cw-bnav 는 배틀이 열리면 꺼지는 클래스라(patch-appbar show = narrow && !battleOpen)
        배틀 중엔 못 쓴다. */
.battle-log .inner { font-size: 15px; line-height: 1.6; }
@media (max-width: 700px) { .battle-log .inner { font-size: 13px; line-height: 1.55; } }
.battle-log h2 { display: inline-block; margin: 8px 8px 4px; padding: 2px 11px; border-radius: 999px; border: 1px solid var(--cw-line); background: var(--cw-tint); color: var(--cw-ink-muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.battle-log .chat small { color: var(--cw-ink-muted); }
.battle-log-add, .chat-log-add { background: var(--cw-white); border-top: 1px solid var(--cw-line); }
.battle-log-add .textbox, .chat-log-add .textbox { border-radius: 12px; border: 1px solid var(--cw-line); background: #fff; }
.battle-log > .controls:has(> .battle-controls:not(.inline-battle)) { box-shadow: 0 8px 16px -12px rgba(190, 18, 60, .35); }
.battle-log .inline-controls { border-top: 1px solid var(--cw-line); }

/* ── 29) 2차 그림 배선 (2026-09-05, 사용자 그림 도착 — C:/ym/포켓몬/img/2 → ui-assets 로 가공) ─────────
   내비 아이콘 4종: FontAwesome 글리프(fa-home·fa-paw·fa-certificate·fa-trophy) 자리에 마스크 그림. 색은 currentColor 라
   상단 앱바(회색/흰)·하단 알약(회색/흰) 둘 다 같은 파일로 된다. 글리프는 ::before content 를 없애 숨긴다.
   브랜드 마크: §19 파비콘 대신 그린 마크(brand-mark.png, 구름 위 포켓볼 체리). 히어로: §13 url 을 webp 로.
   포디움 빛: 흰 글로우 그림을 마스크로 써서 분홍으로 물들인다 (흰 그림 그대로면 밝은 카드 위에서 안 보인다). */
.maintabbar li.cw-nav-li .button i.fa, ul.cw-bnav .button i.fa {
	display: inline-block; width: 18px; height: 18px; margin: 0 5px 0 0; vertical-align: -4px; line-height: 0;
	background-color: currentColor;
	-webkit-mask: url('/cherish/ui/nav-home.png?v=1') center / contain no-repeat; mask: url('/cherish/ui/nav-home.png?v=1') center / contain no-repeat;
}
.maintabbar li.cw-nav-li .button i.fa::before, ul.cw-bnav .button i.fa::before { content: none; }
.maintabbar li.cw-nav-li .button i.fa-paw, ul.cw-bnav .button i.fa-paw { -webkit-mask-image: url('/cherish/ui/nav-team.png?v=1'); mask-image: url('/cherish/ui/nav-team.png?v=1'); }
.maintabbar li.cw-nav-li .button i.fa-certificate, ul.cw-bnav .button i.fa-certificate { -webkit-mask-image: url('/cherish/ui/nav-achieve.png?v=1'); mask-image: url('/cherish/ui/nav-achieve.png?v=1'); }
.maintabbar li.cw-nav-li .button i.fa-trophy, ul.cw-bnav .button i.fa-trophy { -webkit-mask-image: url('/cherish/ui/nav-rank.png?v=1'); mask-image: url('/cherish/ui/nav-rank.png?v=1'); }
ul.cw-bnav .button i.fa { display: block; width: 22px; height: 22px; margin: 0 auto 2px; }
/* 브랜드 마크 — 그린 마크로 교체 (파비콘 규칙 §19 를 덮는다) */
.cw-brand-mark.has-img { background-image: url('/cherish/ui/brand-mark.png?v=1'); }
/* 포디움 1위 빛 — 그림(흰 알파)을 마스크로, 분홍으로 채색. §13·§16 의 방사형 그라데이션을 덮는다 */
.cw-podium-slot.is-1::before {
	width: 240px; height: 240px; top: -6px;
	background: rgba(251, 113, 133, .5);
	-webkit-mask: url('/cherish/ui/podium-glow.png?v=1') center / contain no-repeat; mask: url('/cherish/ui/podium-glow.png?v=1') center / contain no-repeat;
}
html.cw-dark .cw-podium-slot.is-1::before { background: rgba(251, 113, 133, .35); }

/* ── 30) 좁은 화면 앱바 — 배틀 중에도 방 칩의 닫기 × 가 보이게 (2026-09-05) ─────────────────
   폰(375px)에서 배틀을 열면 하단 내비(§17)는 꺼지고 앱바는 그대로다. 업스트림 client.css 는 탭 띠에
   margin-right:165px + overflow:hidden 을 박고 handleResize() 가 유저 칩 위치로 다시 재는데, 포크 가로 헤더엔
   .overflow 요소가 없어 그 함수가 `if (!overflow…) return` 으로 조기 종료한다(재계산 0회). 왼쪽 브랜드 150 +
   오른쪽 165 를 빼면 60px 만 남아 홈 알약 다음의 배틀 칩 뒷부분(×)이 통째로 잘렸다 (폰 스크린샷, 사용자).
   스위치 html.cw-narrow = patch-appbar.py v6 (폭 ≤700, 배틀 여부 무관). cw-bnav(홈 등)와 겹칠 때도 유저 칩은
   아이콘만·탭 띠 여백은 여기 값. 브랜드 글자는 배틀(cw-bnav 꺼짐)에서만 숨긴다 — 홈에선 그대로 두고 싶어서.
   예산(375px): 마크 54 + 홈 알약 ~74 + 배틀 칩 ≤150(말줄임) + 유저 칩 ~90 = 368. */
html.cw-narrow .header .userbar { right: 10px; gap: 0; padding: 0 4px; }
html.cw-narrow .header .userbar .username { display: none; }
html.cw-narrow .tabbar.maintabbar { margin-right: 90px; }
html.cw-narrow:not(.cw-bnav) .cw-brand-name { display: none; }
html.cw-narrow:not(.cw-bnav) .cw-brand { left: 12px; gap: 0; }
html.cw-narrow:not(.cw-bnav) .tabbar.maintabbar { padding-left: 54px; }
html.cw-narrow .maintabbar li:not(.cw-nav-li) .button {
	display: inline-block;
	max-width: 150px;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
html.cw-narrow .maintabbar li:not(.cw-nav-li) .button i { vertical-align: middle; margin-right: 4px; }

/* ── 31) 배틀 껍데기 A 「본가 스테이지」 (2026-09-06, patch-battle-shell.py · html.cw-bshell 게이트, 시안 preview/battle-shell.html 사용자 채택) ───
   필드 위 · 조작부 카드 아래 한 흐름(PC·모바일 같은 DOM). 로그 패널(.cw-blog)은 숨김(데이터 통로만), ⚙ 「배틀 기록 보기」면 조작부 아래 카드.
   캡션 = 업스트림 .messagebar 재스타일(연출 동기는 원래 있음). PC(.wide-controls)는 기술 2×2 왼쪽 + 교체 카드 오른쪽(기술 화면만, :has 가드).
   §10 (a)(d) 는 로그 안 조작부 전제라 여기선 무관. §28 의 .battle{top:10px} 는 필드 상자 안에서 0 으로. */
html.cw-bshell .cw-bshell { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: auto; -webkit-overflow-scrolling: touch; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 14px 20px; box-sizing: border-box; scrollbar-width: thin; }
html.cw-bshell .cw-bfield { position: relative; flex: none; }
html.cw-bshell .cw-bfield .battle { top: 0; left: 0; }
html.cw-bshell .cw-bpanel.battle-controls { position: relative; top: auto; left: auto; flex: none; max-width: 100%; box-sizing: border-box; background: var(--cw-surface); border: 1px solid rgba(255, 255, 255, .85); border-radius: 20px; box-shadow: var(--cw-card-shadow); backdrop-filter: blur(12px); padding: 8px 12px 14px; }
html.cw-bshell .cw-bpanel .controls { padding: 0; }
html.cw-bshell .cw-bpanel .inline-controls { border: 0 !important; padding: 0 !important; margin: 0 !important; }
html.cw-bshell .cw-bpanel .whatdo { font-size: 14px; font-weight: 700; color: var(--cw-ink); line-height: 1.6; padding: 4px 4px 8px; margin: 0; }
html.cw-bshell .cw-bpanel .whatdo em { font-style: normal; color: var(--cw-ink-muted); }
html.cw-bshell .cw-bpanel .whatdo .button { border-radius: 999px; padding: 3px 12px; font-weight: 700; }
/* 머리줄: 기권 · 무승부 · (빈칸) · N명 · 음량 · 옵션 · 타이머 */
html.cw-bshell .cw-bbar { display: flex; align-items: center; gap: 6px; padding: 2px 2px 8px; }
/* 구름 미궁 현재 단계 (2026-09-09) — 배틀 안에서 몇 라운드째인지 알 길이 없었다. */
html.cw-bshell .cw-bbar-stage {
	align-self: center; padding: 3px 9px; border-radius: 8px; white-space: nowrap;
	background: rgba(122, 92, 176, .16); color: #c9a2ff; font-size: 8.5pt;
}
html.cw-bshell .cw-bbar-sp { flex: 1; }
html.cw-bshell .cw-bbar .button { border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--cw-line); color: var(--cw-ink); text-shadow: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); line-height: 1.5; }
html.cw-bshell .cw-bbar .button.cw-bbar-quit { color: var(--cw-ink-soft); }
html.cw-bshell .cw-bbar .button[role="timer"] { position: static !important; font-variant-numeric: tabular-nums; }
html.cw-bshell .cw-bbar .button.timerbutton-on { border-color: var(--cw-line-strong); background: var(--cw-tint); }
html.cw-bshell .cw-bbar .button.timerbutton-critical { border-color: #fb7185; color: #be123c; background: #fff1f2; }
/* 기술 2×2 (모바일도 flex 두 칸) */
html.cw-bshell .cw-bpanel .movecontrols, html.cw-bshell .cw-bpanel .switchcontrols { max-width: none; margin: 0; }
html.cw-bshell .cw-bpanel .movemenu { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
html.cw-bshell .cw-bpanel .movebutton { float: none; width: calc(50% - 4px); margin: 0; box-sizing: border-box; min-height: 52px; }
html.cw-bshell .cw-bpanel.wide-controls .movebutton { min-height: 60px; font-size: 14px; }
html.cw-bshell .cw-bpanel h3.moveselect { display: none; }
html.cw-bshell .cw-bpanel h3.switchselect, html.cw-bshell .cw-bpanel h3.shiftselect { margin: 10px 0 2px; }
html.cw-bshell .cw-bpanel .switchmenu.cherish-tp { overflow: visible; }
html.cw-bshell .cw-bpanel .switchmenu.cherish-tp::after { content: ''; display: block; clear: both; }
/* PC: 기술 왼쪽 · 교체 카드 오른쪽 — 기술 화면(.movecontrols 가 있는 inline-controls)만 */
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; align-items: start; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .whatdo { grid-column: 1 / -1; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .movecontrols { grid-column: 1; }
/* 교체 칸은 한 줄에 카드 3장까지 (104 + 좌우 margin 4 = 112, ×3 = 336). 2대2 는 동료 3마리까지 같은 목록에 들어가 6장이 되는데,
   auto 트랙이라 그만큼 오른쪽이 넓어지고 기술 칸(1fr)이 90px 로 눌려 기술 이름이 세로로 쪼개졌다 (2026-09-08 사용자 제보).
   상한을 걸면 6장은 3×2 로 접히고 기술 칸은 400px 대를 지킨다. 3장(1대1)은 원래도 336px 라 바뀌는 게 없다.
   ⚠️ 아래 카드 width(104) · margin 을 고치면 이 336px 도 같이 고칠 것. */
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols { grid-column: 2; padding-top: 2px; max-width: 336px; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols h3 { display: none; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) .switchmenu.cherish-tp button { width: 104px; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) .switchmenu.cherish-tp button .cherish-tpart { width: 94px; height: 94px; }
/* 동료 카드 8할 — §10 (c) 의 같은 규칙보다 이쪽 선택자가 세서 여기서 한 번 더 (기술 화면 카드는 104 라 84) */
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) { width: 84px; font-size: 10pt; padding: 4px 3px 10px; }
html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) .cherish-tpart { width: 76px; height: 76px; }
/* 캡션 — 필드 아래 검은 유리 한 줄 (display 는 업스트림 JS 가 애니 중에만 켠다) */
html.cw-bshell .battle .messagebar { left: 130px; right: 130px; bottom: 12px; padding: 7px 14px 6px; border-radius: 14px; background: rgba(20, 16, 24, .74); backdrop-filter: blur(6px); color: #fff; font-size: 12.5pt; font-weight: 700; line-height: 1.35; text-align: center; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12); word-break: keep-all; }
html.cw-bshell .battle .messagebar strong { color: #ffd6de; font-size: inherit; }
html.cw-bshell .battle .messagebar small { font-size: 9.5pt; font-weight: 600; color: #e6dfe3; }
/* 필드 안 남은 시간 HUD 는 머리줄 타이머와 중복 — 껍데기에선 숨긴다 (2026-09-06 사용자). 만드는 코드(TimerButton.cherishSyncHud)는 그대로 */
html.cw-bshell .cherish-timerhud { display: none !important; }
/* 담임 말풍선(patch-school-coach.py)도 필드 아래 가운데라 캡션과 겹친다 — 캡션 띠 위로 올린다 (자리는 이 세션 소유, 문구는 학교 세션) */
html.cw-bshell .battle .cherish-coach { bottom: 62px; }
/* 로그 = 데이터만. battle.ts 의 log.add·코치 훅·seek 가 로그 DOM 을 쓰므로 마운트는 하고 화면에서만 지운다.
   2026-09-09: 이걸 보여 주던 ⚙ 「배틀 기록 보기」 토글은 폐기 — 글 로그는 이제 어디서도 안 보인다 */
html.cw-bshell .cw-blog { display: none !important; }
/* 토스트 (2단계) — 필드 위 가운데. 타이머 켜짐/꺼짐·연결·오류 문장, 어린이집 배너. 카운트다운은 HUD */
html.cw-bshell .cw-toasts { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 6; pointer-events: none; max-width: 400px; }
html.cw-bshell .cw-toast { max-width: 400px; padding: 5px 14px; border-radius: 999px; background: rgba(24, 20, 30, .78); color: #fff; font-size: 10.5pt; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); animation: cherish-bgmtitle-in 320ms ease-out; transition: opacity .45s ease; }
html.cw-bshell .cw-toast-out { opacity: 0; }
html.cw-bshell .cw-toast-error { background: rgba(190, 18, 60, .86); }
html.cw-bshell .cw-toast-dash { white-space: normal; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .94); color: var(--cw-ink); border: 1px solid var(--cw-line); line-height: 1.4; }
html.cw-bshell .cw-toast-dash .broadcast { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; }
/* 종료 카드 (3단계) — 결과 배지 · 사유 · 턴 · 레이팅 안내 · 내 팀 · 버튼(기존 after-row 마크업 재사용, 이름 그대로) */
html.cw-bshell .cw-end { text-align: center; padding: 6px 4px 4px !important; }
html.cw-bshell .cw-end-badge { display: inline-block; padding: 8px 30px; border-radius: 999px; font-size: 24px; font-weight: 900; letter-spacing: .04em; color: #fff; background: var(--cw-cta-grad); box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset); }
html.cw-bshell .cw-end-lose { background: linear-gradient(135deg, #94a3b8, #475569); box-shadow: 0 10px 22px -12px rgba(51, 65, 85, .8); }
html.cw-bshell .cw-end-tie, html.cw-bshell .cw-end-spec { background: linear-gradient(135deg, #c4b5fd, #7c3aed); box-shadow: 0 10px 22px -12px rgba(124, 58, 237, .6); }
html.cw-bshell .cw-end-sub { margin: 10px 0 2px; font-weight: 700; color: var(--cw-ink); font-size: 14px; }
html.cw-bshell .cw-end-meta { color: var(--cw-ink-muted); font-size: 12px; font-weight: 600; }
html.cw-bshell .cw-end-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
html.cw-bshell .cw-end-stat { min-width: 96px; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--cw-line); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
html.cw-bshell .cw-end-stat b { display: block; font-size: 20px; line-height: 1.2; color: var(--cw-ink); font-variant-numeric: tabular-nums; }
html.cw-bshell .cw-end-stat b.up { color: #16a34a; }
html.cw-bshell .cw-end-stat b.dn { color: #dc2626; }
html.cw-bshell .cw-end-stat small { display: block; margin-top: 2px; color: var(--cw-ink-muted); font-weight: 600; font-size: 11px; }
html.cw-bshell .cw-end-egg { background: var(--cw-tint); border-color: var(--cw-line-strong); }
html.cw-bshell .cw-end-note { margin: 8px auto 0; max-width: 520px; padding: 6px 12px; border-radius: 12px; background: var(--cw-tint); color: var(--cw-ink); font-size: 12px; font-weight: 600; }
html.cw-bshell .cw-end .switchcontrols { margin-top: 8px; }
html.cw-bshell .cw-end .switchcontrols h3 { display: none; }
html.cw-bshell .cw-end .switchmenu.cherish-teamlist { text-align: center; }
html.cw-bshell .cw-bpanel.wide-controls .cw-end .switchmenu.cherish-tp button { width: 92px; }
html.cw-bshell .cw-bpanel.wide-controls .cw-end .switchmenu.cherish-tp button .cherish-tpart { width: 82px; height: 82px; }
html.cw-bshell .cw-end .cw-end-btns { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 10px 0 0; padding: 0; }
html.cw-bshell .cw-end .cw-end-btns .button { border-radius: 999px; padding: 7px 16px; font-weight: 800; font-size: 13px; line-height: 1.4; background: #fff; border: 1px solid var(--cw-line); color: var(--cw-ink); text-shadow: none; min-width: 0; margin: 0; height: auto; }
html.cw-bshell .cw-end .cw-end-btns .button br, html.cw-bshell .cw-end .cw-end-btns .button small { display: none; }
html.cw-bshell .cw-end .cw-end-main .button:first-child { background: var(--cw-cta-grad); color: #fff; border: 0; box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset); padding: 8px 26px; }
html.cw-bshell .cw-end .cw-end-sub2 .button { font-size: 12px; padding: 5px 12px; color: var(--cw-ink-muted); font-weight: 700; }
@media (max-width: 700px) {
	html.cw-bshell .cw-bshell { padding: 8px 8px 16px; gap: 8px; }
	html.cw-bshell .cw-toast { font-size: 9.5pt; max-width: 330px; }
	html.cw-bshell .cw-end-badge { font-size: 20px; padding: 6px 24px; }
	html.cw-bshell .cw-bpanel.battle-controls { padding: 6px 8px 12px; border-radius: 16px; }
	html.cw-bshell .cw-bbar .button { padding: 3px 9px; font-size: 11.5px; }
	html.cw-bshell .battle .messagebar { left: 110px; right: 110px; font-size: 11.5pt; }
}

/* ── 31-b) 교체 줄 압축 — 기술 화면의 교체 목록만 (2026-09-21 모바일 · 2026-09-22 PC 확대) ⚠️ ──────────
   왜: 세로 카드 3장이 조작부(377px)의 **47%**(「교체」 제목 33 + 카드 143)를 먹는다. 카드가 6장이 되는
   자리가 둘인데 — 2대2(내 3 + 동료 3) · 6대6(내 6) — 그때는 3×2 로 접혀 294px 이 되고 조작부가 511px 로
   부푼다. 껍데기 A 의 .cw-bshell 이 스크롤 상자라 잘리지는 않지만 교체 카드가 화면 밖으로 밀린다.
   압축하면 같은 6장이 3열 2줄 ≈ 114px 로 끝난다. 시안 비교는 아티팩트(2026-09-21 세션).

   ⚠️ **거는 자리는 「기술 화면에 곁들여진 교체 목록」뿐이다** (`:has(> .movecontrols)`).
   선봉 선택 · 기절 뒤 교체 전용 화면 · 대기 중 「내 팀」 · 종료 카드는 그 화면이 통째로 그 용도라
   자리가 남는다. 거기서 카드를 줄이면 2026-09-06 에 카드를 키운 이유(사용자 「아이콘이 작아 식별이
   어렵다」)를 그대로 되돌리는 꼴이 된다. :has() 를 못 쓰는 브라우저는 규칙이 통째로 죽어 현행
   세로 카드 그대로다 — 안전한 실패.

   ⚠️ ~~PC(.wide-controls)는 손대지 않는다~~ → **2026-09-22 에 PC 도 같이 눕혔다 (§31-c).**
   09-21 의 판단은 「PC 는 교체가 기술 **오른쪽 칸**이라 세로로 안 밀린다」였는데, 밀리지 않을 뿐
   **조작부 높이를 혼자 결정**하고 있었다. 실측(목업에 실 CSS 를 물려 잼): 기술 4칸은 2×2 라 150px 인데
   교체 세로 카드 6장은 3×2 로 **276px** 이라, 조작부가 372px 이 되고 1280×800 노트북에서는
   **팀 채팅 띠를 넣기 전에 이미 59px 이 화면 밖으로 밀려 있었다.** §31-c 가 그 276 을 130 대로 내린다.

   칸 구조: 그림만 absolute 로 왼쪽에 박고(그 폭만큼 padding-left), 이름·배지는 **평범한 블록 흐름**이다.
   이름은 `.cherish-tpname`(patch-switch-cards.py STEP D)이라야 말줄임이 걸린다 — 텍스트 노드로는 못 건다.

   ⚠️ **칸 안을 grid 로 짜면 안 된다** (2026-09-21 실측으로 두 번 엎었다). 배지가 두 개인 칸에서
   `grid-template-rows` 가 배지 줄 높이를 **폭이 정해지기 전에** min-content(한 줄)로 계산해 버려서,
   줄바꿈된 둘째 배지가 버튼의 `overflow: hidden` 에 잘렸다. flex-wrap 도 같은 이유로 안 된다.
   그림을 흐름에서 빼면 나머지가 일반 블록이라 높이가 정확히 잡힌다.

   ⚠️ **`.cherish-sw` 의 `height: auto` 가 핵심이다.** patch-effect-badge.py 의 CSS 가
   `.switchmenu button .cherish-sw { height: 13px }` 로 **한 줄 높이를 고정**해 둔다(세로 카드에서는
   배지가 늘 한 줄이라 그래도 됐다). 이 줄을 풀지 않으면 배지 두 개짜리 칸에서 둘째 배지가 통째로
   잘린다 — 화면에 붉은 조각만 남는다.

   배지 두 개(「피해 ×2」 + 「공격 ×0.5」)는 한 칸(≈106px) 폭에 같이 못 들어가서 두 줄로 흐른다.
   그 칸만 한 줄 높아지고 grid 라 같은 줄 전체가 따라 높아진다(실측 57 → 66px). 배지를 하나만
   남기는 안은 「피해」와 「공격」 중 뭘 버릴지가 판단마다 달라서 접었다.

   실측(모바일 조작부 내부 폭 344px 기준, 목업에 실 CSS 를 물려 잰 값):
   교체 영역 3장 176 → **57px** · 6장 327 → **129px** · 2대2 6장 → 114px. */
@media (max-width: 700px) {
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols h3.switchselect { display: none; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 0; text-align: left; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button { display: block; position: relative; width: auto; min-height: 47px; margin: 0; padding: 5px 7px 10px 44px; font-size: 10pt; line-height: 1.3; text-align: left; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-tpart { position: absolute; left: 7px; top: 5px; width: 32px; height: 32px; margin: 0; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-tpname { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-sw { display: block; height: auto; line-height: 15px; margin: 2px 0 0; white-space: normal; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-eff { display: inline-block; vertical-align: top; margin: 0 3px 1px 0; font-size: 7.5pt; padding: 0 3px; white-space: nowrap; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .hpbar { left: 7px; right: 7px; bottom: 4px; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .status { bottom: 3px; right: 7px; }
	/* 2대2 동료 칸 — 폭을 줄이던 8할 규칙(§10 (c))은 가로 칸에서 뜻이 없다(3열 고정). 3열이라 둘째 줄이
	   통째로 동료가 되므로 자리가 이미 말해 주고, 구분은 흐리기로만 준다. */
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) { width: auto; font-size: 10pt; padding: 5px 7px 10px 44px; opacity: .72; }
	html.cw-bshell .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) .cherish-tpart { width: 32px; height: 32px; }
}

/* ── 31-c) 교체 줄 압축 — PC (2026-09-22 사용자 결정) ⚠️ ─────────────────────────────────
   §31-b 와 **같은 자리·같은 모양**이고 폭만 다르다. 모바일에서 재던 이유가 PC 에도 그대로 있었다:
   조작부 높이를 결정하는 건 기술 칸이 아니라 **교체 칸**이다 (기술 2×2 = 150px · 교체 세로 3×2 = 276px).

   실측(1280×800 노트북, 방 높이 744px):
     · 지금:      필드 387 + 조작부 372 = **59px 넘침** (팀 채팅 이전부터 스크롤이었다)
     · 이 규칙 뒤: 교체 276 → 130 대 → 조작부 230 대 → **띠를 접어서 얹어도 남는다**

   ⚠️ **거는 자리는 §31-b 와 똑같이 `:has(> .movecontrols)` 뿐이다.** 선봉 선택 · 기절 뒤 교체 전용
   화면 · 대기 중 「내 팀」 · 종료 카드는 그 화면이 통째로 그 용도라 자리가 남으므로 큰 카드 그대로다
   (2026-09-06 「아이콘이 작아 식별이 어렵다」를 되돌리지 않는다).

   ⚠️ **폭을 `max-width` 가 아니라 `width` 로 못 박는다.** 바깥 격자의 오른쪽 트랙이 `auto` 라
   max-content 로 재는데, 칸 내용을 grid 로 바꾸면 이름이 짧은 판에서 트랙이 336 아래로 쪼그라들어
   3열이 좁아진다. 336 = 카드 108×3 + 간격 6×2 로 §31 의 기존 상한과 같은 값이다.

   ⚠️ 선택자에 `> .switchcontrols` 가 하나 더 붙어 §31 의 세로 카드 규칙(width 104 · 그림 94 ·
   동료 84)보다 **특정도가 높다.** 그 줄들을 지우면 안 된다 — 기술 화면 밖에서는 여전히 그쪽이 정본이다.

   ⚠️ `.cherish-sw { height: auto }` 는 여기서도 핵심이다 (§31-b 의 같은 주의 참고). */
@media (min-width: 701px) {
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols { width: 336px; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 0; text-align: left; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button { display: block; position: relative; width: auto; min-height: 47px; margin: 0; padding: 5px 7px 10px 44px; font-size: 10pt; line-height: 1.3; text-align: left; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-tpart { position: absolute; left: 7px; top: 5px; width: 32px; height: 32px; margin: 0; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-tpname { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-sw { display: block; height: auto; line-height: 15px; margin: 2px 0 0; white-space: normal; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .cherish-eff { display: inline-block; vertical-align: top; margin: 0 3px 1px 0; font-size: 7.5pt; padding: 0 3px; white-space: nowrap; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .hpbar { left: 7px; right: 7px; bottom: 4px; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-tp button .status { bottom: 3px; right: 7px; }
	/* 2대2 동료 칸 — 3열 고정이라 둘째 줄이 통째로 동료가 된다. 폭 8할 대신 흐리기로만 구분한다 (§31-b 와 같다). */
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) { width: auto; font-size: 10pt; padding: 5px 7px 10px 44px; opacity: .72; }
	html.cw-bshell .cw-bpanel.wide-controls .inline-controls:has(> .movecontrols) > .switchcontrols .switchmenu.cherish-swcards:not(.cherish-teamlist) button.disabled:not([data-cmd^="/"]) .cherish-tpart { width: 32px; height: 32px; }
}

/* ── 32) 칭호 고르기 (2026-09-07, patch-mon-detail.py) ───────────────────
   상세 패널 「칭호」 버튼으로 펼친다. 칩 = 장착 토글(켜진 칩을 다시 누르면 해제).
   마지막 줄은 배틀에 실제로 나갈 이름 미리보기 — 칭호가 안 붙는 경우(받은 아이·18자 초과)를
   그 자리에서 알려 준다. 자리표(§21)와 같은 상자 모양을 쓴다. */
.cw-epi { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--cw-tint); border: 1px solid var(--cw-line); }
.cw-epi-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cw-epi-head b { font-size: 12.5px; font-weight: 800; }
.cw-epi-head small { font-size: 11.5px; color: var(--cw-ink-muted); }
.cw-epi-empty { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--cw-ink-muted); }
.cw-epi-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-epi-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--cw-line); background: var(--cw-white, #fff); color: var(--cw-ink-soft); font: 700 11.5px/1.45 Pretendard, sans-serif; cursor: pointer; transition: background .12s, color .12s, box-shadow .12s; }
.cw-epi-chip:hover:not(:disabled) { border-color: var(--cw-line-strong); color: var(--cw-accent); }
.cw-epi-chip.on { color: var(--cw-on-accent); background: linear-gradient(160deg, #ff7c96, #d61a45); border-color: transparent; box-shadow: 0 4px 10px -6px rgba(190, 18, 60, .9), inset 0 1px 0 rgba(255, 255, 255, .4); }
.cw-epi-chip:disabled { opacity: .55; cursor: default; }
.cw-epi-prev { margin: 9px 0 0; padding-top: 8px; border-top: 1px dashed var(--cw-line); font-size: 11.5px; line-height: 1.6; color: var(--cw-ink-muted); }
.cw-epi-prev b { color: var(--cw-ink); font-weight: 800; }
.cw-epi-prev small { font-size: 11px; }

/* ── 33) 배틀 점수 알 수령제 + 종료 카드 히어로 (2026-09-07) ─────────────
   patch-battle-points.py(홈 카드) · patch-battle-shell.py(종료 카드). 그림은 install-ui-assets.py 6차 4장,
   없으면 전부 CSS 폴백으로 떨어진다(배경 그라데이션 · 썸네일 자리 빈 원판).

   수령제: 게이지를 채우면 알이 지갑에 쌓이고 유저가 눌러야 나온다. 그래서 이 카드는 상태가 셋이다 —
   평소 / **가득 참**(is-ready) / 받은 직후(is-got, 6초). 예전 PS.alert 알림은 폐지했다. */

/* 가득 참 — 카드가 통째로 한 톤 올라온다. 발광·금색은 안 쓴다(사용자 취향), 테두리와 바탕만으로 말한다. */
.cw-bp.is-ready { position: relative; background: linear-gradient(170deg, rgba(255, 236, 241, .95), rgba(255, 249, 244, .95)); border-color: var(--cw-line-strong); box-shadow: 0 10px 26px -18px rgba(190, 18, 60, .55); }
.cw-bp.is-ready .cw-bp-fill { animation: cw-bp-ready-sheen 2.4s ease-in-out infinite; }
.cw-bp-goal.is-ready { animation: cw-bp-near 1.2s ease-in-out infinite; }
.cw-bp-goal.is-ready b { color: var(--cw-on-accent); background: linear-gradient(160deg, #ff7c96, #d61a45); border-color: transparent; }
@keyframes cw-bp-ready-sheen { 0%, 100% { filter: none; } 50% { filter: brightness(1.08) saturate(1.1); } }

/* 수령 줄 / 받은 직후 줄 — 같은 뼈대(썸네일 · 글 · 버튼)라 자리가 안 흔들린다. */
.cw-bp-claim, .cw-bp-got { display: flex; align-items: center; gap: 11px; margin-top: 11px; padding: 10px 11px; border-radius: 14px; border: 1px solid var(--cw-line); background: var(--cw-white, #fff); }
.cw-bp-claim { border-color: var(--cw-line-strong); }
.cw-bp-claim-egg, .cw-bp-got-egg { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; background: var(--cw-tint) center / cover no-repeat; }
.cw-bp-claim-egg { background-image: url('/cherish/ui/bp-egg-ready.webp?v=1'); animation: cw-bp-egg-wobble 2.8s ease-in-out infinite; }
.cw-bp-got-egg { background-image: url('/cherish/ui/bp-egg-open.webp?v=1'); }
/* 체리만 받는 회차 -- 알 사진을 쓰면 「알을 받았다」로 읽힌다. 같은 크기 판에 체리를 그려 넣는다. */
.cw-bp-claim-egg.is-cherry, .cw-bp-got-egg.is-cherry { position: relative; background-image: none; background: var(--cw-tint); animation: none; }
.cw-bp-claim-egg.is-cherry::before, .cw-bp-got-egg.is-cherry::before { content: ''; position: absolute; left: 12px; bottom: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--cw-accent); }
.cw-bp-claim-egg.is-cherry::after, .cw-bp-got-egg.is-cherry::after { content: ''; position: absolute; left: 21px; top: 9px; width: 12px; height: 11px; border-top: 2.5px solid var(--cw-accent); border-right: 2.5px solid var(--cw-accent); border-top-right-radius: 12px; }
/* 베리만 받는 회차 (2026-09-09 · 2026-09-16 모양 교체) -- 같은 판에 열매 두 알. 색은 상점 베리와 같은 보라.
   사각별(별가루)이었던 것을 화폐 통합에 맞춰 갈았다 — 위 .cw-bp-goal-dust 주석 참조. */
.cw-bp-claim-egg.is-dust, .cw-bp-got-egg.is-dust { position: relative; background-image: none; background: #f7f5ff; animation: none; }
.cw-bp-claim-egg.is-dust::before, .cw-bp-got-egg.is-dust::before { content: ''; position: absolute; left: 8px; bottom: 9px; width: 21px; height: 21px; border-radius: 50%; background: #6d5bc9; }
.cw-bp-claim-egg.is-dust::after, .cw-bp-got-egg.is-dust::after { content: ''; position: absolute; right: 7px; top: 9px; width: 16px; height: 16px; border-radius: 50%; background: #a99af0; }
@keyframes cw-bp-egg-wobble { 0%, 82%, 100% { transform: rotate(0); } 87% { transform: rotate(-5deg); } 93% { transform: rotate(5deg); } }
.cw-bp-claim-text, .cw-bp-got-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-bp-claim-text b, .cw-bp-got-text b { font-size: 13px; font-weight: 800; color: var(--cw-ink); }
.cw-bp-claim-text small, .cw-bp-got-text small { font-size: 11.5px; line-height: 1.5; color: var(--cw-ink-muted); }
.cw-bp-claim-go.button { flex: 0 0 auto; padding: 9px 20px; border: 0; border-radius: 999px; color: var(--cw-on-accent); font: 800 13px/1.2 Pretendard, sans-serif; background: var(--cw-cta-grad); box-shadow: var(--cw-cta-shadow), var(--cw-cta-inset); cursor: pointer; }
.cw-bp-claim-go.button:hover:not(:disabled) { filter: brightness(1.05); }
.cw-bp-claim-go.button:disabled { opacity: .6; cursor: default; box-shadow: none; }
/* 받은 직후는 조용히 한 번 떠오른다 — 알림을 없앤 자리라 여기서 과하면 팝업과 다를 게 없다. */
.cw-bp-got { animation: cw-bp-got-in .5s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes cw-bp-got-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
html.cw-bnav .cw-bp-claim, html.cw-bnav .cw-bp-got { gap: 9px; padding: 9px; }
html.cw-bnav .cw-bp-claim-egg, html.cw-bnav .cw-bp-got-egg { width: 40px; height: 40px; }
html.cw-bnav .cw-bp-claim-go.button { padding: 8px 15px; font-size: 12px; }
html.cw-bnav .cw-bp-claim-text b, html.cw-bnav .cw-bp-got-text b { font-size: 12.5px; }
html.cw-bnav .cw-bp-claim-text small, html.cw-bnav .cw-bp-got-text small { font-size: 11px; }
@media (prefers-reduced-motion: reduce) {
	.cw-bp.is-ready .cw-bp-fill, .cw-bp-goal.is-ready, .cw-bp-claim-egg, .cw-bp-got { animation: none; }
}

/* 종료 카드 히어로 — 결과에 따라 배경 한 장. 예전엔 배지 하나만 색이 달라 카드 전체가 평평했다. */
html.cw-bshell .cw-end-hero { position: relative; margin: -2px -4px 12px; padding: 18px 16px 15px; border-radius: 18px; overflow: hidden; text-align: center; background: linear-gradient(165deg, #ffe6d8, #fff3ea); }
html.cw-bshell .cw-end.is-win .cw-end-hero { background: url('/cherish/ui/end-bg-win.webp?v=1') center / cover no-repeat, linear-gradient(165deg, #ffe6d8, #fff3ea); }
html.cw-bshell .cw-end.is-lose .cw-end-hero,
html.cw-bshell .cw-end.is-tie .cw-end-hero,
html.cw-bshell .cw-end.is-spec .cw-end-hero { background: url('/cherish/ui/end-bg-lose.webp?v=1') center / cover no-repeat, linear-gradient(165deg, #e9e6fb, #f4f2ff); }
html.cw-bshell .cw-end-hero > * { position: relative; z-index: 1; }
html.cw-bshell .cw-end-hero .cw-end-badge { animation: cw-end-badge-in .42s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes cw-end-badge-in { from { opacity: 0; transform: scale(.86) translateY(6px); } to { opacity: 1; transform: none; } }
/* 수치 타일은 하나씩 올라온다 — 한 번에 다 뜨면 무엇이 늘었는지 눈이 안 따라간다. */
html.cw-bshell .cw-end-stat { animation: cw-end-stat-in .38s ease-out both; }
html.cw-bshell .cw-end-stat:nth-child(1) { animation-delay: .10s; }
html.cw-bshell .cw-end-stat:nth-child(2) { animation-delay: .20s; }
html.cw-bshell .cw-end-stat:nth-child(3) { animation-delay: .30s; }
@keyframes cw-end-stat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* 알 칸은 「받을 알」이다 — 여기서 알이 나오지 않으므로 홈으로 보내는 줄을 붙인다. */
html.cw-bshell .cw-end-note.is-egg { margin-top: 6px; padding: 7px 12px; border-radius: 999px; display: inline-block; background: var(--cw-tint); border: 1px solid var(--cw-line-strong); color: var(--cw-ink-soft); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
	html.cw-bshell .cw-end-hero .cw-end-badge, html.cw-bshell .cw-end-stat { animation: none; }
}
html.cw-bnav .cw-end-hero { padding: 14px 12px 12px; border-radius: 14px; }

/* ── 34) 내 포켓몬 — 목록 왼쪽, 상세 오른쪽 (2026-09-21) ─────────────────────
   마크업 patch-mon-detail.py (renderCherishTeam 의 .cw-monpage / .cw-monlist, renderCherishMonDock).

   왜: 상세가 카드 그리드 **전체 아래**에 그려져, 79마리를 가진 사람이 맨 위 카드를 눌러도 79장을
   다 지나야 기술·자리표가 나왔다. 「곁에 두기」는 카드 순서만 바꾸므로 이걸 못 푼다. 폰은
   2026-09-05 에 §20 바텀 시트로 이미 풀었고, 여기는 **PC 몫**이다.

   ⚠️ **폭 제한부터 푼다.** 이 페이지의 pad 는 위 「홈 폭·카드」에서 **790px** 로 잘려 있어 모니터가
   2560 이어도 카드가 4열밖에 안 선다. 그대로 좌우로 나누면 목록이 2열이 되어 지금보다 나빠진다.
   그래서 **포켓몬 하위탭이 켜져 있을 때만**(:has) pad 를 넓히고, 상한 1600px 을 둔다 — 무제한이면
   카드가 여덟 열로 퍼져 눈이 가로로 너무 멀리 간다. 카드 한 칸의 실측 간격은 176px 이라,
   1600 에서 목록이 6열(79마리 = 14줄)이다 — 790 시절의 4열 20줄보다 짧다. 위의 하위탭 바·안내 카드는 790 으로 묶어 둬야
   알·도구 탭과 폭이 달라 보이지 않는다(.cw-subtab 이 flex: 1 이라 안 묶으면 버튼이 300px 로 늘어난다).
   :has() 를 못 쓰는 브라우저에서는 규칙이 통째로 죽어 지금 화면 그대로다 (안전한 실패).

   ⚠️ **sticky 의 기준은 스크롤 상자인 `.ps-room`** 이다 (client.css: top 56px, .scrollable 이 overflow: auto).
   그래서 상세의 키 상한이 calc(100vh - 76px) — 이보다 크게 잡으면 상세 아래쪽이 화면 밖으로 나가
   영영 못 본다(스크롤은 목록을 따라가므로 상세 안쪽으로는 못 내려간다).
   ⚠️ `align-items: flex-start` 도 필수다. 빠지면 상세가 목록 높이만큼 늘어나 sticky 가 움직일 자리를 잃는다. */
.ps-room .pad[style*="max-width:1100px"]:has(.cw-monpage) { max-width: min(1600px, 100%) !important; }
.ps-room .pad:has(.cw-monpage) > div > .cw-subtabs,
.ps-room .pad:has(.cw-monpage) > div > .cw-egg-promo,
.ps-room .pad:has(.cw-monpage) > div > .cw-card { max-width: 790px; margin-left: auto; margin-right: auto; }

.cw-monpage { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 14px; }
/* 머리글·안내문·정렬 줄은 두 칸 위를 가로지른다. 아래 두 규칙이 목록과 상세만 같은 줄에 앉힌다. */
.cw-monpage > * { flex: 0 0 100%; min-width: 0; }
.cw-monpage > .cw-monlist { flex: 1 1 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.cw-monpage > .cw-mondock {
	flex: 0 0 400px;
	position: sticky;
	top: 10px;
	max-height: calc(100vh - 76px);
	overflow: auto;
	overscroll-behavior: contain;
}
/* 400px 에서는 6칸이 한 줄에 안 들어간다 — 폰과 같은 3칸 두 줄로. */
.cw-mondock .cw-slots-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cw-mondock-hint {
	display: flex; flex-direction: column; gap: 4px;
	padding: 22px 16px;
	border: 1px dashed var(--cw-line-strong);
	border-radius: var(--cw-r-sm);
	background: var(--cw-tint);
	text-align: center;
}
.cw-mondock-hint b { font-size: 13px; font-weight: 800; color: var(--cw-ink-soft); }
.cw-mondock-hint small { font-size: 11.5px; color: var(--cw-ink-muted); line-height: 1.45; }

/* 좌우로 나눌 수 없는 폭 — 상세를 **화면 아래에 붙인다**(sticky bottom). 목록을 훑는 동안에도
   고른 아이가 계속 보인다. 안 골랐으면 자리를 아예 비운다(여기선 목록이 어차피 전폭이라
   자리를 예약해 둘 이유가 없다). */
@media (max-width: 1100px) {
	.cw-monpage > .cw-monlist, .cw-monpage > .cw-mondock { flex: 0 0 100%; }
	.cw-monpage > .cw-mondock { top: auto; bottom: 0; max-height: 58vh; }
	.cw-mondock:not(.is-open) { display: none; }
}
/* 폰은 §20 의 바텀 시트가 이긴다 — 독은 자리만 내주고 빠진다. 여기서 overflow 를 남겨 두면
   시트가 fixed 라도 스크롤 상자가 하나 더 생겨 손가락이 엉킨다. */
html.cw-bnav .cw-monpage { display: block; }
html.cw-bnav .cw-monpage > .cw-mondock { position: static; max-height: none; overflow: visible; }
