:root {
	font-family: Inter, "Pretendard", "Noto Sans KR", system-ui, sans-serif;
	color: #eaf0f8;
	background: #0b1019;
	font-size: 16px;
	line-height: 1.55;
	--muted: #93a5bd;
	--line: #263246;
	--accent: #56e1bb
}

* {
	box-sizing: border-box
}

body {
	margin: 0
}

button,
input,
select {
	font: inherit
}

button,
a,
input,
select {
	outline-offset: 4px
}

button {
	cursor: pointer;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 9px 15px;
	background: #182334;
	color: #eaf0f8;
	font-weight: 600
}

button:hover {
	background: #25364d
}

button:disabled {
	opacity: .45;
	cursor: not-allowed
}

a {
	color: var(--accent);
	text-underline-offset: 4px
}

button.primary {
	background: var(--accent);
	color: #07261c;
	border-color: transparent
}

button.primary:hover {
	background: #89f2d2
}

.quiet {
	background: transparent
}

.text-button {
	padding: 0;
	border: 0;
	background: transparent;
	text-align: left;
	font-size: .875rem;
	color: var(--accent)
}

header {
	padding: 23px 4%;
	border-bottom: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #0e1520
}

.brand {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: -1px
}

.brand span {
	color: var(--accent)
}

.brand b {
	font-size: 1rem;
	letter-spacing: 2px;
	margin-left: 6px
}

.brand small {
	font-size: .75rem;
	color: var(--muted);
	letter-spacing: 1px;
	font-weight: 500;
	margin-left: 25px
}

.header-actions {
	display: flex;
	gap: 20px;
	align-items: center
}

.badge {
	border: 1px solid var(--line);
	border-radius: 30px;
	padding: 5px 12px;
	font-size: .875rem;
	background: #172133
}

.badge.live {
	color: #ffb46b;
	border-color: #875428
}

.badge.paper {
	color: #8ed7ee
}

main {
	max-width: 1600px;
	margin: auto;
	padding: 42px 4%
}

h1 {
	font-size: 2rem;
	letter-spacing: -1px;
	margin: 4px 0 9px
}

h2 {
	font-size: 1.12rem;
	margin: 0
}

p {
	margin: 10px 0 20px
}

.eyebrow {
	font-size: .75rem;
	letter-spacing: 2px;
	color: var(--accent);
	margin: 0
}

.muted {
	color: var(--muted);
	font-size: .875rem
}

.title-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 25px;
	margin-bottom: 24px
}

.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 26px
}

.stats article {
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #111a28;
	display: flex;
	flex-direction: column;
	gap: 8px
}

.stats article>span {
	font-size: .875rem;
	color: var(--muted)
}

.stats strong {
	font-size: 1.45rem;
	line-height: 1.5;
	letter-spacing: -.4px
}

.stats small {
	font-size: .8rem;
	color: var(--muted)
}

.panel {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: #101824;
	margin-bottom: 24px;
	overflow: hidden
}

.panel-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 21px 22px;
	gap: 12px;
	border-bottom: 1px solid var(--line)
}

.panel-title span {
	font-size: .8rem;
	color: var(--muted)
}

.table-scroll {
	overflow-x: auto
}

table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: .875rem
}

th {
	background: #131e2e;
	color: var(--muted);
	font-weight: 500;
	padding: 13px 18px;
	white-space: nowrap
}

td {
	padding: 19px 18px;
	border-bottom: 1px solid #202c3d;
	vertical-align: middle
}

tbody tr:last-child td {
	border: 0
}

td small {
	display: block;
	color: var(--muted);
	font-size: .75rem;
	margin-top: 5px;
	max-width: 270px;
	overflow-wrap: anywhere
}

.coin {
	display: flex;
	gap: 12px;
	align-items: center;
	white-space: nowrap
}

.coin-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #263448;
	color: #bbe7e1;
	display: grid;
	place-items: center;
	font-weight: 700
}

.numeric {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	font-weight: 600
}

.up {
	color: #ff8b98
}

.down {
	color: #79acff
}

.row-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	min-width: 155px
}

.row-actions button {
	padding: 5px 9px;
	font-size: .8rem
}

.buy {
	color: #ff9daa
}

.sell {
	color: #96bcff
}

.empty {
	padding: 45px 20px;
	text-align: center;
	color: var(--muted)
}

