/* [CUSTOM(takemd)] 2026-10-01 라공 테마 고르기 드롭다운의 모양 — 코어 공용(css/ra0_theme_picker.css, 동작은 js/ra0_theme_picker.js).
   피스 게시판(bbs_katalk)·시트 게시판(sheet)이 함께 싣는다(전엔 bbs_katalk css/style.theme.css 와 sheet sheet.ra0.css 에 한 벌씩).
   판의 「목록 카드 표지」(.ra0-tile-mark.bbs-list-box)는 테마 생성물(ui_themes_piece.css)의 카드 ::after 와 스킨의 목록 카드 규칙을 빌려 쓴다.
   자리마다 크기 조정(피스 출력 설정 패널 등)은 스킨에 남는다. */

/* ══ 테마 고르기 — 접힌 드롭다운 + 미리보기(js/ra0_theme_picker.js, 2026-09-29 사용자 「드롭다운을 커스텀으로 만들어서 미리보기」) ══
   select 는 값·저장용으로 남기고 화면에선 감춘다. 단추(.ra0-dd-trigger)와 목록 타일(.ra0-tile)은 그 테마의 루트 class 를 달아 테마 토큰으로
   제 모습(틀 바탕·글자·테두리·둥글림·서체·면 무늬) + 바탕·글자·포인트 점 + 목록 카드 표지. 「없음」·따르기 꺼진 「안 고름」은 테마가 없어 점선 판(.ra0-tile-plain).
   목록은 단추 아래로 밀고 펼친다(겹쳐 뜨지 않는다 — 패널 스크롤 상자에서 잘리지 않고, 글쓰기의 카드 미리보기를 가리지 않게) */
