/* 넘기기 기본 동작. 색·크기·위치는 테마가 덮어씁니다 (:where 로 우선순위 0). */

/* ── 슬라이드 (한 장씩) ── */
.ruri-slides.is-ready { display: grid !important; position: relative; overflow: hidden; }
.ruri-slides.is-ready > .ruri-slides__slide {
	grid-area: 1 / 1; margin: 0 !important; min-width: 0;
	opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s;
}
.ruri-slides.is-ready > .ruri-slides__slide.is-active { opacity: 1; visibility: visible; }
:where(.ruri-slides__nav) {
	position: absolute; z-index: 3; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
	display: flex; align-items: center; gap: .5rem;
	padding: .35rem .6rem; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff;
	font-size: .8125rem; line-height: 1;
}
:where(.ruri-slides__nav button), :where(.ruri-carousel__btn) {
	appearance: none; border: 0; background: none; color: inherit; cursor: pointer; padding: .25rem; line-height: 0;
}
:where(.ruri-slides__nav svg), :where(.ruri-carousel__btn svg) { width: 1.1em; height: 1.1em; }
:where(.ruri-slides__count) { font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: center; }
:where(.ruri-slides__dots) { display: none; gap: .4rem; }
:where(.ruri-slides__dot) { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; opacity: .4; }
:where(.ruri-slides__dot.is-active) { opacity: 1; }
.ruri-slides__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 가로로 넘기기 ── */
.ruri-carousel { position: relative; }
.ruri-carousel__track {
	display: flex !important; flex-wrap: nowrap !important; gap: var(--ruri-carousel-gap, 1.5rem);
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ruri-carousel__track::-webkit-scrollbar { display: none; }
.ruri-carousel__track > * {
	flex: 0 0 calc((100% - (var(--ruri-carousel-per-view, 4) - 1) * var(--ruri-carousel-gap, 1.5rem)) / var(--ruri-carousel-per-view, 4));
	scroll-snap-align: start; margin: 0 !important; min-width: 0;
}
@media (max-width: 900px) { .ruri-carousel { --ruri-carousel-per-view: 2.3; } }
@media (max-width: 560px) { .ruri-carousel { --ruri-carousel-per-view: 1.4; } }
:where(.ruri-carousel__btn) {
	position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
	width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
	border-radius: 50%; background: #fff; color: #222; box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
:where(.ruri-carousel__btn.is-prev) { left: -1.25rem; }
:where(.ruri-carousel__btn.is-next) { right: -1.25rem; }
.ruri-carousel__btn[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { :where(.ruri-carousel__btn) { display: none; } }

@media (prefers-reduced-motion: reduce) {
	.ruri-slides.is-ready > .ruri-slides__slide { transition: none; }
	.ruri-carousel__track { scroll-behavior: auto; }
}
