html {
	scroll-behavior: smooth;
	zoom: 1.2;
}

html,
h1,
h2,
h3,
h4,
p,
div,
span,
a,
td,
th,
button,
textarea,
small {
	font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif !important;
}

::selection {
	background: rgba(166, 175, 189, .3) !important;
	color: #222 !important;
}

.white {
	color: rgba(255, 255, 255) !important;
}

.uk-accordion-title {
	color: rgba(255, 255, 255) !important;
}

.bold {
	font-weight: 600;
}

.light {
	font-weight: 300;
}

.fullscreen {
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	text-align: left;
	color: rgba(255, 255, 255);
}

.hero {
	padding-top: 64px;
	padding-bottom: 6px;
}

.hero-block {
	margin-bottom: 16px;
}

.hero-block > span {
	display: block;
	line-height: 1.55;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 3px 10px rgba(0, 0, 0, 0.5);
}

.hero-temp {
	color: rgba(255, 255, 255, 0.97);
	font-size: 285%;
	line-height: 1.2 !important;
	letter-spacing: -0.5px;
	margin-bottom: 8px;
}

/* 타이틀: 아래로 쌓이는 적층 그림자 → 글자가 떠 있는 입체감 */
.hero-block > span.hero-temp {
	text-shadow:
		0 1px 0 rgba(6, 12, 30, 0.55),
		0 2px 0 rgba(6, 12, 30, 0.45),
		0 3px 0 rgba(6, 12, 30, 0.35),
		0 4px 0 rgba(6, 12, 30, 0.25),
		0 6px 3px rgba(0, 0, 0, 0.35),
		0 12px 28px rgba(0, 0, 0, 0.55);
}

.hero-block > span.hero-prob {
	text-shadow:
		0 1px 0 rgba(6, 12, 30, 0.45),
		0 2px 0 rgba(6, 12, 30, 0.3),
		0 5px 14px rgba(0, 0, 0, 0.55);
}

.hero-sub {
	color: rgba(255, 255, 255, 0.9);
}

.hero-dim {
	color: rgba(255, 255, 255, 0.65);
}

.hero-prob {
	color: rgba(255, 255, 255, 0.92);
	font-size: 112%;
	margin-top: 6px;
}

.stock-row {
	max-width: 560px;
	margin-bottom: 10px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 3px 10px rgba(0, 0, 0, 0.45);
}

.stock-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

/* 원형 기업 로고 (코드 기반 자동, 실패 시 이니셜) */
.stock-logo {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	flex: none;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
	font-size: 11px;
	font-weight: 700;
	color: #1c2440;
}

.stock-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stock-head > span {
	white-space: nowrap;
}

.stock-name {
	font-weight: 700;
	color: rgba(255, 255, 255, 0.92);
}

.stock-price {
	font-weight: 600;
	color: rgba(255, 255, 255, 0.95);
	font-variant-numeric: tabular-nums;
}

/* 오도미터 카운터: 각 자릿수가 세로로 굴러가는 효과 */
.odo {
	display: inline-flex;
	align-items: flex-end;
}

.odo-digit {
	display: block;
	height: 1.3em;
	line-height: 1.3em;
	overflow: hidden;
}

.odo-strip {
	display: block;
	transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
	will-change: transform;
}

.odo-strip > span {
	display: block;
	height: 1.3em;
	line-height: 1.3em;
	text-align: center;
}

.odo-sep {
	display: block;
	height: 1.3em;
	line-height: 1.3em;
}

.stock-price.flash-up {
	animation: price-flash-up 0.7s ease-out;
}

.stock-price.flash-down {
	animation: price-flash-down 0.7s ease-out;
}

@keyframes price-flash-up {
	0% {
		color: #ff8080;
		text-shadow: 0 0 12px rgba(255, 128, 128, 0.8);
	}

	100% {
		color: rgba(255, 255, 255, 0.95);
	}
}

@keyframes price-flash-down {
	0% {
		color: #80aaff;
		text-shadow: 0 0 12px rgba(128, 170, 255, 0.8);
	}

	100% {
		color: rgba(255, 255, 255, 0.95);
	}
}

.stock-rate {
	font-size: 86%;
	font-weight: 600;
}

.stock-target {
	margin-left: auto;
	font-size: 86%;
	color: rgba(255, 255, 255, 0.55);
}

.stock-bar {
	height: 6px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 3px;
	overflow: hidden;
	margin: 4px 0 3px;
}

.stock-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #67e8f9, #818cf8);
	border-radius: 3px;
	transition: width 0.6s ease, background 0.4s ease;
}

