/* ---------- Studio page ---------- */

/* index.css pulls .site-main up under the header for the home hero; not here. */
.studio-page { top: 0; }

/* ---------- Search box (overlaps the bottom of the hero) ---------- */
.studio-search {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	width: min(1280px, 100% - var(--gutter) * 2);
	min-height: 144px;
	margin: calc(-1 * clamp(40px, 5vw, 73px)) auto 0;
	padding: 24px clamp(24px, 5vw, 70px) 24px clamp(24px, 5vw, 73px);
	background: #fff;
	border-radius: clamp(24px, 3.1vw, 45px);
	box-shadow: 0 0 8px rgba(42, 46, 69, .1);
}
.studio-search .section-title { margin-bottom: 0; }
.studio-search .section-title h2 { line-height: 37px; letter-spacing: .07em; }
.studio-search .section-title p { font-weight: 800; line-height: 30px; letter-spacing: .01em; }

.studio-search-form {
	display: flex;
	align-items: center;
	gap: 14px;
}
.studio-select { position: relative; width: 216px; }
/* ▼ on the right of the pill */
.studio-select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 20px;
	border: 5px solid transparent;
	border-top: 8px solid #333;
	border-bottom: 0;
	transform: translateY(-50%);
	pointer-events: none;
}
.studio-select select {
	width: 100%;
	height: 48px;
	padding: 0 40px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -.04em;
	text-align: center;
	text-align-last: center;
	color: var(--ink);
	background: #fff;
	border: 1px solid #333;
	border-radius: var(--radius-full);
	appearance: none;
	cursor: pointer;
}
.studio-select select:disabled { color: var(--gray-light); border-color: #ccc; cursor: default; }
.studio-select:has(select:disabled)::after { border-top-color: #ccc; }

/* studio.js swaps the native select for a pill button + list (same look as the trial form's studio select). */
.studio-select.is-enhanced select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}
.studio-select-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	padding: 0 40px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -.04em;
	color: var(--ink);
	background: #fff;
	border: 1px solid #333;
	border-radius: var(--radius-full);
	cursor: pointer;
}
.studio-select-btn[aria-expanded="true"] { border-width: 2px; }
.studio-select-btn:disabled { color: var(--gray-light); border-color: #ccc; cursor: default; }
.studio-select.is-enhanced:has(.studio-select-btn:disabled)::after { border-top-color: #ccc; }

.studio-select-list {
	position: absolute;
	z-index: 10;
	top: 100%;
	left: 0;
	right: 0;
	max-height: 280px;
	margin: 0;
	padding: 12px 0;
	overflow-y: auto;
	list-style: none;
	text-align: center;
	background: #fff;
	border: 1px solid #1e2236;
}
.studio-select-list li {
	padding: 6px 12px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.studio-select-list li.is-clear { font-weight: 500; color: var(--gray-light); }
.studio-select-list li:hover,
.studio-select-list li:focus,
.studio-select-list li[aria-selected="true"] { background: #eef0f9; outline: none; }

.studio-search-btn {
	position: relative;
	width: 216px;
	height: 48px;
	margin-left: 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -.04em;
	color: #fff;
	background: var(--international-klein-blue);
	border-radius: var(--radius-full);
	transition: background .2s ease;
}
/* ▶ on the right of the button */
.studio-search-btn::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 20px;
	border: 5px solid transparent;
	border-left: 8px solid #eee;
	border-right: 0;
	transform: translateY(-50%);
}
.studio-search-btn:hover { background: var(--klein-blue); }

/* ---------- Breadcrumb: aligned with the studio list ---------- */
.studio-page .breadcrumb ol {
	width: min(1100px, 100% - var(--gutter) * 2);
	margin: 16px auto 0;
}

/* ---------- Studios by area ---------- */
.studio-areas { margin-top: clamp(24px, 2.2vw, 32px); }
.studio-area + .studio-area { margin-top: 80px; }

/* 都道府県 heading; ▼ toggles the area open/closed. */
.studio-area-pref {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	list-style: none;
	cursor: pointer;
}
.studio-area-pref::-webkit-details-marker { display: none; }
.studio-area-pref h2 {
	font-size: clamp(24px, 22.6px + .38vw, 28px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: .04em;
	color: var(--international-klein-blue);
}
.studio-area-pref::after {
	content: "";
	border: 6px solid transparent;
	border-top: 10px solid var(--international-klein-blue);
	border-bottom: 0;
	transition: transform .2s ease;
}
.studio-area:not([open]) .studio-area-pref::after { transform: rotate(-90deg); }

.studio-area-city { margin-top: 12px; }
.studio-area-city + .studio-area-city { margin-top: 56px; }
.studio-area-city h3 {
	font-size: clamp(20px, 18.6px + .38vw, 24px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: .04em;
	color: var(--moody-blue);
}
.studio-area-count { margin-left: 2px; }

.studio-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px 20px;
	margin-top: 40px;
}
.studio-empty { margin-top: 40px; text-align: center; color: #7b7d8c; }

/* ---------- Studio card ---------- */
.studio-item {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e8f6;
	border-radius: 32px;
	overflow: hidden;
}
.studio-item-media {
	position: relative;
	aspect-ratio: 2 / 1;
	border-bottom: 1px solid #e9ebfa;
}
.studio-item-media img,
.studio-item-media .ph { display: block; width: 100%; height: 100%; object-fit: cover; } /* fills the 2:1 box at any card width */
.studio-item-badges {
	position: absolute;
	top: 16px;
	left: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.studio-item-badge {
	padding: 7px 16px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -.04em;
	color: var(--international-klein-blue);
	background: #fff;
	border-radius: var(--radius-full);
}

.studio-item-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 17px 24px 14px;
}
.studio-item-head,
.studio-item-address { padding-left: 12px; }
.studio-item-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0 12px;
	line-height: 26px;
	letter-spacing: -.02em;
}
.studio-item-head h4 { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); }
/* 都道府県 before the name: phones only (the area heading shows it on wider screens). */
.studio-item-pref { display: none; }
.studio-item-station { font-size: 16px; font-weight: 500; color: var(--international-klein-blue); }
.studio-item-address {
	margin-top: 13px;
	font-size: 15px;
	line-height: 26px;
	letter-spacing: -.02em;
	color: #7b7d8c;
}

.studio-item-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 13px;
	margin-top: auto;
	padding-top: 16px;
}
.studio-item-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	font-size: 13px;
	letter-spacing: -.04em;
	color: var(--ink);
	background: #fff;
	border: 1px solid #7b7d8c;
	border-radius: var(--radius-full);
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.studio-item-btn:hover { 
	color: #fff; 
	background: var(--moody-blue); 
	border: 1px solid var(--moody-blue);
}

.studio-item-btn.is-primary {
	font-weight: 500;
	color: #fff;
	background: var(--international-klein-blue);
	border-color: var(--international-klein-blue);
}
.studio-item-btn.is-primary:hover { background: var(--klein-blue); border-color: var(--klein-blue); }

/* ---------- Responsive ---------- */

/* Tablet: search title above the controls, two cards per row. */
@media (max-width: 1100px) {
	.studio-search { flex-direction: column; align-items: flex-start; }
	.studio-search-form { width: 100%; }
	.studio-select,
	.studio-search-btn { flex: 1; width: auto; }
	.studio-search-btn { margin-left: 0; }

	.studio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: stacked controls; one card per row —
   "大阪府 本町店" / "本町駅 徒歩3分" / address, then the two buttons side by side. */
@media (max-width: 640px) {
	.studio-search { padding: 24px; }
	.studio-search-form { flex-direction: column; align-items: stretch; gap: 12px; }
	.studio-select,
	.studio-search-btn { flex: none; width: 100%; }

	.studio-area + .studio-area { margin-top: 56px; }
	.studio-area-city + .studio-area-city { margin-top: 40px; }
	.studio-grid { grid-template-columns: 1fr; gap: 16px 12px; margin-top: 24px; }
	.studio-item { border-radius: 20px; }
	.studio-item-badges { top: 12px; left: 12px; }
	.studio-item-badge { padding: 8px 16px; font-size: 14px; }
	.studio-item-body { padding: 16px 16px 20px; }
	.studio-item-head,
	.studio-item-address { padding-left: 4px; }
	.studio-item-head { flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1.4; }
	.studio-item-head h4 { font-size: 18px; }
	.studio-item-pref { display: inline; margin-right: .5em; }
	.studio-item-station { font-size: 14px; }
	.studio-item-address { margin-top: 10px; font-size: 13px; line-height: 1.7; }
	.studio-item-actions { gap: 10px; padding-top: 16px; }
	.studio-item-btn { height: 42px; }
}

/* ---------- Two faint drifting bubbles behind the studio list ----------
   Same animated bubbles as the top page (morph in the SVG; float from index.css), but on
   a softer fade (55% ↔ 20%) so they stay in the background behind the cards.
   --bubble-w is the part left on screen. */
.studio-page { overflow-x: clip; } /* the off-screen parts would widen the page on phones */
.studio-areas {
	--edge: max(var(--gutter), (100vw - 1100px) / 2);
	position: relative;
}
.studio-areas::before,
.studio-areas::after {
	content: "";
	position: absolute;
	z-index: -1;
	background: no-repeat center / 100% 100%;
	pointer-events: none;
	opacity: .55; /* fainter here than on the other pages */
}
/* Only the oval bubble (bubble_shape_8, 162 wide; _anim adds 16 of room → 194 × 169).
   Right edge, beside the top of the list, a quarter of it off-screen. */
.studio-areas::before {
	--bubble-w: min(360px, 26vw);
	top: 0;
	right: calc(-1 * var(--edge) - var(--bubble-w) * .25);
	width: calc(var(--bubble-w) * 194 / 162);
	aspect-ratio: 194 / 169;
	background-image: url("../images/background/bubble_shape_8_anim.svg");
	animation: bubble-float 12s ease-in-out infinite alternate;
}
/* Left edge, about half way down, a quarter of it off-screen; mirrored so the two ovals differ. */
.studio-areas::after {
	--bubble-w: min(280px, 22vw);
	top: 55%;
	left: calc(-1 * var(--edge) - var(--bubble-w) * .25);
	width: calc(var(--bubble-w) * 194 / 162);
	aspect-ratio: 194 / 169;
	background-image: url("../images/background/bubble_shape_8_anim.svg");
	transform: scaleX(-1);
	animation: bubble-float 11s ease-in-out infinite alternate;
	animation-delay: -4s;
}
@media (max-width: 782px) {
	.studio-areas::before { --bubble-w: 45vw; }
	.studio-areas::after { --bubble-w: 40vw; }
}
@media (prefers-reduced-motion: reduce) {
	.studio-areas::before,
	.studio-areas::after { animation: none; opacity: .4; }
}
