/* cherish-lineup (patch-lineup.py) — 홈의 내 파티 줄 + 파티 구성 팝업. cherish-skin.css 의 토큰(--cw-*)과 자리 칸(.cw-slot)을 쓴다. */
.cw-lu-rowwrap { padding: 0; }
.cw-lu-row { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 9px 14px; border: 1px solid var(--cw-line, #f1c7d0); border-radius: var(--cw-r-sm, 12px); background: var(--cw-white, #fff); color: var(--cw-ink, #333); font: inherit; text-align: left; text-shadow: none; cursor: pointer; }
.cw-lu-row:hover { border-color: var(--cw-accent, #be123c); }
.cw-lu-row-label { flex: 0 0 auto; display: flex; flex-direction: column; gap: 1px; }
.cw-lu-row-label b { font-size: 10.5pt; }
.cw-lu-row-label small { font-size: 9pt; color: var(--cw-ink-muted, #a8637a); }
.cw-lu-row-mons { flex: 1 1 auto; display: flex; gap: 5px; min-width: 0; overflow: hidden; }
.cw-lu-pip { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--cw-tint, #fff3f5); border: 1px solid var(--cw-line, #f1c7d0); }
.cw-lu-pip.is-out2 { border-color: #d8ccf5; background: #f6f2fe; }
.cw-lu-pip.is-empty { background: transparent; border-style: dashed; }
.cw-lu-pip.is-rot { border-color: #b9d9ef; background: #eef6fc; }
.cw-lu-pip img { display: block; object-fit: contain; }
.cw-lu-row-go { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; background: var(--cw-accent, #be123c); color: #fff; font-size: 9.5pt; font-weight: 700; white-space: nowrap; }

.cw-lu-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); }
/* ⚠️ 「내 포켓몬」 탭에서는 팝업이 .menugroup(cw-monpage) **안**에서 그려진다. 스킨의 .menugroup 블러(backdrop-filter)가
   fixed 의 기준을 그 상자로 바꿔, 배경은 패널만 덮고 본체는 긴 패널 한가운데(화면 밖)로 갔다 (2026-11-25 실기 신고).
   팝업이 열린 동안만 그 상자의 블러를 끈다. 홈은 팝업이 상자 밖이라 해당 없음. */
.menugroup:has(.cw-lu-backdrop) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; transform: none !important; }
/* 배경은 토큰이 아니라 **불투명 고정색**이다 — 테마에 따라 --cw-white 가 반투명(.75)이라 뒤의 홈 화면이 글자 사이로 비친다. */
.cw-lu { display: flex; flex-direction: column; width: 100%; max-width: 860px; max-height: calc(100vh - 32px); box-sizing: border-box; padding: 16px 18px 14px; border-radius: var(--cw-r, 16px); background: #fffafb; color: var(--cw-ink, #333); box-shadow: 0 24px 48px -16px rgba(60, 8, 24, .5); text-align: left; }
html.cw-dark .cw-lu { background: #191330; }
.cw-lu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cw-lu-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.cw-lu-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--cw-tint, #fff3f5); color: var(--cw-ink, #333); font-size: 20px; line-height: 1; cursor: pointer; }
.cw-lu-lead { margin: 4px 0 10px; font-size: 12px; line-height: 1.5; color: var(--cw-ink-muted, #a8637a); word-break: keep-all; }
.cw-lu-slots { grid-template-columns: repeat(9, minmax(0, 1fr)); flex: 0 0 auto; }
.cw-lu-slots .cw-slot.is-dead { opacity: .4; cursor: default; }
.cw-lu-slots .cw-slot:disabled { cursor: default; }
/* 안내 줄과 고른 아이 상자는 **같은 최소 높이**다 — 카드를 누르는 순간 이 상자가 커지면 아래 목록이 통째로 밀려
   다음 클릭이 엉뚱한 카드에 떨어진다 (2026-10-03 상자 높이 변화 사고와 같은 꼴). */
.cw-lu-hint { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 150px; box-sizing: border-box; margin: 10px 0 0; padding: 9px 12px; border-radius: var(--cw-r-sm, 12px); background: var(--cw-tint, #fff3f5); border: 1px dashed var(--cw-line, #f1c7d0); font-size: 12px; color: var(--cw-ink-soft, #7a4a58); text-align: center; }
.cw-lu-focus { flex: 0 0 auto; display: flex; gap: 12px; min-height: 150px; box-sizing: border-box; margin-top: 10px; padding: 10px 12px; border-radius: var(--cw-r-sm, 12px); border: 1px solid var(--cw-accent, #be123c); background: var(--cw-tint, #fff3f5); }
.cw-lu-focus-art { flex: 0 0 auto; }
.cw-lu-focus-art img { display: block; object-fit: contain; }
.cw-lu-focus-body { flex: 1 1 auto; min-width: 0; }
.cw-lu-focus-name { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.cw-lu-focus-name b { font-size: 11pt; }
.cw-lu-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.cw-lu-chip { padding: 2px 9px; border-radius: 999px; background: var(--cw-white, #fff); border: 1px solid var(--cw-line, #f1c7d0); font-size: 11px; line-height: 17px; color: var(--cw-ink-soft, #7a4a58); }
.cw-lu-chip.is-today { background: #fff8e1; border-color: #f2c94c; color: #8a6d1f; }
/* 로테이션 두 갈래 딱지 — 파랑 = 강한 종(top), 분홍 = 체리쉬 강화(boost). 홈 띠(cherish-rotation.css)와 같은 색 */
.cw-lu-kind { flex: 0 0 auto; padding: 0 7px; border-radius: 999px; border: 1px solid; font-style: normal; font-size: 9.5px; font-weight: 700; line-height: 15px; white-space: nowrap; }
.cw-lu-kind.is-top { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.cw-lu-kind.is-boost { background: #fde8ee; border-color: #f9c2d0; color: #be123c; }
.cw-lu-chips .cw-lu-kind { font-size: 11px; line-height: 17px; padding: 2px 9px; }
.cw-lu-kind-desc { margin: 5px 0 0; font-size: 11.5px; line-height: 1.4; color: var(--cw-ink-soft, #7a4a58); word-break: keep-all; }
.cw-lu-chip.is-away { background: #f4f4f5; border-color: #e4e4e7; color: #52525b; }
.cw-lu-moves { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; }
.cw-lu-move { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cw-lu-focus-act { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cw-lu-focus-act small { flex: 1 1 auto; font-size: 11.5px; color: var(--cw-ink-muted, #a8637a); word-break: keep-all; }
.cw-lu-focus-act .button { flex: 0 0 auto; white-space: nowrap; }
.cw-lu-body { flex: 1 1 auto; min-height: 120px; margin-top: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cw-lu-sec + .cw-lu-sec { margin-top: 12px; }
.cw-lu-sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.cw-lu-sec-head b { font-size: 10.5pt; }
.cw-lu-sec-head small { font-size: 11px; color: var(--cw-ink-muted, #a8637a); word-break: keep-all; }
/* 로테이션 접기 (2026-11-24) — 제목 줄 오른쪽 끝. 접히면 제목 한 줄만 남는다 */
.cw-lu-fold { margin-left: auto; padding: 2px 10px; border: 1px solid var(--cw-line, #f1c7d0); border-radius: 999px; background: var(--cw-white, #fff); color: var(--cw-ink-soft, #7a4a58); font: inherit; font-size: 11px; font-weight: 700; line-height: 18px; text-shadow: none; cursor: pointer; white-space: nowrap; }
.cw-lu-fold:hover { border-color: var(--cw-accent, #be123c); color: var(--cw-accent, #be123c); }
.cw-lu-sec.is-folded .cw-lu-sec-head { margin-bottom: 0; }
/* 「내 포켓몬」 탭 맨 위의 내 파티 줄 (patch-mon-detail.py 20번) — 정렬 줄과 띄운다 */
.cw-lu-rowwrap.is-tab { margin: 0 0 8px; }
.cw-lu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.cw-lu-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 14px 4px 6px; border: 1px solid var(--cw-line, #f1c7d0); border-radius: 12px; background: var(--cw-white, #fff); color: var(--cw-ink, #333); font: inherit; text-shadow: none; cursor: pointer; }
.cw-lu-tile img { display: block; object-fit: contain; }
.cw-lu-tile b { max-width: 100%; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-lu-tile small { font-size: 10px; color: var(--cw-ink-muted, #a8637a); }
.cw-lu-tile.is-in { background: var(--cw-tint, #fff3f5); }
.cw-lu-tile.is-on { border-color: var(--cw-accent, #be123c); box-shadow: 0 0 0 1px var(--cw-accent, #be123c); }
.cw-lu-tile.is-today { border-color: #f2c94c; }
.cw-lu-tile.is-away img { opacity: .5; }
.cw-lu-tile.is-locked { cursor: default; background: #f4f4f5; border-color: #e4e4e7; }
.cw-lu-tile.is-locked img { filter: grayscale(1); opacity: .45; }
.cw-lu-badge { position: absolute; top: 3px; left: 4px; padding: 0 6px; border-radius: 999px; font-size: 9.5px; font-weight: 800; line-height: 15px; background: var(--cw-accent, #be123c); color: #fff; }
.cw-lu-badge.is-out2 { background: #7c3aed; }
.cw-lu-badge.is-sub { background: #71717a; }
.cw-lu-star { position: absolute; top: 2px; right: 4px; font-size: 11px; line-height: 1; }
.cw-lu-empty { margin: 0; padding: 12px; border-radius: 12px; background: var(--cw-tint, #fff3f5); font-size: 12px; color: var(--cw-ink-soft, #7a4a58); }
@media (max-width: 700px) {
	.cw-lu-backdrop { padding: 0; align-items: flex-end; }
	.cw-lu { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; padding: 14px 12px 12px; }
	.cw-lu-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
	.cw-lu-slots .cw-slot { flex-direction: row; justify-content: flex-start; gap: 5px; padding: 3px 5px; }
	.cw-lu-slots .cw-slot img, .cw-lu-slots .cw-slot i { width: 26px; height: 26px; }
	.cw-lu-slots .cw-slot i { font-size: 0; }
	.cw-lu-slots .cw-slot b { display: none; }
	/* 폰에서는 고른 아이 상자를 **맨 아래**로 내린다 (order). 위에 두면 상자가 생길 때 목록이 손가락 밑에서 밀린다 —
	   아래에 두면 목록은 제자리고 아랫단만 줄어든다. 안내 줄은 자리가 좁아 숨긴다. */
	.cw-lu-hint { display: none; }
	.cw-lu-focus { order: 9; min-height: 0; margin-top: 8px; padding: 8px 10px; gap: 8px; }
	.cw-lu-focus-art img { width: 44px; height: 44px; }
	.cw-lu-chip { font-size: 10.5px; padding: 1px 7px; }
	.cw-lu-moves { font-size: 11.5px; gap: 3px 8px; }
	.cw-lu-focus-act { margin-top: 6px; }
	.cw-lu-focus-act small { font-size: 11px; }
	.cw-lu-lead { margin-bottom: 8px; font-size: 11.5px; }
	.cw-lu-row { gap: 8px; padding: 8px 10px; }
	.cw-lu-pip { width: 32px; height: 32px; }
	.cw-lu-pip img { width: 28px; height: 28px; }
	.cw-lu-row-label small { display: none; }
}
