/**
 * Verso — Auth / header account / search overlay.
 * verso.css 의 새 토큰(--bg/--text/--text-2/--surface/--border/--accent)을 상속.
 */

/* ============================================================ Header action icons */
.site-header__actions .header-login,
.site-header__actions .search-toggle,
.site-header__actions .theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--text); cursor: pointer;
	transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.site-header__actions .header-login:hover,
.site-header__actions .search-toggle:hover,
.site-header__actions .theme-toggle:hover { background: var(--surface-2); color: var(--accent); }
.site-header__actions svg { width: 21px; height: 21px; display: block; }
.site-header__actions .header-login { text-decoration: none; }

/* 순서: 검색 → 테마 → 계정 */
.site-header__actions { gap: 6px; }
.site-header__actions .search-toggle { order: 1; }
.site-header__actions .theme-toggle { order: 2; }
.site-header__actions .header-account,
.site-header__actions .header-login { order: 3; }

/* sun/moon 토글 */
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: block; }

/* ============================================================ Profile dropdown */
.header-account { position: relative; display: inline-flex; }
.header-profile {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; padding: 0; background: transparent;
	border: 1px solid var(--border); border-radius: 50%; cursor: pointer; overflow: hidden;
	transition: border-color 0.18s var(--ease);
}
.header-profile:hover, .header-profile:focus-visible { border-color: var(--accent); }
.header-profile__avatar { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.header-profile__initial { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: 700; font-size: 0.95rem; color: var(--accent-ink); background: var(--accent); }

.profile-menu {
	position: absolute; top: calc(100% + 10px); right: 0; z-index: 220; min-width: 200px;
	padding: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
	box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px;
}
.profile-menu[hidden] { display: none; }
.profile-menu__name { padding: 9px 12px 7px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.profile-menu__item { display: block; padding: 9px 12px; font-size: 0.92rem; font-weight: 600; color: var(--text); text-decoration: none; border-radius: 9px; transition: background 0.15s, color 0.15s; }
.profile-menu__item:hover, .profile-menu__item:focus-visible { background: var(--surface-2); color: var(--text); }
.profile-menu__item--logout { color: var(--accent); margin-top: 2px; }

/* ============================================================ Auth pages */
.verso-auth { padding-block: clamp(3rem, 9vh, 6.5rem); min-height: 60vh; }
.verso-auth__container { display: flex; justify-content: center; }
.verso-auth__card {
	width: 100%; max-width: 420px; padding: clamp(1.75rem, 5vw, 2.75rem);
	background: var(--bg); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.verso-auth__head { margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.verso-auth__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em; color: var(--text); }
.verso-auth__lead { margin: 0 0 1.4rem; color: var(--text-2); font-size: 0.95rem; line-height: 1.6; }

.verso-auth__form { display: flex; flex-direction: column; gap: 1.1rem; }
.verso-auth__field { display: flex; flex-direction: column; gap: 0.45rem; }
.verso-auth__label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.verso-auth__field input {
	width: 100%; font-size: 16px; font-family: inherit; color: var(--text);
	background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
	padding: 0.8rem 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.verso-auth__field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.verso-auth__check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--text-2); cursor: pointer; }
.verso-auth__check input { width: 1rem; height: 1rem; accent-color: var(--accent); }

.verso-auth__submit {
	margin-top: 0.35rem; padding: 0.85rem 1.2rem; font-family: var(--font-sans);
	font-size: 0.95rem; font-weight: 700; color: var(--accent-ink); background: var(--accent);
	border: 0; border-radius: 999px; cursor: pointer; transition: transform 0.18s var(--ease), filter 0.18s;
}
.verso-auth__submit:hover { filter: brightness(1.05); transform: translateY(-1px); }

.verso-auth__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.verso-auth__links a { font-size: 0.88rem; font-weight: 600; color: var(--text-2); text-decoration: none; transition: color 0.15s; }
.verso-auth__links a:hover { color: var(--accent); }

.verso-auth__account-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.verso-auth__account-links a { display: block; padding: 0.9rem 1rem; font-size: 0.95rem; font-weight: 600; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.15s, color 0.15s; }
.verso-auth__account-links a:hover { border-color: var(--accent); color: var(--accent); }

.verso-auth__alert { margin-bottom: 1.25rem; padding: 0.85rem 1rem; font-size: 0.9rem; line-height: 1.5; border-radius: 12px; border: 1px solid transparent; }
.verso-auth__alert--error { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.verso-auth__alert--notice { color: var(--text); background: var(--surface); border-color: var(--border); }

/* ============================================================ Search overlay (clean) */
.verso-no-scroll { overflow: hidden !important; touch-action: none; }
.search-overlay { min-height: var(--vv-height, 100vh); }
.search-overlay.is-keyboard { align-items: flex-start; padding-top: calc(var(--vv-offset-top, 0px) + 1.5rem); }
.search-overlay .search-form { position: relative; display: flex; align-items: center; }
.search-overlay .search-field {
	width: 100%; font-size: clamp(1.7rem, 4.5vw, 2.8rem); font-weight: 800; font-family: var(--font-display);
	letter-spacing: -0.03em; color: var(--text); background: transparent;
	border: 0; border-bottom: 2px solid var(--text); border-radius: 0; box-shadow: none !important;
	padding: 0.35rem 2.4rem 0.35rem 0; outline: none;
}
.search-overlay .search-field::placeholder { color: var(--text-3); }
.search-overlay .search-submit {
	position: absolute; right: 0; bottom: 0.6rem; width: 40px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent; border: 0; color: var(--text-2); cursor: pointer; transition: color 0.18s;
}
.search-overlay .search-submit:hover { color: var(--accent); }
.search-overlay .search-submit svg { width: 24px; height: 24px; }
@media (max-width: 600px) {
	.search-overlay .search-field { font-size: 1.6rem; }
}