.ra0-picker-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
}
.ra0-dd { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; }
.ra0-picker {
	position: relative;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
	gap: 6px;
	max-height: 236px;
	overflow: auto;
	padding: 6px;
	overscroll-behavior: contain;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: min(var(--bbs-th-radius, 8px), 8px);
	background: color-mix(in srgb, currentColor 4%, transparent);
}
.ra0-picker[hidden] { display: none; }
.ra0-tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-height: 54px;
	padding: 7px 8px;
	text-align: left;
	cursor: pointer;
	background-color: var(--piece-frame-bg, transparent);
	background-image: var(--piece-bg-image, none);
	background-size: var(--piece-bg-size, auto);
	color: var(--piece-frame-text, inherit);
	border: var(--piece-border-width, 1px) solid var(--piece-border, color-mix(in srgb, currentColor 22%, transparent));
	border-radius: min(var(--piece-radius, 8px), 10px);
	box-shadow: var(--piece-shadow-sm, none);
	font-family: var(--piece-font, inherit);
	font-size: 12px;
	line-height: 1.25;
	transition: transform var(--bbs-anim-base, .15s) ease;
}
.ra0-picker .ra0-tile:hover { transform: translateY(-1px); }
.ra0-tile.ra0-tile-plain {
	background: transparent;
	color: inherit;
	border: 1px dashed color-mix(in srgb, currentColor 40%, transparent);
	box-shadow: none;
	font-family: inherit;
}
.ra0-tile.is-on { outline: 2px solid var(--bbs-ui-accent-bg, #4a7cff); outline-offset: 2px; }
.ra0-tile:focus-visible { outline: 2px dashed var(--bbs-ui-accent-bg, #4a7cff); outline-offset: 2px; }
.ra0-tile-dots { display: flex; gap: 3px; }
.ra0-tile-dots i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent);
}
.ra0-tile-dots i:nth-child(1) { background: var(--piece-surface, var(--card-bg-color, #fff)); }
.ra0-tile-dots i:nth-child(2) { background: var(--piece-text, var(--content-font-color, #111)); }
.ra0-tile-dots i:nth-child(3) { background: var(--piece-accent, var(--accent-color, #888)); }
.ra0-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; align-self: stretch; }
/* 목록 카드 표지(테마 piece.css 의 .bbs-list-box.piece-theme-X::after)를 타일에도 — 사이트 색을 따르는 테마끼리(투명·모던·레트로·맥 …)
   바탕이 같아 구분이 안 되던 것. 표지만 빌려 쓰는 작은 상자라 목록 카드 규칙(가림·크기 추정)은 끈다 */
.ra0-tile .ra0-tile-mark.bbs-list-box {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 26px;
	height: 14px;
	overflow: visible;
	content-visibility: visible;
	contain-intrinsic-size: none;
	border-radius: 0;
	font-family: inherit;
}
.ra0-tile .ra0-tile-mark.bbs-list-box.piece-themed::after { left: 0; right: auto; }
/* 테마 없는 판의 점은 사이트 색(뷰 밖 body 에 옮긴 글 테마 토큰을 받지 않게) */
.ra0-tile.ra0-tile-plain .ra0-tile-dots i:nth-child(1) { background: var(--card-bg-color, #fff); }
.ra0-tile.ra0-tile-plain .ra0-tile-dots i:nth-child(2) { background: var(--content-font-color, #111); }
.ra0-tile.ra0-tile-plain .ra0-tile-dots i:nth-child(3) { background: var(--accent-color, #888); }
.ra0-tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ra0-tile-name { font-weight: 600; overflow-wrap: anywhere; }
.ra0-tile-sub { font-size: 10.5px; opacity: .75; }
.ra0-tile-sub:empty { display: none; }
/* 단추 — 가로 한 줄: 점·표지 | 이름 · 덧말 | ▾ */
.ra0-tile.ra0-dd-trigger {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 340px;
	min-height: 38px;
	padding: 6px 10px;
	font-size: 12.5px;
}
.ra0-dd-trigger .ra0-tile-top { flex: 0 0 auto; align-self: auto; justify-content: flex-start; gap: 6px; }
.ra0-dd-trigger .ra0-tile-text { flex: 1 1 auto; flex-direction: row; align-items: baseline; gap: 6px; overflow: hidden; white-space: nowrap; }
.ra0-dd-trigger :is(.ra0-tile-name, .ra0-tile-sub) { min-width: 0; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.ra0-dd-trigger .ra0-tile-sub { font-size: 11px; }
.ra0-dd-caret {
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin: 0 2px 0 auto;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: .7;
	transition: transform var(--bbs-anim-base, .15s) ease;
}
.ra0-dd.is-open .ra0-dd-caret { transform: translateY(2px) rotate(-135deg); }
/* 서체 판(select[data-ra0-fontpicker]) — 그 서체로 쓴 「가나다 Aa」 + 이름. 테마 판과 달리 제 색은 없다(둘레 선만, 글자색은 자리 것) */
.ra0-tile.ra0-font-tile {
	gap: 3px;
	background: color-mix(in srgb, currentColor 4%, transparent);
	color: inherit;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: min(var(--bbs-th-radius, 8px), 8px);
	box-shadow: none;
}
.ra0-font-sample { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.25; }
.ra0-font-tile .ra0-tile-name { font-weight: 400; font-size: 11px; opacity: .8; }
.ra0-picker.ra0-font-picker { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.ra0-dd-trigger.ra0-font-tile .ra0-font-sample { flex: 0 0 auto; font-size: 15px; }
.ra0-dd-trigger.ra0-font-tile .ra0-tile-name { font-size: 12px; }
/* 추천 3색 칩 — 바탕에 글자색 「가」 + 포인트 점. 누르면 그 3색(js/ra0_theme_picker.js RA0Theme.swatches) */
.ra0-swatches { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; }
.ra0-swatches:empty { display: none; }
.ra0-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 42px;
	height: 26px;
	padding: 0 8px;
	border-radius: min(var(--bbs-th-radius, 999px), 999px);
	background: var(--sw-bg);
	color: var(--sw-fg);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: transform var(--bbs-anim-base, .15s) ease;
}
.ra0-swatch::after {   /* 둘레 — 단추 테두리는 스킨 「버튼 보더 전역 제거」가 지우므로 따로 한 겹 */
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 1px solid color-mix(in srgb, var(--sw-fg) 28%, transparent);
	pointer-events: none;
}
.ra0-swatch i { width: 8px; height: 8px; border-radius: 50%; background: var(--sw-ac); }
.ra0-swatch:hover { transform: translateY(-1px); }
.ra0-swatch:focus-visible { outline: 2px solid var(--bbs-ui-accent-bg, #4a7cff); outline-offset: 2px; }