/* 등락 방향과 게이지 색 연동 (상승 빨강 / 하락 파랑) */
.stock-fill.up {
	background: linear-gradient(90deg, #ff9d9d, #ff4d6d);
}

.stock-fill.down {
	background: linear-gradient(90deg, #8ab4ff, #5c7cfa);
}

.stock-remain {
	font-size: 88%;
	color: rgba(255, 255, 255, 0.65);
}

.region-wrap {
	display: block;
	margin-top: 10px;
}

.region-toggle {
	background: rgba(8, 14, 40, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 78%;
	font-weight: 600;
	padding: 4px 10px;
	cursor: pointer;
}

.region-toggle:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
}

.region-chips {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-left: 8px;
	vertical-align: middle;
}

.region-chip {
	background: rgba(8, 14, 40, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.65);
	font-size: 78%;
	font-weight: 600;
	padding: 4px 11px;
	cursor: pointer;
}

.region-chip:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
}

.region-chip.active {
	background: rgba(255, 255, 255, 0.9);
	color: #0c1a4a;
	border-color: transparent;
}

.stock-add {
	max-width: 560px;
	margin: 0 0 10px;
}

.stock-add-toggle,
#add-submit {
	background: rgba(8, 14, 40, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 85%;
	font-weight: 600;
	padding: 6px 14px;
	cursor: pointer;
}

.stock-add-toggle:hover,
#add-submit:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.stock-add-form {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.stock-add-form input {
	background: rgba(8, 14, 40, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #fff;
	font-size: 85%;
	padding: 6px 12px;
	width: 190px;
	max-width: 45%;
}

.stock-add-form input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.stock-remove {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	font-size: 90%;
	padding: 0 2px;
	line-height: 1;
}

.stock-remove:hover {
	color: #ff9b9b;
}

.index-chips {
	display: flex;
	gap: 10px;
	max-width: 560px;
	margin: 2px 0 10px;
	flex-wrap: wrap;
}

.index-chip {
	flex: 1 1 140px;
	background: rgba(8, 14, 40, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	padding: 7px 12px;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.index-name {
	display: block;
	font-size: 80%;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 2px;
}

.index-value {
	font-weight: 700;
	font-size: 118%;
	color: rgba(255, 255, 255, 0.95);
	font-variant-numeric: tabular-nums;
}

.index-rate {
	font-size: 86%;
	font-weight: 600;
	margin-left: 6px;
}

/* 상단 중앙 고정 러너 스트립 */
#run-strip {
	position: fixed;
	top: 6px;
	left: 0;
	right: 0;
	margin: 0 auto;
	width: min(560px, 88%);
	z-index: 50;
	pointer-events: none;
	text-align: center;
}

/* 트랙 자체도 스트립 안에서 중앙 정렬 */
#run-strip .run-track {
	margin-left: auto;
	margin-right: auto;
}

.run-track {
	position: relative;
	max-width: 560px;
	height: 36px;
	margin-top: 0;
	border-bottom: 2px dashed rgba(255, 255, 255, 0.28);
	overflow: hidden;
}

.river-goal {
	position: absolute;
	right: 0;
	bottom: 4px;
	font-size: 92%;
	color: rgba(255, 255, 255, 0.75);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.runner {
	position: absolute;
	left: 0;
	bottom: 2px;
	font-size: 140%;
	animation: run-to-river 8s linear infinite;
	will-change: transform;
}

/* 스틱피겨 러너: 팔다리가 실제로 교차하는 런 사이클 (--step = 한 보폭 주기) */
.runner-svg {
	display: block;
	overflow: visible;
	filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
	/* 확률 낮음 = 꼿꼿이 서서 걷기(음수 회전으로 상체 세움), 높음 = 앞으로 숙인 질주 자세 */
	transform: rotate(var(--lean, 0deg));
}

.rn-head {
	fill: #fff;
}

.rn-torso,
.rn-limb {
	stroke: #fff;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
}

.rn-arm-b,
.rn-leg-b {
	stroke: rgba(255, 255, 255, 0.5);
}

.rn-limb,
.rn-bob {
	transform-box: view-box;
}

.rn-arm {
	transform-origin: 16.5px 11px;
}

.rn-leg {
	transform-origin: 13.5px 20px;
}

.rn-arm-a {
	animation: rn-swing-arm var(--step, 0.3s) ease-in-out infinite;
}

.rn-arm-b {
	animation: rn-swing-arm var(--step, 0.3s) ease-in-out infinite;
	animation-delay: calc(var(--step, 0.3s) / -2);
}

.rn-leg-a {
	animation: rn-swing-leg var(--step, 0.3s) ease-in-out infinite;
}

.rn-leg-b {
	animation: rn-swing-leg var(--step, 0.3s) ease-in-out infinite;
	animation-delay: calc(var(--step, 0.3s) / -2);
}

.rn-bob {
	animation: rn-bob calc(var(--step, 0.3s) / 2) ease-in-out infinite;
}

/* 스윙 폭은 확률에 따라 JS가 --swing-* 변수로 조절 (산책 ~8° → 전력질주 ~44°) */
@keyframes rn-swing-leg {

	0%,
	100% {
		transform: rotate(var(--swing-leg, 42deg));
	}

	50% {
		transform: rotate(calc(var(--swing-leg, 42deg) * -0.9));
	}
}

@keyframes rn-swing-arm {

	0%,
	100% {
		transform: rotate(calc(var(--swing-arm, 44deg) * -1));
	}

	50% {
		transform: rotate(calc(var(--swing-arm, 44deg) * 0.9));
	}
}

@keyframes rn-bob {

	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(var(--bob-y, -1.5px));
	}
}

@keyframes run-to-river {
	0% {
		transform: translateX(0);
		opacity: 1;
	}

	88% {
		opacity: 1;
	}

	100% {
		transform: translateX(var(--run-distance, 460px));
		opacity: 0;
	}
}

.run-hint {
	display: block;
	font-size: 78%;
	color: rgba(255, 255, 255, 0.45);
	margin-top: 4px;
}

@media (max-width: 640px) {
	.hero {
		padding-top: 62px;
	}

	.hero-temp {
		font-size: 215%;
	}
}

.comment-warn {
	color: rgba(255, 255, 255, 0.6);
	margin-top: -20px;
}

/* 댓글 작성: 다크 글래스 패널 */
.comment-form {
	max-width: 720px;
	background: rgba(8, 14, 40, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 14px;
	padding: 12px;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.comment-form .uk-textarea {
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 10px;
	color: #fff;
	font-size: 15px;
	padding: 10px 12px;
}

.comment-form .uk-textarea:focus {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(129, 140, 248, 0.65);
	color: #fff;
}

.comment-form .uk-textarea::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.comment-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.sticker-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	flex: 1;
}

.sticker {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 4px 11px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
}

.sticker:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.comment-submit {
	background: linear-gradient(90deg, #67e8f9, #818cf8);
	color: #0b1230;
	font-weight: 700;
	border: none;
	border-radius: 10px;
	padding: 8px 24px;
	font-size: 14px;
	cursor: pointer;
}

.comment-submit:hover {
	filter: brightness(1.12);
}

/* 댓글 목록: 다크 글래스 카드 */
.comment-card {
	white-space: normal;
	position: relative;
	max-width: 720px;
	background: rgba(8, 14, 40, 0.5) !important;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	box-shadow: none !important;
	color: rgba(255, 255, 255, 0.9) !important;
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	margin-top: 10px;
}

.comment-card h4 {
	color: rgba(255, 255, 255, 0.55) !important;
	font-size: 14px;
}

.comment-card .uk-comment-meta {
	color: rgba(255, 255, 255, 0.4) !important;
}

.comment-card > span {
	color: rgba(255, 255, 255, 0.92);
}

.comment-del {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.4);
	font-size: 15px;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
}

.comment-del:hover {
	color: #ff9b9b;
}

.comment-card h4 {
	margin-bottom: 0px;
}

.comment-card span {
	word-wrap: break-word;
}

td,
th {
	color: rgba(255, 255, 255, 0.8) !important;
}

.a-dark {
	color: rgba(0, 0, 0, 0.53) !important;
}

.a-dark:hover {
	color: rgba(0, 0, 0, 0.5) !important;
}

a {
	color: rgba(255, 255, 255) !important;
}

a:hover {
	color: rgba(255, 255, 255, 0.5) !important;
	text-decoration: none;
}

.gear {
	color: white;
	cursor: pointer;
	position: fixed !important;
	top: auto !important;
	bottom: 12px !important;
	left: 12px !important;
	z-index: 100;
	padding: 8px;
}

/* 댓글이 한강 위를 떠다니는 레이어 (화면 오른쪽 → 강물 흐르듯 왼쪽으로) */
#float-layer {
	position: fixed;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.float-comment {
	position: absolute;
	left: 100%;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.78);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 0 4px rgba(0, 0, 0, 0.6);
	animation: float-drift var(--dur, 18s) linear forwards;
	will-change: transform;
}

.float-bob {
	display: inline-block;
	animation: float-bob 3.2s ease-in-out infinite;
}

/* 방금 올라온 새 댓글은 조금 크게 */
.float-new {
	font-size: 16px !important;
}

/* --- 떠다니는 댓글 스타일 변주 (랜덤 적용) --- */

/* 네온 사인 */
.fx-neon {
	color: #8ef4ff;
}

.fx-neon .float-bob {
	animation: float-bob 3.2s ease-in-out infinite,
		fx-neon-pulse 1.4s ease-in-out infinite;
}

@keyframes fx-neon-pulse {

	0%,
	100% {
		text-shadow: 0 0 6px rgba(80, 226, 255, 0.95), 0 0 20px rgba(80, 226, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.8);
	}

	50% {
		text-shadow: 0 0 3px rgba(80, 226, 255, 0.5), 0 0 8px rgba(80, 226, 255, 0.25), 0 2px 10px rgba(0, 0, 0, 0.8);
	}
}

/* 무지개 (색이 흐르며 변함) */
.fx-rainbow .float-bob {
	background: linear-gradient(90deg, #ff8a8a, #ffd36e, #8dff9e, #7fd4ff, #c99bff, #ff8ad4);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: float-bob 3.2s ease-in-out infinite,
		fx-hue 3s linear infinite;
}

@keyframes fx-hue {
	to {
		filter: hue-rotate(360deg);
	}
}

/* 별처럼 반짝임 */
.fx-twinkle {
	color: #ffffff;
}

.fx-twinkle .float-bob {
	animation: float-bob 3.2s ease-in-out infinite,
		fx-twinkle 1.3s ease-in-out infinite;
}

@keyframes fx-twinkle {

	0%,
	100% {
		opacity: 1;
		filter: brightness(1.5);
	}

	45% {
		opacity: 0.5;
		filter: brightness(0.9);
	}

	70% {
		opacity: 0.9;
	}
}

/* 네온사인 플리커 (고장난 간판처럼 불규칙하게 지지직) */
.fx-flicker {
	color: #ffc2ef;
}

.fx-flicker .float-bob {
	animation: float-bob 3.2s ease-in-out infinite,
		fx-flicker 2.6s linear infinite;
}

@keyframes fx-flicker {

	0%,
	7%,
	9%,
	13%,
	15%,
	42%,
	44%,
	46%,
	78%,
	80%,
	100% {
		opacity: 1;
		text-shadow: 0 0 4px #fff, 0 0 11px #ff6ad5, 0 0 22px #ff6ad5, 0 0 42px #ff2fbf, 0 2px 10px rgba(0, 0, 0, 0.8);
	}

	8%,
	14%,
	43%,
	79% {
		opacity: 0.35;
		text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
	}

	45% {
		opacity: 0.6;
		text-shadow: 0 0 6px rgba(255, 106, 213, 0.4), 0 2px 10px rgba(0, 0, 0, 0.8);
	}
}

/* 유리 말풍선 */
.fx-bubble {
	background: rgba(10, 20, 52, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	padding: 4px 13px;
	color: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

/* 금빛 */
.fx-gold {
	color: #ffe9a8;
}

.fx-gold .float-bob {
	animation: float-bob 3.2s ease-in-out infinite,
		fx-gold-glow 2s ease-in-out infinite;
}

@keyframes fx-gold-glow {

	0%,
	100% {
		text-shadow: 0 0 8px rgba(255, 215, 120, 0.8), 0 2px 10px rgba(0, 0, 0, 0.8);
	}

	50% {
		text-shadow: 0 0 18px rgba(255, 215, 120, 0.5), 0 2px 10px rgba(0, 0, 0, 0.8);
	}
}

@keyframes float-drift {
	0% {
		transform: translateX(0);
		opacity: 0;
	}

	8% {
		opacity: 0.9;
	}

	78% {
		opacity: 0.9;
	}

	100% {
		transform: translateX(-58vw);
		opacity: 0;
	}
}

@keyframes float-bob {

	0%,
	100% {
		transform: translateY(0) rotate(-1.5deg);
	}

	50% {
		transform: translateY(-6px) rotate(1.5deg);
	}
}

@media (max-width: 640px) {
	.float-comment {
		font-size: 13px;
	}
}

.visitor-info {
	padding-top: 20px;
	font-size: 88%;
	color: rgba(255, 255, 255, 0.55);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.footer-copy {
	padding-top: 8px;
	padding-bottom: 20px;
	color: rgba(255, 255, 255, 0.6);
}

.cbs-alert {
	margin-bottom: 20px;
}

/* 기본색은 html에: body 배경이 음수 z-index 슬라이드를 덮지 않도록 */
html {
	background: #05102e !important;
}

.bg-img {
	background: transparent !important;
}

/* 지역별 배경 슬라이드 (두 레이어 크로스페이드) */
.bg-slide {
	position: fixed;
	inset: 0;
	z-index: -1;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	opacity: 0;
	transition: opacity 2s ease;
	pointer-events: none;
}

.bg-slide.on {
	opacity: 1;
}

.uk-accordion-title,
.footer-copy,
.comment-warn {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 3px 10px rgba(0, 0, 0, 0.45);
}

#APHORISM {
	transition: opacity 0.6s ease;
}

.rate-up {
	color: #ff9b9b;
}

.rate-down {
	color: #9bb8ff;
}
