:root {
	--wrap: 1180px;
	--rail: 296px;
	--gap: 22px;
	--top: 58px;

	--brand: #e03131;
	--brand-strong: #c92a2a;
	--brand-text: #cc2626;
	--brand-tint: #fff1f0;
	--brand-line: #ffd6d3;
	--on-brand: #ffffff;

	--ink: #14171c;
	--ink-soft: #3b414b;
	--dim: #5c6472;
	--dim-soft: #79818f;
	--on-ink: #ffffff;

	--line: #e4e7ec;
	--line-soft: #eef0f3;
	--line-hard: #cbd1da;

	--body: #f2f4f7;
	--page: #ffffff;
	--face: #f7f8fa;
	--face-2: #edf0f4;

	--notice-tint: #fffaef;
	--notice-line: #f0e2c4;
	--good: #0e9f6e;
	--logo-mark: #1a1a1a;
	--logo-ink: #1a1a1a;

	--gold: #b47b10;
	--silver: #6f7787;
	--bronze: #9c6132;

	--r1: 8px;
	--r2: 12px;
	--r3: 16px;
	--sh1: 0 1px 2px rgba(16, 24, 40, .06);
	--sh2: 0 4px 14px rgba(16, 24, 40, .08);
	--sh3: 0 12px 32px rgba(16, 24, 40, .14);
	--ring: 0 0 0 3px rgba(224, 49, 49, .16);

	--sans: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', Pretendard,
		'Noto Sans KR', 'Malgun Gothic', system-ui, 'Segoe UI', Roboto, sans-serif;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme=light]) {
		--brand: #ff5f5a;
		--brand-strong: #ff7b76;
		--brand-text: #ff8b86;
		--brand-tint: #2c1719;
		--brand-line: #4a2528;
		--on-brand: #2a0d0d;

		--ink: #e9ecf1;
		--ink-soft: #c3c9d4;
		--dim: #98a1b0;
		--dim-soft: #838d9c;
		--on-ink: #12151a;

		--line: #272d38;
		--line-soft: #1f242d;
		--line-hard: #38414f;

		--body: #0e1116;
		--page: #161a21;
		--face: #1b2028;
		--face-2: #232936;

		--notice-tint: #241f14;
		--notice-line: #453a22;
		--good: #34d399;
		--logo-mark: #2a313c;
		--logo-ink: #e9ecf1;

		--gold: #e0b34c;
		--silver: #a6afbf;
		--bronze: #c98c5c;

		--sh1: 0 1px 2px rgba(0, 0, 0, .4);
		--sh2: 0 4px 14px rgba(0, 0, 0, .45);
		--sh3: 0 12px 32px rgba(0, 0, 0, .55);
		--ring: 0 0 0 3px rgba(255, 95, 90, .22);

		color-scheme: dark;
	}
}

:root[data-theme=dark] {
	--brand: #ff5f5a;
	--brand-strong: #ff7b76;
	--brand-text: #ff8b86;
	--brand-tint: #2c1719;
	--brand-line: #4a2528;
	--on-brand: #2a0d0d;

	--ink: #e9ecf1;
	--ink-soft: #c3c9d4;
	--dim: #98a1b0;
	--dim-soft: #838d9c;
	--on-ink: #12151a;

	--line: #272d38;
	--line-soft: #1f242d;
	--line-hard: #38414f;

	--body: #0e1116;
	--page: #161a21;
	--face: #1b2028;
	--face-2: #232936;

	--notice-tint: #241f14;
	--notice-line: #453a22;
	--good: #34d399;
	--logo-mark: #2a313c;
	--logo-ink: #e9ecf1;
	--gold: #e0b34c;
	--silver: #a6afbf;
	--bronze: #c98c5c;

	--sh1: 0 1px 2px rgba(0, 0, 0, .4);
	--sh2: 0 4px 14px rgba(0, 0, 0, .45);
	--sh3: 0 12px 32px rgba(0, 0, 0, .55);
	--ring: 0 0 0 3px rgba(255, 95, 90, .22);

	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
	scrollbar-gutter: stable;
	scroll-padding-top: calc(var(--top) + 56px);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding-bottom: env(safe-area-inset-bottom);
	background: var(--body);
	color: var(--ink);
	font: 15px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; }
