/*
Theme Name: Oshiryo 推し寮カラー
Description: ツイステグッズ紹介サイト用のオリジナルテーマ。推し寮を選ぶとサイトの色とおすすめが切り替わる。記事の色は商品の寮の色になる。
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: oshiryo
*/

/* 白地に寮カラー1色。--main/--tint/--ink/--on-main は寮ごとに functions.php から差し替わる。 */
:root {
	--page: #ffffff;
	--text: #1f1d29;
	--muted: #5f5b6e;
	--line: #e7e4ee;
	--soft: #f6f5f9;
	--footer: #1f1d29;
	--footer-text: #d6d3df;
	--font-display: 'Dela Gothic One', 'Hiragino Sans', sans-serif;
	--font-body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', sans-serif;
	--radius-l: 28px;
	--radius-m: 20px;
	--gutter: max(16px, env(safe-area-inset-left, 0px));
	--gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- 基本 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.8;
	transition: none;
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.4; text-wrap: balance; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter-r);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 8px;
	top: -100px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--text);
	color: #ffffff;
	border-radius: 8px;
}
.skip-link:focus { top: 8px; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 99px;
	font-weight: 900;
	text-decoration: none;
}
.btn--fill { background: var(--main); color: var(--on-main); }
.btn--fill:hover { color: var(--on-main); filter: brightness(0.95); }
.btn--white { background: #ffffff; color: var(--text); }

.badge {
	display: inline-block;
	padding: 2px 12px;
	border-radius: 99px;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.6;
}
.badge--fill { background: var(--main); color: var(--on-main); }
.badge--tint { background: var(--tint); color: var(--ink); }

.empty { color: var(--muted); }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--main); color: var(--on-main); }

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 32px;
	padding-block: 12px;
}

.site-title,
.site-header .custom-logo-link {
	font-family: var(--font-display);
	font-size: 22px;
	color: var(--on-main);
	text-decoration: none;
}
.site-title:hover { color: var(--on-main); }

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 0;
	background: transparent;
	color: var(--on-main);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 700;
}
.site-nav__list a { color: var(--on-main); text-decoration: none; }
.site-nav__list a:hover { text-decoration: underline; }

.search-form {
	display: flex;
	align-items: center;
	height: 44px;
	background: #ffffff;
	border-radius: 99px;
	padding: 0 4px 0 16px;
	min-width: 0;
}
.search-form__input {
	flex: 1;
	min-width: 0;
	width: 200px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 14px;
	color: var(--text);
}
.search-form__input:focus { outline: none; }
.search-form:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.search-form__submit {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--tint);
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.pr-notice {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px var(--gutter-r) 8px var(--gutter);
	font-size: 12px;
	color: var(--muted);
}
.pr-notice--article {
	margin: 0;
	padding: 10px 16px;
	background: var(--soft);
	border-radius: 14px;
	font-size: 13px;
	color: #3d3a49;
}

@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.site-nav {
		display: none;
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		padding-block: 8px 12px;
	}
	.site-nav.is-open { display: flex; }
	.site-nav__list { flex-direction: column; font-size: 16px; }
	.site-nav__list a { display: block; padding: 8px 0; }
	.search-form__input { width: auto; }
}

/* ---------- トップ ---------- */
.front { display: flex; flex-direction: column; gap: 56px; padding-block: 24px 72px; }

.hero { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.hero__text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero__title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(30px, 5vw, 52px);
	line-height: 1.3;
}
.hero__accent { color: var(--ink); }
.hero__lead { margin: 0; color: var(--muted); max-width: 40ch; }
.hero__visual {
	flex: 1 1 360px;
	min-width: 0;
	min-height: 320px;
	background: var(--tint);
	border-radius: 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	color: var(--ink);
	text-align: center;
	padding: 24px;
}
.hero__visual-name { font-family: var(--font-display); font-size: 30px; }
.hero__visual-sub { font-weight: 700; }

