/* ==========================================================================
   CC Board — Frontend Styles
   ========================================================================== */

/* Remove black focus outline on click — keep for keyboard nav only */
.cc-board-wrap a:focus:not(:focus-visible),
.cc-fp a:focus:not(:focus-visible) { outline: none; }

/* Kill theme double-padding when cc-board is on the page */
main:has(.cc-board-wrap) { margin-top: 0 !important; }
main:has(.cc-board-wrap) > .wp-block-group { padding-top: 12px !important; }
main:has(.cc-submit-wrap) { margin-top: 0 !important; }
main:has(.cc-submit-wrap) > .wp-block-group { padding-top: 12px !important; }
main:has(.cc-member-wrap) { margin-top: 0 !important; }
main:has(.cc-member-wrap) > .wp-block-group { padding-top: 12px !important; }

/* Hide the redundant page title above cc-board */
main:has(.cc-board-wrap) .wp-block-post-title,
main:has(.cc-submit-wrap) .wp-block-post-title,
main:has(.cc-member-wrap) .wp-block-post-title { display: none; }

/* Reset / Base */
.cc-board-wrap,
.cc-submit-wrap {
	/* max-width is set per-board via inline style from Board Options → Archive width */
	margin: 0 auto;
	font-family: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}

/* ==========================================================================
   Search Form + Toolbar
   ========================================================================== */

/* Toolbar: search input on the left, bulk actions slide in on the right */
.cc-search-toolbar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.cc-search-form {
	flex-shrink: 0;     /* don't let the search shrink when bulk bar appears */
}

.cc-search-inner {
	display: flex;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
	width: 320px;
	box-sizing: border-box;
}

.cc-search-scope {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding: 7px 20px 7px 8px;
	border: none;
	border-right: 1px solid #d1d5db;
	background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 8px center;
	font-size: 0.75rem;
	color: #374151;
	outline: none;
	cursor: pointer;
	flex-shrink: 0;
}

.cc-search-input {
	flex: 1;
	min-width: 0;
	padding: 7px 12px;
	border: none;
	outline: none;
	font-size: 0.875rem;
	background: #fff;
}

.cc-search-btn {
	padding: 0 11px;
	background: #fff;
	border: none;
	border-left: 1px solid #d1d5db;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
}

.cc-search-btn:hover {
	background: #f9fafb;
	color: #111;
}

/* Board title in toolbar — fills space between search and user buttons */
.cc-toolbar-title {
	flex: 1;
	text-align: center;
	font-size: 1.125rem;
	font-weight: 700;
	white-space: nowrap;
}

/* ==========================================================================
   Archive List
   ========================================================================== */

/* Bulk action bar — pushed to the far right (admin only) */
.cc-bulk-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.875rem;
	margin-left: auto;
}