ul, ol { list-style: none; }
fieldset, img { border: 0; }
img { max-width: 100%; height: auto; vertical-align: middle; }
hr { display: none; }
table { border-collapse: collapse; width: 100%; }

a { color: inherit; text-decoration: none; transition: color .13s ease; }
a:hover { color: var(--brand-text); }

input, textarea, select, button { font-family: inherit; font-size: 15px; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(224, 49, 49, .2); }

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 16px;
	position: relative;
}

.card {
	background: var(--page);
	border: 1px solid var(--line);
	border-radius: var(--r2);
	box-shadow: var(--sh1);
}

.num { font-variant-numeric: tabular-nums; }

.only-read {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: fixed;
	left: 12px;
	top: -60px;
	z-index: 100;
	padding: 10px 15px;
	border-radius: var(--r1);
	background: var(--ink);
	color: var(--on-ink);
	font-size: 14px;
	font-weight: 700;
	transition: top .15s ease;
}

.skip:focus { top: 12px; color: var(--on-ink); }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 38px;
	padding: 0 15px;
	border: 1px solid var(--line-hard);
	border-radius: var(--r1);
	background: var(--page);
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transition: background .13s ease, border-color .13s ease, color .13s ease, box-shadow .13s ease;
}

.btn:hover { background: var(--face); border-color: var(--dim-soft); color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.btn-on:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--on-ink); }

.btn-brand { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--on-brand); }

.btn-quiet { border-color: transparent; background: transparent; color: var(--dim); }
.btn-quiet:hover { background: var(--face-2); border-color: transparent; color: var(--ink); }

.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }

.notice-box {
	margin: 14px 0;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r2);
	background: var(--face);
	font-size: 14px;
}

.notice-box a { margin-left: 8px; color: var(--brand-text); font-weight: 600; }
.notice-box .sub { margin-top: 3px; color: var(--dim); font-size: 12px; }

.empty {
	padding: 52px 20px;
	border-radius: var(--r2);
	background: var(--page);
	border: 1px solid var(--line);
	text-align: center;
	color: var(--dim);
	font-size: 14px;
}

.alert {
	margin: 0 0 14px;
	padding: 12px 15px;
	border: 1px solid var(--brand-line);
	border-radius: var(--r1);
	background: var(--brand-tint);
	color: var(--brand-text);
	font-size: 14px;
	font-weight: 600;
}

.chip {
	display: inline-flex;
	align-items: center;
	height: 22px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--face-2);
	color: var(--dim);
	font-size: 12px;
	font-weight: 600;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(76px + env(safe-area-inset-bottom));
	z-index: 90;
	transform: translate(-50%, 10px);
	max-width: calc(100vw - 32px);
	padding: 11px 18px;
	border-radius: 999px;
	background: rgba(20, 23, 28, .94);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}

.toast.on { opacity: 1; transform: translate(-50%, 0); }

input[type=checkbox] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var(--line-hard);
	border-radius: 6px;
	background: var(--page);
	vertical-align: middle;
	position: relative;
	cursor: pointer;
	transition: border-color .13s ease, background .13s ease;
}

input[type=checkbox]:hover { border-color: var(--ink); }
input[type=checkbox]:checked { border-color: var(--brand); background: var(--brand); }

input[type=checkbox]:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid var(--on-brand);
	border-width: 0 2px 2px 0;
	transform: rotate(43deg);
}

@media (min-width: 941px) {
	.toast { bottom: 26px; }
}

@media (pointer: coarse) {
	input[type=checkbox] { width: 22px; height: 22px; }
	input[type=checkbox]:checked::after { left: 7px; top: 2.5px; width: 6px; height: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
