﻿/* 프론트 스도쿠 스타일 — 프론트(View 등)에서만 로드.
   관리자 스타일은 css/tadm/interest/sudoku.css 로 분리됨. */

.sudoku-box { position: relative; padding:0; }
.sudoku-box canvas { position: absolute; left: 0; top: 0; }
/* 다크 프레임 위에서 밝은 격자가 완전히 묻히지 않도록 은은한 네이비 링 + 소프트 섀도(레이아웃 영향 없음) */
.sudoku-box .sudoku-board { position: relative; box-shadow: 0 0 0 1px #2c3c7e, 0 14px 36px -16px #000c; }

/* ── 힌트 계산 중 진행 표시(스피너) — 보드 위 오버레이 ─────────────────────────
   힌트 풀이(기법 탐색)는 메인 스레드를 잠깐 점유하므로 계산 동안 보드 위에 반투명
   오버레이 + 스피너를 띄우고 입력을 잠근다(.is-busy 는 sudoku.js onBusy 가 토글).
   transform 애니메이션은 컴포지터에서 돌아가 계산으로 메인 스레드가 멈춰도 계속 회전한다. */
.sudoku-busy {
	position: absolute; inset: 0; z-index: 5;
	display: none;
	flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	background: rgba(5, 7, 15, .55);
	-webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
	cursor: progress;
	opacity: 0;						/* 기본 투명 — 1초 지연 후 페이드 인(아래 애니메이션) */
	will-change: opacity;
}
.sudoku-box.is-busy { cursor: progress; }
/* 힌트 계산이 1초를 넘길 때만 스피너가 보이도록 1초 지연 후 페이드 인한다.
   opacity 애니메이션은 컴포지터에서 진행되므로 solve() 로 메인 스레드가 멈춰도
   1초 시점에 스스로 나타난다. 1초 안에 끝나면 is-busy 가 해제되어 나타나지 않는다.
   (입력 잠금은 is-busy 즉시부터 계산 끝까지 유지 — 아래 pointer-events + 모델 가드) */
.sudoku-box.is-busy .sudoku-busy { display: flex; animation: sk-busy-in .2s linear 1s forwards; }
.sudoku-box.is-busy canvas { pointer-events: none; }			/* 보드/뷰패드 클릭 차단 */
.sudoku-pad.is-busy .sudoku-keypad { pointer-events: none; }	/* 키패드 클릭 차단 */

.sk-spinner {
	width: 46px; height: 46px;
	border: 4px solid rgba(245, 197, 66, .25);
	border-top-color: #f5c542;
	border-radius: 50%;
	animation: sk-spin .8s linear infinite;
}
.sk-busy-text {
	font-family: 'Press Start 2P', monospace; font-size: 11px;
	color: #f5c542; letter-spacing: .5px; text-shadow: 0 2px 0 #070b1f;
}
@keyframes sk-spin { to { transform: rotate(360deg); } }
@keyframes sk-busy-in { to { opacity: 1; } }

/* 패드(키패드+메시지)는 게임박스(다크)가 비치도록 투명 처리 */
.sudoku-pad { background-color: transparent; width: 340px; height:478px; margin-left:10px;}
.flex { display:flex;}

.sudoku-keypad { width: 100%; height: 200px; }

/* 풀이 메시지 칸 — 2B 다크 테마(딥네이비 '스크린'). 키패드 다크 버튼과 통일. */
.sudoku-message {
	width: 340px; height: 272px;
	overflow-y: auto;
	padding: 10px 12px;
	border: 1px solid #23306a;
	border-radius: 8px;
	background: #0a0e1f;
	color: #c3cdec;
	font-size: 13px;
	line-height: 1.65;
	scrollbar-width: thin;
	scrollbar-color: #2c3c7e #0a0e1f;
}
.sudoku-message span { display: block; }
.sudoku-message::-webkit-scrollbar { width: 8px; }
.sudoku-message::-webkit-scrollbar-track { background: #0a0e1f; }
.sudoku-message::-webkit-scrollbar-thumb { background: #2c3c7e; border-radius: 4px; }
.sudoku-message::-webkit-scrollbar-thumb:hover { background: #3a4a8e; }

/* 강조 색상 — 다크 배경에서 가독성 있게 재조정(보드 하이라이트 색과 의미 대응).
   .sudoku-message 로 스코프해 페이지의 다른 요소와 충돌을 막는다. */
.sudoku-message .red { color: #ff7272; }	/* 제거 후보 · 모순(보드 빨강) */
.sudoku-message .blue { color: #6aa8ff; }	/* 하우스 참조 R/C/B */
.sudoku-message .green { color: #8fd14f; }	/* 기법 · 라벨 · 완료 */
.sudoku-message .orange { color: #ff9e4d; }	/* 셀 참조 RnCn */
.sudoku-message .navy { color: #f5c542; }	/* 기법명 · 안내 헤더(골드 강조) */
.sudoku-message .cyan { color: #4fd8e8; }	/* 강한 링크 후보(보드 시안) */

@media (max-width:990px) { .sudoku-pad { margin-left: 0; width: 100%; max-width: 478px; height: auto; }
	.flex { flex-direction: column; align-items: center }
	.sudoku-message { width: 100%; }

}

/* ══════════════════════════════════════════════════════
   스도쿠 목록(Index) — 리뉴얼 2B 시안(8-bit 딥네이비·골드 다크 테마)
   디자인 목업(Sudoku-List) 기반, _Layout + 사이트 공용 서브 내비(_NavigationPartial) 사용
   ══════════════════════════════════════════════════════ */

/* body 다크 배경/선택색은 공용 _DarkLayout(css/dark.css)로 통합됨
   (스도쿠 Index·View 모두 _DarkLayout 사용) */

/* 픽셀 배너 */
.sk-banner { position: relative; height: 132px; background: linear-gradient(180deg, #1a2a6e 0%, #10193f 68%, #0a1028 100%); overflow: hidden; border-bottom: 1px solid #23306a; }
.sk-banner-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(245,197,66,0.16) 1.5px, transparent 1.5px); background-size: 26px 26px; }
.sk-banner-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.10) 2px 4px); }
.sk-banner-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.sk-banner-title { font-family: 'Press Start 2P', monospace; font-size: 26px; color: #f5c542; text-shadow: 0 3px 0 #070b1f; }
.sk-banner-sub { font-size: 14px; color: #a9b6df; }

/* 서브 내비(.sub-nav)는 사이트 공용 파티셜(_NavigationPartial) + site.css 사용
   난이도 탭도 서브메뉴(_NavigationPartial)로 노출된다. */

/* 콘텐츠 */
.sk-wrap { max-width: 1200px; margin: 0 auto; min-height: 560px; color: #e8ecf7; font-family: 'Pretendard', system-ui, sans-serif; }
.sk-wrap-inner { padding: 30px 32px 60px; }

.sk-list-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.sk-list-title { font-family: 'Press Start 2P', monospace; font-size: 18px; color: #e8ecf7; }
.sk-list-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.sk-list-total { margin-left: auto; font-size: 13px; font-family: monospace; color: #6f7ea8; }

/* 난이도별 색상 — 레벨 배지·목록 셀 공용 */
.sk-lv-easy      { color: #b0d840; }
.sk-lv-moderate  { color: #4fc3f7; }
.sk-lv-hard      { color: #ffa94d; }
.sk-lv-fiendish  { color: #ff7272; }
.sk-bg-easy      { background: rgba(176,216,64,0.16); color: #b0d840; }
.sk-bg-moderate  { background: rgba(79,195,247,0.16); color: #4fc3f7; }
.sk-bg-hard      { background: rgba(255,169,77,0.16); color: #ffa94d; }
.sk-bg-fiendish  { background: rgba(255,114,114,0.16); color: #ff7272; }

/* 목록 (table → 반응형 div 리스트) */
.sk-list { border-top: 2px solid #2c3c7e; }
.sk-head, .sk-row {
	display: grid;
	grid-template-columns: 56px 88px minmax(0, 1fr) 74px 150px 64px;
	align-items: center;
	gap: 12px;
	padding: 13px 12px;
}
/* 로그인 시 '풀이' 열 추가(랭크 앞) */
.sk-list.with-solved .sk-head,
.sk-list.with-solved .sk-row {
	grid-template-columns: 56px 88px minmax(0, 1fr) 74px 150px 64px 64px;
}
.sk-head { background: #0c1230; border-bottom: 1px solid #23306a; font-size: 13px; font-weight: 700; color: #8da0d6; white-space: nowrap; }
.sk-row { border-bottom: 1px solid #1b2a4e; font-size: 13px; padding: 15px 12px; transition: background .12s; }
.sk-row:hover { background: #0c1230; }

.c-id { font-family: 'Press Start 2P', monospace; font-size: 12px; color: #c3cdec; }
.sk-head .c-id { font-family: inherit; font-size: 13px; color: #8da0d6; }
.c-level { font-weight: 600; }
.c-title { min-width: 0; }
.c-title a { text-decoration: none; font-size: 15px; color: #e8ecf7; border-bottom: 1px solid #2c3c7e; padding-bottom: 1px; overflow-wrap: anywhere; }
.c-title a:hover { color: #f5c542; border-bottom-color: #f5c542; }
.c-views { text-align: right; font-size: 14px; font-family: monospace; color: #8da0d6; }
.sk-head .c-views { font-size: 13px; }
.c-date { padding-left: 24px; font-size: 13px; font-family: monospace; color: #8da0d6; }
.c-solved { text-align: center; }
.c-rank { text-align: center; }
.sk-head .c-rank { text-align: center; }
/* 랭크 링크 — 골드 아웃라인 칩 */
.c-rank .sk-rank-link {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 4px 12px; border: 1px solid #2c3c7e; border-radius: 999px;
	font-size: 12px; font-weight: 700; color: #c3cdec; text-decoration: none;
	transition: border-color .15s, color .15s, background .15s;
}
.c-rank .sk-rank-link:hover { border-color: #f5c542; color: #f5c542; background: rgba(245,197,66,.08); }

.sk-solved { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 16px; font-weight: 800; line-height: 1; color: #f5c542; }
.sk-unsolved { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 15px; font-weight: 800; line-height: 1; color: #ff7272; }

.sk-empty { padding: 60px 12px; text-align: center; font-size: 14px; color: #6f7ea8; }

/* 모바일: 각 행을 카드형으로 리플로우(제목 위 · 메타 아래) */
@media (max-width: 768px) {
	.sk-head { display: none; }
	.sk-row, .sk-list.with-solved .sk-row {
		display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 2px;
	}
	.sk-row > span { font-size: 12px; }
	/* 제목: 첫 줄 전체 폭 */
	.c-title { order: 1; flex: 1 0 100%; }
	.c-title a { font-size: 15px; border-bottom: 0; }
	/* 메타 줄(난이도 · #번호 · 조회 · 등록일 · 풀이) */
	.c-level { order: 2; font-weight: 600; }
	.c-id { order: 3; font-family: monospace; font-size: 11px; color: #6f7ea8; }
	.c-id::before { content: "#"; }
	.c-views { order: 4; text-align: left; font-family: monospace; color: #8da0d6; }
	.c-views::before { content: "조회 "; font-family: 'Pretendard', system-ui, sans-serif; color: #6f7ea8; }
	.c-date { order: 5; padding-left: 0; font-family: monospace; color: #8da0d6; }
	.c-solved { order: 6; margin-left: auto; }
	/* 랭크: 로그인(풀이 있음)은 풀이 뒤, 비로그인은 우측으로 밀어 배치 */
	.c-rank { order: 7; }
	.sk-list:not(.with-solved) .c-rank { margin-left: auto; }
}

/* 게임 화면(상세 View) — 게임판을 감싸는 프레임(2B 다크 테마 카드). 격자(셀)는 캔버스에서 밝게 유지. */
/* 게임 박스와 하단 액션을 같은 폭(=게임판 폭)으로 묶어, 버튼 우측 끝을 보드 우측 끝과 일치시킨다 */
.sk-gamewrap { display: inline-block; max-width: 100%; }
/* 테두리는 border 대신 box-shadow 링으로 — 보드 폭 계산(clientWidth)에 영향 없이 프레임 표시 */
.sk-gamebox { display: block; background: #111938; color: #e8ecf7; padding: 22px; border-radius: 18px; box-shadow: 0 0 0 1px #23306a, 0 24px 60px -28px #000c; }

/* 진행시간/힌트 횟수 바 — 보드 상단(2B 다크 테마). 진행시간은 골드 강조·픽셀 폰트. */
.sk-timer {
	display: flex; align-items: center; gap: 14px;
	margin-bottom: 14px; padding: 8px 12px;
	border: 1px solid #23306a; border-radius: 10px;
	background: #0a0e1f;
	font-family: monospace; font-size: 13px; color: #8da0d6;
}
.sk-timer-time {
	font-family: 'Press Start 2P', monospace; font-size: 15px; color: #f5c542;
	letter-spacing: 1px; text-shadow: 0 2px 0 #070b1f;
}
.sk-timer-time::before { content: "⏱ "; -webkit-text-fill-color: initial; }
.sk-timer-hints { margin-left: auto; color: #c3cdec; }
.sk-timer-hints span { color: #ff9e4d; font-weight: 700; }

/* 게임 화면 하단 — 목록으로 돌아가는 취소 버튼(래퍼 우측 = 보드 우측 끝) */
.sk-actions { margin-top: 24px; text-align: right; }
.sk-cancel { display: inline-flex; align-items: center; text-decoration: none; padding: 13px 26px; border: 1px solid #2c3c7e; border-radius: 10px; background: transparent; color: #c3cdec; font-size: 15px; font-weight: 700; cursor: pointer; transition: border-color .15s, color .15s; }
.sk-cancel:hover { border-color: #f5c542; color: #f5c542; }

/* 게임(View) 화면 전용(목록 페이지엔 .sk-gamebox 가 없음 → :has 로 스코프).
   모바일에서만 상단 배너·공용 푸터를 숨기고 하단 여백을 취소 버튼까지만 남긴다.
   ※ PC 에서는 배너·푸터를 그대로 유지한다. */
@media (max-width: 768px) {
	body:has(.sk-gamebox) .sk-banner { display: none; }
	body:has(.sk-gamebox) .site-footer { display: none; }
	body:has(.sk-gamebox) .sk-wrap { min-height: 0; }
	body:has(.sk-gamebox) .sk-wrap-inner { padding-bottom: 12px; }
}

/* 모바일 */
@media (max-width: 768px) {
	/* 목록 등 일반 화면: 좌우에 약간의 여백을 준다 */
	.sk-wrap-inner { padding: 16px 14px 40px; }
	/* 게임(View) 화면만: 흰 배경을 좌우 0으로 화면 폭 100% 꽉 채움(상단 5px 은 흰 배경 패딩) */
	body:has(.sk-gamebox) .sk-wrap-inner { padding: 0 0 12px; }
	/* 게임박스(다크)는 화면 폭을 꽉 채우되(패딩 0), 상단 제목은 서브내비와 간격·좌우 여백을 준다 */
	body:has(.sk-gamebox) .sk-list-head { margin: 14px 0 12px; padding: 0 14px; }
	.sk-gamewrap { display: block; max-width: none; }
	.sk-gamebox { background: #111938; width: 100%; padding: 5px 0 0; border-radius: 0; border: 0; }
	/* 하단 취소 버튼: 보드와의 상단 여백 축소(24px→8px), 좌우는 가장자리에 안 붙게 최소 여백 */
	.sk-actions { margin-top: 8px; padding: 0 5px; }
}

/* 페이지네이션은 사이트 공용 .pager(site.css) 사용 */

/* ══════════════════════════════════════════════════════
   풀이법 설정 레이어(상세 View) — 기법 사용여부 토글 + 드래그로 적용순서 변경
   제목(.sk-list-head) 우측 톱니 버튼으로 열고, 저장 시 localStorage에 유지.
   ══════════════════════════════════════════════════════ */

/* 제목 우측 톱니 버튼 (.sk-list-head 는 flex → margin-left:auto 로 우측 정렬) */
.sk-settings-btn {
	margin-left: auto;
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; padding: 0;
	border: 1px solid #2c3c7e; border-radius: 9px;
	background: #111938; color: #c3cdec;
	cursor: pointer; transition: color .15s, border-color .15s, transform .12s;
}
.sk-settings-btn:hover { color: #f5c542; border-color: #f5c542; }
.sk-settings-btn:active { transform: scale(.94); }
.sk-settings-btn svg { display: block; }
/* 힌트 계산 중에는 설정 열기를 잠근다(sudoku.js onBusy 가 disabled 토글) */
.sk-settings-btn:disabled { opacity: .45; cursor: progress; color: #8da0d6; border-color: #2c3c7e; }

/* 오버레이(레이어) — 기본 숨김. 표시/숨김/페이드는 Helper.fadeIn/fadeOut
   (display block/none + opacity 애니메이션)로 제어하므로 여기선 display:none 만 둔다. */
.sk-settings {
	position: fixed; inset: 0; z-index: 1000;
	display: none;
	background: rgba(3, 6, 16, .72);
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}

/* 패널 — fadeIn 이 오버레이를 display:block 으로 바꾸므로, flex 중앙정렬 대신
   absolute 로 화면 중앙에 고정한다(오버레이 display 종류와 무관). */
.sk-settings-panel {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	display: flex; flex-direction: column;
	width: calc(100% - 40px); max-width: 460px; max-height: 86vh;
	background: #0d1430; border: 1px solid #23306a; border-radius: 14px;
	box-shadow: 0 24px 60px -18px #000e;
	color: #e8ecf7;
}

.sk-settings-head {
	display: flex; align-items: center; gap: 10px;
	padding: 15px 18px; border-bottom: 1px solid #1b264f;
}
.sk-settings-title { font-family: 'Press Start 2P', monospace; font-size: 13px; color: #f5c542; letter-spacing: .5px; }
.sk-settings-x {
	margin-left: auto; width: 30px; height: 30px; line-height: 1;
	border: 1px solid transparent; border-radius: 8px;
	background: transparent; color: #8da0d6; font-size: 22px; cursor: pointer;
	transition: color .15s, border-color .15s;
}
.sk-settings-x:hover { color: #ff7272; border-color: #3a2036; }

.sk-settings-desc { margin: 0; padding: 12px 18px; font-size: 12.5px; line-height: 1.6; color: #8da0d6; }
.sk-settings-desc b { color: #c3cdec; }

/* 기법 목록 */
.sk-settings-list {
	flex: 1; overflow-y: auto; padding: 2px 12px 12px;
	overscroll-behavior: contain;
	scrollbar-width: thin; scrollbar-color: #2c3c7e #0a0e1f;
}
.sk-settings-list::-webkit-scrollbar { width: 8px; }
.sk-settings-list::-webkit-scrollbar-track { background: #0a0e1f; }
.sk-settings-list::-webkit-scrollbar-thumb { background: #2c3c7e; border-radius: 4px; }

.sk-set-row {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 10px; margin: 6px 0;
	border: 1px solid #1e2a56; border-radius: 9px;
	background: #111938;
	font-size: 13.5px; color: #e8ecf7;
	transition: border-color .15s, background .15s, opacity .15s, box-shadow .15s;
}
.sk-set-row.off { opacity: .55; background: #0c1330; }
.sk-set-row.off .sk-set-name { text-decoration: line-through; color: #8da0d6; }
/* SortableJS: 집은 항목(chosenClass) / 드롭 위치 placeholder(ghostClass) */
.sk-set-row.sk-set-chosen { border-color: #f5c542; background: #17204a; box-shadow: 0 8px 20px -8px #000c; }
.sk-set-row.sk-set-ghost { opacity: .4; }

.sk-set-grip {
	display: inline-flex; align-items: center; color: #6377b8;
	cursor: grab; touch-action: none;		/* 터치 드래그 시 스크롤 방지 */
}
.sk-set-grip:active { cursor: grabbing; }
.sk-set-row.sk-set-chosen .sk-set-grip { color: #f5c542; }

.sk-set-name { flex: 1; font-family: 'Pretendard', system-ui, sans-serif; }

/* 커스텀 스위치(사용여부) — 상태는 행 .off 클래스로 구동 */
.sk-set-switch {
	position: relative; flex: 0 0 auto;
	width: 40px; height: 22px; border-radius: 999px;
	background: #2a3564; cursor: pointer; transition: background .15s;
}
.sk-set-switch::after {
	content: ""; position: absolute; top: 2px; left: 2px;
	width: 18px; height: 18px; border-radius: 50%;
	background: #8da0d6; transition: transform .15s, background .15s;
}
.sk-set-row:not(.off) .sk-set-switch { background: #f5c542; }
.sk-set-row:not(.off) .sk-set-switch::after { transform: translateX(18px); background: #0a0e1f; }

/* 하단 버튼 */
.sk-settings-foot {
	display: flex; align-items: center; gap: 10px;
	padding: 14px 18px; border-top: 1px solid #1b264f;
}
.sk-set-foot-right { margin-left: auto; display: flex; gap: 10px; }
.sk-set-btn {
	padding: 9px 16px; border: 1px solid #2c3c7e; border-radius: 9px;
	background: transparent; color: #c3cdec; font-size: 13px; font-weight: 700;
	cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.sk-set-btn:hover { border-color: #f5c542; color: #f5c542; }
.sk-set-btn.ghost { color: #8da0d6; }
.sk-set-btn.primary { background: #f5c542; border-color: #f5c542; color: #0a0e1f; }
.sk-set-btn.primary:hover { background: #ffd85a; color: #0a0e1f; }

/* 모바일: 레이어를 전체화면으로 */
@media (max-width: 560px) {
	.sk-settings-panel {
		top: 0; left: 0; transform: none;
		width: 100%; max-width: none; height: 100%; max-height: 100%;
		border-radius: 0;
	}
}

/* ══════════════════════════════════════════════════════
   게임별 랭킹 레이어(TOP 10) — 목록의 "랭크" 링크로 열림(rank.js)
   표시/숨김·페이드는 Helper.fadeIn/fadeOut(display block/none + opacity)로 제어.
   ══════════════════════════════════════════════════════ */
.sk-rank {
	position: fixed; inset: 0; z-index: 1000;
	display: none;
	background: rgba(3, 6, 16, .72);
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.sk-rank-panel {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	display: flex; flex-direction: column;
	width: calc(100% - 40px); max-width: 460px; max-height: 84vh;
	background: #0d1430; border: 1px solid #23306a; border-radius: 14px;
	box-shadow: 0 24px 60px -18px #000e; color: #e8ecf7;
}
.sk-rank-head {
	display: flex; align-items: center; gap: 10px;
	padding: 15px 18px; border-bottom: 1px solid #1b264f;
}
.sk-rank-title { font-family: 'Press Start 2P', monospace; font-size: 12px; color: #f5c542; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-rank-x {
	margin-left: auto; flex: 0 0 auto; width: 30px; height: 30px; line-height: 1;
	border: 1px solid transparent; border-radius: 8px;
	background: transparent; color: #8da0d6; font-size: 22px; cursor: pointer;
	transition: color .15s, border-color .15s;
}
.sk-rank-x:hover { color: #ff7272; border-color: #3a2036; }

.sk-rank-body {
	flex: 1; overflow-y: auto; padding: 12px 14px 16px;
	overscroll-behavior: contain;
	scrollbar-width: thin; scrollbar-color: #2c3c7e #0a0e1f;
}
.sk-rank-body::-webkit-scrollbar { width: 8px; }
.sk-rank-body::-webkit-scrollbar-track { background: #0a0e1f; }
.sk-rank-body::-webkit-scrollbar-thumb { background: #2c3c7e; border-radius: 4px; }

.sk-rank-loading, .sk-rank-empty { padding: 44px 12px; text-align: center; font-size: 13px; color: #8da0d6; line-height: 1.7; }

/* 랭킹 표 — 순위 · 닉네임 · 풀이시간 · 힌트 · 총점 */
.sk-rank-table { display: flex; flex-direction: column; }
.sk-rank-row {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 62px 44px 64px;
	align-items: center; gap: 8px;
	padding: 9px 8px; border-bottom: 1px solid #1b2a4e; font-size: 13px;
}
.sk-rank-thead {
	color: #8da0d6; font-size: 11px; font-weight: 700;
	border-bottom: 1px solid #23306a; background: #0c1230; border-radius: 8px 8px 0 0;
}
.rk-no { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.rk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e8ecf7; font-weight: 600; }
.rk-time, .rk-score { text-align: right; font-family: monospace; }
.rk-time { color: #c3cdec; }
.rk-score { color: #f5c542; font-weight: 700; }
.rk-hint { text-align: center; font-family: monospace; color: #ff9e4d; }
.sk-rank-thead .rk-no,
.sk-rank-thead .rk-hint { text-align: center; }
.sk-rank-thead .rk-time,
.sk-rank-thead .rk-score { color: #8da0d6; font-weight: 700; }
.sk-rank-thead .rk-hint { color: #8da0d6; }

.rk-num { font-family: 'Press Start 2P', monospace; font-size: 11px; color: #c3cdec; }

/* 1~3위 강조 배경(금은동) + 왕관 이모지에 filter 로 금/은/동 색을 입힌다 */
.rk-rank-1 { background: linear-gradient(90deg, rgba(245, 197, 66, .14), transparent 62%); }
.rk-rank-2 { background: linear-gradient(90deg, rgba(196, 205, 224, .12), transparent 62%); }
.rk-rank-3 { background: linear-gradient(90deg, rgba(205, 127, 50, .14), transparent 62%); }
.rk-rank-1 .rk-num { color: #f5c542; }
.rk-crown { font-size: 16px; line-height: 1; }
.crown-1 { filter: none; }											/* 금(기본 골드 이모지) */
.crown-2 { filter: grayscale(1) brightness(1.25); }					/* 은 */
.crown-3 { filter: sepia(1) saturate(2.4) hue-rotate(-18deg) brightness(.92); }	/* 동 */

@media (max-width: 560px) {
	.sk-rank-panel { width: calc(100% - 24px); max-width: none; }
	.sk-rank-row { grid-template-columns: 48px minmax(0, 1fr) 56px 38px 58px; gap: 6px; font-size: 12px; }
}