/* Toolbar user widget — buttons on the right */
.cc-toolbar-user {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cc-toolbar-username {
	display: inline-block;
	max-width: 200px;
	font-size: 0.8rem;
	color: #374151;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.cc-toolbar-username:hover {
	color: #2271b1;
	text-decoration: underline;
}

.cc-toolbar-admin-link {
	font-size: 0.75rem;
	color: #6b7280;
	text-decoration: none;
	padding: 2px 8px;
	border: 1px solid #d1d5db;
	border-radius: 3px;
	margin-left: 4px;
}

.cc-toolbar-admin-link:hover {
	color: #2271b1;
	border-color: #2271b1;
}

.cc-register-btn {
	padding: 5px 14px;
	font-size: 0.8rem;
	color: #2271b1;
	border: 1px solid #2271b1;
	border-radius: 4px;
	text-decoration: none;
	white-space: nowrap;
}

.cc-register-btn:hover {
	background: #2271b1;
	color: #fff;
}

.cc-bulk-bar[hidden] {
	display: none;
}

.cc-select-all-wrap {
	display: flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	color: #6b7280;
	font-size: 0.8rem;
}

.cc-bulk-trash-btn {
	padding: 5px 14px;
	background: #ef4444;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.8rem;
	cursor: pointer;
	white-space: nowrap;
}

.cc-bulk-trash-btn:disabled {
	background: #fca5a5;
	cursor: default;
}

.cc-bulk-count {
	color: #6b7280;
}

/* Archive list */
.cc-board-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cc-board-item {
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid #f0f0f0;
}

.cc-board-item:first-child {
	border-top: 1px solid #f0f0f0;
}

.cc-board-item--pinned {
	background: #fefce8;
}

/* Admin checkbox column */
.cc-item-check {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	align-self: center;   /* pin to the flex row's midline */
	padding: 0 2px;
	cursor: pointer;
}

.cc-item-check input {
	display: block;       /* removes inline descender gap */
	width: 15px;
	height: 15px;
	margin: 0;
	cursor: pointer;
	vertical-align: middle;
}


.cc-pinned-badge {
	display: inline-block;
	background: #dc2626;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 1px 6px;
	border-radius: 3px;
	margin-right: 5px;
	vertical-align: middle;
}

/* The clickable link covers thumb + content */
.cc-board-item-link {
	display: flex;
	align-items: center;  /* don't stretch children — center them */
	gap: 14px;
	padding: 16px 0;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.15s;
}

.cc-board-item-link:focus {
	outline: none;
}

.cc-board-item-link:hover {
	opacity: 0.75;
}

.cc-board-thumb {
	flex-shrink: 0;
	width: 80px;
	height: 56px;
	overflow: hidden;
	border-radius: 4px;
	background: #f3f4f6;
}

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

.cc-board-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

/* One-line row: title (flex:1) · photo · name · sep · date
   All children share line-height:1 so their flex boxes are
   the same height and align-items:center lands perfectly. */
.cc-board-row {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	line-height: 1;       /* normalises every child's box height */
}

.cc-post-number {
	flex-shrink: 0;
	min-width: 2.5em;
	text-align: right;
	color: #9ca3af;
	font-size: 0.825rem;
	font-variant-numeric: tabular-nums;
}

.cc-board-title {
	flex: 1;
	margin: 0;
	margin-right: 10px;   /* extra breathing room before author */
	font-size: 1.0rem;
	font-weight: 500;
	letter-spacing: -0.02em;
	line-height: 1;       /* must match sibling line-height */
	color: #111827;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-author-photo {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	display: block;       /* removes inline descender gap */
	align-self: center;   /* explicit — don't rely on parent's default */
}

.cc-author-col {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.cc-author-text {
	display: flex;
	align-items: center;
	gap: 4px;
	line-height: 1;
}

.cc-author-name {
	font-size: 0.8rem;
	color: #6b7280;
	font-weight: 400;
	white-space: nowrap;
	line-height: 1;
	max-width: 6rem;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-meta-sep {
	color: #d1d5db;
	font-size: 0.8rem;
	line-height: 1;
	flex-shrink: 0;
}

.cc-post-date {
	font-size: 0.8rem;
	color: #9ca3af;
	white-space: nowrap;
	flex-shrink: 0;
	line-height: 1;
	width: 5.5rem;
}

.cc-board-excerpt {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
	line-height: 1.45;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-no-posts {
	padding: 40px 0;
	text-align: center;
	color: #9ca3af;
}

/* ==========================================================================
   Gallery list type
   ========================================================================== */

.cc-board-list--gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.cc-gallery-item {
	display: flex;
	flex-direction: column;
	border-bottom: none;
	border: none;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.cc-gallery-item:first-child {
	border-top: none;
}

.cc-gallery-item-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	flex: 1;
}

.cc-gallery-item-link:hover {
	opacity: 0.75;
}
.cc-gallery-item-link:focus {
	outline: none;
}

.cc-gallery-thumb {
	width: 100%;
	aspect-ratio: 5 / 3;
	overflow: hidden;
	background: #f3f4f6;
}

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

.cc-gallery-thumb--empty {
	background: #e5e7eb;
}

.cc-gallery-info {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cc-gallery-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cc-gallery-meta {
	font-size: 0.8rem;
	color: #9ca3af;
	display: flex;
	align-items: center;
	gap: 4px;
}

.cc-gallery-meta .cc-author-name {
	color: inherit;
	font-weight: inherit;
}

/* Admin checkbox overlay for gallery cards */
.cc-board-list--gallery .cc-item-check {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
}

.cc-board-list--gallery .cc-gallery-item {
	position: relative;
}

/* ==========================================================================
   News list type
   ========================================================================== */

.cc-news-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	border-bottom: 1px solid #e5e7eb;
}

.cc-news-item:first-child {
	border-top: 1px solid #e5e7eb;
}

.cc-news-item-link {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.cc-news-item-link:hover {
	opacity: 0.75;
}

.cc-news-thumb {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	overflow: hidden;
	border-radius: 6px;
	background: #f3f4f6;
}

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

.cc-news-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cc-news-date {
	font-size: 0.8rem;
	font-weight: 600;
	color: #6b7280;
	line-height: 1;
}

.cc-news-title {
	margin: 0;
	font-size: 1.0rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cc-news-excerpt {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cc-news-author {
	font-size: 0.78rem;
	color: #9ca3af;
}

/* ==========================================================================
   Sales Ad list type
   ========================================================================== */

/* 4 equal columns filling the full board width, evenly gapped */
.cc-board-list--sales-ad {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Configurable columns */
.cc-board-list--sales-ad.cc-board-list--cols-2 { grid-template-columns: repeat(2, 1fr); }
.cc-board-list--sales-ad.cc-board-list--cols-3 { grid-template-columns: repeat(3, 1fr); }
.cc-board-list--sales-ad.cc-board-list--cols-2x2 { grid-template-columns: repeat(2, 1fr); }
.cc-board-list--sales-ad.cc-board-list--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* 2 columns on narrow viewports */
@media (max-width: 600px) {
	.cc-board-list--sales-ad {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}

/* Reset the default cc-board-item row styles for this layout */
.cc-sales-ad-item {
	display: flex;
	flex-direction: column;
	border-bottom: none;
	border: none;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.15s, transform 0.15s;
}

.cc-sales-ad-item:first-child {
	border-top: none;
}

.cc-sales-ad-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
	transform: translateY(-2px);
}

.cc-sales-ad-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	flex: 1;
}

.cc-sales-ad-link:focus {
	outline: none;
}

/* Portrait image area — sales flyers are typically taller than wide.
   flex-grow lets the thumb stretch when a grid sibling is taller. */
.cc-sales-ad-thumb {
	width: 100%;
	aspect-ratio: 3 / 4;
	flex-grow: 1;
	overflow: hidden;
	background: #f3f4f6;
}

.cc-sales-ad-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform 0.2s ease;
}

.cc-sales-ad-item:hover .cc-sales-ad-thumb img {
	transform: scale(1.03);
}

.cc-sales-ad-thumb--empty {
	width: 100%;
	height: 100%;
	background: #e5e7eb;
}

.cc-sales-ad-info {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.cc-sales-ad-title {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-sales-ad-dates {
	margin: 0;
	font-size: 0.75rem;
	color: #6b7280;
	white-space: nowrap;
}

/* Admin checkbox overlay */
.cc-board-list--sales-ad .cc-item-check {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
}

.cc-board-list--sales-ad .cc-sales-ad-item {
	position: relative;
}

/* Sales date fields in the write form */
.cc-sales-date-row {
	display: flex;
	gap: 16px;
}

.cc-sales-date-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cc-sales-date-field label {
	font-size: 0.875rem;
	color: #374151;
}

/* Sales Ad shortcode wrap — section titles + column override */
.cc-sales-ad-wrap {
	max-width: 1200px;
	margin: 0 auto;
}

.cc-sales-ad-section {
	margin-bottom: 32px;
}

.cc-sales-ad-section-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e5e7eb;
}

.cc-sales-ad-section-title a {
	color: inherit;
	text-decoration: none;
}

.cc-sales-ad-section-title a:hover {
	color: #2563eb;
}

.cc-sales-ad-wrap--cols-2 .cc-board-list--sales-ad {
	grid-template-columns: repeat(2, 1fr);
}

.cc-sales-ad-wrap--cols-3 .cc-board-list--sales-ad {
	grid-template-columns: repeat(3, 1fr);
}

.cc-sales-ad-wrap--cols-2x2 .cc-board-list--sales-ad {
	grid-template-columns: repeat(2, 1fr);
}

.cc-sales-ad-wrap--cols-4 .cc-board-list--sales-ad {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 600px) {
	.cc-sales-ad-wrap--cols-3 .cc-board-list--sales-ad,
	.cc-sales-ad-wrap--cols-2x2 .cc-board-list--sales-ad,
	.cc-sales-ad-wrap--cols-4 .cc-board-list--sales-ad {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Sales date display in single post view */
.cc-single-sales-dates {
	margin: 0 0 18px;
	font-size: 0.9rem;
	color: #6b7280;
	font-weight: 500;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.cc-pagination {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 32px;
	justify-content: center;
}

.cc-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.875rem;
	color: #374151;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
}

.cc-page-link:hover {
	background: #f3f4f6;
}

.cc-page-link.is-current {
	background: #111827;
	border-color: #111827;
	color: #fff;
	pointer-events: none;
}

.cc-page-arrow {
	font-size: 1.1rem;
	line-height: 1;
}

.cc-page-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	color: #9ca3af;
	font-size: 0.875rem;
	user-select: none;
}

/* ==========================================================================
   Single Post — Author Header
   ========================================================================== */

.cc-single-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 0 24px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 32px;
}

.cc-author-photo--lg {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.cc-single-author-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cc-single-author-info .cc-author-name {
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
	max-width: none;
	white-space: normal;
	overflow: visible;
	text-overflow: unset;
}

.cc-single-author-info .cc-post-date {
	font-size: 0.825rem;
	color: #9ca3af;
}

.cc-single-links {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.cc-post-number-label {
	margin-left: auto;
	color: #9ca3af;
	font-size: 0.825rem;
	white-space: nowrap;
}

.cc-icon-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.825rem;
	color: #6b7280;
	text-decoration: none;
}

button.cc-icon-link,
button.cc-icon-link:focus,
button.cc-icon-link:focus-visible,
button.cc-icon-link:active {
	background: none;
	border: none;
	padding: 0;
	outline: none !important;
	box-shadow: none !important;
	cursor: pointer;
}

/* Global: strip focus outlines from all cc-board buttons */
.cc-board-wrap button:focus,
.cc-board-wrap button:focus-visible,
.cc-board-wrap button:active,
.cc-comments-section button:focus,
.cc-comments-section button:focus-visible,
.cc-comments-section button:active {
	outline: none !important;
	box-shadow: none !important;
}

.cc-icon-link:hover {
	color: #111;
}


.cc-single-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 24px;
	line-height: 1.3;
}

.cc-single-content {
	font-size: 1rem;
	line-height: 1.75;
	color: #374151;
	word-break: break-word;
}
.cc-single-content img {
	display: block;
}
.cc-single-content p:empty,
.cc-single-content p:has(> br:only-child) {
	display: none;
}

.cc-back-wrap {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cc-back-link,
.cc-adj-link {
	font-size: 0.875rem;
	color: #6b7280;
	text-decoration: none;
	padding: 12px 4px;
}

.cc-back-link:hover,
.cc-adj-link:hover {
	color: #111;
}

/* ==========================================================================
   Category Filter Tabs
   ========================================================================== */

.cc-cat-tabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.cc-cat-tab {
	padding: 6px 14px;
	border: 1px solid #d1d5db;
	border-radius: 20px;
	font-size: 0.85rem;
	text-decoration: none;
	color: #374151;
	transition: background 0.15s, border-color 0.15s;
	white-space: nowrap;
}

.cc-cat-tab:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

.cc-cat-tab.is-active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

/* ==========================================================================
   Write button (bottom of archive)
   ========================================================================== */

.cc-board-footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 24px;
}

.cc-write-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 22px;
	background: #111827;
	color: #fff;
	border-radius: 5px;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	transition: background 0.15s;
}

.cc-write-btn:hover {
	background: #374151;
	color: #fff;
}

.cc-write-btn-icon {
	font-size: 1.15rem;
	line-height: 1;
	font-weight: 400;
}

/* ==========================================================================
   Per-user image gallery modal
   ========================================================================== */

.cc-gallery-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.cc-gallery-modal {
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 860px;
	max-height: 82vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.cc-gallery-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.cc-gallery-modal-header h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
}

.cc-gallery-modal-close {
	background: none;
	border: none;
	font-size: 1.1rem;
	cursor: pointer;
	color: #6b7280;
	padding: 4px 6px;
	border-radius: 4px;
	line-height: 1;
	transition: background 0.15s;
}

.cc-gallery-modal-close:hover {
	background: #f3f4f6;
	color: #111;
}

.cc-gallery-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid #e5e7eb;
	padding: 0 16px;
	flex-shrink: 0;
}

.cc-gallery-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 8px 14px;
	margin-bottom: -1px;
	font-size: 0.875rem;
	color: #6b7280;
	cursor: pointer;
	white-space: nowrap;
}

.cc-gallery-tab:hover { color: #111; }

.cc-gallery-tab.is-active {
	color: #b91c1c;
	border-bottom-color: #b91c1c;
	font-weight: 600;
}

.cc-gallery-item-author {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0,0,0,0.55);
	color: #fff;
	font-size: 0.7rem;
	padding: 2px 4px;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.cc-gallery-upload-area {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
	background: #fafafa;
}

.cc-gallery-grid {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 96px, 1fr ) );
	gap: 8px;
	align-content: start;
}

.cc-gallery-item {
	position: relative;
	aspect-ratio: 1;
	border-radius: 5px;
	overflow: hidden;
	border: 3px solid transparent;
	background: #f3f4f6;
	transition: border-color 0.12s;
}

.cc-gallery-item:hover {
	border-color: #9ca3af;
}

.cc-gallery-item.is-selected {
	border-color: #16a34a;
	box-shadow: 0 0 0 1px #16a34a;
}

/* Green checkmark badge — bottom-right corner of selected items */
.cc-gallery-item.is-selected::after {
	content: '\2713'; /* ✓ */
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background: #16a34a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	border-radius: 50%;
	line-height: 20px;
	text-align: center;
	z-index: 2;
}

/* Inner button that selects the image */
.cc-gallery-item-select {
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}

.cc-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Delete button — top-right overlay, revealed on hover */
.cc-gallery-item-delete {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: none;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.15s, background 0.15s;
	z-index: 1;
	padding: 0;
}

.cc-gallery-item:hover .cc-gallery-item-delete {
	opacity: 1;
}

.cc-gallery-item-delete:hover {
	background: rgba(185, 28, 28, 0.9);
}

.cc-gallery-item-delete:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.cc-gallery-placeholder {
	grid-column: 1 / -1;
	text-align: center;
	color: #9ca3af;
	padding: 40px 0;
	margin: 0;
	font-size: 0.9rem;
}

.cc-gallery-modal-footer {
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px;
	border-top: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.cc-gallery-status {
	font-size: 0.83rem;
	color: #6b7280;
}

.cc-gallery-status.is-success { color: #065f46; }
.cc-gallery-status.is-error   { color: #991b1b; }

/* Gallery modal footer — col picker + all action buttons always present */
.cc-gallery-modal-footer {
	gap: 8px;
	align-items: center;
	flex-wrap: nowrap;
	overflow-x: auto; /* safety net on very narrow viewports */
}

/* Prevent Korean (or any) button text from wrapping */
.cc-gallery-modal-footer .cc-submit-btn {
	white-space: nowrap;
	flex-shrink: 0;
}

/* Column picker (3 / 4 / 5 buttons) — hidden until 2+ images selected */
.cc-col-picker {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cc-col-picker-label {
	font-size: 0.825rem;
	color: #6b7280;
	white-space: nowrap;
}

.cc-col-btn {
	width: 32px;
	height: 32px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	padding: 0;
	transition: background 0.12s, border-color 0.12s;
}

.cc-col-btn:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

.cc-col-btn.is-active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

/* Ghost (secondary) submit button — used for "Set as Featured" */
.cc-submit-btn--ghost {
	background: transparent;
	color: #374151;
	border: 1px solid #d1d5db;
}

.cc-submit-btn--ghost:hover:not(:disabled) {
	background: #f3f4f6;
	border-color: #9ca3af;
}

/* Selected image preview below the button */
.cc-feat-preview {
	margin-bottom: 10px;
}

.cc-feat-thumb {
	display: block;
	max-width: 220px;
	max-height: 140px;
	border-radius: 4px;
	object-fit: cover;
}

/* ==========================================================================
   Submit Form
   ========================================================================== */

.cc-submit-wrap {
	padding: 8px 0;
}

.cc-form-group {
	margin-bottom: 22px;
}

.cc-form-row {
	display: flex;
	gap: 16px;
}

.cc-form-group--half {
	flex: 1;
}

.cc-form-group label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: #374151;
}

.cc-required {
	color: #ef4444;
}

.cc-input,
.cc-textarea {
	width: 100%;
	padding: 9px 13px;
	border: 1px solid #d1d5db;
	border-radius: 5px;
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.15s;
}

.cc-input:focus,
.cc-textarea:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.cc-textarea {
	resize: vertical;
	line-height: 1.6;
}

.cc-file-input {
	font-size: 0.875rem;
}

.cc-field-hint {
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: #9ca3af;
}

/* ── Quill editor ───────────────────────────────────────────────────────── */

#cc-quill-editor {
	min-height: 350px;
	background: #fff;
	font-size: 1rem;
	line-height: 1.7;
}

#cc-quill-editor .ql-editor {
	min-height: 350px;
}

/* Gallery grid + inserted images render inside Quill */
#cc-quill-editor .cc-body-gallery {
	display: grid;
	gap: 6px;
	margin: 12px 0;
}
#cc-quill-editor .cc-body-gallery--cols-3 { grid-template-columns: repeat(3, 1fr); }
#cc-quill-editor .cc-body-gallery--cols-4 { grid-template-columns: repeat(4, 1fr); }
#cc-quill-editor .cc-body-gallery--cols-5 { grid-template-columns: repeat(5, 1fr); }
#cc-quill-editor .cc-body-gallery img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	border-radius: 4px;
}
/* Gallery edit toolbar (floating above gallery in editor) */
.cc-gallery-edit-toolbar {
	display: flex;
	gap: 4px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.cc-gallery-edit-btn {
	padding: 4px 10px;
	border: none;
	border-radius: 4px;
	background: #f3f4f6;
	color: #374151;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
}
.cc-gallery-edit-btn:hover {
	background: #e5e7eb;
}
.cc-gallery-edit-btn--danger {
	color: #dc2626;
}
.cc-gallery-edit-btn--danger:hover {
	background: #fef2f2;
}

/* Highlight gallery on hover in editor */
#cc-quill-editor .cc-body-gallery {
	cursor: pointer;
	transition: outline 0.15s;
}
#cc-quill-editor .cc-body-gallery:hover {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

#cc-quill-editor .cc-inserted-img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 12px 0;
	border-radius: 4px;
}

.cc-image-preview {
	position: relative;
	display: inline-block;
	margin-top: 12px;
}

.cc-image-preview img {
	max-width: 240px;
	max-height: 160px;
	border-radius: 4px;
	display: block;
}

.cc-remove-image {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #ef4444;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 11px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Featured image — WP media library picker */
.cc-feat-preview {
	margin-bottom: 10px;
}

.cc-feat-preview img {
	display: block;
	max-width: 240px;
	max-height: 160px;
	border-radius: 4px;
}

/* Thumbnail picker — multiple images, clickable to select featured */
.cc-feat-picker {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.cc-feat-pick {
	display: block;
	padding: 0;
	border: 3px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	background: none;
	transition: border-color 0.15s;
}

.cc-feat-pick img {
	display: block;
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
}

.cc-feat-pick--active {
	border-color: #2563eb;
}

.cc-feat-pick:hover:not(.cc-feat-pick--active) {
	border-color: #93c5fd;
}

.cc-media-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: #fff;
	color: #1f2937;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	line-height: inherit;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	text-decoration: none;
}

.cc-media-btn:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

.cc-media-btn--remove {
	color: #ef4444;
	border-color: #fca5a5;
	margin-left: 8px;
}

.cc-media-btn--remove:hover {
	background: #fef2f2;
	border-color: #ef4444;
}

/* Content field header — label + "Insert Image(s)" button on same row */
.cc-form-group-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.cc-form-group-header label {
	margin-bottom: 0;
}

/* Override WP admin .mce-toolbar styles that may bleed into front-end wp_editor() */
.cc-board-wrap .wp-editor-wrap {
	border: 1px solid #d1d5db;
	border-radius: 5px;
	overflow: hidden;
}

.cc-board-wrap .wp-editor-area {
	width: 100% !important;
	box-sizing: border-box;
}

.cc-draft-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
	min-height: 18px;
}

.cc-draft-status {
	font-size: 0.8rem;
	color: #6b7280;
}

.cc-draft-discard-btn {
	font-size: 0.8rem;
	color: #9ca3af;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.cc-draft-discard-btn:hover {
	color: #374151;
}

.cc-form-actions {
	margin-top: 24px;
}

.cc-submit-btn {
	padding: 11px 28px;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.cc-submit-btn:hover {
	background: #374151;
}

.cc-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cc-form-notice {
	margin-top: 14px;
	font-size: 0.825rem;
	color: #9ca3af;
}

/* ==========================================================================
   Notices
   ========================================================================== */

.cc-notice {
	padding: 12px 16px;
	border-radius: 5px;
	font-size: 0.9rem;
	margin-bottom: 24px;
}

.cc-notice--success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.cc-notice--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

.cc-notice--info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #93c5fd;
}

/* ==========================================================================
   Body gallery — rendered in post content via cc-gallery.js insert mode
   ========================================================================== */

.cc-body-gallery {
	display: grid;
	gap: 4px;
	margin: 1.2em 0;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
}

.cc-body-gallery--cols-3 { grid-template-columns: repeat( 3, 1fr ); }
.cc-body-gallery--cols-4 { grid-template-columns: repeat( 4, 1fr ); }
.cc-body-gallery--cols-5 { grid-template-columns: repeat( 5, 1fr ); }

.cc-body-gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
	transition: filter 0.15s;
}

