/* Setting */

:root {
	--font-base: 'Pretendard', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	--font-display: 'GmarketSans', 'Pretendard', sans-serif;
	--fs-base: clamp(14px, 3.2vw, 16px);

	/* Brand */
	--c-primary: #ea609e;
	--c-secondary: #5f8cff;
	--c-accent: #ffd23f;

	/* Text */
	--c-text: #191919;
	--c-text-sub: #666;
	--c-text-light: #999;

	/* Background */
	--c-bg: #ffffff;
	--c-bg-soft: #f1f1f1;

	/* Border */
	--c-border: #d6d6d6;

	/* size */
	--header-h: 56px;
	--header-icon-size: 22px;
	--header-icon-touch: 40px;
	--footer-h: 54px;
	--footer-up-h: 124px;
	--banner-h: 70px;
}

body {
	font-family: var(--font-base);
	font-size: 15px;
	line-height: 1.5;
	color: var(--c-text);
	padding-bottom: 70px;
}

h1 {
	font-size: clamp(1.6rem, 4.5vw, 1.8rem);
}
h2 {
	font-size: clamp(1.45rem, 4vw, 1.65rem);
}
h3 {
	font-size: clamp(1.3rem, 3.2vw, 1.5rem);
}
h4 {
	font-size: clamp(1.1rem, 2.8vw, 1.4rem);
}
h5 {
	font-size: clamp(0.9rem, 2.4vw, 1.2rem);
}
h6 {
	font-size: clamp(0.8rem, 2vw, 1rem);
}

p {
	font-size: clamp(0.8rem, 1.9vw, 0.9rem);
}

h1,
h2 {
	font-weight: 700;
}
h3,
h4 {
	font-weight: 600;
}
h5,
h6 {
	font-weight: 600;
}

small {
	font-size: 13px;
	color: var(--c-text-sub);
}

.text-shadow-l {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.text-shadow {
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.shadow-xs {
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shadow-sm {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.shadow-md {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shadow-lg {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ease {
	transition: all 0.25s ease;
}

.ease-fast {
	transition: all 0.15s ease;
}

.tap {
	-webkit-tap-highlight-color: transparent;
}

.tap:active {
	transform: scale(0.97);
	opacity: 0.85;
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-up {
	animation: fadeUp 0.35s ease-out;
}

.glow-primary {
	box-shadow: 0 0 12px rgba(255, 107, 129, 0.45);
}

.badge {
	position: relative;
}

.badge::after {
	content: '';
	display: inline-block;
	position: absolute;
	top: 0;
	right: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #f00;
}

/* layout */

header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px;
	background: var(--c-bg-soft);
	border-bottom: 1px solid var(--c-border);
}

header .header-left,
header .header-right {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 40px;
	height: 100%;
}

header .header-left {
	justify-content: flex-start;
	justify-self: start;
}

header .header-right {
	justify-content: flex-end;
	justify-self: end;
	gap: 10px;
}

header .page-title {
	display: flex;
	align-items: center;
	gap: 6px;
	pointer-events: auto;
}

header .title {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

header .logoImg {
	width: auto;
	height: 100%;
}

header button {
	position: relative;
	height: 50%;
}

header button > img {
	width: 25px;
	height: auto;
}

header button.signin > img {
	position: relative;
	opacity: 0.25;
}

header button.signin::after {
	position: absolute;
	content: '?';
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	color: var(--c-bg-soft);
	font-weight: bold;
	font-size: 0.8rem;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

header button.isloggedIn {
	display: none;
}

header .back-btn {
	width: var(--icon-touch);
	height: var(--icon-touch);
	display: flex;
	align-items: center;
	justify-content: center;
}

header .back-btn img {
	width: var(--icon-size);
	height: var(--icon-size);
}

header .header-action {
	width: var(--icon-touch);
	height: var(--icon-touch);
	display: flex;
	align-items: center;
	justify-content: center;
}

header .header-action img {
	width: var(--icon-size);
	height: var(--icon-size);
}

main {
	height: 100%;
	background-color: var(--c-bg-soft);
	overflow-y: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
	padding-bottom: 60px;
}

main::-webkit-scrollbar {
	display: none;
}

#bottom-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: var(--banner-h);
	z-index: 100;
	background: url('/assets/img/ui/ads-mock.webp') no-repeat center/cover;
}

.toast {
	position: fixed;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	min-width: 120px;
	max-width: 320px;
	padding: 10px 16px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	font-size: 14px;
	text-align: center;
	line-height: 1.4;
	opacity: 0;
	pointer-events: none;
	z-index: 9999;
	transition: opacity 0.25s ease, transform 0.25s ease;
	white-space: nowrap;
	word-break: keep-all;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.toast.top {
	top: 70px;
}

.toast.bottom {
	bottom: 120px;
}

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-container {
	background: var(--c-bg);
	border-radius: 10px;
	max-width: 90%;
	max-height: 90%;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	position: relative;
}

.modal-close {
	position: absolute;
	width: 12px;
	height: 12px;
	top: 12px;
	right: 12px;
	border: none;
	background: none;
	cursor: pointer;
}

.modal-content {
	width: 100%;
}

.modal-title {
	padding: 12px;
}

.modal-content img {
	width: 100%;
	height: auto;
	display: block;
}

.modal-desc {
	padding: 12px;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
	cursor: pointer;
	user-select: none;
}

button.wiggle,
a.wiggle {
	animation: tap-wiggle 140ms ease-out;
}

@keyframes tap-wiggle {
	0% {
		transform: translateX(0) rotate(0deg);
	}
	25% {
		transform: translateX(-1px) rotate(-1deg);
	}
	50% {
		transform: translateX(1px) rotate(1deg);
	}
	75% {
		transform: translateX(-0.5px) rotate(-0.5deg);
	}
	100% {
		transform: translateX(0) rotate(0deg);
	}
}

#slider {
	position: relative;
	width: 100%;
	touch-action: pan-y;
}

#slider img {
	width: 100%;
	height: auto;
	opacity: 0;
	transition: opacity 1s ease;
}

#slider img:first-child {
	position: relative;
	z-index: 99;
}

#slider img:last-child {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 20;
}

#slider img.show {
	opacity: 1;
}