.footnote {
	padding: 0 22px;
	font-size: .8rem;
	color: var(--muted);
	margin: 18px 0
}

.bottom-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 24px
}

.events {
	max-height: 335px;
	overflow: auto
}

.event {
	padding: 16px 22px;
	border-bottom: 1px solid var(--line)
}

.event-top {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	font-size: .875rem
}

.event p {
	white-space: pre-line;
	font-size: .875rem;
	color: #bac8da;
	margin: 7px 0
}

.event small {
	font-size: .75rem;
	color: var(--muted)
}

.order-guide {
	padding: 28px;
	background: linear-gradient(140deg, #122c32, #111a28 70%)
}

.order-guide h2 {
	font-size: 1.4rem;
	margin: 12px 0
}

.order-guide p {
	font-size: .9rem
}

#order-limit {
	padding: 12px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	font-size: .9rem
}

.warning {
	border: 1px solid #775c30;
	background: #322918;
	color: #f8d494;
	border-radius: 8px;
	padding: 13px 18px;
	font-size: .875rem;
	margin-bottom: 20px;
	white-space: pre-line
}

.error-text {
	color: #ffb1b1
}

.good {
	color: var(--accent)
}

footer {
	color: var(--muted);
	font-size: .8rem;
	display: flex;
	justify-content: space-between;
	margin-top: 34px
}

dialog {
	width: 540px;
	max-width: calc(100% - 24px);
	max-height: 90vh;
	overflow: auto;
	background: #111c2c;
	color: #eaf0f8;
	border: 1px solid #344963;
	border-radius: 15px;
	padding: 28px
}

dialog::backdrop {
	background: #030912b8;
	backdrop-filter: blur(4px)
}

.dialog-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 22px
}

.dialog-title button {
	font-size: 1.4rem;
	padding: 0 10px;
	border: 0;
	background: transparent
}

label {
	display: block;
	font-size: .875rem;
	color: #c3cfde;
	margin-bottom: 18px
}

input,
select {
	display: block;
	width: 100%;
	background: #0b1421;
	color: #edf5ff;
	border: 1px solid #354760;
	border-radius: 7px;
	padding: 11px 12px;
	margin-top: 7px
}

input:focus,
select:focus {
	border-color: var(--accent)
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px
}

form>.primary {
	width: 100%
}

.check {
	display: flex;
	align-items: center;
	gap: 10px
}

.check input {
	width: auto;
	margin: 0
}

.summary {
	padding: 17px;
	background: #1b2c40;
	border-radius: 8px;
	margin: 20px 0;
	font-size: .9rem;
	white-space: pre-line
}

.actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px
}

.login {
	max-width: 410px;
	margin: 12vh auto;
	padding: 26px
}

.login .brand {
	margin-bottom: 35px
}

.login>p {
	color: var(--muted)
}

#notice {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
	background: #283e54;
	border: 1px solid #617c99;
	color: white;
	box-shadow: 0 8px 40px #0007;
	padding: 14px 22px;
	border-radius: 10px;
	max-width: 90%;
	width: max-content;
	white-space: pre-line
}

body:has(dialog[open]) #notice {
	top: 20px;
	bottom: auto
}

*[hidden] {
	display: none !important
}

@media(max-width:1000px) {
	.stats {
		grid-template-columns: repeat(2, 1fr)
	}

	.bottom-grid {
		grid-template-columns: 1fr
	}

	.brand small {
		display: none
	}
}

@media(max-width:600px) {
	header {
		padding: 18px
	}

	.brand b {
		font-size: .85rem;
		letter-spacing: 1px
	}

	.header-actions {
		gap: 9px
	}

	.badge {
		font-size: .75rem;
		padding: 4px 8px
	}

	main {
		padding: 28px 15px
	}

	.title-row {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px
	}

	h1 {
		font-size: 1.7rem
	}

	.stats {
		gap: 10px
	}

	.stats article {
		padding: 15px
	}

	.stats strong {
		font-size: 1.13rem
	}

	.panel-title {
		padding: 16px;
		align-items: flex-start;
		flex-direction: column;
		gap: 5px
	}

	dialog {
		padding: 20px
	}

	.form-grid {
		gap: 0 12px
	}

	.header-actions .quiet {
		font-size: .8rem;
		padding: 5px
	}

	footer {
		gap: 15px
	}
}
