/*
Theme Name: CY Mini Theme
Theme URI: https://example.com/cy-mini-theme
Author: CY Developer
Author URI: https://example.com
Description: 싸이월드 미니홈피 감성을 재해석한 워드프레스 블로그 테마. 중앙 고정 프레임 안에서 글 목록과 본문을 탐색합니다.
Version: 0.4.37
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cy-mini-theme
Tags: blog, one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   0. Variables & Reset
   ========================================================================== */

:root {
	/* 관리자 → 미니홈피 설정 에서 덮어씀 */
	--cy-frame-color: #4a94cc;
	--cy-frame-color-dark: #2d6fa8;
	--cy-frame-border-color: #1e5a8a;
	--cy-bg-color: #c8deee;
	--cy-inner-bg-color: #ffffff;
	--cy-inner-line-color: #b7d9f1;
	--cy-content-bg-color: #ffffff;
	--cy-profile-bg-color: #f8fcff;
	--cy-profile-button-bg-color: #ffffff;
	--cy-profile-button-border-color: #b7d9f1;
	--cy-profile-button-text-color: #2d6fa8;
	--cy-profile-button-hover-bg-color: #fff5f8;
	--cy-profile-button-hover-text-color: #e85d8a;
	--cy-inner-watermark-image: none;
	--cy-inner-watermark-opacity: 0.08;
	--cy-inner-watermark-size: contain;
	--cy-inner-watermark-position: center center;
	--cy-inner-watermark-repeat: no-repeat;
	--cy-main-panel-border-enabled: 1;
	--cy-main-panel-border-color: #b7d9f1;
	--cy-main-panel-bg-color: #ffffff;
	--cy-main-panel-radius: 6px;
	--cy-main-panel-margin-r: 18px;
	--cy-tab-color: #f07a28;
	--cy-tab-border-color: #c85e12;
	--cy-tab-text-color: #ffffff;
	--cy-tab-active-color: #ffffff;
	--cy-tab-active-text-color: #c85e12;
	--cy-text: #203850;
	--cy-tab-width: 110px;
	--cy-tab-height: 48px;
	--cy-tab-overlap: 0px;
	--cy-tab-protrude: 118px;
	--cy-tabs-top-offset: 58px;
	--cy-tabs-base-x-offset: -14px;
	--cy-tabs-x-offset: 0px;
	--cy-profile-w: 200px;
	--cy-profile-image-size: 110px;
	--cy-mobile-profile-image-size: 120px;
	--cy-profile-card-min-height: 180px;
	--cy-mobile-profile-card-min-height: 140px;
	--cy-mobile-profile-gap: 18px;
	--cy-pc-profile-card-padding: 14px;
	--cy-pc-profile-card-radius: 12px;
	--cy-bg-image: none;
	--cy-bg-repeat: no-repeat;
	--cy-bg-size: cover;
	--cy-bg-position: center center;
	/* 파생/고정 색상 */
	--cy-blue-dark: var(--cy-frame-color-dark);
	--cy-blue: var(--cy-frame-color);
	--cy-blue-light: #7eb8e0;
	--cy-blue-pale: #c5dff2;
	--cy-blue-sky: #d8ebf7;
	--cy-white: #ffffff;
	--cy-pink: #e85d8a;
	--cy-text-muted: #777777;
	--cy-frame-max-w: 1100px;
	--cy-frame-max-h: 760px;
	--cy-frame-border: 10px;
	--cy-frame-mat: 6px;
	--cy-scrollbar-size: 7px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100vh;
	overflow: hidden;
}

body {
	font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Dotum, sans-serif;
	font-size: 12px;
	line-height: 1.55;
	color: var(--cy-text);
	background-color: var(--cy-bg-color);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--cy-blue-dark);
	text-decoration: none;
}