.cc-body-gallery img:hover {
	filter: brightness( 0.85 );
}

/* Subtle gallery icon on last image */
.cc-body-gallery img:last-child {
	position: relative;
}
.cc-body-gallery::after {
	content: '';
	position: absolute;
	top: 8px;
	left: 8px;
	width: 22px;
	height: 22px;
	background: rgba(255,255,255,0.7);
	border-radius: 4px;
	pointer-events: none;
	z-index: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* Single inserted image */
.cc-inserted-img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 2em 0;
	border-radius: 4px;
	cursor: zoom-in;
}

/* ==========================================================================
   Lightbox — native <dialog> element, zero dependencies
   ========================================================================== */

.cc-lightbox {
	padding: 0;
	border: none;
	background: transparent;
	max-width: min( 1920px, 92vw );
	max-height: 92vh;
	overflow: visible;
}

.cc-lightbox::backdrop {
	background: rgba( 0, 0, 0, 0.92 );
}

.cc-lightbox-img {
	display: block;
	max-width: min( 1920px, 88vw );
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
}

.cc-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: rgba( 0, 0, 0, 0.7 );
	color: #fff;
	font-size: 13px;
	line-height: 30px;
	text-align: center;
	cursor: pointer;
	padding: 0;
	z-index: 1;
}

