/* ---- ギャラリー型：1作品＝正方形の枠、中央にサムネ ---- */

.tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	padding: 0;
}

.tile {
	position: relative;
	touch-action: manipulation;
	display: grid;
	place-items: center;
	aspect-ratio: 1/1;
	min-width: 0;
	min-height: 0;
	border: 1.5px solid var(--soft);
	border-radius: 16px;
	background: #fff;
	transition: background .2s, transform .25s;
}

@media (hover: hover) {
	.tile:hover {
		background: color-mix(in srgb, var(--accent) 40%, #fff);
		transform: translateY(-4px);
	}
}

.tile:focus-visible {
	background: color-mix(in srgb, var(--accent) 40%, #fff);
	transform: translateY(-4px);
}

.tile:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.thumb {
	position: relative;
	background: linear-gradient(135deg, hsl(var(--h, 210) 70% 90%), hsl(calc(var(--h, 210) + 40) 75% 80%));
	box-shadow: 6px 6px 18px rgba(35, 24, 21, .2);
}

.thumb.l {
	width: 76%;
	aspect-ratio: var(--r);
}

.thumb.p {
	height: 76%;
	aspect-ratio: var(--r);
}

.play {
	position: absolute;
	left: 10px;
	bottom: 10px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ink);
}

.play::before {
	content: "";
	position: absolute;
	left: 13px;
	top: 10px;
	border-left: 11px solid #fff;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
}

.tile img {
	max-width: 76%;
	max-height: 76%;
	min-width: 0;
	min-height: 0;
	box-shadow: 6px 6px 18px rgba(35, 24, 21, .2);
}

.thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	box-shadow: none;
}

.shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

/* ---- Web型：1人＝企画書・スマホ版・PC版を同じ高さで3列 ---- */

.sites {
	padding: 0;
}

.site {
	display: flex;
	align-items: flex-start;
	gap: clamp(12px, 2.4vw, 32px);
	padding: clamp(28px, 4vw, 48px) 0;
	border-top: 2px solid var(--line);
}

.site:last-child {
	border-bottom: 2px solid var(--line);
}

.shot {
	position: relative;
	display: block;
	flex: var(--r) 1 0%;
	min-width: 0;
	aspect-ratio: var(--r);
	overflow: hidden;
	border: 2px solid var(--ink);
	border-radius: 14px;
	background: linear-gradient(hsl(var(--h, 210) 60% 80%) 0 42%, transparent 42%), repeating-linear-gradient(#fff 0 10px, var(--soft) 10px 12px);
	transition: transform .25s, box-shadow .25s;
}

.shot:hover,
.shot:focus-visible {
	transform: translate(-3px, -3px);
	box-shadow: 6px 6px 0 var(--accent);
}

.shot:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.shot::after {
	content: attr(aria-label);
	position: absolute;
	left: 8px;
	top: 8px;
	padding: 3px 5px;
	background: var(--soft);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .08em;
	color: var(--ink);
	border-radius: 5px;
}

/* ===== スマホ（560px以下） ===== */
@media (max-width: 560px) {
	.shot::after {
		left: 4px;
		top: 4px;
		padding: 2px 4px;
		font-size: 10px;
		letter-spacing: .02em;
		line-height: 1.4;
		white-space: nowrap;
	}

	.pg-arrow {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.pre,
	.next {
		white-space: nowrap;
		font-size: 14px;
	}

	.next {
		align-self: flex-end;
	}
}

@media (max-width: 560px) {
	.shot[data-kind="sp"]::after {
		writing-mode: vertical-rl;
		left: 4px;
		top: 4px;
		padding: 4px 2px;
	}
}

.pg {
	background: var(--accent);
}

.pg-head {
	position: relative;
	z-index: 30;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: var(--header-h);
	padding: 10px max(clamp(12px, 2vw, 24px), calc((100% - 1200px) / 2));
	background: var(--accent);
}

.pg-head .logo {
	display: flex;
	align-items: center;
	color: var(--ink);
	text-decoration: none;
}

.pg-head .logo svg {
	display: block;
	height: 44px;
	width: auto;
}

.pg-head .hamburger {
	background: var(--paper);
}

.pg-head .drawer {
	padding-inline: max(28px, calc(50% - 360px));
}

.pg-main {
	padding: 0 clamp(12px, 2vw, 24px) clamp(24px, 3vw, 40px);
}

.panel {
	--pad: clamp(20px, 5vw, 56px);
	--gap: clamp(14px, 2.4vw, 24px);
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(40px, 7vw, 80px) var(--pad) clamp(28px, 4vw, 48px);
	border-radius: 28px;
	background: var(--paper);
}

.pg-title {
	display: flex;
	align-items: center;
	gap: var(--gap);
	margin: 0 calc(var(--pad) * -1);
	font-size: clamp(28px, 4.6vw, 52px);
	line-height: 1.3;
}

.pg-title::before {
	content: "";
	flex: none;
	width: calc(var(--pad) - var(--gap));
	height: 2px;
	background: var(--ink);
}

.pg-title::after {
	content: "";
	flex: 1;
	height: 2px;
	background: var(--ink);
}

.pg-who {
	margin: 10px 0 0;
	font-size: 13px;
	color: #5b5350;
}

.accs {
	display: grid;
	gap: 8px;
	margin: clamp(28px, 4vw, 44px) 0 clamp(36px, 5vw, 56px);
}

.acc {
	border-radius: 14px;
	border: 4px solid var(--accent);
}

.acc summary {
	padding: 12px 18px;
}

.acc-body {
	padding: 2px 20px 20px;
	max-width: none;
	font-size: 14.5px;
	line-height: 1.95;
	line-break: strict;
	word-break: auto-phrase;
	text-wrap: pretty;
}

.acc-body p {
	margin: 0 0 1em;
}

.acc-body p:last-child {
	margin-bottom: 0;
}

.chev {
	position: relative;
	flex: none;
	width: 30px;
	height: 30px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--paper);
	transition: background .2s, transform .25s;
}

.chev::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 44%;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--ink);
	border-bottom: 2px solid var(--ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

details[open] .chev {
	transform: rotate(180deg);
}

.pg-arrow {
	display: flex;
	justify-content: space-between;
	margin-top: clamp(40px, 6vw, 72px);
}

.pre {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
}

.pre .arrow {
	order: -1;
	position: relative;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	transition: transform .2s, background .2s;
}

.pre .arrow::before {
	content: "";
	position: absolute;
	left: 54%;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ink);
	border-top: 2px solid var(--ink);
	transform: translate(-50%, -50%) rotate(-135deg);
}

