* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
	background: radial-gradient(circle at 20% 10%, #f6d9ff, transparent 32%), linear-gradient(135deg, #6a4de6, #f7d8ee 70%, #fff7fb);
	color: #202033;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 18px;
}

button, input, textarea, select {
	font: inherit;
}

button {
	cursor: pointer;
}

.app-shell {
	position: relative;
	width: 390px;
	height: 844px;
	background: #fbfbff;
	border-radius: 34px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(47, 28, 116, 0.35);
	border: 1px solid rgba(255,255,255,0.6);
}

.screen {
	display: none;
	height: 100%;
	overflow-y: auto;
	background: #fbfbff;
}

.screen.active {
	display: block;
}

.main-screen {
	padding: 16px 16px 92px;
}

.hero-screen {
	position: relative;
	min-height: 100%;
	padding: 0 24px 34px;
	background-image: linear-gradient(180deg, rgba(72, 42, 174, .05), rgba(249, 215, 239, .16)), url("./assets/images/intro-bg.png");
	background-size: cover;
	background-position: center top;
	color: white;
	overflow: hidden;
	display: flex;
	align-items: flex-end;
}

.intro-actions {
	position: relative;
	z-index: 4;
	width: 100%;
	display: grid;
	gap: 14px;
	padding-bottom: 14px;
}

.primary-btn,
.outline-btn {
	width: 100%;
	border: 0;
	border-radius: 18px;
	padding: 15px 18px;
	font-weight: 800;
}

.primary-btn {
	background: linear-gradient(135deg, #8a63ff, #6546d8);
	color: white;
	box-shadow: 0 12px 24px rgba(105, 74, 219, .28);
}

.outline-btn {
	background: rgba(255,255,255,.75);
	color: #6546d8;
	border: 1px solid rgba(101,70,216,.35);
}

.top-bar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 54px;
	background: rgba(251,251,255,.92);
	backdrop-filter: blur(12px);
	font-size: 18px;
}

.icon-btn {
	border: 0;
	background: transparent;
	font-size: 26px;
	color: #17172b;
}

.form-page {
	padding: 32px 24px;
	text-align: center;
}

.mini-logo {
	width: 82px;
	height: 82px;
	margin: 10px auto 18px;
	border-radius: 50%;
	background: #fff2fa;
	display: grid;
	place-items: center;
	font-size: 38px;
}

.form-page h2 { margin: 0 0 8px; }
.form-page p { color: #77778a; }

input, textarea, select {
	width: 100%;
	border: 1px solid #e6e3f2;
	border-radius: 15px;
	padding: 15px;
	background: white;
	outline-color: #8a63ff;
	margin-top: 12px;
}

.text-link {
	display: block;
	text-align: right;
	margin: 12px 0 28px;
	font-size: 13px;
	color: #79708b;
	text-decoration: none;
}

.divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 24px 0;
	color: #999;
}

.divider::before, .divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e8e5f1;
}

.social-row {
	display: flex;
	justify-content: center;
	gap: 22px;
}

.social-row button {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid #e7e4ef;
	background: white;
	font-weight: 900;
}

.bottom-copy {
	margin-top: 80px;
	font-size: 13px;
}

.bottom-copy button {
	border: 0;
	background: none;
	color: #6546d8;
	font-weight: 800;
}