.cc-lightbox-close:hover {
	background: rgba( 0, 0, 0, 0.95 );
}

/* Prev / Next arrows */
.cc-lightbox-prev,
.cc-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba( 0, 0, 0, 0.5 );
	color: #fff;
	font-size: 28px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
	padding: 0;
	z-index: 1;
	transition: background 0.15s, opacity 0.15s;
}

.cc-lightbox-prev { left: -56px; }
.cc-lightbox-next { right: -56px; }

.cc-lightbox-prev:hover,
.cc-lightbox-next:hover {
	background: rgba( 0, 0, 0, 0.8 );
}

.cc-lightbox-prev:disabled,
.cc-lightbox-next:disabled {
	opacity: 0.3;
	cursor: default;
}

/* Counter */
.cc-lightbox-counter {
	position: absolute;
	bottom: -32px;
	left: 50%;
	transform: translateX( -50% );
	color: rgba( 255, 255, 255, 0.8 );
	font-size: 14px;
	white-space: nowrap;
}

/* ==========================================================================
   Member (Register / Profile) Forms
   ========================================================================== */

.cc-member-wrap {
	max-width: 420px;
	margin: 0 auto;
	padding: 24px 16px;
	font-family: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}

.cc-member-wrap .cc-member-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 20px;
}

.cc-member-wrap .cc-member-form {
	display: flex !important;
	flex-direction: column;
	gap: 14px;
}

.cc-member-wrap .cc-member-field {
	display: flex;
	flex-direction: column;
}

.cc-member-wrap .cc-member-field label {
	display: block;
	font-size: 0.85rem;
	font-weight: 500;
	margin-bottom: 4px;
	color: #374151;
}

.cc-member-wrap .cc-member-field input[type="text"],
.cc-member-wrap .cc-member-field input[type="email"],
.cc-member-wrap .cc-member-field input[type="password"] {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 5px;
	font-size: 0.9rem;
	box-sizing: border-box;
	background: #fff;
}

.cc-member-wrap .cc-member-field input:disabled {
	background: #f3f4f6;
	color: #6b7280;
}

.cc-member-wrap .cc-member-hint {
	display: block;
	font-size: 0.75rem;
	color: #9ca3af;
	margin-top: 2px;
}

.cc-member-wrap .cc-member-remember {
	margin: 0;
	font-size: 0.85rem;
	color: #374151;
	line-height: 1;
}

.cc-member-wrap .cc-member-remember input,
.cc-member-wrap .cc-member-remember label {
	vertical-align: middle;
	cursor: pointer;
}

.cc-member-wrap .cc-member-submit {
	padding: 9px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 0.9rem;
	cursor: pointer;
	align-self: flex-start;
}

.cc-member-wrap .cc-member-submit:hover {
	background: #135e96;
}

.cc-member-wrap .cc-member-submit--admin {
	display: inline-block;
	background: #374151;
	text-decoration: none;
	text-align: center;
}

.cc-member-wrap .cc-member-submit--admin:hover {
	background: #1f2937;
}

.cc-member-wrap .cc-member-alt-link {
	margin-top: 16px;
	font-size: 0.85rem;
	color: #6b7280;
}

.cc-member-wrap .cc-member-alt-link a {
	color: #2271b1;
}

.cc-member-wrap .cc-member-actions {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
}

.cc-member-wrap .cc-member-form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cc-member-wrap .cc-member-logout {
	padding: 9px 20px;
	background: #b32d2e;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 0.9rem;
	text-decoration: none;
	cursor: pointer;
}

