@charset "utf-8";

:root {
	--bg: #f4f4f4;
	--bg-head: #2c2f36;
	--bg-card: #ffffff;
	--line: #e2e2e2;
	--text: #222222;
	--sub: #767676;
	--accent: #ff3700;
	--accent-dim: #c72c00;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
}

header {
	background: var(--bg-head);
	padding: 9px 20px;
	border-bottom: 1px solid var(--line);
	text-align: center;
}
header h1 { margin: 0; font-size: 18px; letter-spacing: 2px; }
header h1 a { color: #fff; text-decoration: none; }

.container {
	max-width: 960px;
	margin: 0 auto;
	padding: 8px 10px 40px;
}

h2.page { font-size: 20px; margin: 0 0 3px; text-align: center; }
.explanation { color: var(--sub); font-size: 13px; margin-bottom: 10px; text-align: center; line-height: 1.5; }

.filter_tabs {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
}
.filter_group {
	display: flex;
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 3px;
}
.filter_pill {
	position: relative;
	flex: 1;
	background: transparent;
	border: none;
	color: var(--sub);
	font-size: 13px;
	font-weight: bold;
	font-family: inherit;
	padding: 7px 8px;
	border-radius: 7px;
	cursor: pointer;
	white-space: nowrap;
}
.filter_pill:not(:first-child)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 22%;
	bottom: 22%;
	width: 1px;
	background: var(--line);
}
.filter_pill.active {
	background: var(--accent);
	color: #fff;
}
.filter_pill.active::before,
.filter_pill.active + .filter_pill::before {
	display: none;
}

/* JS(masonry.js)が計算した配置に切り替えるまでの初期フォールバック。
   Safariのcolumn-countはaspect-ratio由来の高さ計算と相性が悪く、
   列ごとの高さがブラウザによってズレることがあるため、実際の配置はJSで行う。 */
.grids {
	column-count: 2;
	column-gap: 8px;
}
@media (min-width: 600px) {
	.grids { column-count: 3; }
}
.grids.js-masonry {
	display: block;
	position: relative;
	column-count: initial;
}
.grids.js-masonry .art_li {
	position: absolute;
	top: 0;
	left: 0;
	margin-bottom: 0;
}

.art_li {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	break-inside: avoid;
	margin-bottom: 8px;
}
.item_image { position: relative; }
.item_image a.thumb_link { display: block; width: 100%; height: 100%; }
.item_image .thumb_img,
.item_image .thumb_video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.item_image .thumb_video { display: none; background: #000; }

.rank {
	position: absolute;
	top: 6px;
	left: 6px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	padding: 3px 8px;
	border-radius: 999px;
}
.item_image::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 45%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
	pointer-events: none;
}
.creator_overlay {
	position: absolute;
	left: 6px;
	bottom: 6px;
	max-width: calc(100% - 12px);
	display: flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	z-index: 2;
}
.creator_avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: var(--bg-card);
	border: 1px solid rgba(255, 255, 255, 0.4);
}
.creator_avatar_fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: #fff;
	font-size: 11px;
	font-weight: bold;
}
.creator_overlay_name {
	min-width: 0;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.likes_badge {
	position: absolute;
	right: 6px;
	bottom: 6px;
	display: flex;
	align-items: center;
	gap: 4px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 11px;
	font-weight: bold;
	padding: 4px 8px;
	border-radius: 999px;
	z-index: 2;
	backdrop-filter: blur(4px);
}
.likes_badge svg { width: 12px; height: 12px; flex-shrink: 0; }

.popular_tags_card {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 10px;
}
.popular_tags_title {
	font-size: 12px;
	color: var(--sub);
	font-weight: bold;
	margin: 0 0 8px;
}
.popular_tags_wrap {
	position: relative;
	overflow: hidden;
	transition: max-height 0.35s ease;
}
.popular_tags_list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 6px;
}
.popular_tags_fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(to bottom, transparent 0%, var(--bg-card) 55%);
	pointer-events: none;
}
.popular_tags_toggle {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}
.popular_tags_toggle_label {
	font-size: 10px;
	color: var(--sub);
	line-height: 1.2;
}
.popular_tags_toggle_arrow {
	width: 11px;
	height: 11px;
	color: var(--sub);
	margin-top: -1px;
	transition: transform 0.25s ease;
}
.popular_tags_toggle.expanded .popular_tags_toggle_arrow {
	transform: rotate(180deg);
}
.popular_tag {
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 12px;
	color: var(--text);
	text-decoration: none;
	flex-shrink: 0;
}
a.popular_tag:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.creator_profile {
	text-align: center;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
}
.creator_profile_avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	margin: 0 auto 8px;
	background: var(--bg-card);
	border: 2px solid var(--line);
}
.creator_profile_avatar_fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: #fff;
	font-size: 28px;
	font-weight: bold;
}
.creator_profile h2 { margin: 0 0 6px; }
.creator_profile .bio {
	color: var(--sub);
	font-size: 13px;
	line-height: 1.5;
	white-space: pre-wrap;
	max-width: 560px;
	margin: 0 auto 10px;
}
.cta_button {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	font-weight: bold;
	text-decoration: none;
	padding: 10px 28px;
	border-radius: 999px;
}

