/*
Theme Name: MMR
Theme URI: https://github.com/yasho111/mmr-web
Description: MMRサーバー（Mikesaba Railroad）公式サイト用テーマ
Author: Chuck451019
Version: 1.4.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mmr
*/

:root {
	--mmr-text: #222;
	--mmr-muted: #444;
	/* Dates and other secondary labels, a step back from the body text. */
	--mmr-meta: #6f6f6f;
	--mmr-border: #d9d9d9;
	--mmr-line-light: #ececec;
	--mmr-search-bg: #f1f1f1;
	--mmr-hover-bg: #f7f7f7;
	--mmr-accent: #5cd5b9;
	--mmr-accent-dark: #0b7c66;
	--mmr-blue: #0e7fff;
	--mmr-green: #3fdc59;
	--mmr-green-text: #2fbf47;
	--mmr-orange: #ff9f0e;
	--mmr-red: #ff3b3b;
	--mmr-gray: #9a9a9a;
	--mmr-footer: #282828;
	--mmr-container: 1136px;
	--mmr-gutter: 24px;
	/* One easing and one duration for every hover, so the whole UI reacts alike. */
	--mmr-ease: cubic-bezier(0.33, 0, 0.2, 1);
	--mmr-fast: 0.18s;
	/* Tinted toward the teal so panels feel lit by the same light. */
	--mmr-shadow-sm: 0 1px 2px rgba(16, 48, 54, 0.05), 0 2px 6px rgba(16, 48, 54, 0.05);
	--mmr-shadow-md: 0 2px 8px rgba(16, 48, 54, 0.06), 0 12px 28px rgba(16, 48, 54, 0.09);
}

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

html {
	-webkit-text-size-adjust: 100%;
	/* The design is light-only; without this a phone in dark mode repaints form
	   controls (and their default text colour) and they stop matching the page. */
	color-scheme: light;
}