.cc-member-wrap .cc-member-logout:hover {
	background: #8c2324;
	color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
	/* Mobile board pages use a separate template (templates/mobile-board.php)
	   that bypasses TwentyTwentyFive's layout entirely. */

	/* Search toolbar: stack vertically on mobile */
	.cc-search-toolbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.cc-search-inner {
		width: 100%;
	}

	.cc-search-scope {
		padding: 7px 4px 7px 8px;
		font-size: 0.75rem;
		max-width: 90px;
	}

	/* Toolbar user: reset absolute positioning, align right on mobile */
	.cc-toolbar-user {
		position: static;
		transform: none;
		margin-left: auto;
		align-self: center;
	}

	/* Hide thumbnails on mobile — saves ~84px horizontal space */
	.cc-board-thumb { display: none; }

	/* Title: full row, allow wrapping */
	.cc-board-row {
		flex-wrap: wrap;
	}

	.cc-board-title {
		flex: 0 0 100%;
		font-size: 0.95rem;
		white-space: normal;
		overflow: visible;
		line-height: 1.4;
		text-overflow: clip;
		margin-right: 0;
	}

	/* Stack author name over date */
	.cc-author-text {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	.cc-meta-sep { display: none; }

	.cc-author-name {
		width: auto;
		text-align: left;
		font-size: 0.78rem;
	}

	.cc-post-date {
		width: auto;
		font-size: 0.72rem;
	}

.cc-form-row {
		flex-direction: column;
		gap: 0;
	}

	.cc-single-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.cc-lightbox-prev { left: 4px; }
	.cc-lightbox-next { right: 4px; }
	.cc-lightbox-prev,
	.cc-lightbox-next {
		background: rgba( 0, 0, 0, 0.6 );
	}
	.cc-lightbox-counter {
		bottom: -28px;
	}

	/* Gallery: 2 columns on mobile */
	.cc-board-list--gallery {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.cc-gallery-title {
		font-size: 0.88rem;
	}

	/* News: smaller thumb on mobile */
	.cc-news-thumb {
		width: 80px;
		height: 80px;
	}

	.cc-news-title {
		font-size: 0.93rem;
	}

	.cc-news-excerpt {
		-webkit-line-clamp: 1;
	}
}

/* ── Mobile template overrides (user-agent based, not viewport) ──────────
   Scoped to .cc-mobile on <body> — set by templates/mobile-board.php.
   Applies in both portrait AND landscape, regardless of screen width. */

/* Flatten gallery grid to vertical image list */
.cc-mobile .cc-body-gallery,
.cc-mobile .cc-body-gallery--cols-3,
.cc-mobile .cc-body-gallery--cols-4,
.cc-mobile .cc-body-gallery--cols-5 {
	grid-template-columns: 1fr;
	gap: 2em;
}
.cc-mobile .cc-body-gallery img {
	aspect-ratio: auto;
	object-fit: contain;
	cursor: default;
}
.cc-mobile .cc-body-gallery img:hover {
	filter: none;
}
.cc-mobile .cc-body-gallery::after {
	display: none;
}

/* Hide lightbox on mobile */
.cc-mobile .cc-lightbox,
.cc-mobile .cc-lightbox-prev,
.cc-mobile .cc-lightbox-next,
.cc-mobile .cc-lightbox-close,
.cc-mobile .cc-lightbox-counter {
	display: none !important;
}

/* Extra bottom padding so nav links stay clear of browser chrome (address bar / toolbar) */
.cc-mobile .cc-back-wrap {
	margin-bottom: 6em;
	padding-top: 24px;
}
.cc-mobile .cc-back-link,
.cc-mobile .cc-adj-link {
	font-size: 1rem;
	padding: 14px 6px;
}

/* ==========================================================================
   Password verification dialog
   ========================================================================== */

.cc-password-dialog {
	padding: 0;
	border: none;
	border-radius: 8px;
	max-width: 420px;
	width: calc(100% - 32px);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.cc-password-dialog::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.cc-password-dialog-inner {
	padding: 28px 24px;
}

.cc-password-dialog-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 600;
}

.cc-password-dialog-desc {
	margin: 0 0 20px;
	font-size: 0.875rem;
	color: #6b7280;
	line-height: 1.5;
}

.cc-password-dialog .cc-form-group {
	margin-bottom: 16px;
}

.cc-password-turnstile {
	margin-bottom: 16px;
	min-height: 65px;
}

.cc-password-dialog-actions {
	display: flex;
	gap: 10px;
}

.cc-password-dialog-status {
	margin: 12px 0 0;
	font-size: 0.85rem;
	min-height: 1.2em;
}

.cc-password-dialog-status.is-error {
	color: #ef4444;
}

.cc-password-dialog-status.is-success {
	color: #10b981;
}

/* Anon action buttons in single post header */
.cc-anon-action-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.825rem;
	padding: 0;
	font-family: inherit;
	line-height: 1;
}

.cc-anon-delete-btn,
.cc-delete-own-btn {
	color: #6b7280;
}

.cc-anon-delete-btn:hover,
.cc-delete-own-btn:hover {
	color: #dc2626;
}

.cc-delete-own-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.825rem;
	padding: 0;
	font-family: inherit;
	line-height: 1;
}

/* Anonymous name + password side-by-side row */
.cc-anon-row {
	display: flex;
	gap: 16px;
}

.cc-anon-row > .cc-form-group {
	flex: 1;
	margin-bottom: 6px;
}

@media (max-width: 520px) {
	.cc-anon-row {
		flex-direction: column;
		gap: 0;
	}
	.cc-anon-row > .cc-form-group {
		margin-bottom: 22px;
	}
}

/* Form hint text */
.cc-form-hint {
	margin-top: 2px;
	margin-bottom: 16px;
	font-size: 0.8rem;
	color: #9ca3af;
}

/* ── Anon session timer ─────────────────────────────────────────────── */
.cc-anon-timer {
	text-align: center;
	margin-top: 8px;
	color: #6b7280;
	font-size: 0.82rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.cc-anon-timer.is-expired {
	background: #b91c1c;
	color: #fff;
}
.cc-anon-timer-icon {
	font-size: 15px;
}

/* Upload limit notice inside gallery modal */
.cc-upload-limit-notice {
	display: inline-block;
	font-size: 0.82rem;
	color: #b91c1c;
	margin-left: 8px;
}

/* =====================================================================
   FRONTPAGE TEMPLATES — [cc_frontpage]
   ===================================================================== */

.cc-fp {
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin: 0 auto;
	padding: 0 var(--wp--preset--spacing--50, 16px);
	font-family: "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}

/* Override TwentyTwentyFive double padding on frontpage */
main:has(.cc-fp) { margin-top: 0 !important; }
main:has(.cc-fp) > .wp-block-group {
	padding-top: 12px !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Shared section title */
.cc-fp-section-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #1d1d1f;
	line-height: 1.3;
}
.cc-fp-section-title a {
	color: #1d1d1f;
	text-decoration: none;
}
.cc-fp-section-title a:hover { color: #c0392b; }

/* "More +" link */
.cc-fp-more {
	display: inline-block;
	margin-top: 8px;
	font-size: 0.82rem;
	color: #646970;
	text-decoration: none;
}
.cc-fp-more:hover { color: #c0392b; }

/* No posts fallback */
.cc-fp-no-posts {
	color: #888;
	font-size: 0.9rem;
	padding: 12px 0;
}

/* ── kazt-classic ─────────────────────────────────────────────────────── */

.cc-fp-boards {
	display: grid;
	gap: 28px;
}
.cc-fp-boards--2col { grid-template-columns: repeat(2, 1fr); }
.cc-fp-boards--3col { grid-template-columns: repeat(3, 1fr); }

.cc-fp-board-section {
	min-width: 0; /* prevent grid blowout */
}

.cc-fp-post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cc-fp-post-list li {
	border-bottom: 1px solid #eee;
}
.cc-fp-post-link {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 7px 0;
	text-decoration: none;
	color: #333;
	font-size: 0.9rem;
	line-height: 1.4;
}
.cc-fp-post-link:hover { color: #c0392b; }
.cc-fp-post-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cc-fp-post-date {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: #999;
}

/* Classic gallery */
.cc-fp-gallery {
	margin-top: 32px;
}
.cc-fp-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}
.cc-fp-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 4px;
}
.cc-fp-gallery-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	transition: transform 0.2s;
}
.cc-fp-gallery-item:hover img { transform: scale(1.04); }

/* Classic gallery — in-column variant
   Fills the column height to match adjacent board sections (CSS grid
   stretches all columns to the same row height by default).
   flex:1 + grid-auto-rows:1fr divides that height evenly among image rows. */
.cc-fp-col-gallery {
	display: flex;
	flex-direction: column;
}
.cc-fp-col-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols, 4), 1fr);
	gap: 4px;
	flex: 1;
	min-height: 0;
	grid-auto-rows: 1fr;
}