.banner-card {
	padding: 20px;
	border-radius: 18px;
	background: linear-gradient(135deg, #7b55ec, #e9a9ef);
	color: white;
	font-weight: 800;
	line-height: 1.5;
	box-shadow: 0 10px 24px rgba(125, 85, 236, .24);
}

.category-tabs {
	display: flex;
	gap: 18px;
	padding: 18px 2px 12px;
	overflow-x: auto;
}

.category-tabs button {
	border: 0;
	background: none;
	color: #6c6879;
	font-weight: 700;
	white-space: nowrap;
	padding: 7px 0;
}

.category-tabs .active {
	color: #6546d8;
	border-bottom: 3px solid #6546d8;
}

.wish-card {
	background: white;
	border: 1px solid #eeeaf7;
	border-radius: 22px;
	padding: 17px;
	margin-bottom: 14px;
	box-shadow: 0 8px 22px rgba(52, 43, 91, .06);
}

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

.avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: linear-gradient(135deg, #ffd4de, #8a63ff);
	display: grid;
	place-items: center;
}

button.avatar {
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
}

.wish-user strong { display: block; }
.wish-user small { color: #8b8796; }

.wish-card h3 {
	margin: 14px 0 8px;
	font-size: 18px;
}

.wish-card p {
	margin: 0;
	line-height: 1.55;
	color: #4e4b5f;
}

.tags {
	display: flex;
	gap: 7px;
	margin-top: 12px;
}

.tags span {
	font-size: 12px;
	padding: 5px 9px;
	border-radius: 999px;
	background: #f2ebff;
	color: #6546d8;
}

.card-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	color: #686478;
	font-size: 14px;
}

.help-btn {
	border: 0;
	border-radius: 999px;
	padding: 10px 15px;
	background: #7751e8;
	color: white;
	font-weight: 800;
}

.detail-card {
	background: white;
	border-radius: 24px;
	padding: 20px;
	border: 1px solid #eeeaf7;
}

.info-grid {
	display: grid;
	gap: 10px;
	margin: 20px 0;
	padding: 15px;
	border-radius: 16px;
	background: #f8f6fd;
	color: #555268;
}

.create-box {
	background: white;
	border-radius: 24px;
	padding: 18px;
	border: 1px solid #eeeaf7;
}

.create-box label {
	display: block;
	font-weight: 800;
	margin-bottom: 16px;
}

.notification-item, .chat-item {
	display: flex;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid #eeeaf7;
}

.notification-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #f0e9ff;
	display: grid;
	place-items: center;
	font-size: 22px;
	flex: 0 0 auto;
}