body {
	margin: 0;
	background: #fff;
	color: var(--mmr-text);
	font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
	font-size: 15px;
	line-height: 1.7;
	/* Without this, Noto Sans JP renders noticeably heavier on macOS. */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

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

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

/* Proportional kana/punctuation spacing, for display text only: body copy at
   15px reads better with the font's default (full-width) metrics. */
.page-title,
.news-block__title,
.station-sign__name,
.join__title,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content .line-head__title {
	font-feature-settings: "palt" 1;
	letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

::selection {
	background: rgba(92, 213, 185, 0.32);
}

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

.container {
	width: 100%;
	max-width: calc(var(--mmr-container) + var(--mmr-gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--mmr-gutter);
}

/* ---------- Header ---------- */

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 132px;
}

.site-logo {
	display: flex;
	align-items: center;
	width: 320px;
	max-width: 100%;
	height: 58px;
	margin-left: 5px;
}

.site-logo img,
.site-logo .custom-logo {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 58px;
}

.site-logo__text {
	font-size: 23px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.site-footer .site-logo__text {
	color: #fff;
}

.search-form {
	position: relative;
	width: 380px;
	max-width: 100%;
}

.search-form__input {
	width: 100%;
	height: 42px;
	padding: 0 48px 0 20px;
	border: 1px solid transparent;
	border-radius: 21px;
	background: var(--mmr-search-bg);
	color: var(--mmr-text);
	font-size: 15px;
}

.search-form__input::placeholder {
	color: #9a9a9a;
}

.search-form__input:focus {
	outline: none;
	border-color: var(--mmr-border);
	background: #fff;
}

.search-form__submit svg {
	width: 22px;
	height: 22px;
}

.search-form__submit {
	position: absolute;
	top: 0;
	right: 4px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: none;
	color: #9a9a9a;
	cursor: pointer;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumb {
	background: #efefef;
}

.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 0;
	padding: 16px 0;
	list-style: none;
	font-size: 15px;
}

.breadcrumb__item {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

/* Chevron drawn with borders so the trail needs no icon asset. */
.breadcrumb__item + .breadcrumb__item::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-top: 2px solid #a8a8a8;
	border-right: 2px solid #a8a8a8;
	transform: rotate(45deg);
}

.breadcrumb__link {
	color: var(--mmr-text);
}

.breadcrumb__link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.breadcrumb__current {
	overflow: hidden;
	color: var(--mmr-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Collapsed search and nav are for narrow screens only. */
.site-header__tools,
.site-menu {
	display: none;
}

.site-header__search {
	min-width: 0;
}

.status__caption,
.status__icon.icon-circle {
	display: none;
}

/* ---------- Hero ---------- */

/* The status bar and the photo share one grid cell so the bar sits on top. */
.hero-area {
	display: grid;
}

.hero-area > * {
	grid-area: 1 / 1;
}

.hero-area .status-bar {
	align-self: start;
	z-index: 1;
}

.hero {
	position: relative;
	height: 326px;
	background-color: #6b7a6a;
	background-position: center 44%;
	background-size: cover;
}

.status-bar {
	display: flex;
	gap: 22px;
	padding-top: 44px;
	padding-left: calc(var(--mmr-gutter) + 51px);
	padding-right: calc(var(--mmr-gutter) + 52px);
}

.status {
	display: flex;
	align-items: stretch;
	height: 40px;
	overflow: hidden;
	border-radius: 6px;
	background: #fff;
}

.status--operation {
	flex: 605 1 0;
}

.status--server {
	flex: 405 1 0;
}

/* Manual status: just the badge, so the 運行情報 row takes the spare width. */
.status--badge-only {
	flex: 0 0 auto;
	background: none;
}

.status--badge-only .status__label {
	flex: 0 0 auto;
	padding: 0 28px;
	border-radius: 6px;
}

.status__label {
	display: flex;
	flex: 0 0 160px;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	letter-spacing: 0.06em;
}

.status__body {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
	padding: 0 24px;
}

/* Ellipsis is the resting state; assets/js/status-message.js swaps it for a
   slow pan when the text is actually too long to fit. */
.status__message {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.status__message.is-marquee {
	text-overflow: clip;
}

.status__message-text {
	display: inline-block;
	will-change: transform;
}

/* With motion turned down, the reader pans it by hand instead. */
.status__message.is-scrollable {
	overflow-x: auto;
	text-overflow: clip;
	scrollbar-width: none;
}

.status__message.is-scrollable::-webkit-scrollbar {
	display: none;
}

/* "プレイヤー数" otherwise breaks mid-word when the bar gets tight. */
.status__body > span {
	white-space: nowrap;
}

.status__count {
	color: var(--mmr-green-text);
	font-weight: 700;
	white-space: nowrap;
}

.status--normal .status__label { background: var(--mmr-blue); }
.status--delay .status__label { background: var(--mmr-orange); }
.status--suspend .status__label { background: var(--mmr-red); }
.status--online .status__label { background: var(--mmr-green); }
.status--offline .status__label,
.status--loading .status__label { background: var(--mmr-gray); }
.status--offline .status__count,
.status--loading .status__count { color: var(--mmr-gray); }

/* ---------- Quick navigation ---------- */

.quick-nav {
	border-bottom: 1px solid var(--mmr-line-light);
}

.quick-nav__list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	max-width: var(--mmr-container);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.quick-nav__item {
	border-left: 1px solid var(--mmr-line-light);
}

.quick-nav__item:last-child {
	border-right: 1px solid var(--mmr-line-light);
}

.quick-nav__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	height: 100%;
	padding: 18px 8px 16px;
	font-weight: 700;
	text-align: center;
	word-break: keep-all;
	transition: background-color var(--mmr-fast) var(--mmr-ease);
}

.quick-nav__link:hover {
	background: var(--mmr-hover-bg);
}

/* Sits on the section's own 1px rule and opens out from the centre. */
.quick-nav__link::after {
	content: "";
	position: absolute;
	right: 50%;
	bottom: -1px;
	left: 50%;
	height: 3px;
	border-radius: 2px 2px 0 0;
	background: var(--mmr-accent);
	transition: left 0.26s var(--mmr-ease), right 0.26s var(--mmr-ease);
}

.quick-nav__link:hover::after,
.quick-nav__link:focus-visible::after {
	right: 16%;
	left: 16%;
}

.quick-nav__link .icon-circle {
	transition: transform 0.26s var(--mmr-ease);
}

.quick-nav__link:hover .icon-circle {
	transform: translateY(-3px);
}

/* Name kept so the markup stays put: the glyph itself carries the colour now. */
.icon-circle {
	display: grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	color: var(--mmr-accent);
}

.icon-circle svg {
	width: 100%;
	height: 100%;
}

/* ---------- News ---------- */

.news {
	padding: 72px 0 80px;
}

.news__grid {
	display: grid;
	grid-template-columns: 543fr 525fr;
	column-gap: 68px;
}

.news-block__header {
	display: flex;
	align-items: center;
	gap: 30px;
	padding: 0 5px 12px;
	border-bottom: 1px solid var(--mmr-border);
}

.news-block__header .icon-circle {
	width: 34px;
	height: 34px;
}

.news-block__title {
	margin: 0;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.06em;
}

.news-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-item {
	border-bottom: 1px solid var(--mmr-border);
}

.news-item__link {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* Right padding keeps long titles clear of the chevron. */
	padding: 15px 34px 15px 12px;
	transition: background-color var(--mmr-fast) var(--mmr-ease);
}

.news-item__link:hover {
	background: var(--mmr-hover-bg);
}

.news-item__link::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 7px;
	height: 7px;
	margin-top: -5px;
	border-right: 2px solid var(--mmr-accent);
	border-bottom: 2px solid var(--mmr-accent);
	opacity: 0;
	transform: rotate(-45deg) translate(-4px, -4px);
	transition: opacity var(--mmr-fast) var(--mmr-ease), transform 0.26s var(--mmr-ease);
}

.news-item__link:hover::after,
.news-item__link:focus-visible::after {
	opacity: 1;
	transform: rotate(-45deg) translate(0, 0);
}

.news-item__link:hover .news-item__title {
	color: var(--mmr-accent-dark);
}

.news-item__meta {
	display: flex;
	align-items: center;
	gap: 28px;
}

/* Muted so the headline leads the row rather than competing with the date. */
.news-item__date {
	color: var(--mmr-meta);
	font-size: 15px;
	line-height: 1.5;
}

.news-item__title {
	margin: 0;
	font-weight: 500;
	line-height: 1.7;
	transition: color var(--mmr-fast) var(--mmr-ease);
}

.news-empty {
	padding: 24px 12px;
	color: var(--mmr-muted);
	border-bottom: 1px solid var(--mmr-border);
}

.news-block__more {
	display: flex;
	justify-content: center;
	margin-top: 44px;
}

.button-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 184px;
	height: 50px;
	padding: 0 38px;
	border: 1px solid var(--mmr-border);
	border-radius: 25px;
	background: #fff;
	font-size: 17px;
	transition: background-color var(--mmr-fast) var(--mmr-ease), border-color var(--mmr-fast) var(--mmr-ease), color var(--mmr-fast) var(--mmr-ease), box-shadow var(--mmr-fast) var(--mmr-ease), transform var(--mmr-fast) var(--mmr-ease);
}

.button-outline:hover {
	border-color: var(--mmr-accent);
	background: #fff;
	color: var(--mmr-accent-dark);
	box-shadow: var(--mmr-shadow-sm);
	transform: translateY(-1px);
}

.button-outline:active {
	transform: translateY(0);
	box-shadow: none;
}

/* ---------- Join ---------- */

.join {
	position: relative;
	padding: 76px 0 76px;
	background-position: center;
	background-size: cover;
	text-align: center;
}

.join::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(86, 186, 196, 0.74) 0%,
		rgba(110, 200, 206, 0.56) 48%,
		rgba(128, 210, 212, 0.68) 100%
	);
}

.join > * {
	position: relative;
}

.join__title {
	margin: 0 0 30px;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-shadow: 0 1px 6px rgba(0, 60, 70, 0.35);
}

.join__card {
	max-width: 773px;
	margin: 0 auto;
	padding: 36px 24px 44px;
	border-radius: 13px;
	background: #fff;
	box-shadow: var(--mmr-shadow-md);
}

.join__text {
	margin: 0 0 24px;
	line-height: 2.1;
}

.join__text p {
	margin: 0;
}

.button-square {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 238px;
	height: 50px;
	padding: 0 24px;
	border: 1px solid var(--mmr-border);
	border-radius: 3px;
	background: #fff;
	font-size: 17px;
	font-weight: 500;
	transition: background-color var(--mmr-fast) var(--mmr-ease), border-color var(--mmr-fast) var(--mmr-ease), box-shadow var(--mmr-fast) var(--mmr-ease), transform var(--mmr-fast) var(--mmr-ease);
}

/* The same accent treatment as every other button, so nothing jumps out of
   the palette on hover. */
.button-square:hover {
	border-color: var(--mmr-accent);
	background: #fff;
	color: var(--mmr-accent-dark);
	box-shadow: var(--mmr-shadow-sm);
	transform: translateY(-1px);
}

.button-square:active {
	transform: translateY(0);
	box-shadow: none;
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--mmr-footer);
	color: #ddd;
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 54px;
}

.footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 500;
}

.footer-nav__list a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.site-footer__copy {
	margin: 0;
	padding: 72px 0 28px;
	font-size: 12px;
	color: #bbb;
	text-align: center;
}

/* ---------- Generic pages ---------- */

.page-main {
	padding: 56px 0 80px;
}

/* Pages and single posts sit in a centred column, narrower than the list pages. */
.page-main > .container > article {
	max-width: 990px;
	margin: 0 auto;
}

.page-title {
	margin: 0 0 32px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mmr-border);
	font-size: 28px;
	font-weight: 700;
}

/* Static pages lead straight into their own section headings. */
body.page .page-title {
	padding-bottom: 0;
	border-bottom: 0;
}

.entry-meta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
	margin-bottom: 24px;
	color: var(--mmr-muted);
}

/* Share buttons, standing where the category label used to. */
.share {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.share__link {
	position: relative;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--mmr-border);
	border-radius: 50%;
	background: #fff;
	color: var(--mmr-text);
	cursor: pointer;
	transition: background-color var(--mmr-fast) var(--mmr-ease), border-color var(--mmr-fast) var(--mmr-ease), color var(--mmr-fast) var(--mmr-ease);
}

.share__link svg {
	width: 17px;
	height: 17px;
}

/* Each service takes over on hover, so the row stays quiet at rest. */
.share__link:hover {
	border-color: currentColor;
	background: var(--mmr-hover-bg);
}

.share__link--x:hover { color: #000; }
.share__link--line:hover { color: #06c755; }
.share__link--facebook:hover { color: #1877f2; }
.share__link--copy:hover { color: var(--mmr-accent-dark); }

/* The button is the last thing on the row, so the tip opens leftwards and
   never runs past the right gutter. */
.share__link .copy-tip {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--mmr-footer);
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	white-space: nowrap;
	opacity: 0;
	transition: opacity var(--mmr-fast) var(--mmr-ease);
	pointer-events: none;
}

.share__link[data-copied] .copy-tip {
	opacity: 1;
}

.entry-content {
	max-width: 100%;
}

.entry-content > * + * {
	margin-top: 1.2em;
}

/* Prose only: the editor's own paragraph and list blocks. Theme components
   (駅名標, 座標, 担当者…) never carry these classes, so their spacing is
   untouched; the classless selectors catch content saved without block markup. */
.entry-content .wp-block-paragraph,
.entry-content .wp-block-list li,
.entry-content p:not([class]),
.entry-content li:not([class]) {
	line-height: 2;
}

/* Keeps the gap down to the CTA identical whatever the last block is. */
.entry-content > :last-child {
	margin-bottom: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
	font-weight: 700;
	line-height: 1.5;
}

.entry-content h1 {
	font-size: 28px;
}

.entry-content h2,
.entry-content .line-head__title {
	position: relative;
	padding-left: 14px;
	font-size: 24px;
}

.entry-content h2::before,
.entry-content .line-head__title::before {
	content: "";
	position: absolute;
	top: 0.16em;
	bottom: 0.16em;
	left: 0;
	width: 4px;
	border-radius: 2px;
	background: var(--mmr-accent);
}

/* fit-content keeps the rule the width of the heading rather than the column;
   a long heading still wraps and the rule follows it. */
.entry-content h3 {
	width: fit-content;
	max-width: 100%;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--mmr-accent);
	font-size: 20px;
}

.entry-content h4 {
	font-size: 18px;
}

.entry-content h5 {
	font-size: 16px;
}

.entry-content h6 {
	font-size: 14px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content a {
	color: var(--mmr-accent-dark);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--mmr-fast) var(--mmr-ease);
}

.entry-content a:hover {
	color: var(--mmr-accent);
}

.entry-content > h2 {
	margin-top: 72px;
}

.entry-content > h2:first-child {
	margin-top: 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

/* Scoped through `table` to outrank core's .wp-block-table rule, which would
   otherwise box in every cell. */
.entry-content table td,
.entry-content table th {
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--mmr-border);
	text-align: left;
	vertical-align: top;
}

.entry-content table td:first-child,
.entry-content table th:first-child {
	width: 34%;
	font-weight: 700;
}

.entry-content .wp-block-table {
	margin: 0;
	padding-left: 18px;
}

/* 3-up screenshot rows; .media-grid holds the placeholders until real images are added */
.media-grid,
.entry-content .wp-block-gallery.has-nested-images {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.media-grid__item {
	aspect-ratio: 1 / 1;
	background: var(--mmr-border);
}

/* Core sizes each figure itself with a selector carrying an id inside :not()
   — `.columns-default figure.wp-block-image:not(#individual-image)` — which
   ties on specificity and wins on order. Repeating the :not() adds the weight
   needed to hand the sizing back to the grid column. */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):not(#individual-image) {
	width: 100%;
	margin: 0;
}

.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* ---------- 鉄道案内: route map ---------- */

.route-map {
	position: relative;
	border: 1px solid var(--mmr-border);
	background: #fff;
}

/* pan-y leaves vertical swipes to the page, so the map never traps scrolling.
   Zooming is the buttons' job. */
.route-map__viewport {
	height: 520px;
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
}

.route-map.is-panning .route-map__viewport {
	cursor: grabbing;
}

.route-map__image {
	display: block;
	max-width: none;
	transform-origin: 0 0;
	user-select: none;
	-webkit-user-drag: none;
}

.route-map__image svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Station names on the map link through to their 駅 page. The map sits inside
   .entry-content, so the underline that applies to body links must be undone. */
.entry-content .route-map__station,
.route-map__station {
	cursor: pointer;
	text-decoration: none;
}

.route-map__station text {
	text-decoration: none;
	transition: fill var(--mmr-fast) var(--mmr-ease);
}

.route-map__station:hover text {
	fill: var(--mmr-accent-dark);
}

.route-map__controls {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	gap: 6px;
}

.route-map__button {
	display: grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--mmr-border);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.95);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--mmr-fast) var(--mmr-ease), border-color var(--mmr-fast) var(--mmr-ease);
}