.dorm-picker { display: flex; flex-direction: column; gap: 10px; }
.dorm-picker__label { font-weight: 900; font-size: 14px; }
.dorm-picker__list { display: flex; flex-wrap: wrap; gap: 8px; }

.dorm-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 99px;
	border: 2px solid var(--line);
	background: #ffffff;
	color: var(--text);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.dorm-chip[aria-pressed='true'] { background: var(--text); border-color: var(--text); color: #ffffff; }
.dorm-chip__dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px #ffffff; }
.dorm-chip--clear { color: var(--muted); }

@media (max-width: 600px) {
	.dorm-picker__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-inline: calc(var(--gutter) * -1) calc(var(--gutter-r) * -1);
		padding: 2px var(--gutter-r) 6px var(--gutter);
	}
	.dorm-chip { flex: none; }
	.hero__visual { min-height: 200px; }
}

.dorm-panel { display: flex; flex-direction: column; gap: 56px; }

.section { display: flex; flex-direction: column; gap: 18px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.section__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3vw, 28px); }
.section__more { font-weight: 700; font-size: 14px; }

/* ---------- カード ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .card-grid, .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }

.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card__link { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; }
.card__link:hover .card__title { text-decoration: underline; }
.card__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	max-width: 100%;
	background: var(--tint);
	border-radius: var(--radius-m);
	overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__status {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #ffffff;
	color: var(--ink);
	font-size: 12px;
	font-weight: 900;
	padding: 2px 10px;
	border-radius: 99px;
}
.card__title { font-weight: 700; line-height: 1.5; }
.card__meta { margin: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.card__left { color: var(--ink); font-weight: 900; }

/* ---------- キャラ・ランキング・締切・レポート ---------- */
.char-list { display: flex; flex-wrap: wrap; gap: 10px; }
.char-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 20px 0 6px;
	border: 2px solid var(--line);
	border-radius: 99px;
	color: var(--text);
	font-weight: 700;
	text-decoration: none;
}
.char-chip:hover { border-color: var(--main); color: var(--text); }
.char-chip__icon {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--tint);
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
}

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank-list__item { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 2px dotted var(--line); }
.rank-list__item a { color: var(--text); font-weight: 700; text-decoration: none; }
.rank-list__no {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tint);
	color: var(--ink);
	font-family: var(--font-display);
	font-size: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.rank-list__item:first-child .rank-list__no { background: var(--main); color: var(--on-main); }