.cc-fp-col-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 2px;
	min-height: 0;
}
.cc-fp-col-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s;
}
.cc-fp-col-gallery-item:hover img { transform: scale(1.04); }

/* ── kazt-modern ──────────────────────────────────────────────────────── */

.cc-fp-modern-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}
.cc-fp-modern-layout--sidebar {
	grid-template-columns: 1fr 300px;
}

/* Hero / Centerpiece */
.cc-fp-hero { margin-bottom: 8px; position: relative; }
.cc-fp-hero-link {
	display: block;
	text-decoration: none;
	color: #1d1d1f;
}
.cc-fp-hero-slide {
	transition: opacity 0.5s ease;
}
.cc-fp-hero-link:hover .cc-fp-hero-title { color: #c0392b; }
.cc-fp-hero-image {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 16px;
	background: linear-gradient(135deg, #f5e6d3, #e8d5c4);
	aspect-ratio: 16 / 9;
}
.cc-fp-hero-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.cc-fp-hero-cat {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: #c0392b;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.cc-fp-hero-title {
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 4px;
	transition: color 0.15s;
}
.cc-fp-hero-excerpt {
	font-size: 0.92rem;
	color: #555;
	line-height: 1.55;
	margin: 0;
}

/* Secondary grid */
.cc-fp-secondary { margin-top: 20px; margin-bottom: 8px; }
.cc-fp-secondary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
.cc-fp-card-link {
	display: flex;
	gap: 14px;
	text-decoration: none;
	color: #1d1d1f;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}
.cc-fp-card-link:hover .cc-fp-card-title { color: #c0392b; }
.cc-fp-card-thumb {
	width: 120px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}
.cc-fp-card-body {
	flex: 1;
	min-width: 0;
}
.cc-fp-card-top {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}
.cc-fp-card-cat {
	font-size: 0.82rem;
	font-weight: 600;
	color: #c0392b;
	letter-spacing: 0.02em;
}
.cc-fp-card-date {
	font-size: 0.78rem;
	color: #999;
}
.cc-fp-card-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
	transition: color 0.15s;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Tertiary headlines */
.cc-fp-tertiary-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	margin-bottom: 8px;
}
.cc-fp-tertiary { min-width: 0; }
.cc-fp-headline-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cc-fp-headline-list li {
	border-bottom: 1px dotted #ddd;
}
.cc-fp-headline-list a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 8px 0;
	text-decoration: none;
	color: #333;
	font-size: 0.9rem;
}
.cc-fp-headline-list a:hover .cc-fp-headline-title { color: #c0392b; }
.cc-fp-headline-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cc-fp-headline-date {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: #999;
}

/* Sidebar */
.cc-fp-sidebar {
	min-width: 0;
}
.cc-fp-sidebar-section {
	margin-bottom: 24px;
}
.cc-fp-sidebar-title {
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid #1d1d1f;
}
.cc-fp-sidebar-title a {
	color: #1d1d1f;
	text-decoration: none;
}
.cc-fp-sidebar-title a:hover { color: #c0392b; }
.cc-fp-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cc-fp-sidebar-list li {
	border-bottom: 1px solid #eee;
}
.cc-fp-sidebar-list a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px;
	padding: 6px 0;
	text-decoration: none;
	color: #333;
	font-size: 0.85rem;
}
.cc-fp-sidebar-list a:hover { color: #c0392b; }
.cc-fp-sidebar-date {
	flex-shrink: 0;
	font-size: 0.75rem;
	color: #999;
}

/* Tertiary gallery mode — reuse col-gallery-grid inside tertiary section */
.cc-fp-tertiary--gallery { display: flex; flex-direction: column; }
.cc-fp-tertiary--gallery .cc-fp-col-gallery-grid {
	flex: 1;
	grid-auto-rows: 1fr;
	gap: 8px;
}
.cc-fp-tertiary--gallery .cc-fp-col-gallery-item {
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}

/* Sidebar gallery grid — 1-col (default): full-width, natural aspect ratio */
.cc-fp-sidebar-gallery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
.cc-fp-sidebar-gallery-grid .cc-fp-col-gallery-item {
	display: block;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}
.cc-fp-sidebar-gallery-grid .cc-fp-col-gallery-item img {
	width: 100%;
	height: auto;
	object-fit: contain;
	display: block;
}

/* Sidebar gallery grid — 2-col: cropped uniform thumbnails */
.cc-fp-sidebar-gallery-grid--2col {
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.cc-fp-sidebar-gallery-grid--2col .cc-fp-col-gallery-item {
	aspect-ratio: 3 / 4;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	overflow: hidden;
}
.cc-fp-sidebar-gallery-grid--2col .cc-fp-col-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.05);
}

/* ── Weather widget ──────────────────────────────────────────────────── */

.cc-fp-weather-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.cc-fp-weather-grid--2 { grid-template-columns: repeat(2, 1fr); }

.cc-fp-weather-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 12px 4px;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.cc-fp-weather-icon {
	width: 28px;
	height: 28px;
	color: #f59e0b;
}

.cc-fp-weather-city {
	font-size: 0.75rem;
	font-weight: 600;
	color: #374151;
	letter-spacing: -0.01em;
}

.cc-fp-weather-temps {
	display: flex;
	gap: 6px;
	font-size: 0.8rem;
}

.cc-fp-weather-high {
	color: #dc2626;
	font-weight: 600;
}

.cc-fp-weather-low {
	color: #2563eb;
	font-weight: 500;
}

/* ── Sidebar gallery with titles ─────────────────────────────────────── */

.cc-fp-sidebar-gallery-grid--titled .cc-fp-col-gallery-item {
	display: flex;
	flex-direction: column;
	border: none !important;
	background: none !important;
	text-decoration: none;
	overflow: hidden;
}
.cc-fp-sidebar-gallery-grid--titled .cc-fp-col-gallery-item img {
	border: 1px solid #d1d5db;
	border-radius: 4px;
	width: 100%;
	flex: 1;
	min-height: 0;
	object-fit: cover;
	display: block;
}
.cc-fp-gallery-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.85rem;
	line-height: 1.35;
	color: #1d1d1f;
	padding: 2px 0 6px;
	text-decoration: none;
}
.cc-fp-col-gallery-item:hover .cc-fp-gallery-title {
	color: #c0392b;
}

/* ── YouTube video widget ────────────────────────────────────────────── */

.cc-fp-youtube-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cc-fp-youtube-item {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}
.cc-fp-youtube-item iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 4px;
}

/* ── kazt-retro (2-col board grid + sidebar) ─────────────────────────── */

.cc-fp--kazt-retro .cc-fp-retro-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}
.cc-fp--kazt-retro .cc-fp-retro-layout--sidebar {
	grid-template-columns: 1fr 300px;
}
.cc-fp--kazt-retro .cc-fp-retro-layout--banner-right { margin-right: 200px; }
.cc-fp--kazt-retro .cc-fp-retro-layout--banner-left  { margin-left:  200px; }

.cc-fp--kazt-retro .cc-fp-boards {
	display: grid;
	gap: 28px;
}
.cc-fp--kazt-retro .cc-fp-boards--2col { grid-template-columns: repeat(2, 1fr); }

.cc-fp--kazt-retro .cc-fp-board-section {
	min-width: 0;
}

.cc-fp--kazt-retro .cc-fp-post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cc-fp--kazt-retro .cc-fp-post-list li {
	border-bottom: 1px solid #eee;
}
.cc-fp--kazt-retro .cc-fp-post-link {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 7px 0;
	text-decoration: none;
	color: #333;
	font-size: 0.9rem;
	line-height: 1.4;
}
.cc-fp--kazt-retro .cc-fp-post-link:hover { color: #c0392b; }
.cc-fp--kazt-retro .cc-fp-post-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cc-fp--kazt-retro .cc-fp-post-date {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: #999;
}

/* Retro gallery */
.cc-fp--kazt-retro .cc-fp-gallery {
	margin-top: 32px;
}
.cc-fp--kazt-retro .cc-fp-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}
.cc-fp--kazt-retro .cc-fp-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 4px;
}
.cc-fp--kazt-retro .cc-fp-gallery-item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	display: block;
	transition: transform 0.2s;
}
.cc-fp--kazt-retro .cc-fp-gallery-item:hover img { transform: scale(1.04); }