.notification-item p, .chat-item p { margin: 0 0 5px; }
.notification-item small, .chat-item small { color: #918d9d; }

.search-box {
	background: white;
	border: 1px solid #eeeaf7;
	border-radius: 14px;
	padding: 13px 15px;
	color: #aaa;
	margin-bottom: 10px;
}

.chat-item {
	align-items: center;
	cursor: pointer;
}

.chat-item .meta {
	margin-left: auto;
	font-size: 12px;
	color: #888;
}

.chat-room {
	padding: 8px 0 72px;
}

.date-chip {
	width: max-content;
	margin: 10px auto 22px;
	padding: 7px 13px;
	border-radius: 999px;
	background: #f4f0fa;
	font-size: 12px;
	color: #777;
}

.bubble {
	max-width: 76%;
	padding: 12px 14px;
	border-radius: 18px;
	margin-bottom: 12px;
	line-height: 1.5;
	font-size: 14px;
}

.bubble.other {
	background: #f0eef4;
	border-top-left-radius: 6px;
}

.bubble.me {
	margin-left: auto;
	background: #7751e8;
	color: white;
	border-top-right-radius: 6px;
}

.message-input {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 18px;
	display: flex;
	gap: 8px;
	background: rgba(251,251,255,.92);
}

.message-input input { margin: 0; border-radius: 999px; }
.message-input button {
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: #7751e8;
	color: white;
}

.nav-icon {
	display: block;
	width: 24px;
	height: 24px;
	background: currentColor;
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
}

.icon-home { -webkit-mask-image: url("./assets/icons/home.svg"); mask-image: url("./assets/icons/home.svg"); }
.icon-wish { -webkit-mask-image: url("./assets/icons/wish.svg"); mask-image: url("./assets/icons/wish.svg"); }
.icon-plus { -webkit-mask-image: url("./assets/icons/plus.svg"); mask-image: url("./assets/icons/plus.svg"); }
.icon-bell { -webkit-mask-image: url("./assets/icons/bell.svg"); mask-image: url("./assets/icons/bell.svg"); }
.icon-chat { -webkit-mask-image: url("./assets/icons/chat.svg"); mask-image: url("./assets/icons/chat.svg"); }
.icon-heart { -webkit-mask-image: url("./assets/icons/heart.svg"); mask-image: url("./assets/icons/heart.svg"); }
.icon-star { -webkit-mask-image: url("./assets/icons/star.svg"); mask-image: url("./assets/icons/star.svg"); }
.icon-gift { -webkit-mask-image: url("./assets/icons/gift.svg"); mask-image: url("./assets/icons/gift.svg"); }

.image-icon-btn {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	font-size: 0;
}


.bottom-nav {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 78px;
	background: rgba(255,255,255,.94);
	border-top: 1px solid #ebe8f4;
	display: none;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
	padding: 6px 10px 12px;
	backdrop-filter: blur(14px);
}

.bottom-nav.show {
	display: grid;
}

.bottom-nav button {
	border: 0;
	background: none;
	color: #5d596e;
	display: grid;
	gap: 3px;
	place-items: center;
	font-size: 21px;
}

.bottom-nav button span {
	font-size: 11px;
}

.bottom-nav .active {
	color: #6546d8;
	font-weight: 800;
}

.bottom-nav .plus {
	width: 54px;
	height: 54px;
	margin: auto;
	border-radius: 50%;
	background: linear-gradient(135deg, #8a63ff, #6546d8);
	color: white;
	box-shadow: 0 12px 22px rgba(101, 70, 216, .32);
}

.bottom-nav .plus .nav-icon {
	width: 28px;
	height: 28px;
}

@media (max-width: 440px) {
	body { padding: 0; }
	.app-shell {
		width: 100vw;
		height: 100vh;
		border-radius: 0;
	}
}

.inline-stats {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.tiny-icon {
	display: inline-block;
	width: 17px;
	height: 17px;
	background: currentColor;
	-webkit-mask: center / contain no-repeat;
	mask: center / contain no-repeat;
	vertical-align: -3px;
}

.notification-icon {
	color: #7751e8;
}

.notification-icon .nav-icon {
	width: 24px;
	height: 24px;
}

.profile-photo-picker {
	position: relative;
	display: inline-block;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0 auto 8px;
}

.profile-photo {
	margin: 10px auto 18px;
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(101, 70, 216, .20);
	border: 3px solid rgba(255,255,255,.95);
}

.profile-photo img,
.avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.profile-photo-badge {
	position: absolute;
	right: -8px;
	bottom: 10px;
	padding: 6px 9px;
	border-radius: 999px;
	background: linear-gradient(135deg, #8a63ff, #6546d8);
	color: white;
	font-size: 11px;
	font-weight: 800;
	box-shadow: 0 8px 18px rgba(101, 70, 216, .28);
}

.profile-photo-picker:active .profile-photo {
	transform: scale(.98);
}

.visually-hidden-file {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@supports (height: 100dvh) {
	@media (max-width: 440px) {
		.app-shell { height: 100dvh; }
	}
}

@media (max-width: 440px) {
	html, body {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}
	body {
		min-height: 100svh;
		padding: 0;
		align-items: stretch;
	}
	.app-shell {
		width: 100%;
		max-width: none;
		height: 100svh;
		min-height: 100svh;
		border-radius: 0;
		border: 0;
	}
	.screen {
		-webkit-overflow-scrolling: touch;
	}
}

/* 추가 기능: 기존 색감과 카드 디자인을 유지하는 최소 확장 */
.wish-photo-btn {
	width: 100%;
	margin-top: 8px;
}

.wish-image-preview {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 2px 0 6px;
}

.wish-image-thumb {
	position: relative;
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 18px;
	overflow: hidden;
	background: rgba(255,255,255,.7);
}

.wish-image-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wish-image-thumb button {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 16px;
	line-height: 22px;
}

.wish-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 24px;
	overflow: hidden;
	margin: 12px 0 14px;
	background: rgba(255,255,255,.35);
}

.wish-slide {
	display: none;
	width: 100%;
	height: 100%;
}

.wish-slide.active {
	display: block;
}

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

.slide-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.75);
	color: #6b42d8;
	font-size: 26px;
	line-height: 30px;
	box-shadow: 0 8px 18px rgba(85,62,150,.18);
}

.slide-btn.prev {
	left: 10px;
}

.slide-btn.next {
	right: 10px;
}

.slide-count {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(0,0,0,.48);
	color: #fff;
	font-size: 12px;
}

.hashtag-suggest {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: -8px;
}

.hashtag-suggest button {
	border: 0;
	border-radius: 999px;
	padding: 8px 12px;
	background: rgba(112,82,219,.12);
	color: #6b42d8;
	font-weight: 700;
}

.logout-btn {
	width: 100%;
	margin-top: 10px;
}

@media (max-width: 420px) {
	.app-shell {
		width: 100%;
		min-height: 100dvh;
		border-radius: 0;
	}

	.screen {
		min-height: 100dvh;
	}

	.main-screen {
		padding-bottom: calc(86px + env(safe-area-inset-bottom));
	}
}
.tags {
	flex-wrap: wrap;
}

.like-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	padding: 0;
	cursor: pointer;
}

.like-btn.liked {
	color: #ef3b5d;
}

.like-btn.liked .tiny-icon {
	background: #ef3b5d;
}

.comment-stat {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.detail-actions {
	margin: 12px 0 16px;
	color: #686478;
	font-size: 14px;
}

/* Inline SVG icons: prevents icon-font/mask rendering issues in WebView */
.tiny-svg-icon {
	display: inline-block;
	width: 17px;
	height: 17px;
	vertical-align: -3px;
	color: currentColor;
	flex: 0 0 auto;
}

.like-btn.liked {
	color: #ef3b5d;
}