.route-map__button:hover {
	border-color: #b5b5b5;
	background: var(--mmr-hover-bg);
}

.route-map__button--wide {
	font-size: 13px;
}

/* ---------- 鉄道案内: line buttons ---------- */

.entry-content .line-grid,
.line-grid {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

/* 18% lets five sit on a row; fewer than five still stretch to fill it. */
.line-grid__item {
	display: flex;
	flex: 1 1 18%;
	margin-left: -1px;
}

.entry-content .line-grid__link,
.line-grid__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 54px;
	padding: 10px 14px;
	border: 1px solid var(--mmr-border);
	border-bottom: 4px solid var(--mmr-line-color, var(--mmr-accent));
	background: #fff;
	color: var(--mmr-text);
	font-size: 18px;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--mmr-fast) var(--mmr-ease);
}

.line-grid__link:hover {
	background: var(--mmr-hover-bg);
}

.line-grid__name {
	font-weight: 700;
}

.line-grid__kana {
	min-height: 16px;
	color: var(--mmr-meta);
	font-size: 12px;
	letter-spacing: 0.06em;
	line-height: 1.3;
}

/* ---------- 路線情報 ---------- */

.line-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
}

.line-head__name {
	min-width: 0;
}

/* Lines up with the title's own 14px accent-bar indent. */
.entry-content .line-head__kana {
	margin: 2px 0 0;
	padding-left: 14px;
	color: var(--mmr-meta);
	font-size: 14px;
	letter-spacing: 0.08em;
}

.entry-content .line-staff {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 12px;
	margin-top: 16px;
	padding-left: 14px;
	font-size: 15px;
}

.line-staff__label {
	color: var(--mmr-meta);
	font-weight: 700;
}

.entry-content .line-head__title {
	margin: 0;
	line-height: 1.5;
}

.entry-content .line-head__back {
	flex: none;
	font-size: 15px;
}

.entry-content .line-legend,
.line-legend {
	margin-top: 26px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px 34px;
	margin-bottom: 0;
	padding: 18px 24px;
	border: 1px solid var(--mmr-line-light);
	border-radius: 6px;
	background: #fff;
	box-shadow: var(--mmr-shadow-sm);
	list-style: none;
}

.line-legend__item {
	display: flex;
	align-items: center;
	gap: 10px;
}

.line-legend__swatch {
	width: 42px;
	height: 9px;
	border-radius: 2px;
}