/* Retro gallery — in-column variant */
.cc-fp--kazt-retro .cc-fp-col-gallery {
	display: flex;
	flex-direction: column;
}
.cc-fp--kazt-retro .cc-fp-col-gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols, 4), 1fr);
	gap: 4px;
	flex: 1;
	min-height: 0;
	grid-auto-rows: 1fr;
}
.cc-fp--kazt-retro .cc-fp-col-gallery-item {
	display: block;
	overflow: hidden;
	border-radius: 2px;
	min-height: 0;
}
.cc-fp--kazt-retro .cc-fp-col-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s;
}
.cc-fp--kazt-retro .cc-fp-col-gallery-item:hover img { transform: scale(1.04); }

/* Retro front page image block */
.cc-fp--kazt-retro .cc-fp-board-section--frontpage {
	display: grid;
	grid-template-rows: auto 1fr;
}
.cc-fp--kazt-retro .cc-fp-board-section--frontpage .cc-fp-frontpage-image {
	overflow: hidden;
	border-radius: 4px;
	position: relative;
}
.cc-fp--kazt-retro .cc-fp-board-section--frontpage .cc-fp-frontpage-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
}
.cc-fp--kazt-retro .cc-fp-sidebar .cc-fp-frontpage-image {
	margin-bottom: 24px;
}
.cc-fp--kazt-retro .cc-fp-sidebar .cc-fp-frontpage-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

/* Retro sidebar — reuse modern sidebar classes */
.cc-fp--kazt-retro .cc-fp-sidebar {
	min-width: 0;
}
.cc-fp--kazt-retro .cc-fp-sidebar-section {
	margin-bottom: 24px;
}
.cc-fp--kazt-retro .cc-fp-sidebar-title {
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid #1d1d1f;
}
.cc-fp--kazt-retro .cc-fp-sidebar-title a {
	color: #1d1d1f;
	text-decoration: none;
}
.cc-fp--kazt-retro .cc-fp-sidebar-title a:hover { color: #c0392b; }
.cc-fp--kazt-retro .cc-fp-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.cc-fp--kazt-retro .cc-fp-sidebar-list li {
	border-bottom: 1px solid #eee;
}
.cc-fp--kazt-retro .cc-fp-sidebar-list a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 6px;
	padding: 6px 0;
	text-decoration: none;
	color: #333;
	font-size: 0.85rem;
}
.cc-fp--kazt-retro .cc-fp-sidebar-list a:hover { color: #c0392b; }
.cc-fp--kazt-retro .cc-fp-sidebar-date {
	flex-shrink: 0;
	font-size: 0.75rem;
	color: #999;
}

/* Retro sidebar gallery */
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid .cc-fp-col-gallery-item {
	display: block;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid .cc-fp-col-gallery-item img {
	width: 100%;
	height: auto;
	object-fit: contain;
	display: block;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid--2col {
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid--2col .cc-fp-col-gallery-item {
	aspect-ratio: 3 / 4;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	overflow: hidden;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid--2col .cc-fp-col-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1.05);
}

/* Retro titled gallery — border on image, not container */
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid--titled .cc-fp-col-gallery-item {
	border: none;
	overflow: hidden;
}
.cc-fp--kazt-retro .cc-fp-sidebar-gallery-grid--titled .cc-fp-col-gallery-item img {
	border: 1px solid #d1d5db;
	border-radius: 4px;
	flex: 1;
	min-height: 0;
	object-fit: cover;
	transform: none;
}

/* Retro weather widget */
.cc-fp--kazt-retro .cc-fp-weather-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}
.cc-fp--kazt-retro .cc-fp-weather-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cc-fp--kazt-retro .cc-fp-weather-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 12px 4px;
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}
.cc-fp--kazt-retro .cc-fp-weather-icon {
	width: 28px;
	height: 28px;
	color: #f59e0b;
}
.cc-fp--kazt-retro .cc-fp-weather-city {
	font-size: 0.75rem;
	font-weight: 600;
	color: #374151;
	letter-spacing: -0.01em;
}
.cc-fp--kazt-retro .cc-fp-weather-temps {
	display: flex;
	gap: 6px;
	font-size: 0.8rem;
}
.cc-fp--kazt-retro .cc-fp-weather-high {
	color: #dc2626;
	font-weight: 600;
}
.cc-fp--kazt-retro .cc-fp-weather-low {
	color: #2563eb;
	font-weight: 500;
}

/* ── Frontpage responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
	/* Classic: collapse to 1 column */
	.cc-fp-boards--2col,
	.cc-fp-boards--3col {
		grid-template-columns: 1fr;
	}
	.cc-fp-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	/* In-column gallery: on mobile use fixed aspect ratio (no adjacent column to match) */
	.cc-fp-col-gallery { display: block; }
	.cc-fp-col-gallery-grid { flex: none; grid-auto-rows: auto; }
	.cc-fp-col-gallery-item { aspect-ratio: 4 / 3; }

	/* Retro: no banner margin on mobile */
	.cc-fp--kazt-retro .cc-fp-retro-layout--banner-right { margin-right: 0; }
	.cc-fp--kazt-retro .cc-fp-retro-layout--banner-left  { margin-left:  0; }
	/* Retro: sidebar below main, boards 1-col */
	.cc-fp--kazt-retro .cc-fp-retro-layout--sidebar {
		grid-template-columns: 1fr;
	}
	.cc-fp--kazt-retro .cc-fp-boards--2col {
		grid-template-columns: 1fr;
	}
	.cc-fp--kazt-retro .cc-fp-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.cc-fp--kazt-retro .cc-fp-col-gallery { display: block; }
	.cc-fp--kazt-retro .cc-fp-col-gallery-grid { flex: none; grid-auto-rows: auto; }
	.cc-fp--kazt-retro .cc-fp-col-gallery-item { aspect-ratio: 4 / 3; }
	/* Retro: image-only section — undo absolute positioning */
	.cc-fp--kazt-retro .cc-fp-board-section--frontpage .cc-fp-frontpage-image img {
		position: static;
		width: 100%;
		height: auto;
	}

	/* Modern: sidebar below main, secondary 1-col */
	.cc-fp-modern-layout--sidebar {
		grid-template-columns: 1fr;
	}
	.cc-fp-secondary-grid,
	.cc-fp-tertiary-grid {
		grid-template-columns: 1fr;
	}
	.cc-fp-hero-title {
		font-size: 1.2rem;
	}
}

@media (max-width: 480px) {
	.cc-fp { padding: 0 12px; }
	.cc-fp-hero-title { font-size: 1.05rem; }
	.cc-fp-card-link { gap: 10px; }
	.cc-fp-card-thumb { width: 90px; height: 60px; }
	.cc-fp-card-top {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.cc-fp-card-cat,
	.cc-fp-card-date {
		white-space: nowrap;
	}
	.cc-fp-card-title { font-size: 0.88rem; }
}

/* =========================================================================
   Comments
   ========================================================================= */

.cc-comments-section {
	margin-top: 40px;
	padding-top: 28px;
	border-top: 1px solid #e5e7eb;
}

.cc-comments-heading {
	font-size: 1.1rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 16px;
}

.cc-comments-count {
	font-weight: 400;
	color: #6b7280;
}

.cc-comments-empty {
	color: #9ca3af;
	font-size: 0.875rem;
	margin: 0 0 20px;
}

.cc-comment-list {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
}

.cc-comment-item {
	padding: 14px 0;
	border-bottom: 1px solid #f3f4f6;
}

.cc-comment-item:last-child {
	border-bottom: none;
}

.cc-comment-header {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.cc-comment-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.cc-comment-author {
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
}

.cc-comment-date {
	font-size: 0.75rem;
	color: #9ca3af;
}

.cc-comment-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
	line-height: 1;
}

.cc-comment-actions .cc-icon-link,
.cc-comment-actions .cc-icon-link:focus,
.cc-comment-actions .cc-icon-link:focus-visible,
.cc-comment-actions .cc-icon-link:active {
	display: inline-flex;
	align-items: center;
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	outline: none !important;
	box-shadow: none !important;
}

.cc-comment-content {
	font-size: 0.9rem;
	line-height: 1.6;
	color: #374151;
	word-break: break-word;
}

.cc-comment-content p {
	margin: 0 0 8px;
}

.cc-comment-content p:last-child {
	margin-bottom: 0;
}

.cc-comment-content img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 4px 0;
}