a:hover {
	color: var(--cy-pink);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

ul,
ol {
	list-style: none;
}

/* ==========================================================================
   1. Background — 종이 + 패턴 + 그림자
   ========================================================================== */

.cy-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-color: var(--cy-bg-color);
	background-image:
		var(--cy-bg-image),
		radial-gradient(ellipse 120% 80% at 50% 20%, rgba(255, 255, 255, 0.45) 0%, transparent 55%),
		radial-gradient(ellipse 90% 60% at 80% 90%, rgba(120, 170, 210, 0.35) 0%, transparent 50%),
		linear-gradient(175deg, color-mix(in srgb, var(--cy-bg-color) 85%, #fff) 0%, var(--cy-bg-color) 45%, color-mix(in srgb, var(--cy-bg-color) 80%, #000) 100%);
	background-repeat: var(--cy-bg-repeat), no-repeat, no-repeat, no-repeat;
	background-size: var(--cy-bg-size), auto, auto, auto;
	background-position: var(--cy-bg-position), center, center, center;
}

.cy-bg-paper {
	position: absolute;
	inset: 0;
	opacity: 0.55;
	background-image:
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 3px,
			rgba(255, 255, 255, 0.06) 3px,
			rgba(255, 255, 255, 0.06) 4px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 3px,
			rgba(255, 255, 255, 0.04) 3px,
			rgba(255, 255, 255, 0.04) 4px
		),
		repeating-radial-gradient(
			circle at 50% 50%,
			rgba(255, 255, 255, 0.08) 0 1px,
			transparent 1px 12px
		);
}

/* ==========================================================================
   2. Stage & Frame — 두꺼운 파란 외곽 + 내부 흰 영역
   ========================================================================== */

.cy-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	padding: 12px 28px 12px 12px;
}

.cy-stage {
	position: relative;
	width: 100%;
	max-width: calc(var(--cy-frame-max-w) + var(--cy-tab-protrude));
}