.pre:hover .arrow,
.pre:focus-visible .arrow {
	transform: translateX(-4px);
	background: var(--ink);
}

.pre:hover .arrow::before,
.pre:focus-visible .arrow::before {
	border-color: #fff;
}

.pre:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
	border-radius: 999px;
}

.next {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
}

.next .arrow {
	position: relative;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	transition: transform .2s, background .2s;
}

.next .arrow::before {
	content: "";
	position: absolute;
	left: 46%;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--ink);
	border-top: 2px solid var(--ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.next:hover .arrow,
.next:focus-visible .arrow {
	transform: translateX(4px);
	background: var(--ink);
}

.next:hover .arrow::before,
.next:focus-visible .arrow::before {
	border-color: #fff;
}

.next:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 4px;
	border-radius: 999px;
}

.pg-rule {
	height: 2px;
	margin: clamp(32px, 4vw, 48px) calc(var(--pad) * -1) 0;
	border: 0;
	background: var(--ink);
}

.viewer {
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 100px 16px;
	border: 0;
	background: transparent;
	overflow: auto;
	overscroll-behavior: contain;
}

@media (max-width: 1100px) {
	.viewer {
		padding-top: calc(env(safe-area-inset-top, 0px) + 66px);
	}
}

.viewer::backdrop {
	background: rgba(35, 24, 21, .88);
}

.viewer-body {
	display: grid;
	gap: 16px;
	width: var(--vw, min(960px, 100%));
	margin: 0 auto;
}

.viewer[data-kind="sp"] {
	--vw: min(420px, 100%);
}

.viewer[data-kind="pc"] {
	--vw: min(1100px, 100%);
}

.viewer-body>* {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
	background: #fff;
}

.viewer-body .ph {
	aspect-ratio: var(--ar);
	background: linear-gradient(hsl(var(--h, 210) 60% 80%) 0 12%, transparent 12%), repeating-linear-gradient(#fff 0 18px, var(--soft) 18px 22px);
}

.viewer-close {
	position: fixed;
	top: calc(env(safe-area-inset-top, 0px) + 14px);
	right: 16px;
	z-index: 2;
	width: 48px;
	height: 48px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--paper);
	cursor: pointer;
	transition: background .2s;
}

.viewer-close::before,
.viewer-close::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 2px;
	background: var(--ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.viewer-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.viewer-close:hover,
.viewer-close:focus-visible {
	background: var(--accent);
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.viewer[data-kind="img"] {
	--vw: min(860px, 100%);
}

.viewer-body>video {
	background: #000;
}

.viewer-body>iframe {
	aspect-ratio: 16 / 9;
	border: 0;
	background: #000;
}

.to-top-fab {
	position: fixed;
	right: clamp(16px, 3vw, 32px);
	bottom: calc(env(safe-area-inset-bottom, 0px) + clamp(16px, 3vw, 32px));
	z-index: 15;
	width: 52px;
	height: 52px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--paper);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s, transform .25s, visibility .25s, background .2s;
}

.to-top-fab.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.to-top-fab::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 54%;
	width: 12px;
	height: 12px;
	border-left: 3px solid var(--ink);
	border-top: 3px solid var(--ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.to-top-fab:hover,
.to-top-fab:focus-visible {
	background: var(--accent);
	outline-offset: 3px;
}

.to-top-fab.is-visible:hover,
.to-top-fab.is-visible:focus-visible {
	transform: translateY(-4px);
}

.pg footer {
	padding-top: 44px;
}

.pg footer h2 {
	margin-top: 0;
}

@media (max-width: 1100px) {
	.tiles {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 860px) {
	.tiles {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 700px) {
	.site {
		flex-wrap: wrap;
		row-gap: 14px;
	}

	.site>.shot:first-child {
		flex: 0 0 100%;
	}
}

@media (max-width: 560px) {
	.tiles {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}