.line-legend__label {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.line-legend__label small {
	display: block;
	font-size: 12px;
	font-weight: 400;
}

/* Diagram: a column of rails on the left, station details on the right. */
.line-diagram {
	--mmr-rail-width: 34px;
	--mmr-stop-offset: 30px;
	margin-top: 28px;
}

.line-diagram__row {
	display: flex;
	align-items: stretch;
	gap: 20px;
}

.line-diagram__rails {
	display: flex;
	flex: none;
}

.line-rail {
	position: relative;
	width: var(--mmr-rail-width);
}

.line-rail__track {
	position: absolute;
	left: 50%;
	width: 9px;
	margin-left: -4.5px;
	background: var(--mmr-rail-color);
}

.line-rail__track--through {
	top: 0;
	bottom: 0;
}

.line-rail__track--start {
	top: var(--mmr-stop-offset);
	bottom: 0;
	border-radius: 5px 5px 0 0;
}

.line-rail__track--end {
	top: 0;
	height: var(--mmr-stop-offset);
	border-radius: 0 0 5px 5px;
}

.line-rail__stop {
	position: absolute;
	top: var(--mmr-stop-offset);
	left: 50%;
	width: 17px;
	height: 17px;
	margin: -8.5px 0 0 -8.5px;
	border: 4px solid var(--mmr-rail-color);
	border-radius: 50%;
	background: #fff;
}

/* ▲ 特別停車: outlined like the stop circles, with the rail colour as the edge. */
.line-rail__stop--special {
	width: 20px;
	height: 18px;
	margin: -9px 0 0 -10px;
	border: 0;
	border-radius: 0;
	background: var(--mmr-rail-color);
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.line-rail__stop--special::after {
	content: "";
	position: absolute;
	inset: 6px 4px 3px;
	background: #fff;
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.entry-content .line-legend__note {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--mmr-muted);
	text-align: center;
}

.line-diagram__body {
	flex: 1;
	min-width: 0;
	padding: 14px 0 18px;
	border-bottom: 1px solid var(--mmr-border);
}

.line-diagram__row:first-child .line-diagram__body {
	border-top: 1px solid var(--mmr-border);
}

.entry-content .line-station__name {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
}

.entry-content .line-station__name a {
	color: var(--mmr-text);
	text-decoration: none;
}

.entry-content .line-station__name a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.line-station__name small {
	margin-left: 10px;
	font-size: 12px;
	font-weight: 400;
	color: var(--mmr-muted);
}

.entry-content .line-station__transfer {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 14px;
	margin: 8px 0 0;
	font-size: 14px;
}

.line-station__transfer-label {
	font-weight: 700;
}


/* ---------- 駅情報 ---------- */

/* The sign and its 停車種別 row travel together, so the pair carries the gap. */
.station-block {
	max-width: 540px;
	margin: 0 auto 40px;
}

/* Modelled on the station signs standing on the platforms in-game. */
.station-sign {
	position: relative;
	max-width: 540px;
	margin: 0 auto 40px;
	padding: 26px 24px 16px;
	border: 1px solid var(--mmr-line-light);
	background: #fff;
	box-shadow: var(--mmr-shadow-sm);
	text-align: center;
}

.station-sign__number {
	position: absolute;
	top: 18px;
	right: 18px;
	display: grid;
	justify-items: center;
	min-width: 46px;
	padding: 2px 6px 4px;
	border: 2px solid #fcc400;
	border-radius: 4px;
	line-height: 1.1;
}

.station-sign__code {
	font-size: 13px;
	font-weight: 700;
	color: #fcc400;
}

.station-sign__digits {
	font-size: 19px;
	font-weight: 700;
}

.entry-content .station-sign__name {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;
}

.entry-content .station-sign__kana,
.entry-content .station-sign__romaji {
	margin: 2px 0 0;
	line-height: 1.4;
}

.station-sign__kana {
	font-size: 15px;
}

.station-sign__romaji {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.station-sign__bar {
	display: block;
	height: 12px;
	margin: 18px 0 10px;
	background: #f08300;
}

.entry-content .station-sign__neighbours {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	font-size: 14px;
}

.station-sign__line {
	flex: 1;
	font-size: 12px;
	color: var(--mmr-muted);
}

.entry-content .station-sign__line a {
	color: inherit;
	text-decoration: none;
}

/* The card centres its text, so the neighbours have to opt back out to line up
   with the ends of the orange bar. */
.entry-content .station-sign__prev,
.entry-content .station-sign__next {
	min-width: 60px;
}

.station-sign__prev {
	text-align: left;
}

.station-sign__next {
	text-align: right;
}

.station-block .station-sign {
	max-width: none;
	margin: 0;
}

/* .entry-content gives lists an indent and a list marker; this one wants neither. */
.entry-content .station-types,
.station-types {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.station-type {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 4px 15px;
	border: 1px solid var(--mmr-type-color, var(--mmr-border));
	border-radius: 999px;
	color: var(--mmr-type-color, var(--mmr-text));
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

/* Same dimming as a facility the station does not have. */
.station-type--pass {
	opacity: 0.28;
}

/* Matches the ▲ the line diagram uses for a type that only calls part of the day. */
.station-type__mark {
	font-size: 10px;
}

/* The lines without a sign of their own are listed here instead. */
.entry-content .station-transfers,
.station-transfers {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 6px 16px;
	margin: 16px 0 0;
	font-size: 14px;
}

.station-transfers__label {
	color: var(--mmr-muted);
	font-weight: 700;
}

.entry-content .station-transfers a {
	text-decoration: underline;
}

.entry-content .station-coords {
	margin: 0;
	padding-left: 18px;
	letter-spacing: 0.08em;
}

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

.entry-content .facility-grid,
.facility-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--mmr-border);
}

.facility {
	display: grid;
	border-right: 1px solid var(--mmr-border);
	border-bottom: 1px solid var(--mmr-border);
	text-align: center;
}

.facility:nth-child(3n) {
	border-right: 0;
}

.facility:nth-last-child(-n + 3) {
	border-bottom: 0;
}

/* A shared min-height keeps the icons level even when one label wraps. */
.facility__label {
	display: grid;
	place-items: center;
	min-height: 56px;
	padding: 10px;
	border-bottom: 1px solid var(--mmr-border);
	background: #e8f4f8;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

.facility__icon {
	display: grid;
	place-items: center;
	padding: 22px 10px;
	color: var(--mmr-text);
}

.facility__icon svg {
	width: 52px;
	height: 52px;
}

/* A facility the station does not have stays visible, just muted. */
.facility--absent {
	opacity: 0.28;
}

/* ---------- 運営紹介 ---------- */

/* No heading sits above the list any more, so it carries its own top gap. */
/* No heading sits above the list any more, so it carries its own top gap. */
.entry-content .staff-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 64px 48px;
	margin-top: 48px;
}

.staff {
	display: grid;
	align-content: start;
	justify-items: center;
	text-align: center;
}

.staff__icon {
	width: 100%;
	max-width: 300px;
}

/* A rounded panel rather than a circle: the skin renders are standing figures,
   which a circle would clip at the head and feet. */
.staff__icon img,
.staff__icon-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 18px;
	object-fit: cover;
	background: var(--mmr-border);
}

/* The figure stands on the floor of the panel instead of filling it, and
   pixelated keeps the skin crisp rather than blurring it. */
.staff__icon img.staff__icon-skin {
	padding: 18px 0 12px;
	background: #e8f4f8;
	object-fit: contain;
	object-position: bottom;
	image-rendering: pixelated;
}

.entry-content .staff__details {
	margin: 0;
}

.entry-content .staff__name {
	margin: 26px 0 0;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

/* Kept narrower than the column so the lines stay comfortable to read. */
.entry-content .staff__note {
	max-width: 30em;
	margin: 14px auto 0;
	color: var(--mmr-muted);
	line-height: 1.9;
}

/* ---------- サーバーについて ---------- */

/* The band runs the full window width, so the template puts it outside the
   centred column and the page loses its usual top padding. */
.page-main--about {
	padding-top: 0;
}

.about-hero {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 320px;
	padding: 72px 0;
	overflow: hidden;
	background: var(--mmr-hover-bg);
	text-align: center;
}

/* Blurring the layer rather than the section keeps the text sharp; the inset
   hides the soft edges the blur leaves behind. */
.about-hero__image {
	position: absolute;
	inset: -40px;
	background-position: center;
	background-size: cover;
	filter: blur(14px);
}

.about-hero__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.55);
}

.about-hero__inner {
	position: relative;
}

.about-hero__title {
	margin: 0;
	font-size: 40px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
	font-feature-settings: "palt" 1;
}

.about-hero__subtitle {
	margin: 14px 0 0;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: 0.1em;
}

.feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 48px;
	margin: 72px 0 0;
	padding: 0;
	list-style: none;
}