footer {
	text-align: center;
	color: var(--sub);
	font-size: 12px;
	padding: 14px;
	border-top: 1px solid var(--line);
}
.footer_disclaimer {
	max-width: 640px;
	margin: 0 auto 10px;
	line-height: 1.6;
}
.footer_links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 14px;
	margin-bottom: 10px;
}
.footer_links a {
	color: var(--sub);
	text-decoration: underline;
}

.legal_body {
	max-width: 640px;
	margin: 0 auto;
	font-size: 14px;
	line-height: 1.6;
}
.legal_body h3 {
	font-size: 15px;
	color: var(--text);
	margin: 16px 0 5px;
}
.legal_body h3:first-child { margin-top: 0; }
.legal_body p {
	color: var(--sub);
	margin: 0 0 8px;
}
.contact_form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 480px;
	margin: 0 auto;
}
.contact_form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--text);
	font-size: 14px;
}
.contact_form textarea,
.contact_form input[type="text"] {
	background: var(--bg-card);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
	padding: 10px 12px;
	resize: vertical;
}
.contact_form .hp { position: absolute; left: -9999px; }
.contact_form button {
	background: var(--accent);
	color: #fff;
	font-weight: bold;
	font-size: 15px;
	border: none;
	border-radius: 999px;
	padding: 12px;
	cursor: pointer;
}
.form_success, .form_error {
	max-width: 480px;
	margin: 0 auto 16px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 14px;
	text-align: center;
}
.form_success { background: rgba(255, 55, 0, 0.12); color: var(--accent); }
.form_error { background: rgba(199, 44, 0, 0.15); color: var(--accent-dim); }

.viewer {
	display: none;
	position: fixed;
	inset: 0;
	background: #000;
	z-index: 1000;
	overflow: hidden;
}
.viewer.is-open { display: block; }
.viewer_track {
	position: absolute;
	inset: 0;
	overflow: hidden;
}
.viewer_slot {
	position: absolute;
	inset: 0;
	transform: translateY(100%);
	display: none;
}
.viewer_thumb,
.viewer_video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #000;
}
.viewer_video { display: none; }

.viewer_pause_icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	display: none;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	z-index: 5;
}
.viewer_pause_icon.show { display: flex; }

.icon_btn {
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.icon_btn svg { width: 22px; height: 22px; }

.viewer_x {
	position: absolute;
	top: 16px;
	right: 16px;
}

.viewer_side_actions {
	position: absolute;
	right: 16px;
	bottom: 100px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}
#viewer_share.done { background: var(--accent); border-color: var(--accent); }
#viewer_like.liked { background: var(--accent); border-color: var(--accent); }
#viewer_like.liked svg { fill: #fff; stroke: #fff; }

.viewer .watch {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 24px;
	display: block;
	text-align: center;
	background: var(--accent);
	color: #fff;
	font-weight: bold;
	text-decoration: none;
	padding: 14px;
	border-radius: 999px;
}

.viewer_offer {
	position: absolute;
	left: 16px;
	right: 70px;
	bottom: 86px;
	color: #fff;
}
.viewer_offer_box {
	background: rgba(0, 0, 0, 0.5);
	border-radius: 8px;
	padding: 8px 12px;
	margin-bottom: 6px;
}
.viewer_offer_name_row {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 3px;
}
.viewer_offer_name_row #viewer_creator_name {
	font-weight: bold;
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}
.viewer_offer_date {
	flex-shrink: 0;
	font-size: 10px;
	color: rgba(255, 255, 255, 0.65);
}
.viewer_offer_value {
	font-size: 11px;
	line-height: 1.6;
	white-space: pre-line;
	color: rgba(255, 255, 255, 0.9);
}
.viewer_offer_tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.viewer_seekbar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 22px;
	display: flex;
	align-items: center;
	padding: 0 4px;
	cursor: pointer;
	z-index: 6;
}
.viewer_seekbar_track {
	position: relative;
	width: 100%;
	height: 3px;
	background: rgba(255, 255, 255, 0.25);
}
.viewer_seekbar_fill {
	position: absolute;
	inset: 0;
	width: 0%;
	background: var(--accent);
}