/* 외곽 파란 프레임 */
.cy-frame-outer {
	position: relative;
	z-index: 10;
	width: 100%;
	height: calc(100vh - 24px);
	max-height: var(--cy-frame-max-h);
	padding: var(--cy-frame-border);
	background: linear-gradient(160deg, color-mix(in srgb, var(--cy-frame-color) 80%, #fff) 0%, var(--cy-frame-color) 35%, var(--cy-frame-color-dark) 100%);
	border-radius: 6px;
	box-shadow:
		0 0 0 1px var(--cy-frame-border-color),
		0 4px 0 var(--cy-frame-border-color),
		0 12px 40px rgba(30, 70, 110, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		inset 0 -2px 6px rgba(0, 40, 80, 0.2);
	overflow: visible;
}

/* 내부 흰 매트 */
.cy-frame-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: var(--cy-frame-mat);
	background: var(--cy-inner-bg-color);
	border: 2px solid var(--cy-inner-line-color);
	border-radius: 2px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
	overflow: hidden;
}

.cy-frame-body {
	flex: 1;
	display: flex;
	min-height: 0;
	overflow: hidden;
}

/* ==========================================================================
   3. Left Profile
   ========================================================================== */

.cy-profile {
	flex-shrink: 0;
	width: var(--cy-profile-w);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 14px 12px 12px;
	background: var(--cy-profile-bg-color);
	border-right: 2px solid var(--cy-inner-line-color);
	overflow-y: auto;
}

.cy-profile-top {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.cy-profile-visitor-counter {
	width: 100%;
	margin: 10px 0 12px;
	padding: 0;
	font-size: 11px;
	color: var(--cy-blue-dark);
	text-align: center;
	line-height: 1.45;
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.cy-profile-visitor-line {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.cy-profile-visitor-item {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.cy-profile-visitor-sep {
	color: var(--cy-text-muted);
	opacity: 0.55;
	font-weight: 400;
}

.cy-profile-visitor-label {
	font-weight: 700;
	color: var(--cy-blue);
}

.cy-profile-visitor-value {
	font-weight: 600;
	color: var(--cy-text-muted);
}

.cy-profile-status-wrap {
	width: 100%;
	text-align: center;
}

.cy-profile-status {
	display: inline-block;
	width: auto;
	min-width: 0;
	max-width: none;
	padding: 8px 18px;
	margin: 0 auto 14px;
	font-size: 11px;
	color: var(--cy-text-muted);
	text-align: center;
	line-height: 1.45;
	word-break: keep-all;
	background: var(--cy-content-bg-color);
	border: 1px dashed var(--cy-inner-line-color);
	border-radius: 4px;
}

.cy-profile-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-height: var(--cy-profile-card-min-height);
	height: auto;
}

.cy-profile-avatar-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
}

.cy-profile-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 100%;
	min-width: 0;
}

.cy-profile-avatar {
	position: relative;
	width: var(--cy-profile-image-size);
	height: var(--cy-profile-image-size);
	margin-top: 4px;
	border: 3px solid var(--cy-inner-line-color);
	border-radius: 4px;
	background: color-mix(in srgb, var(--cy-profile-bg-color) 70%, var(--cy-inner-line-color));
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow:
		inset 0 0 0 1px var(--cy-white),
		2px 2px 0 rgba(45, 111, 168, 0.25);
}

.cy-profile-avatar img,
.cy-profile-avatar-img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	min-width: 100%;
	min-height: 100%;
	object-fit: cover;
}

.cy-profile-avatar-placeholder {
	font-size: calc(var(--cy-profile-image-size) * 0.4);
	color: var(--cy-blue-light);
}

.cy-profile-avatar-fallback {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 0;
	align-items: center;
	justify-content: center;
}

.cy-profile-avatar-fallback.is-visible {
	display: flex;
}

.cy-profile-name {
	font-size: 14px;
	font-weight: bold;
	color: var(--cy-blue-dark);
	text-align: center;
	word-break: keep-all;
}

.cy-profile-bio {
	font-size: 11px;
	color: var(--cy-text-muted);
	text-align: center;
	line-height: 1.5;
	word-break: keep-all;
	padding: 0 4px;
}

.cy-profile-bottom {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-top: 12px;
	width: 100%;
	flex-shrink: 0;
}

.cy-mobile-profile-shell {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1;
	width: 100%;
	min-height: 0;
}

.cy-profile-bottom--count-3 {
	gap: 4px;
}

.cy-profile-bottom--count-4 {
	gap: 3px;
}

.cy-profile-btn {
	display: block;
	width: 100%;
	padding: 6px 8px;
	font-size: 11px;
	font-weight: bold;
	color: var(--cy-profile-button-text-color);
	text-align: center;
	background: var(--cy-profile-button-bg-color);
	border: 1px solid var(--cy-profile-button-border-color);
	border-radius: 4px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.cy-profile-btn:hover {
	background: var(--cy-profile-button-hover-bg-color);
	color: var(--cy-profile-button-hover-text-color);
}

.cy-profile-bottom--count-3 .cy-profile-btn {
	padding: 5px 6px;
	font-size: 10px;
	line-height: 1.3;
}

.cy-profile-bottom--count-4 .cy-profile-btn {
	padding: 4px 6px;
	font-size: 10px;
	line-height: 1.25;
}

/* ==========================================================================
   4. Center Content
   ========================================================================== */

.cy-content {
	position: relative;
	z-index: 1;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--cy-content-bg-color);
}

.cy-content--watermark::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--cy-inner-watermark-image);
	background-repeat: var(--cy-inner-watermark-repeat);
	background-position: var(--cy-inner-watermark-position);
	background-size: var(--cy-inner-watermark-size);
	opacity: var(--cy-inner-watermark-opacity);
	pointer-events: none;
	z-index: 0;
}

.cy-content--watermark > * {
	position: relative;
	z-index: 1;
}

