:root {
	--bg-1: #0ea5e9; /* sky-500 */
	--bg-2: #3b82f6; /* blue-500 */
	--bg-3: #1e3a8a; /* indigo-900 */
	--surface: #ffffff;
	--muted: #5b6b7a;
	--text: #0f172a;
	--brand: #38bdf8; /* sky-400 */
	--brand-2: #6366f1; /* indigo-500 */
	--accent-solid: #3b82f6; /* blue-500 */
	--accent-solid-2: #1e40af; /* blue-800 */
	--ok: #10b981;
	--warn: #f59e0b;
	--danger: #ef4444;
	--border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%),
		linear-gradient(180deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
	color: var(--text);
	font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans KR, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	line-height: 1.45;
	background-attachment: fixed;
}

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

.header {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 18px;
}
.header-title { font-size: 26px; font-weight: 900; letter-spacing: .2px; background: linear-gradient(135deg, #fff, #dbeafe); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 30px rgba(255,255,255,.35); text-decoration: none; display: inline-block; }
.header-sub { color: #e2e8f0; font-size: 14px; margin: 6px 0 0; font-weight: 700; line-height: 1.5; }

.intro-logo-wrap {
	display: flex;
	justify-content: center;
	margin: 6px 0 16px;
}
.intro-logo {
	width: clamp(96px, 22vw, 160px);
	height: auto;
	border-radius: 0;
	background: transparent;
	border: none;
	box-shadow: none;
}

.card {
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.26);
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(2, 6, 23, .22), 0 1px 0 rgba(255,255,255,.15) inset;
	backdrop-filter: blur(8px);
	color: #f8fafc;
}
.card-body { padding: 16px; color: #f8fafc; }
/* 좌우 여백 제거용 */
.card--flush .card-body { padding-left: 0; padding-right: 0; }


.topbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .topbar { grid-template-columns: 1fr; } }

.label { display: block; font-size: 12px; color: rgba(255,255,255,0.9); margin-bottom: 6px; font-weight: 800; }
.input, .select { width: 100%; padding: 12px 14px; border-radius: 12px; background: #f8fafc; color: var(--text); border: 1px solid #d1d5db; outline: none; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(56, 189, 248, .25); }

.actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 8px; }
.btn {
	appearance: none; border: 1px solid #d1d5db; cursor: pointer; padding: 12px 16px; border-radius: 16px; font-weight: 800; letter-spacing: .2px;
	background: linear-gradient(135deg, #ffffff, #f8fafc); color: var(--text);
	transition: transform .06s ease, background .25s ease, box-shadow .25s ease;
	box-shadow: 0 8px 16px rgba(2, 6, 23, .15);
}
.btn:hover { background: linear-gradient(135deg, #ffffff, #eef2ff); box-shadow: 0 10px 22px rgba(2, 6, 23, .18); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
	background:
		linear-gradient(135deg, var(--accent-solid), var(--accent-solid-2)) padding-box,
		linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.12)) border-box;
	color: #ffffff;
	border: 2px solid transparent;
	box-shadow:
		0 12px 26px rgba(30, 64, 175, .45),
		inset 0 1px 0 rgba(255,255,255,0.45),
		inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-primary:hover { filter: saturate(1.1) brightness(1.02); }
.btn-phoenix {
	background: #2f3339;
	color: #ffffff;
	border: 1px solid #1f2328;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
.btn-phoenix:hover { background: #3a3f46; }
.btn-ghost { background: rgba(255, 255, 255, 0.65); border: none; color: #0f172a; }
.btn-outline { background: rgba(255,255,255,.9); border: 1px solid var(--border); }
.btn-reset { background: rgba(255, 255, 255, 0.65); border: none; color: #0f172a; }
.btn-reset:hover { background: rgba(255, 255, 255, 0.8); }

.sortbar { display: flex; flex-wrap: wrap; gap: 10px; }

.table-container {
	position: relative;
	margin-top: 16px;
}
.table-card {
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--surface);
	overflow: hidden;
}
.table-wrap { 
	border: 0;
	border-radius: 0;
	overflow-x: auto;
	overflow-y: visible;
	background: transparent;
	position: relative;
}
@media (max-width: 640px) {
	.table-wrap {
		overflow-x: auto;
		overflow-y: visible;
		-webkit-overflow-scrolling: touch;
	}
	.table-wrap .table {
		min-width: 800px;
		width: auto;
	}
}
.table-scroll-indicator {
	position: fixed;
	top: 0;
	width: 36px;
	height: 44px;
	display: none;
	align-items: center;
	justify-content: center;
	background: linear-gradient(90deg, rgba(14, 165, 233, 0.9), rgba(59, 130, 246, 0.9));
	backdrop-filter: blur(8px);
	z-index: 30 !important;
	pointer-events: none;
	font-size: 22px;
	color: rgba(255, 255, 255, 1) !important;
	font-weight: 900;
	border-radius: 0 12px 12px 0;
	box-shadow: 0 4px 16px rgba(2, 6, 23, 0.3);
	animation: pulse-blink 1.5s ease-in-out infinite;
}
.table-scroll-indicator.right {
	border-radius: 12px 0 0 12px;
}
@keyframes pulse-blink {
	0%, 100% {
		opacity: 0.8;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.05);
	}
}
@media (max-width: 640px) {
	.table-scroll-indicator {
		display: flex !important;
		visibility: visible !important;
		opacity: 0.8 !important;
	}
	.table-scroll-indicator.hidden {
		display: none !important;
		visibility: hidden !important;
	}
}
.table-scroll-indicator.left {
	left: 0;
}
.table-scroll-indicator.right {
	right: 0;
}
.table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.table th, .table td { padding: 10px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; white-space: nowrap; }
.table th:first-child,
.table td:first-child {
	white-space: nowrap;
	min-width: 96px;
	width: 1%;
}
.table td:first-child .pill { white-space: nowrap; }
.table th.col-notes,
.table td.col-notes { white-space: normal; }
.table th.col-name,
.table td.col-name { white-space: normal; }
.table .slope-name { display: inline-block; line-height: 1.2; }
.table .slope-name--nowrap { white-space: nowrap; }
.table .slope-name--wrap { white-space: normal; max-width: 12ch; overflow-wrap: anywhere; word-break: break-word; }
.table thead { position: sticky; top: 0; z-index: 5; background: #e0f2fe; }
.table thead th { position: sticky; top: 0; z-index: 6; background: #e0f2fe; color: #0f172a; font-weight: 900; text-align: center; }

/* Overlay header for cross-browser sticky fallback */
.table-head-overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 28;
	display: none;
	overflow: visible;
	pointer-events: none;
}
.table-head-overlay table {
	border-collapse: collapse;
	border-spacing: 0;
	background: #e0f2fe;
}
.table-head-overlay th {
	padding: 10px 11px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
	font-size: 14px;
	font-weight: 900;
	color: #0f172a;
	background: #e0f2fe;
	text-align: center;
	white-space: nowrap;
}
.table-head-overlay th:first-child {
	white-space: nowrap;
	min-width: 96px;
}
.table-head-overlay a { color: #0f172a; text-decoration: none; border-bottom: none; }
.table th a { color: #0f172a; text-decoration: none; border-bottom: none; }
.table tr:hover td { background: #f0f9ff; }
.table .slope-row { cursor: pointer; transition: background-color .15s ease, transform .06s ease; }
.table .slope-row:active { transform: scale(.999); }
.table .slope-row:focus-visible td { outline: 2px solid var(--brand-2); outline-offset: -2px; background: #e0f2fe; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid rgba(15, 23, 42, .08); }
.badge.BEGINNER { background: rgba(16, 185, 129, .12); color: #047857; }
.badge.NOVICE { background: rgba(56, 189, 248, .12); color: #0369a1; }
.badge.INTERMEDIATE { background: rgba(245, 158, 11, .12); color: #92400e; }
.badge.UPPER_INTERMEDIATE { background: rgba(59, 130, 246, .12); color: #1d4ed8; }
.badge.ADVANCED { background: rgba(239, 68, 68, .12); color: #b91c1c; }
.badge.EXPERT { background: rgba(100, 116, 139, .16); color: #0f172a; }
.badge.PARK { background: rgba(168, 85, 247, .14); color: #6d28d9; }

.meta { display: flex; gap: 12px; align-items: center; color: #e2e8f0; font-size: 12px; margin-top: 8px; }
.meta strong { color: #ffffff; }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 16px; background: var(--surface); border-top: 1px solid var(--border); }
.page-link { color: #9ca3af; text-decoration: none; font-weight: 700; display: inline-block; padding: 4px 8px; }
.page-link:hover { color: #6b7280; }
.page-current { background: transparent; color: transparent; background-image: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; font-weight: 900; display: inline-block; padding: 4px 8px; }

/* Dual range slider + value below */
.range { position: relative; width: 100%; height: 56px; display: grid; grid-template-columns: 1fr; align-items: center; }
.range input[type=range] { appearance: none; -webkit-appearance: none; background: transparent; outline: none; position: absolute; width: 100%; margin: 0; pointer-events: none; }
.range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-2); border: 0; box-shadow: 0 0 0 4px #ffffff, 0 8px 18px rgba(59, 130, 246, .35); pointer-events: auto; cursor: pointer; transform: translateY(-6px); }
.range input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-2); border: 0; box-shadow: 0 0 0 4px #ffffff, 0 8px 18px rgba(59, 130, 246, .35); pointer-events: auto; cursor: pointer; transform: translateY(-6px); }
.range .track { position: absolute; height: 10px; width: 100%; background: #e5e7eb; border-radius: 999px; top: 11px; }
.range .range-fill { position: absolute; height: 10px; background: var(--brand-2); border-radius: 999px; top: 11px; }
.range .value { font-size: 14px; color: var(--text); margin-top: 10px; display: flex; justify-content: space-between; font-weight: 800; }
.range .bubble { position: absolute; top: -34px; transform: translateX(-50%); background: #f472b6; color: #fff; font-weight: 900; padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 14px rgba(244, 114, 182, .35); font-size: 12px; }
.range .bubble::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border-width: 6px; border-style: solid; border-color: #f472b6 transparent transparent transparent; }

/* Resort pill bar */
.pillbar { display:flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px 0; }
.pill { padding: 10px 14px; border-radius: 999px; border: 0; color: #0b0f19; font-weight: 900; cursor: pointer; box-shadow: 0 10px 22px rgba(2,6,23,.18); transition: transform .06s ease, filter .2s ease; }
.pill:hover { filter: brightness(1.05) saturate(1.05); }
.pill:active { transform: translateY(1px) scale(.99); }
.pill.active {
	box-shadow:
		0 0 0 3px rgba(255,255,255,.9),
		0 12px 26px rgba(2, 6, 23, .22),
		0 0 0 6px rgba(99, 102, 241, .18),
		0 0 18px rgba(56, 189, 248, .32);
}
/* Resort colorways (좌->우) */
.pill-resort { background: #f1f5f9; color: #0f172a; border: 1px solid var(--border); }
.pill-resort.active {
	background: linear-gradient(135deg, var(--accent-solid), var(--accent-solid-2));
	color: #ffffff;
	border: none;
	background-clip: border-box;
}
.pillbar#resortPills .pill-resort { order: 0; }
.pillbar#resortPills .pill-JS { order: 1; }
.pillbar#resortPills .pill-WH { order: 2; }
.pillbar#resortPills .pill-VP { order: 3; }
.pillbar#resortPills .pill-KJ { order: 4; }
.pillbar#resortPills .pill-HI { order: 5; }
.pillbar#resortPills .pill-YP { order: 6; }
.pillbar#resortPills .pill-MJ { order: 7; }
.pillbar#resortPills .pill-GC { order: 8; }
.pillbar#resortPills .pill-PP { order: 9; }
.pillbar#resortPills .pill-PH { order: 10; }
.pill-YP { background: #a21caf; color: #fff; }
.pill-HI { background: #844bf2; color: #fff; }
.pill-WH { background: #067a58; color: #ecfeff; }
.pill-PH { background: #853a0e; color: #fff7ed; }
.pill-JS { background: #fbbf24; color: #fff; }
.pill-VP { background: #1ebcd4; color: #fff; }
.pill-PP { background: #6a6258; color: #ffffff; border: none; }
.pill-KJ { background: #3d4b5f; color: #ffffff; border: none; }
.pill-MJ { background: #ff36a0; color: #ffffff; border: none; }
.pill-GC { background: #ff98c8; color: #ffffff; border: none; }
/* 전체 버튼 (비활성 시) -> 정렬 미선택 pill과 동일 톤 */
.pill[data-code=""]:not(.active),
.pill[data-diff=""]:not(.active) {
	background: rgba(255, 255, 255, 0.65);
	color: #0f172a;
	border: none;
}
/* Sort pill (단일선택) */
.pill-sort { background: rgba(255, 255, 255, 0.65); color: #0f172a; border: none; }
.pill-sort.active {
	background: linear-gradient(135deg, var(--accent-solid), var(--accent-solid-2));
	color: #ffffff;
	border: none;
	background-clip: border-box;
}
.pill-sort { display: inline-flex; align-items: center; gap: 8px; }
.pill-sort .sort-label { white-space: nowrap; }
.pill-sort .sort-arrows { display: inline-flex; flex-direction: column; gap: 2px; }
.pill-sort .sort-arrow { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; opacity: .35; }
.pill-sort .sort-arrow.up { border-bottom: 7px solid currentColor; }
.pill-sort .sort-arrow.down { border-top: 7px solid currentColor; }
.pill-sort.active .sort-arrow { opacity: .55; }
.pill-sort.active[data-active-dir="asc"] .sort-arrow.up { opacity: 1; }
.pill-sort.active[data-active-dir="desc"] .sort-arrow.down { opacity: 1; }

.pill-sm { padding: 6px 10px; box-shadow: 0 6px 12px rgba(2,6,23,.12); font-weight: 800; }
.pill-diff { background: linear-gradient(90deg, #f1f5f9, #ffffff); color: #0f172a; border: 1px solid var(--border); }
.pill-diff.active { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #0b0f19; border-color: transparent; }
.pill[data-diff=""].active {
	background: linear-gradient(135deg, var(--accent-solid), var(--accent-solid-2));
	color: #ffffff;
	border: none;
}
.pill-diff.BEGINNER {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(16,185,129,.45), rgba(16,185,129,.65));
	color: #047857;
}
.pill-diff.NOVICE {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(56,189,248,.45), rgba(56,189,248,.65));
	color: #0369a1;
}
.pill-diff.INTERMEDIATE {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(245,158,11,.45), rgba(245,158,11,.65));
	color: #92400e;
}
.pill-diff.UPPER_INTERMEDIATE {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(59,130,246,.45), rgba(59,130,246,.65));
	color: #1d4ed8;
}
.pill-diff.ADVANCED {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(239,68,68,.45), rgba(239,68,68,.65));
	color: #b91c1c;
}
.pill-diff.EXPERT {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(100,116,139,.5), rgba(71,85,105,.7));
	color: #0f172a;
}
.pill-diff.PARK {
	background:
		linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.35)),
		linear-gradient(90deg, rgba(168,85,247,.45), rgba(168,85,247,.65));
	color: #6d28d9;
}
.pill-sort.active {
	box-shadow:
		0 0 0 3px rgba(255,255,255,0.8),
		0 12px 26px rgba(30, 64, 175, .45);
}

/* 클릭/포커스 시 기본(네모) 하이라이트 대신 pill 모양 유지 */
.pill, .btn, .filter-toggle, .menu-toggle, .menu-item {
	-webkit-tap-highlight-color: transparent;
}
.pill:focus, .btn:focus, .filter-toggle:focus, .menu-toggle:focus, .menu-item:focus {
	outline: none;
}
.pill:focus-visible, .btn:focus-visible, .filter-toggle:focus-visible, .menu-toggle:focus-visible, .menu-item:focus-visible {
	box-shadow: 0 0 0 3px rgba(56, 189, 248, .28), 0 10px 22px rgba(2,6,23,.18);
}

/* Search grid layout */
.filters { 
	display: grid; 
	grid-template-columns: 1fr auto;
	column-gap: 6px;
	row-gap: 6px;
	align-items: end; 
	padding: 0 20px; 
}
@media (max-width: 1024px) { 
	.filters { 
		grid-template-columns: repeat(2, 1fr); 
	} 
}
@media (max-width: 640px) {
	.filters {
		grid-template-columns: 1fr;
		padding: 0 16px;
		column-gap: 6px;
		row-gap: 6px;
	}
	.filters > div {
		width: 100%;
	}
	.filter-advanced {
		display: none !important;
	}
	.filter-advanced.expanded {
		display: block !important;
	}
	.filter-toggle {
		display: block;
		width: 100%;
		padding: 12px;
		background: rgba(255, 255, 255, 0.65);
		border: 1px solid var(--border);
		border-radius: 12px;
		color: var(--text);
		font-weight: 700;
		cursor: pointer;
		text-align: center;
		margin-top: 0;
	}
	.filter-toggle:hover {
		background: rgba(255, 255, 255, 0.8);
	}
}
.filters > div:not(.filter-advanced) { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 641px) {
	.filter-toggle {
		display: none;
	}
	.filter-advanced {
		display: grid !important;
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 20px !important;
		grid-column: 1 / -1;
		align-items: end;
	}
	.filter-advanced > div {
		display: flex !important;
		flex-direction: column !important;
		gap: 8px;
		width: 100%;
	}
}
.filters > div:first-child { align-items: flex-start; margin-bottom: 30px; }
@media (max-width: 640px) {
	.filters > div:first-child {
		margin-bottom: 0;
	}
}
.filter-advanced { grid-column: 1 / -1; margin-top: 20px; }

/* Search actions */
.search-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.search-actions-buttons { display: flex; gap: 10px; }
.visit-inline { display: flex; gap: 6px; align-items: center; color: rgba(255,255,255,0.65); font-size: 12px; font-weight: 700; flex-wrap: wrap; row-gap: 2px; }
.visit-inline-label { text-transform: uppercase; letter-spacing: .25px; }
.visit-inline-value { color: rgba(255,255,255,0.82); font-weight: 900; }
.visit-dot { color: rgba(255,255,255,0.5); }

/* range spacing fix */
.range { height: 72px; }
.range .track, .range .range-fill { top: 11px; }
.range input[type=range] { top: 10px; }
.range input[type=range]::-webkit-slider-thumb { position: relative; z-index: 3; }
.range input[type=range]::-moz-range-thumb { position: relative; z-index: 3; }
.range .value { margin-top: 28px; z-index: 1; position: relative; }

/* Menu */
.menu-toggle {
	position: fixed;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	background: transparent;
	border: none;
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	z-index: 60;
	transition: transform .08s ease;
}
.menu-toggle:hover { transform: translateY(-1px); }
.menu-toggle:active { transform: translateY(1px) scale(.98); }
.menu-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: rgba(255,255,255,0.9);
	border-radius: 999px;
	box-shadow: 0 0 12px rgba(0,0,0,0.18);
}
.menu-panel {
	position: fixed;
	top: 66px;
	right: 14px;
	width: 190px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(224, 242, 254, 0.16));
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 0;
	box-shadow: 0 18px 36px rgba(2,6,23,0.28), 0 0 0 1px rgba(15,23,42,0.14);
	backdrop-filter: blur(18px);
	padding: 8px;
	display: none;
	flex-direction: column;
	gap: 6px;
	z-index: 59;
}
.menu-panel.open { display: flex; }
.menu-item {
	width: 100%;
	text-align: left;
	border: none;
	background:
		linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.18));
	border-radius: 4px;
	padding: 10px 12px;
	font-weight: 800;
	color: transparent;
	background-clip: padding-box, text;
	-webkit-background-clip: padding-box, text;
	-webkit-text-fill-color: transparent;
	background-image:
		linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.18)),
		linear-gradient(135deg, #0a3e7c 20%, #1e3a8a 80%);
	text-decoration: none;
	border: 1px solid rgba(255,255,255,0.38);
	box-shadow: 0 4px 14px rgba(15,23,42,0.14);
	cursor: pointer;
	transition: background .2s ease, transform .06s ease, color .2s ease;
}
.menu-item:hover {
	background-image:
		linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.22)),
		linear-gradient(135deg, #062c5a 20%, #1f2a60 80%);
}
.menu-item:active { transform: translateY(1px); }
.menu-item a { color: inherit; text-decoration: none; }

/* Modal */
.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 80;
	padding: 0;
	padding-top: max(12px, env(safe-area-inset-top, 0px)); /* keep top radius visible under mobile URL bar */
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 28, 0.6); backdrop-filter: blur(6px); }
.modal-dialog {
	position: relative;
	background:
		linear-gradient(135deg, rgba(224, 242, 254, 0.55), rgba(255,255,255,0.9)),
		linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
	width: min(760px, calc(100% - 32px));
	max-height: min(90vh, calc(100dvh - 32px)); /* keep visible under mobile URL bar */
	overflow-y: auto;
	border-radius: 18px;
	border: 1px solid var(--border);
	box-shadow: 0 24px 60px rgba(2, 6, 23, .38);
	padding: 22px 22px 20px;
	z-index: 1;
}
@supports not (height: 100dvh) {
	.modal-dialog { max-height: min(90vh, calc(100vh - 32px)); }
}
.modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: transparent;
	border-radius: 0;
	width: 40px;
	height: 40px;
	font-size: 28px;
	font-weight: 1000;
	color: var(--bg-2);
	cursor: pointer;
	box-shadow: none;
}
.modal-close:hover { color: var(--bg-1); background: transparent; }
.modal-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.modal-meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-pill { display: inline-flex; align-items: center; }
.modal-heading { display: flex; flex-direction: column; gap: 4px; }
.modal-title { font-size: 22px; font-weight: 900; color: #0f172a; letter-spacing: .2px; }
.modal-sub { font-size: 13px; color: var(--muted); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 11px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	border: 1px solid var(--border);
	background: #f8fafc;
	color: #0f172a;
}
.chip-on { background: rgba(56, 189, 248, .16); color: #075985; border-color: rgba(56, 189, 248, .45); }
.chip-off { background: rgba(15, 23, 42, .06); color: #475569; }
.chip-muted { background: rgba(148, 163, 184, .16); color: #475569; }
.modal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 6px 0 14px;
}
.metric {
	background: #f8fafc;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px 14px;
	box-shadow: 0 8px 16px rgba(2,6,23,.08);
}
.metric-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.metric-value { font-size: 18px; font-weight: 900; color: #0f172a; }
.metric-hint { font-size: 12px; color: #94a3b8; }
.modal-notes {
	background: linear-gradient(90deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.1));
	border: 1px dashed rgba(14,165,233,.4);
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 12px;
}
.modal-map {
	display: none;
	border: 1px solid rgba(14, 165, 233, 0.45);
	border-radius: 14px;
	overflow: hidden;
	background: #0b1220;
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
	margin-bottom: 12px;
}
.modal-map img {
	display: block;
	width: 100%;
	height: auto;
	background: #0b1220;
}
.modal-map-link {
	display: block;
	padding: 10px 12px;
	text-align: center;
	font-weight: 800;
	font-size: 13px;
	color: #ffffff;
	text-decoration: none;
	background: linear-gradient(90deg, #0ea5e9, #6366f1);
}
.modal-map-link:hover { filter: brightness(0.96); }
.modal-extra {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 10px;
}
.extra-block { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.extra-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.extra-value { font-size: 14px; font-weight: 700; color: #0f172a; }
.extra-value a { color: var(--brand-2); text-decoration: none; font-weight: 900; }
.extra-value a:hover { text-decoration: underline; }

/* Coupang event popup */
body.event-popup-open { overflow: hidden; }
body.event-popup-open > *:not(.event-popup) { pointer-events: none; }
body.event-popup-open .event-popup { pointer-events: auto; }
.event-popup {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(2, 6, 23, 0.38);
	z-index: 1000;
}
.event-popup.is-open { display: flex; }
.event-popup-inner {
	position: relative;
	width: min(560px, 92vw);
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 22px 60px rgba(2, 6, 23, 0.42);
}
.coupang-notice {
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -0.2px;
}
.coupang-notice-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.coupang-notice-link:focus-visible {
	outline: 2px solid rgba(59, 130, 246, 0.9);
	outline-offset: 2px;
}
.coupang-notice strong {
	font-weight: 900;
	color: #0b1220;
}
.coupang-notice-em {
	display: inline-block;
	color: #b91c1c;
	font-weight: 800;
}
.event-popup-notice {
	background: rgba(255, 255, 255, 0.86);
	color: rgba(2, 6, 23, 0.82);
	border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.event-popup-link { display: block; }
.event-popup-image {
	display: block;
	width: 100%;
	height: auto;
}
.event-popup-disclaimer {
	padding: 10px 14px 12px;
	background: rgba(2, 6, 23, 0.82);
	color: rgba(255, 255, 255, 0.72);
	font-size: 11px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -0.2px;
}
.event-popup-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	text-shadow: 0 2px 10px rgba(2, 6, 23, 0.9), 0 0 2px rgba(255, 255, 255, 0.25);
}
.event-popup-close:focus-visible {
	outline: none;
	box-shadow: none;
}

/* Coupang footer ad (slopes page bottom) */
.coupang-footer-ad {
	margin: 18px auto 10px;
	width: min(560px, 100%);
	border-radius: 16px;
	overflow: hidden;
	border: 0;
	background: #ffffff;
	box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
}
.coupang-footer-link { display: block; }
.coupang-footer-image { display: block; width: 100%; height: auto; }
.coupang-footer-notice {
	background: rgba(255, 255, 255, 0.86);
	color: rgba(2, 6, 23, 0.82);
	border-bottom: 1px solid rgba(148, 163, 184, 0.45);
}
.coupang-footer-disclaimer {
	padding: 10px 14px 12px;
	background: rgba(2, 6, 23, 0.82);
	color: rgba(255, 255, 255, 0.72);
	font-size: 11px;
	font-weight: 400;
	line-height: 1.45;
	letter-spacing: -0.2px;
}

/* 방문자 통계 */
.stats-card { margin-bottom: 16px; }
.stats-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-title { font-size: 18px; font-weight: 900; color: #ffffff; letter-spacing: .2px; }
.stats-desc { font-size: 13px; color: rgba(226, 232, 240, 0.9); }
.stats-pillbar { justify-content: flex-end; }
.stats-pill { background: rgba(255,255,255,0.82); border: 0; color: #0f172a; }
.stats-pill.active { background: linear-gradient(135deg, var(--accent-solid), var(--accent-solid-2)); color: #ffffff; }
.chart-area {
	position: relative;
	width: 100%;
	min-height: 320px;
	margin-top: 14px;
	background: var(--surface);
	border-radius: 14px;
	padding: 12px;
	box-shadow: 0 12px 30px rgba(2,6,23,.16);
	border: 1px solid var(--border);
}
.chart-area canvas { width: 100% !important; height: 320px !important; }
.chart-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #475569;
	pointer-events: none;
}
.stats-table-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stats-summary { color: #e2e8f0; font-size: 12px; font-weight: 800; margin-top: 6px; }
.stats-table-wrap { background: var(--surface); border-radius: 14px; box-shadow: 0 12px 30px rgba(2,6,23,.16); border: 1px solid var(--border); margin-top: 12px; }
.stats-table { margin: 0; }
.stats-table thead th { background: #e0f2fe; }
.stats-table td, .stats-table th { white-space: normal; color: #0f172a; }
.stats-table { table-layout: fixed; width: 100%; min-width: 0; }
.stats-table-wrap .stats-table { width: 100%; min-width: 0; }
.stats-table th:first-child, .stats-table td:first-child { width: 62%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.stats-table th:last-child, .stats-table td:last-child { width: 38%; min-width: 0; }
.stats-table tbody td { font-weight: 400; }
.stats-table tbody tr:nth-child(2n) td { background: #f8fafc; }
.stats-table tbody tr:hover td { background: #f1f5f9; }
.stats-table td:last-child { font-weight: 400; color: #0f172a; }
.stats-table td:first-child { font-weight: 400; }
@media (max-width: 640px) {
	.stats-top { flex-direction: column; align-items: flex-start; }
	.chart-area { min-height: 260px; }
	.chart-area canvas { height: 260px !important; }
	.stats-pillbar { width: 100%; }
	.stats-pillbar .pill { flex: 1; text-align: center; }
}
