/**
 * Shared center chrome (TOP-like):
 * [ left large ] [ center 402px, flush right ] [ right vertical menu ]
 * Applies to WORKS / SERVICE / JOURNAL / phase2 pages.
 */

.header-octopus {
	display: block;
	width: 96px;
	height: auto;
	margin: 0 auto 12px;
	border: 0;
	background: none;
	border-radius: 0;
	transform: none;
	object-fit: contain;
}

/* Mobile: keep octopus inline with brand text, smaller */
@media (max-width: 730px) {
	.header-octopus {
		display: inline-block;
		width: 36px;
		margin: 0 8px 0 0;
		vertical-align: middle;
	}
	.site-header .brand,
	.global-header .logo {
		display: inline-flex;
		align-items: center;
	}
	.logo-text,
	.brand-text {
		display: inline;
	}
}

@media (min-width: 731px) {
	body.works-center,
	body.phase2-center {
		--top-nav: 240px;
	}

	body.works-center #page.site,
	body.phase2-center #page.site {
		margin-right: var(--top-nav);
	}

	body.works-center .announcement,
	body.phase2-center .announcement {
		display: none !important;
	}

	/* Right vertical site menu */
	body.works-center header.site-header,
	body.phase2-center header.site-header {
		position: fixed !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: auto !important;
		z-index: 120 !important;
		width: var(--top-nav) !important;
		height: 100vh !important;
		height: 100dvh !important;
		display: flex !important;
		flex-direction: column;
		background: #fff !important;
		border-bottom: 0 !important;
		border-left: 1px solid var(--line, #d8d8d8);
		padding: 28px 22px 22px !important;
		overflow: auto;
		backdrop-filter: none;
	}

	body.works-center .site-header-inner,
	body.phase2-center .site-header-inner {
		width: 100% !important;
		height: auto !important;
		min-height: 100%;
		margin: 0 !important;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	body.works-center .brand,
	body.phase2-center .brand {
		order: 0;
		font-size: 26px;
		text-align: center;
		margin: 0 0 18px;
		white-space: normal;
		line-height: 1.05;
	}
	body.works-center .brand .header-octopus,
	body.phase2-center .brand .header-octopus {
		display: block;
	}
	body.works-center .brand-text,
	body.phase2-center .brand-text {
		display: block;
	}
	body.works-center .brand span,
	body.phase2-center .brand span {
		display: block;
		margin: 6px 0 0;
		font-size: 11px;
		letter-spacing: 0.04em;
	}

	body.works-center .header-contact,
	body.phase2-center .header-contact {
		order: 1;
		min-width: 0;
		width: 100%;
		margin: 0 0 18px;
		justify-content: center;
		padding: 14px 16px;
	}

	body.works-center .site-nav,
	body.phase2-center .site-nav {
		order: 2;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		margin: 0;
		gap: 0;
	}
	body.works-center .site-nav a,
	body.phase2-center .site-nav a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 16px 2px;
		border-bottom: 1px solid var(--line, #d8d8d8);
		font-size: 13px;
	}
	body.works-center .site-nav a::after,
	body.phase2-center .site-nav a::after {
		content: "›";
		font-size: 18px;
		font-weight: 500;
		color: #8a8a8a;
	}
	body.works-center .site-nav a.is-current::after,
	body.phase2-center .site-nav a.is-current::after {
		content: "›";
		height: auto;
		position: static;
		background: none;
	}
	body.works-center .site-nav a.is-current,
	body.phase2-center .site-nav a.is-current {
		font-weight: 900;
	}

	body.works-center .menu-toggle,
	body.phase2-center .menu-toggle {
		display: none !important;
	}

	/* Stage: left grows, center flush to menu */
	body.works-center .stage,
	body.phase2-center .stage {
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 20px 0 28px;
		display: grid !important;
		grid-template-columns: minmax(220px, 1fr) var(--center) !important;
		column-gap: clamp(20px, 2.8vw, 48px);
		gap: clamp(20px, 2.8vw, 48px);
		align-items: start;
	}

	body.works-center .desktop-rail-right,
	body.phase2-center .desktop-rail-right {
		display: none !important;
	}

	body.works-center .desktop-rail-left,
	body.phase2-center .desktop-rail-left {
		display: flex !important; /* beat older ≤1080 hide-all-rails rules */
		position: sticky !important;
		top: 0 !important;
		width: 100%;
		max-width: none;
		height: 100vh !important;
		height: 100dvh !important;
		min-height: 0 !important;
		max-height: none !important; /* beat center-footer.css rail max-height */
		overflow: hidden !important; /* no nested scroll — same as TOP */
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		padding: 24px 0 20px;
		overscroll-behavior: auto;
	}

	/* Shared TOP left: mid = CTA + notice */
	body.works-center .stage-mv,
	body.phase2-center .stage-mv {
		display: none;
	}
	body.works-center .stage-aside,
	body.phase2-center .stage-aside {
		display: flex;
		flex-direction: column;
		gap: 18px;
		width: 100%;
		max-width: 360px;
		padding: 8px 4px 20px;
	}
	body.works-center .stage-notice,
	body.phase2-center .stage-notice {
		background: #fff;
		border: 1px solid var(--ink, #111);
		border-radius: 18px;
		padding: 22px 20px 18px;
	}
	body.works-center .stage-notice__label,
	body.phase2-center .stage-notice__label {
		display: block;
		font-size: 10px;
		font-weight: 800;
		letter-spacing: 0.12em;
		color: var(--muted, #888);
		margin-bottom: 10px;
	}
	body.works-center .stage-notice__text,
	body.phase2-center .stage-notice__text {
		margin: 0 0 14px;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.65;
		letter-spacing: -0.02em;
	}
	body.works-center .stage-notice__link,
	body.phase2-center .stage-notice__link {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		font-size: 12px;
		font-weight: 800;
		border-bottom: 1px solid var(--ink, #111);
		padding-bottom: 2px;
	}
	body.works-center .stage-aside__actions,
	body.phase2-center .stage-aside__actions {
		display: grid;
		gap: 10px;
	}
	body.works-center .stage-aside__actions .stage-cta,
	body.phase2-center .stage-aside__actions .stage-cta {
		max-width: none;
	}
	body.works-center .stage-aside__links,
	body.phase2-center .stage-aside__links {
		margin-top: 8px;
		border-top: 1px solid var(--line, #d8d8d8);
	}
	body.works-center .stage-aside__links a,
	body.phase2-center .stage-aside__links a {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 12px 2px;
		border-bottom: 1px solid var(--line, #d8d8d8);
		font-size: 13px;
		font-weight: 800;
	}
	body.works-center .stage-aside__links a span:first-child,
	body.phase2-center .stage-aside__links a span:first-child {
		color: #888;
		font-size: 10px;
	}
	body.works-center .stage-cta,
	body.phase2-center .stage-cta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		width: 100%;
		max-width: 320px;
		padding: 16px 20px;
		font-size: 13px;
		font-weight: 900;
		border-radius: 999px;
		border: 1.5px solid var(--ink, #111);
	}
	body.works-center .stage-cta--fill,
	body.phase2-center .stage-cta--fill {
		background: var(--ink, #111);
		color: #fff;
		border-color: var(--ink, #111);
	}
	body.works-center .stage-cta--line,
	body.phase2-center .stage-cta--line {
		background: #fff;
		color: var(--ink, #111);
	}

	body.works-center .center-canvas,
	body.phase2-center .center-canvas {
		width: var(--center);
		max-width: 100%;
		justify-self: end;
		margin: 18px 0 80px;
		border-radius: 28px;
		overflow: hidden;
	}
}

/* Wide PC: left = large MV (same as TOP) */
@media (min-width: 1200px) {
	body.works-center .stage-aside,
	body.phase2-center .stage-aside {
		display: none;
	}
	body.works-center .stage-mv,
	body.phase2-center .stage-mv {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 12px;
		width: 100%;
		height: 100%;
		min-height: 0;
		padding: 8px 8px 12px 4px;
		overflow: hidden;
	}
	body.works-center .stage-mv__actions,
	body.phase2-center .stage-mv__actions {
		margin-top: auto;
	}
	body.works-center .stage-mv__chip,
	body.phase2-center .stage-mv__chip {
		display: inline-flex;
		align-self: flex-start;
		border: 1.5px solid var(--ink, #111);
		border-radius: 30px;
		padding: 8px 14px;
		font-size: 10px;
		font-weight: 800;
		letter-spacing: 0.025em;
		background: #fff;
	}
	body.works-center .stage-mv__chip span,
	body.phase2-center .stage-mv__chip span {
		color: var(--accent, #eaff00);
		margin: 0 7px;
	}
	body.works-center .stage-mv__title,
	body.phase2-center .stage-mv__title {
		margin: 18px 0 10px;
		font-size: clamp(34px, 3.6vw, 56px);
		font-weight: 900;
		line-height: 1.25;
		letter-spacing: -0.07em;
	}
	body.works-center .stage-mv__lead,
	body.phase2-center .stage-mv__lead {
		margin: 0 0 16px;
		font-size: clamp(13px, 1.05vw, 16px);
		font-weight: 700;
		line-height: 1.75;
		max-width: 28em;
	}
	body.works-center .stage-mv__actions,
	body.phase2-center .stage-mv__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
	}
	body.works-center .stage-mv__actions .stage-cta,
	body.phase2-center .stage-mv__actions .stage-cta {
		width: auto;
		min-width: 200px;
		flex: 1 1 200px;
		max-width: 280px;
	}
}

/* Narrow desktop: drop left rail, keep center + vertical menu */
@media (min-width: 731px) and (max-width: 980px) {
	body.works-center .stage,
	body.phase2-center .stage {
		display: flex !important;
		flex-direction: column;
		align-items: flex-end;
		padding: 0 20px;
	}
	body.works-center .desktop-rail-left,
	body.phase2-center .desktop-rail-left {
		display: none !important;
	}
	body.works-center .center-canvas,
	body.phase2-center .center-canvas {
		width: min(var(--center), calc(100% - 8px));
		margin: 23px 0 60px;
	}
}

/* Mobile: restore horizontal header */
@media (max-width: 730px) {
	body.works-center #page.site,
	body.phase2-center #page.site {
		margin-right: 0;
	}
	body.works-center .announcement,
	body.phase2-center .announcement {
		display: flex !important;
	}
	body.works-center header.site-header,
	body.phase2-center header.site-header {
		position: sticky !important;
		top: 0 !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		width: 100% !important;
		height: auto !important;
		border-left: 0 !important;
		padding: 0 !important;
		overflow: visible;
	}
	body.works-center .site-header-inner,
	body.phase2-center .site-header-inner {
		flex-direction: row;
		align-items: center;
		min-height: 0;
		height: 67px;
		width: calc(100% - 30px);
		margin: auto;
	}
	body.works-center .brand,
	body.phase2-center .brand {
		text-align: left;
		margin: 0;
		font-size: 27px;
	}
	body.works-center .brand span,
	body.phase2-center .brand span {
		display: inline;
		margin-left: 7px;
		font-size: 10px;
	}
	body.works-center .site-nav,
	body.works-center .header-contact,
	body.phase2-center .site-nav,
	body.phase2-center .header-contact {
		display: none !important;
	}
	body.works-center .menu-toggle,
	body.phase2-center .menu-toggle {
		display: flex !important;
		margin-left: auto;
	}
}