.feature {
	display: grid;
	align-content: start;
	justify-items: center;
	text-align: center;
}

.feature__icon {
	width: 100%;
	max-width: 150px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	object-fit: cover;
}

/* Same treatment as the 参加ページ icons: a tinted disc carrying the glyph. */
.feature__icon--drawn {
	display: grid;
	place-items: center;
	background: #e8f4f8;
	color: var(--mmr-accent-dark);
}

.feature__icon--drawn svg {
	width: 48%;
	height: 48%;
}

.feature__title {
	margin: 22px 0 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
	font-feature-settings: "palt" 1;
}

.feature__text {
	margin: 16px 0 0;
	color: var(--mmr-muted);
	line-height: 1.9;
	text-align: left;
}

/* The one-line conclusion the three columns build up to. */
.about-lead {
	margin: 64px 0 0;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.5;
	text-align: center;
	font-feature-settings: "palt" 1;
}

.page-main--about .entry-content {
	margin-top: 72px;
}

/* ---------- 車両一覧 ---------- */

/* Same rule as an h3: a line the width of the words, not the column. */
.entry-content .vehicle-group {
	width: fit-content;
	max-width: 100%;
	margin-top: 64px;
	padding: 0 0 8px;
	border-bottom: 2px solid var(--mmr-accent);
	font-size: 20px;
}

.entry-content .vehicle-group::before {
	content: none;
}

.entry-content .vehicle-list,
.vehicle-list {
	display: grid;
	gap: 44px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.vehicle {
	display: grid;
	grid-template-columns: 460px 1fr;
	gap: 36px;
	align-items: start;
}

.vehicle__image img,
.vehicle__image-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 4px;
	object-fit: cover;
	background: var(--mmr-border);
}

.entry-content .vehicle__name {
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.02em;
	font-feature-settings: "palt" 1;
}

.entry-content .vehicle__text {
	margin-top: 14px;
	color: var(--mmr-muted);
}

.entry-content .vehicle__text p {
	margin: 0 0 0.8em;
	line-height: 1.9;
}

.entry-content .vehicle__text > :last-child {
	margin-bottom: 0;
}

/* The button linking 路線情報 and 車両情報 to each other. */
.entry-content .section-link {
	display: flex;
	justify-content: center;
	margin-top: 64px;
}

/* ---------- 参加ページ ---------- */

.entry-content .spec-grid,
.spec-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* align-content keeps the rows packed at the top: without it the shorter
   cards stretch their rows and their labels drop out of line. */
.spec {
	display: grid;
	align-content: start;
	justify-items: center;
	gap: 6px;
	text-align: center;
}

.spec__image {
	width: 100%;
	max-width: 200px;
	aspect-ratio: 1 / 1;
	margin-bottom: 14px;
	border-radius: 50%;
	object-fit: cover;
}

.spec__image--empty {
	display: block;
	background: var(--mmr-border);
}

/* A tinted disc keeps the mockup's circle while the glyph carries the colour. */
.spec__image--icon {
	display: grid;
	place-items: center;
	background: #e8f4f8;
	color: var(--mmr-accent-dark);
}

.spec__image--icon svg {
	width: 42%;
	height: 42%;
}

.spec__label {
	font-weight: 700;
}

.spec__value {
	color: var(--mmr-muted);
}

/* The address is a button so it can copy on click, but it should read as text
   rather than as a control. */
.entry-content .server-address {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	margin-top: 20px;
}

.server-address__value {
	position: relative;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mmr-text);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: color var(--mmr-fast) var(--mmr-ease);
}

.server-address__value:hover {
	color: var(--mmr-accent-dark);
}

.server-address__hint {
	color: var(--mmr-meta);
	font-size: 14px;
}

.server-address--empty {
	color: var(--mmr-red);
}

.server-address__value .copy-tip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	padding: 4px 10px;
	border-radius: 4px;
	background: var(--mmr-footer);
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
	white-space: nowrap;
	opacity: 0;
	transition: opacity var(--mmr-fast) var(--mmr-ease);
	pointer-events: none;
}

.server-address__value[data-copied] .copy-tip {
	opacity: 1;
}

/* Buttons placed inside post content must not pick up the prose underline. */
.entry-content .button-square,
.entry-content .button-outline {
	color: var(--mmr-text);
	text-decoration: none;
}

.entry-content .button-square:hover,
.entry-content .button-outline:hover {
	color: var(--mmr-accent-dark);
}

/* Sits at the start of the text column rather than floating in the middle. */
.entry-content .discord-button {
	display: flex;
	justify-content: flex-start;
	margin-top: 22px;
}

/* Inert until an invite URL exists: it reads as a button but does nothing. */
.entry-content .button-square--disabled,
.button-square--disabled {
	border-color: var(--mmr-line-light);
	background: var(--mmr-hover-bg);
	color: var(--mmr-meta);
	cursor: default;
}

.entry-content .button-square--disabled:hover,
.button-square--disabled:hover {
	border-color: var(--mmr-line-light);
	background: var(--mmr-hover-bg);
	color: var(--mmr-meta);
	box-shadow: none;
	transform: none;
}


/* ---------- よくある質問（詳細ブロック） ---------- */

.entry-content .wp-block-details {
	border-bottom: 1px solid var(--mmr-line-light);
}

.entry-content .wp-block-details:first-of-type {
	border-top: 1px solid var(--mmr-line-light);
}

/* Each question sits directly under the one before it. */
.entry-content .wp-block-details + .wp-block-details {
	margin-top: 0;
}

.entry-content .wp-block-details summary {
	position: relative;
	padding: 18px 44px 18px 4px;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
	list-style: none;
	transition: color var(--mmr-fast) var(--mmr-ease);
}

/* Safari draws its own triangle unless this is cleared. */
.entry-content .wp-block-details summary::-webkit-details-marker {
	display: none;
}

.entry-content .wp-block-details summary:hover {
	color: var(--mmr-accent-dark);
}