.deadline-box { background: var(--tint); border-radius: 32px; padding: 32px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px; }
.deadline-box__head { flex: 1 1 240px; }
.deadline-box__head .section__title { color: var(--ink); }
.deadline-box__head p { margin: 4px 0 0; color: #3d3a49; }
.deadline-box__list { flex: 999 1 560px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.deadline-box__list a { display: flex; flex-direction: column; height: 100%; background: #ffffff; border-radius: var(--radius-m); padding: 14px 18px; color: var(--text); text-decoration: none; }
.deadline-box__left { font-size: 12px; font-weight: 900; color: var(--ink); }
.deadline-box__name { font-weight: 700; line-height: 1.5; }
@media (max-width: 760px) {
	.deadline-box { padding: 20px; border-radius: var(--radius-l); }
	.deadline-box__list { grid-template-columns: minmax(0, 1fr); }
}

.report-list { display: flex; flex-direction: column; gap: 12px; }
.report {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	padding: 18px 22px;
	border: 2px solid var(--line);
	border-radius: 24px;
	color: var(--text);
	text-decoration: none;
}
.report:hover { border-color: var(--main); color: var(--text); }
.report__tag { background: var(--tint); color: var(--ink); font-size: 12px; font-weight: 900; padding: 4px 12px; border-radius: 99px; }
.report__body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.report__title { font-weight: 900; font-size: 17px; line-height: 1.5; }
.report__desc { font-size: 13px; color: var(--muted); }

/* ---------- 記事 ---------- */
.article-layout { display: flex; flex-wrap: wrap; gap: 48px; padding-block: 24px 72px; }
.article { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.article__head { display: flex; flex-direction: column; gap: 14px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

.badges { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges:empty { display: none; }

.article__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); }
.article__byline { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }

.article__hero { margin: 0; border-radius: 32px; overflow: hidden; background: var(--tint); }
.article__hero img { display: block; width: 100%; }

.summary { background: var(--tint); border-radius: var(--radius-l); padding: 24px 28px; }
.summary__title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--ink); }
.summary ul { margin: 0; padding-left: 1.2em; font-weight: 700; }

.article h2:not(.summary__title):not(.toc__title) { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3vw, 28px); }
.note { margin: 0; font-size: 14px; color: var(--muted); }

.shops, .spec, .related { display: flex; flex-direction: column; gap: 16px; }
.shop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.shop {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding: 18px 22px;
	border: 2px solid var(--line);
	border-radius: 24px;
}
.shop--best { background: var(--tint); border-color: var(--main); }
.shop__info { flex: 1 1 200px; min-width: 0; }
.shop__name { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; }
.shop__detail { margin: 0; font-size: 13px; color: var(--muted); }
.shop__detail:empty { display: none; }
.shop__price { margin: 0; font-family: var(--font-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.shop__btn { min-width: 160px; }
@media (max-width: 600px) { .shop__btn { flex: 1 1 100%; } }

.table-scroll { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 420px; font-size: 15px; }
.spec-table th, .spec-table td { padding: 12px 0; border-bottom: 2px dotted var(--line); text-align: left; vertical-align: top; }
.spec-table th { width: 9em; padding-right: 16px; color: var(--ink); font-weight: 700; }

.entry-content { max-width: 70ch; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { margin-top: 2em; }
.entry-content h3 { font-size: 20px; margin-top: 1.6em; }
.entry-content img { border-radius: var(--radius-m); }
.entry-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; }
.entry-content blockquote { margin-inline: 0; padding: 12px 20px; background: var(--soft); border-radius: 16px; }

.article-aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; align-self: flex-start; position: sticky; top: 16px; }
@media (max-width: 960px) { .article-aside { position: static; } }

.countdown { background: var(--main); color: var(--on-main); border-radius: var(--radius-l); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.countdown__label { font-size: 13px; font-weight: 700; }
.countdown__days { font-family: var(--font-display); font-size: 36px; line-height: 1.2; }

.toc { border: 2px solid var(--line); border-radius: 24px; padding: 20px 24px; }
.toc__title { margin: 0 0 6px; font-size: 14px; font-weight: 900; color: var(--ink); }
.toc__list { margin: 0; padding-left: 1.2em; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.toc__list a { color: var(--text); text-decoration: none; }
.toc__list a:hover { text-decoration: underline; }

/* ---------- 一覧・固定ページ ---------- */
.archive { display: flex; flex-direction: column; gap: 32px; padding-block: 24px 72px; }
.archive__head { display: flex; flex-direction: column; gap: 14px; }
.archive__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); color: var(--ink); }
.archive__desc { color: var(--muted); }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 99px;
	border: 2px solid var(--line);
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
}
.pagination .page-numbers.current { background: var(--main); border-color: var(--main); color: var(--on-main); }

.page { padding-block: 32px 72px; display: flex; flex-direction: column; gap: 20px; }
.page__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4vw, 36px); }

/* ---------- フッター ---------- */
.site-footer { background: var(--footer); color: var(--footer-text); font-size: 13px; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 48px; padding-block: 36px 16px; }
.site-footer__about { flex: 1 1 360px; max-width: 60ch; }
.site-footer__about p { margin: 0 0 8px; }
.site-footer__name { font-family: var(--font-display); font-size: 18px; color: #ffffff; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #ffffff; }
.site-footer__copy { margin: 0; padding-block: 8px 28px; color: #a9a5b5; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
html { scroll-behavior: smooth; }