.cy-content-header {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 44px;
	padding: 0 18px;
	border-bottom: 2px solid var(--cy-inner-line-color);
	background: var(--cy-content-bg-color);
}

.cy-content-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--cy-blue-dark);
	letter-spacing: -0.02em;
}

.cy-content-title a {
	color: inherit;
	text-decoration: none;
	display: inline-block;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.cy-content-title a:hover {
	opacity: 0.75;
}

.cy-content-inner {
	flex: 1;
	overflow-y: auto;
	padding: 12px 18px 16px;
	scrollbar-gutter: stable;
	scrollbar-width: thin;
	scrollbar-color: var(--cy-inner-line-color) transparent;
}

.cy-content-inner--panel {
	padding: 0;
}

.cy-main-panel {
	position: relative;
	z-index: 1;
}

.cy-main-panel--enabled {
	margin: 16px 18px;
	min-height: calc(100% - 32px);
	border: 1px solid var(--cy-main-panel-border-color, var(--cy-inner-line-color));
	background: var(--cy-main-panel-bg-color);
	border-radius: var(--cy-main-panel-radius);
	padding: 18px 20px;
	box-sizing: border-box;
}

/* 스크롤바가 패널 너비를 줄이지 않도록 — 오른쪽 테두리가 책갈피와 밀착 */
.cy-content-inner--panel .cy-main-panel--enabled {
	margin-right: calc(18px - var(--cy-scrollbar-size));
	width: calc(100% - 36px + var(--cy-scrollbar-size));
	max-width: calc(100% - 36px + var(--cy-scrollbar-size));
}

.cy-main-panel--disabled {
	margin: 0;
	min-height: auto;
	border: none;
	background: transparent;
	border-radius: 0;
	padding: 0;
}

.cy-content-inner::-webkit-scrollbar {
	width: 7px;
}

.cy-content-inner::-webkit-scrollbar-thumb {
	background: var(--cy-inner-line-color);
	border-radius: 4px;
}

/* ==========================================================================
   5. Diary List — 카드 없는 다이어리 형식
   ========================================================================== */

.cy-diary-list {
	display: flex;
	flex-direction: column;
}

.cy-diary-entry {
	padding: 14px 4px 16px;
	border-bottom: 1px dotted var(--cy-inner-line-color);
}

.cy-diary-entry:last-child {
	border-bottom: none;
}

.cy-diary-date {
	display: block;
	font-size: 11px;
	font-weight: bold;
	color: var(--cy-blue);
	letter-spacing: 0.02em;
	margin-bottom: 4px;
}

.cy-diary-date::before {
	content: "▶ ";
	font-size: 9px;
	color: var(--cy-blue-light);
}

.cy-diary-title {
	font-size: 13px;
	font-weight: bold;
	margin-bottom: 6px;
	line-height: 1.4;
}

.cy-diary-title a {
	color: var(--cy-blue-dark);
	text-decoration: none;
}

.cy-diary-title a:hover {
	color: var(--cy-pink);
	text-decoration: underline;
}

.cy-diary-body {
	font-size: 12px;
	color: var(--cy-text-muted);
	line-height: 1.65;
}

.cy-diary-body p {
	margin: 0;
}

/* ==========================================================================
   6. Single Post
   ========================================================================== */

.cy-post-single {
	padding: 4px 4px 16px;
}

.cy-post-single-header {
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 2px dotted var(--cy-inner-line-color);
}

.cy-post-single-date {
	display: block;
	font-size: 11px;
	font-weight: bold;
	color: var(--cy-blue);
	margin-bottom: 6px;
}

.cy-post-single-date::before {
	content: "▶ ";
	font-size: 9px;
	color: var(--cy-blue-light);
}

.cy-post-single-title {
	font-size: 16px;
	font-weight: bold;
	color: var(--cy-blue-dark);
	line-height: 1.45;
}

.cy-post-single-body {
	font-size: 12px;
	line-height: 1.75;
	color: var(--cy-text);
}

.cy-post-single-body p {
	margin-bottom: 10px;
}

.cy-post-single-body h2,
.cy-post-single-body h3 {
	color: var(--cy-blue-dark);
	margin: 14px 0 8px;
}

.cy-post-single-body img {
	margin: 8px 0;
	border: 1px solid var(--cy-inner-line-color);
}

/* 갤러리 목록 — 메인 패널 테두리만 사용 (이중 박스·추가 여백 제거) */
body.cy-is-gallery-list .cy-main-panel--enabled .wp-block-group,
body.cy-is-gallery-list .cy-main-panel--enabled .wp-block-shortcode {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

body.cy-is-gallery-list .cy-main-panel--enabled .cy-mini-gallery {
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	max-width: none;
}

.cy-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px dotted var(--cy-inner-line-color);
	font-size: 11px;
}

.cy-post-nav a {
	padding: 4px 10px;
	background: var(--cy-content-bg-color);
	border: 1px solid var(--cy-inner-line-color);
	border-radius: 3px;
	text-decoration: none;
}

.cy-post-nav a:hover {
	background: var(--cy-blue-sky);
}

/* ==========================================================================
   7. Bookmark Tabs — 프레임 외부 책갈피 메뉴
   ========================================================================== */

.cy-mobile-tabs {
	display: none;
}

.cy-tabs {
	position: absolute;
	top: calc(var(--cy-frame-border) + var(--cy-frame-mat) + var(--cy-tabs-top-offset));
	left: calc(100% - var(--cy-frame-mat) - 2px - var(--cy-main-panel-margin-r) + var(--cy-tabs-base-x-offset) + var(--cy-tabs-x-offset));
	margin-left: 0;
	z-index: 12;
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: var(--cy-tab-protrude);
	overflow: visible;
	pointer-events: none;
}

.cy-tabs-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cy-tabs-list > li,
.cy-tabs-item {
	pointer-events: auto;
	position: relative;
	overflow: visible;
}

/* 책갈피 탭 본체 — 왼쪽 경계는 항상 프레임 오른쪽에 고정 */
.cy-tabs-list > li > a,
.cy-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--cy-tab-width);
	height: var(--cy-tab-height);
	min-height: var(--cy-tab-height);
	max-height: var(--cy-tab-height);
	padding: 0 14px;
	margin-left: 0;
	transform: none !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: 0;
	color: var(--cy-tab-text-color);
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
	background: var(--cy-tab-color);
	border: 3px solid var(--cy-tab-border-color);
	border-left: none;
	border-radius: 0 14px 14px 0;
	clip-path: inset(-8px -12px -8px 0);
	box-shadow:
		4px 2px 5px rgba(20, 55, 95, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition: width 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cy-tab-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* hover: 오른쪽으로만 넓어짐 (프레임 접합 유지) */
.cy-tabs-list > li > a:hover,
.cy-tab:hover {
	transform: none !important;
	width: calc(var(--cy-tab-width) + 8px);
	box-shadow:
		5px 3px 6px rgba(20, 55, 95, 0.36),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 활성 책갈피 */
.cy-tabs-list > li.cy-tab-active > a,
.cy-tabs-list > li > a.is-active,
.cy-tabs-list > li.current-menu-item > a,
.cy-tabs-list > li.current_page_item > a,
.cy-tab[aria-current="page"],
a.cy-tab.is-active {
	transform: none !important;
	width: calc(var(--cy-tab-width) + 8px);
	background: var(--cy-tab-active-color);
	border-color: var(--cy-tab-border-color);
	color: var(--cy-tab-active-text-color);
	text-shadow: none;
	box-shadow:
		5px 3px 6px rgba(20, 55, 95, 0.34),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cy-tabs-list > li.cy-tab-active > a:hover,
.cy-tabs-list > li > a.is-active:hover,
.cy-tabs-list > li.current-menu-item > a:hover,
.cy-tabs-list > li.current_page_item > a:hover,
.cy-tab[aria-current="page"]:hover,
a.cy-tab.is-active:hover {
	transform: none !important;
	width: calc(var(--cy-tab-width) + 8px);
}

/* ==========================================================================
   8. Frame Footer
   ========================================================================== */

.cy-frame-footer {
	flex-shrink: 0;
	padding: 6px 14px;
	font-size: 10px;
	color: #999;
	text-align: center;
	background: var(--cy-inner-bg-color);
	border-top: 2px solid var(--cy-inner-line-color);
}

.cy-frame-footer a {
	color: var(--cy-blue);
	text-decoration: none;
}

/* ==========================================================================
   9. Pagination & Empty
   ========================================================================== */

.cy-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px dotted var(--cy-inner-line-color);
}

.cy-pagination a,
.cy-pagination span {
	display: inline-block;
	padding: 3px 9px;
	font-size: 11px;
	border: 1px solid var(--cy-inner-line-color);
	border-radius: 3px;
	background: var(--cy-content-bg-color);
	color: var(--cy-blue-dark);
	text-decoration: none;
}

.cy-pagination span.current {
	background: var(--cy-blue-sky);
	font-weight: bold;
}

.cy-pagination a:hover {
	background: #f2f9fd;
}

.cy-empty {
	text-align: center;
	padding: 48px 20px;
	color: #aaa;
	font-size: 12px;
}

.cy-empty-icon {
	font-size: 28px;
	margin-bottom: 10px;
	opacity: 0.45;
}

/* ==========================================================================
   10. Responsive
   ========================================================================== */

@media (min-width: 769px) {
	.cy-profile {
		padding: 18px 14px;
	}

	.cy-mobile-profile-shell {
		display: flex;
		flex: 1;
		flex-direction: column;
		min-height: 0;
	}

	.cy-profile-top {
		gap: 0;
		flex-shrink: 0;
	}

	.cy-profile-visitor-counter {
		margin: 0 0 10px;
		font-size: 12px;
		opacity: 0.85;
	}

	.cy-profile-visitor-label {
		font-weight: 600;
	}

	.cy-profile-visitor-value {
		font-weight: 500;
	}

	.cy-profile-status-wrap {
		margin-bottom: 14px;
	}

	.cy-profile-status {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin: 0;
		padding: 6px 14px;
		border-radius: 999px;
		font-size: 12px;
		line-height: 1.35;
		border: 1px solid var(--cy-inner-line-color);
		background: color-mix(in srgb, var(--cy-content-bg-color) 90%, var(--cy-profile-bg-color));
		box-shadow: 0 1px 2px color-mix(in srgb, var(--cy-inner-line-color) 35%, transparent);
	}

	.cy-profile-main {
		flex-direction: column;
		align-items: center;
		gap: 10px;
		width: 100%;
	}

	.cy-profile--pc-card .cy-profile-main {
		padding: var(--cy-pc-profile-card-padding) 10px calc(var(--cy-pc-profile-card-padding) + 2px);
		border: 1px solid var(--cy-inner-line-color);
		border-radius: var(--cy-pc-profile-card-radius);
		background: color-mix(in srgb, var(--cy-profile-bg-color) 92%, #fff);
		box-shadow:
			inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent),
			0 1px 3px color-mix(in srgb, var(--cy-inner-line-color) 18%, transparent);
	}

	.cy-profile-avatar {
		margin-top: 0;
	}

	.cy-profile-name {
		margin: 4px 0 0;
		font-size: 15px;
		font-weight: 700;
		text-align: center;
	}

	.cy-profile-bio {
		font-size: 12px;
		text-align: center;
		line-height: 1.4;
		padding: 0 2px;
	}

	.cy-profile-bottom,
	.cy-profile-buttons {
		display: grid;
		width: 100%;
		margin-top: auto;
		margin-bottom: 0;
		gap: 8px;
		padding-top: 14px;
	}

	.cy-profile .cy-mobile-tabs {
		display: none;
	}
}

@media (max-width: 900px) {
	:root {
		--cy-profile-w: 160px;
		--cy-tab-width: 96px;
		--cy-tab-height: 44px;
		--cy-tab-protrude: 104px;
		--cy-tab-overlap: 0px;
	}

	.cy-tabs-list > li > a,
	.cy-tab {
		font-size: 14px;
		line-height: 1.25;
		border-radius: 0 12px 12px 0;
	}
}

@media (max-width: 768px) {
	html,
	body {
		height: auto;
		min-height: 100%;
		overflow-x: hidden;
		overflow-y: auto;
	}

	.cy-wrapper {
		align-items: flex-start;
		height: auto;
		min-height: 100vh;
		min-height: 100dvh;
		padding: 8px;
		padding-bottom: 80px;
	}

	.cy-stage {
		display: flex;
		flex-direction: column;
		max-width: 100%;
		width: 100%;
		height: auto;
		min-height: 100vh;
		min-height: 100dvh;
		overflow: visible;
	}

	.cy-frame-outer {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
		height: auto;
		min-height: auto;
		max-height: none;
		padding: 6px;
		overflow: visible;
	}

	.cy-frame-inner {
		flex: 1 1 auto;
		height: auto;
		min-height: auto;
		padding: 4px;
		overflow: visible;
	}

	.cy-frame-body {
		flex-direction: column;
		flex: 1 1 auto;
		min-height: auto;
		overflow: visible;
	}

	.cy-profile {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 16px 14px 14px;
		border-right: none;
		border-bottom: 2px solid var(--cy-inner-line-color);
		overflow: visible;
	}

	.cy-mobile-profile-shell {
		display: flex;
		flex-direction: column;
		gap: 0;
		width: 100%;
	}

	.cy-profile-top {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0;
	}

	.cy-profile-visitor-counter {
		width: 100%;
		flex: none;
		margin: 0 0 8px;
		font-size: 12px;
		opacity: 0.8;
	}

	.cy-profile-visitor-label {
		font-weight: 600;
	}

	.cy-profile-visitor-value {
		font-weight: 500;
	}

	.cy-profile-status-wrap {
		width: 100%;
		flex: none;
		margin-bottom: 10px;
		text-align: center;
	}

	.cy-profile-status {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin: 0;
		padding: 6px 14px;
		border-radius: 999px;
		font-size: 12px;
		line-height: 1.35;
		border: 1px solid var(--cy-inner-line-color);
		background: color-mix(in srgb, var(--cy-content-bg-color) 90%, var(--cy-profile-bg-color));
		box-shadow: 0 1px 2px color-mix(in srgb, var(--cy-inner-line-color) 35%, transparent);
	}

	.cy-profile-main,
	.cy-mobile-profile-card {
		display: grid;
		grid-template-columns: minmax(0, 45%) minmax(0, 55%);
		align-items: center;
		column-gap: var(--cy-mobile-profile-gap);
		row-gap: 8px;
		width: 100%;
		min-height: var(--cy-mobile-profile-card-min-height);
		height: auto;
		padding: 12px 14px;
		margin: 0 0 12px;
		border: 1px solid var(--cy-inner-line-color);
		border-radius: 14px;
		background: color-mix(in srgb, var(--cy-profile-bg-color) 88%, #fff);
		box-shadow:
			inset 0 0 0 1px color-mix(in srgb, #fff 70%, transparent),
			0 1px 3px color-mix(in srgb, var(--cy-inner-line-color) 22%, transparent);
	}

	.cy-profile-avatar-wrap {
		display: flex;
		align-items: center;
		justify-content: center;
		justify-self: center;
		width: 100%;
		min-width: 0;
	}

	.cy-profile-avatar {
		flex-shrink: 0;
		width: min(var(--cy-mobile-profile-image-size), 100%);
		height: min(var(--cy-mobile-profile-image-size), 100%);
		max-width: 100%;
		aspect-ratio: 1;
		margin-top: 0;
		border-width: 2px;
		box-shadow:
			inset 0 0 0 1px var(--cy-white),
			0 1px 2px color-mix(in srgb, var(--cy-inner-line-color) 35%, transparent);
	}

	.cy-profile-avatar-placeholder {
		font-size: calc(min(var(--cy-mobile-profile-image-size), 100%) * 0.4);
	}

	.cy-profile-info {
		display: flex;
		flex-direction: column;
		justify-content: center;
		justify-self: stretch;
		align-items: flex-start;
		align-self: center;
		gap: 2px;
		min-width: 0;
		padding-left: 4px;
		text-align: left;
	}

	.cy-profile-name,
	.cy-profile-bio {
		width: 100%;
		text-align: left;
	}

	.cy-profile-name {
		margin: 0 0 4px;
		font-size: 17px;
		font-weight: 700;
		line-height: 1.3;
	}

	.cy-profile-bio {
		margin: 0;
		padding: 0;
		font-size: 13px;
		line-height: 1.4;
	}

	.cy-profile-bottom,
	.cy-profile-buttons {
		display: grid;
		width: 100%;
		margin: 0 0 10px;
		gap: 8px;
	}

	.cy-profile-bottom--count-1 {
		grid-template-columns: 1fr;
	}

	.cy-profile-bottom--count-2,
	.cy-profile-bottom--count-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cy-profile-bottom--count-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cy-profile-bottom--count-3 .cy-profile-btn:last-child {
		grid-column: 1 / -1;
	}

	.cy-profile-btn {
		width: 100%;
		flex: none;
		min-height: 36px;
		padding: 7px 8px;
		font-size: 11px;
	}

	.cy-profile-bottom--count-3 .cy-profile-btn,
	.cy-profile-bottom--count-4 .cy-profile-btn {
		width: 100%;
		flex: none;
	}

	.cy-profile .cy-mobile-tabs {
		flex: none;
		width: 100%;
		margin: 0;
	}

	.cy-content {
		flex: 1 1 auto;
		height: auto;
		max-height: none;
		min-height: 0;
		overflow: visible;
	}

	.cy-content-inner {
		flex: 1 1 auto;
		height: auto;
		max-height: none;
		overflow: visible;
	}

	.cy-main-panel {
		min-height: 60vh;
	}

	.cy-main-panel--enabled {
		margin: 10px 12px;
		min-height: calc(60vh - 20px);
		padding: 14px 16px;
	}

	.cy-content-inner--panel .cy-main-panel--enabled {
		margin-right: 12px;
		width: calc(100% - 24px);
		max-width: calc(100% - 24px);
	}

	/* 모바일: 책갈피 숨김, 제목 아래 드롭다운 메뉴 */
	.cy-tabs {
		display: none;
	}

	.cy-mobile-tabs {
		display: block;
		margin: 0;
	}

	.cy-profile .cy-mobile-tabs {
		margin-top: 0;
	}

	.cy-mobile-tabs select,
	.cy-mobile-tabs .cy-mobile-menu {
		width: 100%;
		min-height: 42px;
		border: 1px solid var(--cy-inner-line-color);
		border-radius: 8px;
		background: var(--cy-content-bg-color);
		color: var(--cy-text);
		font-size: 15px;
		font-weight: 700;
		padding: 0 12px;
	}
}

@media (max-width: 480px) {
	.cy-diary-title {
		font-size: 12px;
	}
}

@media (max-width: 380px) {
	.cy-profile-main,
	.cy-mobile-profile-card {
		column-gap: max(10px, calc(var(--cy-mobile-profile-gap) * 0.7));
	}
}
