/* 핫타임 (patch-hot-time-ui.py, 2026-10-27) — 홈 띠 · 종료 카드 핫타임 띠 · 내 포켓몬 포인트 막대.
   마크업: 홈 = 이 패치 / 종료 카드 = patch-battle-learn-ui.py renderCherishLearnEnd / 카드 = patch-mon-detail.py.
   색은 주황~장미 「불꽃」 계열. 청록(새 기술·자람)과 섞이지 않게. */
:root {
	--cw-hot-a: #fb923c;
	--cw-hot-b: #f43f5e;
	--cw-hot-ink: #9a3412;
	--cw-hot-deep: #7c2d12;
	--cw-hot-tint: #fff7ed;
	--cw-hot-line: #fdba74;
}

/* ── 1) 배틀 홈 띠 ─────────────────────────────────────────────────── */
/* 아이콘 | 문구 | 남은 시간. 좁으면 남은 시간이 문구 아래로 — flex 로 두면 문구 칸이 한두 글자로 쪼그라든다 (10-27 시안 375px) */
.cw-hot {
	position: relative;
	display: grid !important; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
	padding: 12px 14px !important;
	border-radius: 18px !important;
	overflow: hidden;
	color: var(--cw-hot-deep);
	background: linear-gradient(120deg, #fff7ed 0%, #ffe4e6 100%) !important;
	border: 1px solid var(--cw-hot-line) !important;
	box-shadow: 0 14px 30px -20px rgba(244, 63, 94, .65), inset 0 1px 0 #fff !important;
}
/* 진행 중 — 위쪽으로 아지랑이처럼 번지는 빛이 천천히 흐른다 */
.cw-hot.is-live::after {
	content: '';
	/* 띠 전체를 덮어야 가장자리에 빛의 경계선이 안 생긴다 (10-27 시안: 위쪽만 덮었더니 가로줄이 보였다) */
	position: absolute; inset: 0;
	background: radial-gradient(55% 90% at 12% 115%, rgba(251, 146, 60, .30), transparent 70%), radial-gradient(45% 90% at 88% 115%, rgba(244, 63, 94, .22), transparent 70%);
	animation: cw-hot-haze 5s ease-in-out infinite alternate;
	pointer-events: none;
}
.cw-hot > * { position: relative; z-index: 1; }
.cw-hot.is-soon { background: linear-gradient(120deg, #fffaf5 0%, #fff1f2 100%) !important; border-style: dashed !important; }
.cw-hot-ic {
	flex: none;
	width: 46px; height: 46px; border-radius: 14px;
	display: flex; align-items: center; justify-content: center;
	color: #fff;
	background: linear-gradient(150deg, var(--cw-hot-a), var(--cw-hot-b));
	box-shadow: 0 8px 18px -8px rgba(244, 63, 94, .85), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.cw-hot.is-soon .cw-hot-ic { background: linear-gradient(150deg, #fdba74, #fda4af); box-shadow: none; }
.cw-hot.is-live .cw-hot-flame { animation: cw-hot-flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.cw-hot-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cw-hot-text b { font-size: 15px; font-weight: 900; letter-spacing: -.01em; color: var(--cw-hot-deep); }
.cw-hot-text > span { font-size: 12px; line-height: 1.45; color: var(--cw-hot-ink); }
.cw-hot-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cw-hot-chips i {
	font-style: normal; font-size: 10.5px; font-weight: 800;
	padding: 1px 8px; border-radius: 999px;
	color: var(--cw-hot-ink); background: rgba(255, 255, 255, .8); border: 1px solid var(--cw-hot-line);
}
.cw-hot-clock {
	flex: none;
	display: flex; flex-direction: column; align-items: center;
	min-width: 76px; padding: 6px 10px; border-radius: 14px;
	background: rgba(255, 255, 255, .85); border: 1px solid var(--cw-hot-line);
}
.cw-hot-clock small { font-size: 10.5px; font-weight: 700; color: var(--cw-hot-ink); }
.cw-hot-clock b { font-size: 16px; font-weight: 900; color: var(--cw-hot-b); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes cw-hot-haze { from { transform: translateX(-4%); opacity: .7; } to { transform: translateX(4%); opacity: 1; } }
@keyframes cw-hot-flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, .96) rotate(-2deg); } 60% { transform: scale(.97, 1.05) rotate(2deg); } }
@media (max-width: 520px) {
	.cw-hot { grid-template-columns: 46px minmax(0, 1fr); row-gap: 8px; }
	.cw-hot-ic { grid-row: span 2; align-self: start; }
	.cw-hot-clock { grid-column: 2; justify-self: start; flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; padding: 4px 12px; }
}

/* ── 1-a) 관전석 줄 (10-29) — 띠 안 맨 아래 한 줄을 통째로 쓴다. 두 칸 + 펼치는 고르기 목록 ── */
.cw-hw { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--cw-hot-line); display: grid; gap: 8px; }
.cw-hw-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; text-align: left; }
.cw-hw-head b { font-size: 13px; font-weight: 900; color: var(--cw-hot-deep); }
.cw-hw-head span { font-size: 11.5px; color: var(--cw-hot-ink); }
.cw-hw-slots { display: grid; grid-template-columns: minmax(0, 360px); }
.cw-hw-slot {
	display: flex; align-items: center; gap: 8px; min-width: 0;
	padding: 6px 10px 6px 6px; border-radius: 14px; cursor: pointer; text-align: left;
	font: inherit; color: var(--cw-hot-deep);
	background: rgba(255, 255, 255, .88); border: 1px solid var(--cw-hot-line);
	transition: transform .12s ease, box-shadow .12s ease;
}
.cw-hw-slot:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -12px rgba(244, 63, 94, .8); }
.cw-hw-slot.is-empty { border-style: dashed; background: rgba(255, 255, 255, .55); }
.cw-hw-slot.is-open { border-style: solid; box-shadow: 0 0 0 2px rgba(251, 146, 60, .35); }
.cw-hw-art { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--cw-hot-tint); overflow: hidden; }
.cw-hw-art img { width: 40px; height: 40px; object-fit: contain; image-rendering: auto; }
.cw-hw-plus { font-size: 20px; font-weight: 900; color: var(--cw-hot-b); background: #fff; border: 1px dashed var(--cw-hot-line); }
.cw-hw-txt { min-width: 0; display: flex; flex-direction: column; }
.cw-hw-txt b { font-size: 12.5px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-hw-txt small { font-size: 10.5px; font-weight: 700; color: var(--cw-hot-ink); }
/* 앉은 칸은 div — 안에 「바꾸기」(본문)와 「×」(내리기) 버튼 둘 (버튼 안에 버튼을 둘 수 없다) */
.cw-hw-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cw-hw-x {
	flex: none; margin-left: auto; padding: 2px 8px; border: 0; border-radius: 999px; background: none; cursor: pointer;
	font: inherit; font-size: 15px; font-weight: 900; line-height: 1; color: var(--cw-hot-ink); opacity: .55;
}
.cw-hw-x:hover { opacity: 1; color: var(--cw-hot-b); background: var(--cw-hot-tint); }
.cw-hw-pick {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px;
	max-height: 232px; overflow-y: auto; padding: 8px; border-radius: 14px;
	background: rgba(255, 255, 255, .7); border: 1px solid var(--cw-hot-line);
}
.cw-hw-cand {
	display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
	padding: 6px 4px; border-radius: 12px; cursor: pointer; font: inherit;
	background: #fff; border: 1px solid #fed7aa; color: var(--cw-hot-deep);
}
.cw-hw-cand:hover { border-color: var(--cw-hot-a); }
.cw-hw-cand.is-on { border: 2px solid var(--cw-hot-b); background: var(--cw-hot-tint); }
.cw-hw-name { max-width: 100%; font-size: 11px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-hw-none { grid-column: 1 / -1; margin: 4px 0; font-size: 12px; color: var(--cw-hot-ink); text-align: center; }
/* 핫타임 진행 중 — 자동매칭 CTA 에 불꽃 테두리. 띠와 매칭 바가 한 덩어리로 읽힌다 (CTA 마크업은 patch-ffa-client.py 소유라 CSS 만) */
body:has(.cw-hot.is-live) .cw-cta:not(.is-waiting) {
	box-shadow: 0 0 0 2px var(--cw-hot-a), 0 14px 30px -14px rgba(244, 63, 94, .75) !important;
}

/* ── 1-b) 배틀 홈 새내기 띠 — 핫타임 띠 골격 그대로, 색만 청록(자람). 진행 중 아지랑이·불꽃 흔들림은 없다 ── */
.cw-hot.cw-nb {
	background: linear-gradient(120deg, #f0fdfa 0%, #ecfeff 100%) !important;
	border-color: #99f6e4 !important;
	box-shadow: 0 14px 30px -20px rgba(13, 148, 136, .55), inset 0 1px 0 #fff !important;
	color: #134e4a;
}
.cw-nb .cw-hot-ic { background: linear-gradient(150deg, #2dd4bf, #38bdf8); box-shadow: 0 8px 18px -8px rgba(14, 165, 233, .8), inset 0 1px 0 rgba(255, 255, 255, .45); }
.cw-nb .cw-hot-text b { color: #134e4a; }
.cw-nb .cw-hot-text > span { color: #0f766e; }
.cw-nb .cw-hot-clock { border-color: #99f6e4; }
.cw-nb .cw-hot-clock small { color: #0f766e; }
.cw-nb .cw-hot-clock b { color: #0d9488; }

/* ── 2) 배틀 종료 카드 핫타임 띠 ───────────────────────────────────── */
.cw-end-hot {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
	margin: 10px auto 0; max-width: 460px;
	padding: 8px 12px; border-radius: 14px;
	background: linear-gradient(120deg, var(--cw-hot-tint), #fff1f2);
	border: 1px solid var(--cw-hot-line);
	color: var(--cw-hot-deep); font-size: 12px; font-weight: 700;
	animation: cw-learn-in .4s .15s ease-out both;
}
.cw-end-hot .cw-hot-tag {
	display: inline-flex; align-items: center; gap: 3px;
	padding: 2px 9px; border-radius: 999px;
	font-size: 11px; font-weight: 900; color: #fff;
	background: linear-gradient(135deg, var(--cw-hot-a), var(--cw-hot-b));
	box-shadow: 0 4px 10px -6px rgba(244, 63, 94, .9);
}
.cw-end-hot .cw-hot-pts { padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--cw-hot-line); color: var(--cw-hot-ink); font-weight: 800; }
/* 아이별 줄 (10-28) — 이름 | +오른 점수 | 막대 | 가진 점수 / 1. 6대6 이면 여섯 줄 */
.cw-hot-mons { flex-basis: 100%; display: grid; gap: 4px; margin-top: 2px; }
.cw-hot-mons-head { font-size: 10.5px; font-weight: 800; color: var(--cw-hot-ink); text-align: left; }
.cw-hot-mon {
	display: grid; grid-template-columns: minmax(0, 1fr) auto 64px auto; align-items: center; gap: 8px;
	padding: 4px 10px; border-radius: 10px;
	background: rgba(255, 255, 255, .78); border: 1px solid var(--cw-hot-line);
}
.cw-hot-mon b { font-weight: 800; color: var(--cw-hot-deep); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-hot-mon em { font-style: normal; font-weight: 900; color: var(--cw-hot-b); font-variant-numeric: tabular-nums; }
.cw-hot-mon-bar { height: 5px; border-radius: 999px; background: #ffe4e6; overflow: hidden; }
.cw-hot-mon-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cw-hot-a), var(--cw-hot-b)); }
.cw-hot-mon small { font-size: 11px; font-weight: 800; color: var(--cw-hot-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 관전석 (10-29) — 종료 카드 아이 줄 · 내 포켓몬 포인트 막대에 붙는 작은 알약 */
.cw-hot-watch {
	display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 999px; vertical-align: 1px;
	font-style: normal; font-size: 10px; font-weight: 800; line-height: 16px;
	color: var(--cw-hot-ink); background: #fff; border: 1px solid var(--cw-hot-line);
}

/* ── 3) 내 포켓몬 카드 — 핫타임 포인트 막대 (진행 중에만) ─────────── */
.cw-hot-bar { display: flex; align-items: center; gap: 4px; width: 84%; max-width: 120px; margin: 4px auto 0; font-size: 10px; font-weight: 800; color: var(--cw-hot-ink); }
.cw-hot-bar svg { flex: none; color: var(--cw-hot-b); }
.cw-hot-bar > span:first-of-type { flex: 1; height: 5px; border-radius: 999px; background: #ffe4e6; overflow: hidden; }
.cw-hot-bar > span:first-of-type > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--cw-hot-a), var(--cw-hot-b)); }
.cw-hot-bar > b { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
	.cw-hot.is-live::after, .cw-hot.is-live .cw-hot-flame, .cw-end-hot { animation: none; }
}