/* A chevron that rotates to point up once the answer is open. */
.entry-content .wp-block-details summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 12px;
	width: 9px;
	height: 9px;
	margin-top: -7px;
	border-right: 2px solid var(--mmr-accent);
	border-bottom: 2px solid var(--mmr-accent);
	transform: rotate(45deg);
	transition: transform 0.26s var(--mmr-ease);
}

.entry-content .wp-block-details[open] summary::after {
	margin-top: -3px;
	transform: rotate(-135deg);
}

.entry-content .wp-block-details > :not(summary) {
	margin: 0 0 18px;
	padding-left: 4px;
	color: var(--mmr-muted);
}

.entry-content .wp-block-details > summary + * {
	margin-top: -2px;
}

/* ---------- お問い合わせフォーム ---------- */

.contact-form__row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 20px;
	align-items: start;
	padding: 12px 0;
	border-bottom: 1px solid var(--mmr-border);
}

.contact-form__label {
	padding-top: 9px;
	font-weight: 700;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	width: 100%;
	padding: 8px 14px;
	/* Transparent until focus so swapping it in causes no layout shift. */
	border: 1px solid transparent;
	border-radius: 4px;
	background: var(--mmr-search-bg);
	color: var(--mmr-text);
	/* Body line-height is set for prose and makes single-line fields bulky. */
	line-height: 1.5;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--mmr-border);
	background: #fff;
}

.contact-form textarea {
	min-height: 200px;
	resize: vertical;
}

.contact-form__submit {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.contact-form__submit input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 184px;
	height: 50px;
	padding: 0 38px;
	border: 1px solid var(--mmr-border);
	border-radius: 25px;
	/* iOS draws its own button face over a styled submit unless appearance is reset. */
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
	color: var(--mmr-text);
	font-size: 17px;
	cursor: pointer;
	transition: background-color var(--mmr-fast) var(--mmr-ease), border-color var(--mmr-fast) var(--mmr-ease);
}

.contact-form__submit input[type="submit"]:hover {
	border-color: #b5b5b5;
	background: var(--mmr-hover-bg);
}

/* Contact Form 7 wraps fields in spans and appends its own messages. */
.wpcf7-form-control-wrap {
	display: block;
}

.wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 15px;
}

.wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: 14px;
}

.wpcf7-spinner {
	display: block;
	margin: 12px auto 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
	.status-bar {
		flex-direction: column;
		gap: 12px;
		padding: 32px var(--mmr-gutter) 0;
	}

	.status--operation,
	.status--server {
		flex: none;
	}

	.news__grid {
		column-gap: 40px;
	}
}