/* Comment form */

.cc-comment-form-wrap {
	margin-top: 20px;
}

.cc-comment-anon-fields {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
}

.cc-comment-anon-fields .cc-form-group {
	flex: 1;
	margin-bottom: 0;
}

.cc-comment-anon-fields label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #374151;
	margin-bottom: 4px;
}

.cc-comment-anon-fields .cc-input {
	width: 100%;
	padding: 8px 10px;
	font-size: 0.85rem;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
}

.cc-comment-anon-fields .cc-input:focus {
	outline: none;
	border-color: #6366f1;
	box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.cc-comment-editor-wrap {
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

#cc-comment-editor {
	min-height: 80px;
	max-height: 300px;
	overflow-y: auto;
}

#cc-comment-editor .ql-editor {
	min-height: 80px;
	font-size: 0.9rem;
	padding: 10px 12px;
}

#cc-comment-editor .ql-editor.ql-blank::before {
	font-style: normal;
	color: #9ca3af;
}

.cc-comment-editor-wrap .ql-toolbar {
	border: none !important;
	border-bottom: 1px solid #e5e7eb !important;
	padding: 4px 8px !important;
}

.cc-comment-editor-wrap .ql-container {
	border: none !important;
}

.cc-comment-toolbar-extra {
	display: flex;
	align-items: center;
	padding: 4px 8px;
	border-top: 1px solid #e5e7eb;
	background: #fafafa;
}

.cc-comment-gallery-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 0.8rem;
	color: #6b7280;
	padding: 4px 8px;
	border-radius: 4px;
}

.cc-comment-gallery-btn:hover {
	color: #111;
	background: #f3f4f6;
}

.cc-comment-form-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 10px;
}

.cc-comment-status {
	font-size: 0.8rem;
	margin: 0;
}

.cc-comment-status.is-error {
	color: #ef4444;
}

.cc-comment-status.is-success {
	color: #22c55e;
}

.cc-comment-submit-btn {
	padding: 8px 20px !important;
	font-size: 0.85rem !important;
}

.cc-comment-hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	width: 0;
}

.cc-comment-login-prompt {
	font-size: 0.875rem;
	color: #6b7280;
	margin-top: 16px;
}

.cc-comment-login-prompt a {
	color: #4f46e5;
}

/* Inline edit mode for comments */

.cc-comment-edit-wrap {
	margin-top: 8px;
}

.cc-comment-edit-wrap .cc-comment-editor-wrap {
	margin-bottom: 8px;
}

.cc-comment-edit-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.cc-comment-edit-actions .cc-submit-btn {
	padding: 6px 16px !important;
	font-size: 0.8rem !important;
}

/* Comment password dialog */

.cc-comment-password-dialog {
	border: none;
	border-radius: 12px;
	padding: 0;
	max-width: 380px;
	width: 90%;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cc-comment-password-dialog::backdrop {
	background: rgba(0, 0, 0, 0.4);
}

.cc-comment-password-dialog-inner {
	padding: 24px;
}

.cc-comment-password-dialog-inner h3 {
	margin: 0 0 6px;
	font-size: 1rem;
	font-weight: 600;
}

.cc-comment-password-dialog-inner .cc-form-group {
	margin: 12px 0;
}

.cc-comment-password-dialog-actions {
	display: flex;
	gap: 8px;
	margin-top: 16px;
}

.cc-comment-password-dialog-status {
	font-size: 0.8rem;
	margin: 8px 0 0;
}

.cc-comment-password-dialog-status.is-error {
	color: #ef4444;
}

/* Vote button */

.cc-comment-vote-btn,
.cc-comment-vote-display {
	gap: 3px !important;
	color: #9ca3af;
	position: relative;
}

.cc-comment-vote-btn {
	transition: color 0.15s;
	outline: none;
	box-shadow: none;
}

.cc-comment-vote-btn:focus,
.cc-comment-vote-btn:focus-visible {
	outline: none;
	box-shadow: none;
}

.cc-vote-count {
	font-weight: 600;
}

.cc-comment-vote-btn:hover:not(:disabled) {
	color: #f59e0b;
}

.cc-comment-vote-btn.is-voted {
	color: #f59e0b;
	cursor: default;
}

/* Confirm tooltip (replaces window.confirm) */

.cc-confirm-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #1f2937;
	color: #fff;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 0.8rem;
	width: max-content;
	max-width: 90vw;
	z-index: 100;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.15s, transform 0.15s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	pointer-events: auto;
}

.cc-confirm-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 12px;
	border: 5px solid transparent;
	border-top-color: #1f2937;
}

.cc-confirm-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.cc-confirm-tooltip-msg {
	margin: 0;
}

.cc-confirm-tooltip-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.cc-confirm-tooltip-yes {
	background: #ef4444;
	color: #fff;
	border: none;
	padding: 4px 14px;
	border-radius: 4px;
	font-size: 0.78rem;
	cursor: pointer;
}

.cc-confirm-tooltip-yes:hover {
	background: #dc2626;
}

.cc-confirm-tooltip-no {
	background: transparent;
	color: #9ca3af;
	border: 1px solid #4b5563;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 0.78rem;
	cursor: pointer;
}

.cc-confirm-tooltip-no:hover {
	color: #fff;
	border-color: #9ca3af;
}

/* Alert toast (replaces alert()) */

.cc-alert-toast {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(-10px);
	background: #1f2937;
	color: #fff;
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 0.85rem;
	z-index: 10000;
	opacity: 0;
	transition: opacity 0.2s, transform 0.2s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cc-alert-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* Vote login tooltip */

.cc-vote-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
	background: #1f2937;
	color: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 0.78rem;
	white-space: nowrap;
	z-index: 100;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.15s, transform 0.15s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	pointer-events: auto;
}

.cc-vote-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	right: 10px;
	border: 5px solid transparent;
	border-top-color: #1f2937;
}

.cc-vote-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.cc-vote-tooltip a {
	color: #93c5fd;
	text-decoration: underline;
}

/* Pinned (top-voted) comments */

.cc-comments-pinned {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
}

.cc-comments-pinned-heading {
	font-size: 0.85rem;
	font-weight: 600;
	color: #6b7280;
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cc-comment-list--pinned .cc-comment-item {
	background: #fffbeb;
	border-radius: 8px;
	padding: 12px 14px;
	border-bottom: none;
	margin-bottom: 8px;
}

.cc-comment-list--pinned .cc-comment-item:last-child {
	margin-bottom: 0;
}

/* Nested (threaded) comments */

.cc-comment-children {
	margin-left: 28px;
	padding-left: 16px;
	border-left: 2px solid #e5e7eb;
}

.cc-comment-children .cc-comment-children {
	margin-left: 20px;
	padding-left: 12px;
}

/* Reply indicator above comment form */

.cc-comment-reply-indicator {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	margin-bottom: 10px;
	background: #f0f4ff;
	border-radius: 6px;
	font-size: 0.8rem;
	color: #374151;
}

.cc-reply-indicator-body {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cc-comment-reply-indicator strong {
	color: #111827;
}

.cc-reply-indicator-excerpt {
	color: #6b7280;
	font-size: 0.78rem;
}

.cc-cancel-reply-btn {
	margin-left: auto;
	font-size: 0.75rem;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
}

@media (max-width: 600px) {
	.cc-comment-anon-fields {
		flex-direction: column;
		gap: 8px;
	}

	.cc-comment-children {
		margin-left: 16px;
		padding-left: 10px;
	}

	.cc-comment-children .cc-comment-children {
		margin-left: 12px;
		padding-left: 8px;
	}
}