@media (max-width: 768px) {
	:root {
		--mmr-gutter: 16px;
	}

	/* Logo on the left, search and nav collapsed into buttons on the right. */
	.site-header__inner {
		gap: 10px;
		min-height: 0;
		padding-top: 10px;
		padding-bottom: 0;
	}

	.site-header__tools {
		display: flex;
		align-self: stretch;
		gap: 0;
		/* Cancel the header padding so the button reaches the corner. */
		margin-top: -10px;
		margin-right: calc(var(--mmr-gutter) * -1);
	}

	.header-button {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		width: 62px;
		padding: 8px 4px;
		border: 0;
		background: none;
		color: var(--mmr-text);
		font-size: 11px;
		font-weight: 700;
		cursor: pointer;
	}

	.header-button__icon {
		display: grid;
		place-items: center;
		width: 26px;
		height: 26px;
	}

	.header-button__icon svg {
		width: 100%;
		height: 100%;
	}

	.header-button--menu {
		background: var(--mmr-accent);
		color: #fff;
	}

	/* Three bars drawn with the border box so no icon file is needed. The margin
	   pads them out to the 26px of the search icon, so both labels sit level. */
	.header-button__bars {
		position: relative;
		width: 24px;
		height: 16px;
		margin: 5px 0;
		border-top: 3px solid currentColor;
		border-bottom: 3px solid currentColor;
	}

	.header-button__bars::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 0;
		width: 100%;
		border-top: 3px solid currentColor;
		transform: translateY(-50%);
	}

	/* The search field grows out of the button, between the logo and the menu. */
	.is-enhanced .site-header__search {
		flex: 1 1 auto;
		max-width: 0;
		opacity: 0;
		overflow: hidden;
		transition: max-width 0.28s var(--mmr-ease), opacity 0.2s var(--mmr-ease), margin 0.28s var(--mmr-ease);
	}

	/* A length rather than a percentage, so the width animates predictably. */
	.is-enhanced.is-search-open .site-header__search {
		max-width: 420px;
		margin-left: 10px;
		opacity: 1;
	}

	/* The button is replaced by the field it opens. */
	.is-enhanced.is-search-open [data-toggle="search"] {
		width: 0;
		padding: 0;
		opacity: 0;
		overflow: hidden;
		transition: width 0.28s var(--mmr-ease), opacity var(--mmr-fast) var(--mmr-ease) ease;
	}

	[data-toggle="search"] {
		transition: width 0.28s var(--mmr-ease), opacity 0.2s var(--mmr-ease);
	}

	/* The logo gives up room to the field rather than being overlapped by it. */
	.is-enhanced .site-logo {
		flex: 0 1 auto;
		min-width: 0;
		overflow: hidden;
		transition: max-width 0.28s var(--mmr-ease), opacity 0.2s var(--mmr-ease);
	}

	/* Hiding it outright reads better than a clipped, half-faded wordmark. */
	.is-enhanced.is-search-open .site-logo {
		max-width: 0;
		margin-left: 0;
		opacity: 0;
	}

	.is-enhanced .site-logo__text {
		display: block;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	/* Shown by default so it works unscripted; the class collapses it once JS runs. */
	.site-menu {
		display: block;
		border-top: 1px solid var(--mmr-line-light);
	}

	.is-enhanced .site-menu {
		display: none;
	}

	.is-enhanced.is-menu-open .site-menu {
		display: block;
	}

	.site-menu__list {
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.site-menu__link {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 14px var(--mmr-gutter);
		border-bottom: 1px solid var(--mmr-line-light);
		font-weight: 700;
	}

	/* The nav bar is replaced by the menu button on narrow screens. */
	.quick-nav {
		display: none;
	}

	/* 運行情報 moves above the photo and loses the coloured block. */
	.hero-area {
		display: block;
	}

	.hero-area .status-bar {
		padding: 14px var(--mmr-gutter);
	}

	.status__icon.icon-circle {
		display: grid;
		width: 24px;
		height: 24px;
	}

	.status__caption {
		display: inline;
		font-weight: 700;
		color: var(--mmr-status-color, var(--mmr-blue));
	}

	.status--delay { --mmr-status-color: var(--mmr-orange); }
	.status--suspend { --mmr-status-color: var(--mmr-red); }

	.status--operation {
		align-items: center;
		gap: 10px;
		height: auto;
		border-radius: 0;
	}

	.status--operation .status__label {
		display: none;
	}

	.status--operation .status__body {
		padding: 0;
	}

	/* Player count is desktop-only. */
	.status--server {
		display: none;
	}

	.site-logo {
		width: auto;
		height: 46px;
		margin-left: 0;
	}

	.site-logo img,
	.site-logo .custom-logo {
		max-height: 46px;
	}

	.site-logo__text {
		font-size: 20px;
	}

	.search-form {
		width: 100%;
	}

	/* A wide band rather than a tall panel, so the lists start higher up. */
	.hero {
		height: auto;
		aspect-ratio: 3 / 1;
		padding-bottom: 0;
	}

	.status {
		font-size: 14px;
	}

	.status__label {
		flex-basis: 104px;
	}

	.status__body {
		padding: 0 12px;
	}

	.quick-nav__list {
		grid-template-columns: repeat(2, 1fr);
	}

	.quick-nav__item,
	.quick-nav__item:last-child {
		border-left: 0;
		border-right: 0;
		border-bottom: 1px solid var(--mmr-line-light);
	}

	.quick-nav__item:nth-child(odd) {
		border-right: 1px solid var(--mmr-line-light);
	}

	.quick-nav__item:nth-last-child(-n + 2) {
		border-bottom: 0;
	}

	.quick-nav__link {
		font-size: 14px;
	}

	.news {
		padding-top: 48px;
	}

	.news__grid {
		grid-template-columns: 1fr;
		row-gap: 56px;
	}

	/* Stacked on one column, お知らせ is the more useful block to meet first. */
	.news-block--notice {
		order: -1;
	}

	.news-block__header {
		gap: 16px;
	}

	.news-block__title {
		font-size: 26px;
	}

	.news-block__header .icon-circle {
		width: 32px;
		height: 32px;
	}

	.news-block__more {
		margin-top: 28px;
	}

	/* Only the rule under each heading stays; the rows are separated by space. */
	.news .news-item {
		border-bottom: 0;
	}

	.news-item__meta {
		gap: 16px;
	}

	/* Narrower rails leave more room for the station names. */
	.line-diagram {
		--mmr-rail-width: 20px;
	}

	.line-diagram__row {
		gap: 12px;
	}

	.join {
		padding: 56px 0;
	}

	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
		padding-top: 40px;
	}

	.footer-nav__list {
		justify-content: flex-start;
		font-size: 16px;
	}

	.site-footer__copy {
		padding-top: 48px;
	}

	.entry-content > h2 {
		margin-top: 48px;
	}

	.entry-content .wp-block-table {
		padding-left: 0;
	}

	.entry-content table td,
	.entry-content table th {
		padding: 12px 8px;
	}

	/* One screenshot per section: three in a row across several sections reads
	   as a wall of thumbnails on a phone. The rest stay in the markup and are
	   lazy-loaded, so hiding them costs no download. */
	.media-grid,
	.entry-content .wp-block-gallery.has-nested-images {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.media-grid > :nth-child(n + 2),
	.entry-content .wp-block-gallery.has-nested-images > :nth-child(n + 2) {
		display: none;
	}

	.about-hero {
		min-height: 0;
		padding: 48px 0;
	}

	.about-hero__title {
		font-size: 26px;
	}

	.about-hero__subtitle {
		margin-top: 10px;
		font-size: 16px;
	}

	/* One per row: three columns leave the description too narrow to read. */
	.feature-grid {
		grid-template-columns: 1fr;
		gap: 40px;
		margin-top: 48px;
	}

	.feature__icon {
		max-width: 120px;
	}

	.feature__title {
		margin-top: 16px;
		font-size: 22px;
	}

	.about-lead {
		margin-top: 48px;
		font-size: 21px;
	}

	.page-main--about .entry-content {
		margin-top: 48px;
	}

	.vehicle {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.entry-content .vehicle-list,
	.vehicle-list {
		gap: 36px;
	}

	.entry-content .vehicle-group {
		margin-top: 48px;
	}

	.entry-content .section-link {
		margin-top: 48px;
	}

	.entry-content .spec-grid,
	.spec-grid {
		gap: 10px;
	}

	.spec__image {
		margin-bottom: 8px;
	}

	.spec {
		font-size: 13px;
	}

	.server-address__value {
		font-size: 17px;
		text-align: left;
		word-break: break-all;
	}

	.station-types {
		gap: 6px 8px;
	}

	.station-type {
		padding: 3px 12px;
		font-size: 13px;
	}

	.station-transfers {
		gap: 4px 14px;
		font-size: 13px;
	}

	/* Small enough that the longest label still fits on one line. */
	.facility__label {
		min-height: 44px;
		padding: 8px 4px;
		font-size: 13px;
	}

	.facility__icon {
		padding: 14px 6px;
	}

	.facility__icon svg {
		width: 40px;
		height: 40px;
	}

	.route-map__viewport {
		height: 360px;
	}

	.line-grid__item {
		flex-basis: 45%;
	}

	.line-grid__link {
		font-size: 16px;
	}

	/* One per row: two columns would leave the note too cramped to read. */
	.entry-content .staff-list {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.staff__icon {
		max-width: 220px;
	}

	.contact-form__row {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.entry-content .staff__name {
		margin-top: 20px;
		font-size: 20px;
	}

	.contact-form__label {
		padding-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}
