/* =============================================================================
 * STAGE Ginza theme — main.css
 * LP（stage-ginza-landing-page (3)）のデザインをサイト全体へ適用。
 * ========================================================================== */

/* ----------------------------- Design Tokens ----------------------------- */
:root {
	--sg-bg: #fdfcf2;            /* warm cream white */
	--sg-fg: #211e16;            /* deep warm brown-black */
	--sg-fg-70: rgba(33, 30, 22, 0.7);
	--sg-fg-50: rgba(33, 30, 22, 0.5);
	--sg-card: #ffffff;
	--sg-primary: #f4cd45;       /* bright yellow */
	--sg-primary-soft: #f7e3a0;
	--sg-accent: #4a3510;        /* deep bronze — clear on primary yellow */
	--sg-secondary: #f3edda;     /* soft cream */
	--sg-muted: #f1ecdd;
	/* OKLCH 版は約4.9:1。この HEX は非対応ブラウザ用なので、同じく 4.5:1 を
	   満たす濃さにしてある（#7d7763 だと約4.34:1 で足りなかった）。 */
	--sg-muted-fg: #746e59;
	--sg-border: #e8e2d0;
	--sg-radius: 0.5rem;
	--sg-maxw: 1200px;
	--sg-header-h: 80px;
	--sg-font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	--sg-font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* OKLCH 対応ブラウザではより鮮やかなトーンに */
@supports (color: oklch(0.85 0.18 95)) {
	:root {
		--sg-bg: oklch(0.98 0.02 95);
		--sg-fg: oklch(0.15 0.02 75);
		--sg-fg-70: oklch(0.15 0.02 75 / 0.7);
		--sg-fg-50: oklch(0.15 0.02 75 / 0.5);
		--sg-primary: oklch(0.85 0.18 95);
		--sg-accent: oklch(0.35 0.085 70);
		--sg-secondary: oklch(0.92 0.04 95);
		--sg-muted: oklch(0.95 0.02 95);
		--sg-muted-fg: oklch(0.45 0.02 75);
		--sg-border: oklch(0.90 0.03 95);
		--sg-card: #ffffff;
	}
}

/* ------------------------------- Base ------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--sg-bg);
	color: var(--sg-fg);
	font-family: var(--sg-font-sans);
	font-size: 16px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--sg-accent); }

::selection { background: rgba(244, 205, 69, 0.4); color: var(--sg-fg); }

.sg-container {
	width: 100%;
	max-width: var(--sg-maxw);
	margin-inline: auto;
	padding-inline: 1.5rem;
}
@media (min-width: 1024px) {
	.sg-container { padding-inline: 3rem; }
}

.sg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--sg-fg);
	color: var(--sg-bg);
	padding: 0.5rem 1rem;
	z-index: 1000;
}
.sg-skip-link:focus { left: 0; }

.sg-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--sg-muted-fg);
	margin-bottom: 1rem;
}
.sg-eyebrow--bar {
	border-left: 2px solid var(--sg-accent);
	padding-left: 1rem;
}

.sg-h2 {
	font-family: var(--sg-font-serif);
	font-weight: 600;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.25;
	margin: 0 0 1.5rem;
}
.sg-accent { color: var(--sg-accent); }

/* ------------------------------- Buttons --------------------------------- */
.sg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border-radius: var(--sg-radius);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.sg-btn--dark { background: var(--sg-fg); color: var(--sg-bg); }
.sg-btn--dark:hover { background: #000; color: var(--sg-bg); transform: translateY(-1px); }
.sg-btn--outline { background: transparent; color: var(--sg-fg); border-color: rgba(33,30,22,0.25); }
.sg-btn--outline:hover { border-color: var(--sg-accent); color: var(--sg-accent); }
.sg-btn--block { width: 100%; }

/* ------------------------------- Header ---------------------------------- */
.sg-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	height: var(--sg-header-h);
	display: flex;
	align-items: center;
	background: transparent;
	transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.sg-header.is-scrolled {
	background: rgba(253, 252, 242, 0.9);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}
.sg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.sg-logo { display: inline-flex; align-items: baseline; gap: 0.3rem; font-family: var(--sg-font-serif); }
.sg-logo__main { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.sg-logo__sub { font-size: 1.05rem; font-weight: 400; letter-spacing: 0.2em; color: var(--sg-accent); }
.sg-logo--light .sg-logo__main { color: var(--sg-bg); }
.sg-logo--light .sg-logo__sub { color: var(--sg-primary); }

.sg-nav { display: none; align-items: center; gap: 2.5rem; }
/* ナビは 900px では収まらず、項目が2行に折り返して CTA がロゴに重なる。
   実測で 1024px 必要。ヒーローの2カラム化と同じ breakpoint に揃えてある。 */
@media (min-width: 1024px) { .sg-nav { display: flex; } }

.sg-menu {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.sg-menu a {
	position: relative;
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--sg-fg-70);
	padding-bottom: 4px;
}
.sg-menu a::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	height: 1px; width: 0;
	background: var(--sg-accent);
	transition: width 0.3s ease;
}
.sg-menu a:hover { color: var(--sg-fg); }
.sg-menu a:hover::after { width: 100%; }

/* Mobile toggle */
.sg-nav-toggle {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px; height: 44px;
	background: none; border: none; cursor: pointer;
}
@media (min-width: 1024px) { .sg-nav-toggle { display: none; } }
.sg-nav-toggle__bar {
	display: block; width: 24px; height: 2px;
	background: var(--sg-fg);
	transition: transform 0.3s ease, opacity 0.3s ease;
	margin-inline: auto;
}
.sg-nav-toggle.is-open .sg-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sg-nav-toggle.is-open .sg-nav-toggle__bar:nth-child(2) { opacity: 0; }
.sg-nav-toggle.is-open .sg-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.sg-mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: var(--sg-primary);
	padding-top: calc(var(--sg-header-h) + 1.5rem);
	display: flex;
	justify-content: center;
}
.sg-mobile-menu[hidden] { display: none; }
.sg-mobile-menu__inner { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding: 2rem; }
.sg-mobile-menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.sg-mobile-menu__list a { font-size: 1.5rem; font-weight: 500; color: var(--sg-fg); }

/* ------------------------------- Main spacing ---------------------------- */
.sg-main { display: block; }
/* 下層ページはヘッダー分のオフセットが必要（フロントは Hero がフルスクリーン） */
body:not(.sg-is-front) .sg-main { padding-top: var(--sg-header-h); }

/* =============================== HERO ==================================== */
/* svh はアドレスバーが出ている状態の高さ。100vh だとスマホでその分はみ出す。
   vh を先に書いて svh 未対応ブラウザのフォールバックにしている。 */
.sg-hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; align-items: center; }
/* ヒーロー写真の幅はここ1か所で決める。Since 2008 のバッジもこの値を参照するので、
   写真の大きさを変えてもバッジの位置がずれない。 */
.sg-hero { --sg-hero-photo-w: min(100%, 320px); }
/* タブレット幅は1カラムのままなので、写真がスマホ幅の320pxだと右半分が
   空いた黄色い面になる。2カラム化の手前で一段広げておく。 */
@media (min-width: 640px) { .sg-hero { --sg-hero-photo-w: 420px; } }
/* 2カラム化の直前は1カラムを丸ごと使えるので、右半分に収める 1024px 以上より
   むしろ広く取れる。 */
@media (min-width: 880px) { .sg-hero { --sg-hero-photo-w: 520px; } }
/* 正方形は縦4:5より背が低くなるぶん、幅を広げて存在感を保つ。 */
@media (min-width: 1024px) { .sg-hero { --sg-hero-photo-w: 480px; } }
.sg-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.sg-hero__clip {
	position: absolute; inset: 0;
	background: var(--sg-primary);
	clip-path: polygon(0 0, 100% 0, 100% 60%, 0 85%);
}
.sg-hero__texture {
	position: absolute; inset: 0; opacity: 0.12;
	background:
		radial-gradient(circle at 25% 25%, rgba(74,53,16,0.35) 0%, transparent 50%),
		radial-gradient(circle at 75% 75%, rgba(74,53,16,0.25) 0%, transparent 50%);
}
.sg-hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	width: 100%;
	padding-top: calc(var(--sg-header-h) + 2rem);
	padding-bottom: 4rem;
}
@media (min-width: 1024px) {
	.sg-hero__grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 0; }
}
.sg-hero__text { display: flex; flex-direction: column; justify-content: center; }
.sg-hero__title { margin: 0 0 1.5rem; font-family: var(--sg-font-serif); }
.sg-hero__title-main {
	display: block;
	font-size: clamp(3.5rem, 11vw, 7rem);
	font-weight: 600;
	line-height: 0.95;
	letter-spacing: -0.02em;
}
.sg-hero__title-sub {
	display: block;
	margin-top: 0.5rem;
	font-size: clamp(2rem, 6vw, 3.5rem);
	font-weight: 500;
	letter-spacing: 0.2em;
	color: var(--sg-accent);
}
.sg-hero__lead { max-width: 28rem; font-size: 1.05rem; line-height: 1.8; color: var(--sg-fg-70); margin: 0; }
.sg-hero__scroll { display: inline-flex; align-items: center; gap: 0.75rem; margin-top: 2rem; font-size: 0.85rem; font-weight: 500; color: var(--sg-fg-70); }
.sg-hero__scroll:hover { color: var(--sg-fg); }
.sg-hero__scroll-arrow { animation: sg-bob 1.5s ease-in-out infinite; }

.sg-hero__visual { position: relative; display: flex; align-items: center; justify-content: center; }
@media (min-width: 1024px) { .sg-hero__visual { justify-content: flex-end; } }
/* 写真の影。バッジは写真の左端に重なって置かれるため、ここが大きく広がっていると
   バッジの影のように見えてしまう。落ち幅と広がりを詰めて写真の際に収める。 */
.sg-hero__image-wrap { position: relative; z-index: 2; width: var(--sg-hero-photo-w); overflow: hidden; border-radius: 2px; box-shadow: 0 10px 22px -10px rgba(0,0,0,0.30); }
.sg-hero__image {
	/* hero-storefront.jpg は 1200x1200 で、必要な切り抜きは画像側で済ませてある
	   （43702.jpeg から x=725 の位置で 1800x1800 を切り出し、下 360px の歩道と
	   腰壁を落としたもの）。ここでの比率は元画像と一致するので、
	   object-position は効かず、中央のままでよい。 */
	display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover;
}
.sg-hero__glow { position: absolute; inset: 0; background: linear-gradient(to top, rgba(74,53,16,0.2), transparent); pointer-events: none; }
.sg-hero__badge {
	position: absolute; z-index: 3; bottom: 2.5rem; left: -0.5rem;
	/* 影は本体の縁にほぼ密着させる。落ち幅1px・ぼかし3pxまで詰め、
	   薄くなるぶん濃さを上げて輪郭が消えないようにする。 */
	background: var(--sg-card); padding: 1.25rem 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.20);
	display: none;
}
@media (min-width: 1024px) { .sg-hero__badge { display: block; left: auto; right: calc(var(--sg-hero-photo-w) - 3rem); bottom: 1rem; } }
.sg-hero__badge-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--sg-muted-fg); }
.sg-hero__badge-value { display: block; font-family: var(--sg-font-serif); font-size: 1.9rem; font-weight: 600; }
/* かつてここに .sg-hero__float（ぼかした円2つ）があったが削除した。
   黄色い方は写真の左下から斜めの境界を越えてクリーム色の側へ滲み出し、
   汚れのように見えていた。暗い方も右上に黒い靄を作っていた。 */

/* Hero 登場アニメーション（元 LP の framer-motion を CSS で再現。ページ読み込み時に段階的にフワッと表示） */
.sg-hero__text .sg-eyebrow { animation: sg-hero-left 0.8s ease both 0.2s; }
.sg-hero__title           { animation: sg-hero-up 0.8s ease both 0.4s; }
.sg-hero__lead            { animation: sg-hero-up 0.8s ease both 0.6s; }
.sg-hero__scroll          { animation: sg-hero-up 0.8s ease both 0.8s; }
.sg-hero__image-wrap      { animation: sg-hero-scale 1s ease both 0.5s; }
.sg-hero__badge           { animation: sg-hero-right 0.8s ease both 1s; }

.sg-hero__curve { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; pointer-events: none; }
.sg-hero__curve svg { width: 100%; height: 64px; }
@media (min-width: 1024px) { .sg-hero__curve svg { height: 96px; } }
.sg-hero__curve path { fill: var(--sg-bg); }

/* ============================== CONCEPT ================================== */
.sg-concept { position: relative; overflow: hidden; padding: 6rem 0; }
@media (min-width: 1024px) { .sg-concept { padding: 10rem 0; } }
.sg-concept__ghost {
	position: absolute; left: 0; top: 50%; transform: translateY(-50%);
	font-family: var(--sg-font-serif); font-weight: 700; font-size: 20vw; line-height: 1;
	color: var(--sg-fg); opacity: 0.03; white-space: nowrap; pointer-events: none;
}
.sg-concept__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 4rem; }
@media (min-width: 1024px) { .sg-concept__grid { grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; } }
.sg-concept__text .sg-h2 span { display: block; }
.sg-concept__body { display: flex; flex-direction: column; gap: 1.5rem; color: var(--sg-fg-70); font-size: 1rem; }
.sg-concept__body p { margin: 0; }
.sg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.sg-stat__value { display: flex; align-items: baseline; gap: 0.25rem; font-family: var(--sg-font-serif); font-size: 2rem; font-weight: 600; }
.sg-stat__unit { font-family: var(--sg-font-sans); font-size: 0.9rem; color: var(--sg-accent); }
.sg-stat__label { display: block; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--sg-muted-fg); margin-top: 0.25rem; }

.sg-concept__visual { position: relative; display: flex; justify-content: center; }
@media (min-width: 1024px) { .sg-concept__visual { justify-content: flex-end; } }
.sg-concept__img-back { width: min(380px, 82%); align-self: center; aspect-ratio: 16 / 9; border-radius: 2px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.sg-concept__img-back img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sg-concept__img-front {
	position: absolute; right: 0; bottom: -1.5rem; width: min(210px, 48%);
	border: 4px solid var(--sg-bg); border-radius: 2px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
@media (min-width: 1024px) { .sg-concept__img-front { right: -2rem; bottom: -2rem; } }
.sg-concept__img-front img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: center; }
.sg-concept__line { position: absolute; left: -1rem; top: 25%; width: 1px; height: 12rem; background: var(--sg-accent); }
@media (min-width: 1024px) { .sg-concept__line { left: -4rem; } }

/* =============================== SPACE =================================== */
.sg-space { position: relative; overflow: hidden; background: var(--sg-secondary); padding: 6rem 0; }
@media (min-width: 1024px) { .sg-space { padding: 10rem 0; } }
.sg-space__accent {
	position: absolute; right: 0; top: 0; height: 100%; width: 66%;
	background: rgba(244,205,69,0.12);
	clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
	pointer-events: none;
}
.sg-space__head { position: relative; margin-bottom: 4rem; }
@media (min-width: 1024px) { .sg-space__head { margin-left: auto; max-width: 36rem; text-align: right; } }

/* Carousel */
.sg-carousel { position: relative; }
.sg-carousel__stage { position: relative; aspect-ratio: 16 / 9; border-radius: 2px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.18); }
.sg-carousel__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.6s ease; }
.sg-carousel__slide.is-active { opacity: 1; }
.sg-carousel__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sg-carousel__caption {
	position: absolute; inset: auto 0 0 0; padding: 2rem;
	background: linear-gradient(to top, rgba(33,30,22,0.65), transparent);
	color: #fff;
}
.sg-carousel__caption h3 { margin: 0 0 0.25rem; font-family: var(--sg-font-sans); font-size: 1.6rem; font-weight: 700; letter-spacing: 0.02em; }
.sg-carousel__caption p { margin: 0; font-size: 0.9rem; opacity: 0.85; }
.sg-carousel__nav {
	position: absolute; top: 1.5rem; width: 40px; height: 40px; border-radius: 50%;
	border: none; cursor: pointer; color: #fff; font-size: 1.5rem; line-height: 1;
	/* button の既定 padding と行ボックスの分だけ矢印が円の中心からずれるので、
	   padding を殺して flex で中央に置く。 */
	padding: 0; display: flex; align-items: center; justify-content: center;
	/* 白の半透明だと明るい写真の上でほぼ見えなくなるため、
	   キャプションの帯と同じ濃い地色を敷いて白抜きにする。 */
	background: rgba(33,30,22,0.55); backdrop-filter: blur(4px);
	transition: background 0.25s ease;
}
.sg-carousel__nav:hover,
.sg-carousel__nav:focus-visible { background: rgba(33,30,22,0.8); }
.sg-carousel__nav--prev { right: 4rem; }
.sg-carousel__nav--next { right: 1.5rem; }
/* gap は 1rem 必要。ドットの当たり判定を24px幅に広げているので、これより
   狭いと隣のドットと重なって押し間違える。8px + 16px でちょうど接する。 */
.sg-carousel__dots { position: absolute; right: 1.5rem; bottom: 1.5rem; display: flex; gap: 1rem; }
.sg-carousel__dot { position: relative; width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; background: rgba(255,255,255,0.4); cursor: pointer; transition: width 0.3s ease, background 0.3s ease; }
.sg-carousel__dot.is-active { width: 24px; background: #fff; }
/* 見た目は8pxのまま、指で押せる範囲だけ 24×24px に広げる（WCAG 2.2 の最小値）。 */
.sg-carousel__dot::after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: 100%; min-width: 24px; height: 24px;
}

/* Features */
/* position: relative は .sg-space__accent（斜めの装飾）より上に置くため。
   同じ理由で .sg-space__head と .sg-carousel にも指定してある。 */
.sg-features { position: relative; margin-top: 4rem; }
.sg-features__title { text-align: center; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sg-muted-fg); margin-bottom: 2rem; }
.sg-features__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.sg-features__item {
	background: var(--sg-card); border: 1px solid var(--sg-border); border-radius: 999px;
	padding: 0.55rem 1.25rem; font-size: 0.85rem; color: var(--sg-fg-70);
	transition: border-color 0.25s ease, color 0.25s ease;
}
.sg-features__item:hover { border-color: var(--sg-accent); color: var(--sg-fg); }
.sg-features__more { text-align: center; margin: 2rem 0 0; }

/* =============================== ACCESS ================================== */
.sg-access { position: relative; overflow: hidden; padding: 6rem 0; }
@media (min-width: 1024px) { .sg-access { padding: 10rem 0; } }
.sg-access__split { position: absolute; inset: 0; pointer-events: none; }
@media (min-width: 1024px) {
	.sg-access__split { background: linear-gradient(to right, var(--sg-bg) 50%, var(--sg-primary) 50%); }
}
.sg-access__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .sg-access__grid { grid-template-columns: 1fr 1fr; gap: 0; } }
.sg-access__info { }
@media (min-width: 1024px) { .sg-access__info { padding-right: 4rem; } }
.sg-access__items { display: flex; flex-direction: column; gap: 2rem; }
.sg-access__item { display: flex; gap: 1rem; }
.sg-access__icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: var(--sg-secondary); color: var(--sg-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.sg-access__item h3 { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 500; }
.sg-access__item p { margin: 0; color: var(--sg-fg-70); font-size: 0.95rem; }
.sg-access__maplink { margin-top: 2.5rem; }
.sg-access__maplink a { font-size: 0.9rem; font-weight: 500; color: var(--sg-fg-70); }
.sg-access__maplink a:hover { color: var(--sg-fg); }

.sg-access__cta { display: flex; align-items: center; }
@media (min-width: 1024px) { .sg-access__cta { padding-left: 4rem; } }
.sg-card { width: 100%; background: var(--sg-card); border-radius: 2px; padding: 2rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
@media (min-width: 1024px) { .sg-card { padding: 3rem; } }
.sg-card__title { margin: 0 0 0.5rem; font-family: var(--sg-font-serif); font-size: 1.6rem; font-weight: 600; }
.sg-card__lead { margin: 0 0 1.5rem; font-size: 0.9rem; color: var(--sg-muted-fg); }
.sg-card__contact { margin: -0.5rem 0 1.5rem; font-size: 1rem; line-height: 1.9; }
.sg-card__contact a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--sg-border); }
.sg-card__contact a:hover { border-bottom-color: currentColor; }
.sg-card__notice { background: rgba(244,205,69,0.2); border-radius: var(--sg-radius); padding: 1rem; margin-bottom: 1.5rem; }
.sg-card__notice-main { margin: 0; font-size: 0.9rem; font-weight: 500; }
.sg-card__notice-sub { margin: 0.25rem 0 0; font-size: 0.78rem; color: var(--sg-fg-70); }
.sg-card__actions { display: flex; flex-direction: column; gap: 1rem; }
.sg-card__follow { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--sg-border); }
.sg-card__follow-label { margin: 0 0 1rem; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sg-muted-fg); }
.sg-card__social { display: flex; gap: 1rem; }
.sg-card__social a {
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--sg-border);
	display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600;
	transition: border-color 0.25s ease, background 0.25s ease;
}
.sg-card__social a:hover { border-color: var(--sg-accent); background: rgba(74,53,16,0.1); }
.sg-card__owner { margin: 1.25rem 0 0; font-size: 0.82rem; color: var(--sg-muted-fg); }
.sg-card__owner a { margin-left: 0.5em; color: var(--sg-fg); border-bottom: 1px solid var(--sg-border); }
.sg-card__owner a:hover { border-bottom-color: currentColor; }

/* Front editable content */
.sg-front-content { padding: 4rem 0; }

/* =============================== FOOTER ================================= */
.sg-footer { position: relative; overflow: hidden; background: var(--sg-fg); color: var(--sg-bg); padding: 4rem 0 2rem; }
@media (min-width: 1024px) { .sg-footer { padding: 6rem 0 2rem; } }
.sg-footer__deco { position: absolute; right: -1.5rem; top: 0; font-family: var(--sg-font-serif); font-weight: 700; font-size: 15rem; line-height: 1; opacity: 0.08; pointer-events: none; }
.sg-footer__grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .sg-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.sg-footer__lead { margin: 1rem 0 0; max-width: 24rem; font-size: 0.88rem; line-height: 1.8; color: rgba(253,252,242,0.6); }
.sg-footer__heading { margin: 0 0 1rem; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(253,252,242,0.4); }
.sg-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.sg-footer__menu a { font-size: 0.9rem; color: rgba(253,252,242,0.7); }
.sg-footer__menu a:hover { color: var(--sg-bg); }
.sg-footer__contact { font-size: 0.9rem; color: rgba(253,252,242,0.7); display: flex; flex-direction: column; gap: 0.75rem; }
.sg-footer__contact a:hover { color: var(--sg-bg); }
.sg-footer__heading--follow { margin-top: 2rem; }
.sg-footer__social { display: flex; gap: 0.75rem; }
.sg-footer__social a {
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(253,252,242,0.25);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 0.8rem; font-weight: 600; color: rgba(253,252,242,0.7);
	transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.sg-footer__social a:hover { border-color: var(--sg-accent); background: rgba(253,252,242,0.08); color: var(--sg-bg); }
.sg-footer__owner { margin: 1rem 0 0; font-size: 0.82rem; color: rgba(253,252,242,0.5); }
.sg-footer__owner a { margin-left: 0.5em; color: rgba(253,252,242,0.7); border-bottom: 1px solid rgba(253,252,242,0.25); }
.sg-footer__owner a:hover { color: var(--sg-bg); border-bottom-color: currentColor; }
.sg-footer__bottom {
	position: relative; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid rgba(253,252,242,0.1);
	display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between;
}
@media (min-width: 1024px) { .sg-footer__bottom { flex-direction: row; } }
.sg-footer__copy { margin: 0; font-size: 0.75rem; color: rgba(253,252,242,0.4); }
.sg-footer__sub-links { display: flex; gap: 1.5rem; font-size: 0.75rem; }
.sg-footer__sub-links a { color: rgba(253,252,242,0.4); }
.sg-footer__sub-links a:hover { color: rgba(253,252,242,0.7); }

/* ========================= Sub-page layout =============================== */
.sg-page-header {
	position: relative;
	background: var(--sg-secondary);
	padding: 3rem 0;
	margin-bottom: 3rem;
	overflow: hidden;
}
.sg-page-header::after {
	content: ""; position: absolute; right: 0; top: 0; height: 100%; width: 40%;
	background: rgba(244,205,69,0.18);
	clip-path: polygon(35% 0, 100% 0, 100% 100%, 0% 100%);
}
.sg-breadcrumb { position: relative; z-index: 1; font-size: 0.78rem; color: var(--sg-muted-fg); margin-bottom: 0.75rem; }
.sg-breadcrumb a:hover { color: var(--sg-accent); }
.sg-breadcrumb__sep { margin: 0 0.4rem; }
.sg-breadcrumb__current { color: var(--sg-fg-70); }
.sg-page-title { position: relative; z-index: 1; margin: 0; font-family: var(--sg-font-serif); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 600; }

.sg-article-wrap { padding-bottom: 5rem; }
.sg-article { font-size: 1rem; line-height: 1.9; }
.sg-article > * + * { margin-top: 1.4em; }
.sg-article h2 {
	font-family: var(--sg-font-serif); font-size: 1.7rem; font-weight: 600;
	margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--sg-primary);
}
.sg-article h3 { font-family: var(--sg-font-serif); font-size: 1.3rem; font-weight: 600; margin: 2rem 0 0.75rem; border-left: 4px solid var(--sg-accent); padding-left: 0.75rem; }
.sg-article h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.sg-article a { color: var(--sg-accent); text-decoration: underline; text-underline-offset: 2px; }
.sg-article a:hover { color: var(--sg-fg); }
.sg-article ul, .sg-article ol { padding-left: 1.5rem; }
.sg-article li { margin-top: 0.4em; }
.sg-article img { border-radius: var(--sg-radius); }

/* 什器・備品ページ: 什器写真の表示サイズを揃える。
   画像自体も 4:3 の 1200x900 に統一してあるが、写真待ちのプレースホルダーや
   後から別サイズの画像を差し込んだ場合でも段が崩れないよう、ここでも固定する。 */
.sg-page-equipment .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	object-position: center;
}
.sg-article blockquote {
	margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--sg-primary);
	background: var(--sg-muted); border-radius: 0 var(--sg-radius) var(--sg-radius) 0; color: var(--sg-fg-70);
}
.sg-article__thumb { margin-bottom: 2rem; }
.sg-post-meta { position: relative; z-index: 1; margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--sg-muted-fg); }

/* WP block buttons */
.sg-article .wp-block-button__link {
	display: inline-block; background: var(--sg-fg); color: var(--sg-bg);
	padding: 0.85rem 1.6rem; border-radius: var(--sg-radius); text-decoration: none; font-weight: 500;
}
.sg-article .wp-block-button__link:hover { background: #000; color: var(--sg-bg); }

/* ========================= TablePress ================================== */
.sg-article .tablepress { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 0.95rem; }
.sg-article .tablepress th { background: var(--sg-fg); color: var(--sg-bg); font-weight: 500; }
.sg-article .tablepress th, .sg-article .tablepress td { border: 1px solid var(--sg-border); padding: 0.75rem 1rem; }
.sg-article .tablepress tbody tr:nth-child(even) td { background: var(--sg-muted); }
/* 既存 .tablepress-id-2 のセル縦中央指定意図を踏襲 */
.sg-article .tablepress-id-2 tbody td { vertical-align: middle; }
.sg-article .tablepress-id-2 tbody td > p { margin: 0; }

/* ========================= MW WP Form =================================== */
.sg-article .mw_wp_form { margin-top: 1rem; }
.sg-article .mw_wp_form input[type="text"],
.sg-article .mw_wp_form input[type="email"],
.sg-article .mw_wp_form input[type="tel"],
.sg-article .mw_wp_form input[type="url"],
.sg-article .mw_wp_form input[type="number"],
.sg-article .mw_wp_form input[type="date"],
.sg-article .mw_wp_form select,
.sg-article .mw_wp_form textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	background: var(--sg-card);
	font-family: inherit;
	font-size: 1rem;
	color: var(--sg-fg);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sg-article .mw_wp_form input:focus,
.sg-article .mw_wp_form select:focus,
.sg-article .mw_wp_form textarea:focus {
	outline: none;
	border-color: var(--sg-accent);
	box-shadow: 0 0 0 3px rgba(74,53,16,0.18);
}
.sg-article .mw_wp_form textarea { min-height: 9rem; resize: vertical; }
.sg-article .mw_wp_form .mwform-checkbox-field,
.sg-article .mw_wp_form .mwform-radio-field { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 1rem; }
.sg-article .mw_wp_form input[type="submit"],
.sg-article .mw_wp_form button[type="submit"] {
	background: var(--sg-fg); color: var(--sg-bg); border: none; cursor: pointer;
	padding: 0.9rem 2.5rem; border-radius: var(--sg-radius); font-size: 0.95rem; font-weight: 500;
	transition: background 0.25s ease, transform 0.25s ease;
}
.sg-article .mw_wp_form input[type="submit"]:hover,
.sg-article .mw_wp_form button[type="submit"]:hover { background: #000; transform: translateY(-1px); }
.sg-article .mw_wp_form .error { color: #c0392b; font-size: 0.85rem; }
.sg-article .mwform-confirm input[type="submit"] { background: var(--sg-accent); }
/* 確認画面の「入力内容を修正する」。送信ボタンと同じ塗りだと押し間違えるので、
   輪郭だけにして主役を送信ボタンに残す。この規則は上の mwform-confirm と
   詳細度が同じなので、必ず後ろに置くこと。 */
.sg-article .mw_wp_form input[name="submitBack"] {
	background: transparent;
	color: var(--sg-fg);
	border: 1px solid rgba(33,30,22,0.25);
	margin: 0 0.75rem 0.75rem 0;
}
.sg-article .mw_wp_form input[name="submitBack"]:hover {
	background: transparent;
	border-color: var(--sg-accent);
	color: var(--sg-accent);
	transform: translateY(-1px);
}

/* form タグ周りの簡易テーブルレイアウト（MW WP Form の table 構成にも対応） */
.sg-article .mw_wp_form table { width: 100%; }
.sg-article .mw_wp_form th { text-align: left; vertical-align: top; padding-top: 0.9rem; white-space: nowrap; }

/* ========================= xo-event-calendar =========================== */
.sg-article .xo-event-calendar-wrap { margin: 1.5rem 0; }
.sg-article .xo-event-calendar { width: 100%; border-collapse: collapse; }
.sg-article .xo-event-calendar caption { font-family: var(--sg-font-serif); font-size: 1.2rem; font-weight: 600; padding: 0.5rem 0 1rem; }
.sg-article .xo-event-calendar th { background: var(--sg-fg); color: var(--sg-bg); padding: 0.5rem; font-weight: 500; border: 1px solid var(--sg-border); }
.sg-article .xo-event-calendar td { border: 1px solid var(--sg-border); padding: 0.4rem; height: 5.5rem; vertical-align: top; }
.sg-article .xo-event-calendar td.xo-sunday, .sg-article .xo-event-calendar th.xo-sunday { color: #c0392b; }
.sg-article .xo-event-calendar td.xo-saturday, .sg-article .xo-event-calendar th.xo-saturday { color: #2b6cb0; }
.sg-article .xo-event-calendar td.xo-today { background: rgba(244,205,69,0.25); }
.sg-article .xo-event-calendar .xo-event-title, .sg-article .xo-event-calendar a { color: var(--sg-accent); font-size: 0.78rem; }
.sg-article .xo-event-calendar-prev, .sg-article .xo-event-calendar-next { color: var(--sg-fg); }

/* ========================= PDF / misc embeds =========================== */
.sg-article .pdfemb-viewer { border: 1px solid var(--sg-border); border-radius: var(--sg-radius); }
.sg-article iframe { max-width: 100%; border-radius: var(--sg-radius); }

/* ========================= Download Manager ============================ */
/* WPDM はファイル数・サイズの前に <i class="fas fa-copy"> などを出すが、
   テーマは Font Awesome を読み込んでいないので何も描画されない。
   プラグイン側から消すとアップデートで戻るのでここで潰す。
   display:none にしないのは、2つめのアイコンが持つ ml-3（項目間の余白）を
   残すため。幅0にすればアイコンは消えて区切りだけ残る。 */
.w3eden i[class*="fa-"],
.link-template-default i[class*="fa-"] {
	display: inline-block;
	width: 0;
	overflow: hidden;
}

/* WPDM のダウンロードカードは flex-wrap:nowrap のまま横並びを維持しようとする。
   ダウンロードボタン（118px）が幅を譲らないので、スマホでは題名欄が 320px 幅で
   32px まで潰れ、タイトルが1文字ずつ縦に折り返す（実測）。
   狭い画面ではボタンだけ次の行に落とす。 */
@media (max-width: 600px) {
	.sg-article .link-template-default .media { flex-wrap: wrap; }
	.sg-article .link-template-default .media > .media-body { flex: 1 1 auto; min-width: 0; }
	.sg-article .link-template-default .media > .ml-3 { flex: 1 0 100%; margin: 0.75rem 0 0; }
}

/* ============================ 404 ====================================== */
.sg-404 { text-align: center; padding-top: 1rem; }
.sg-404__lead { margin-bottom: 2rem; color: var(--sg-fg-70); }

/* ============================ Pagination =============================== */
.sg-pagination { display: flex; justify-content: center; margin-top: 3rem; }
.sg-pagination .page-numbers { padding: 0.5rem 0.9rem; border: 1px solid var(--sg-border); border-radius: var(--sg-radius); margin: 0 0.2rem; }
.sg-pagination .page-numbers.current { background: var(--sg-fg); color: var(--sg-bg); border-color: var(--sg-fg); }

/* ============================ Reveal anim ============================== */
/* 隠す指定は .sg-js（header.php が JS で付ける）配下に限定する。
   is-visible を付けるのは JS なので、スクリプトが落ちた状態でここを無条件に
   opacity:0 にすると、本文が二度と表示されず真っ白なページになる。 */
.sg-js .sg-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.sg-js .sg-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.sg-js .sg-reveal { opacity: 1; transform: none; transition: none; }
	.sg-hero__scroll-arrow { animation: none; }
	.sg-hero__text .sg-eyebrow, .sg-hero__title, .sg-hero__lead, .sg-hero__scroll, .sg-hero__image-wrap, .sg-hero__badge { animation: none; opacity: 1; transform: none; }
	html { scroll-behavior: auto; }
}

/* ============================ Keyframes ================================ */
@keyframes sg-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes sg-hero-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes sg-hero-left { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes sg-hero-right { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes sg-hero-scale { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }

/* WordPress admin bar offset */
.admin-bar .sg-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sg-header { top: 46px; } }

/* ===================== 投稿一覧 / 検索結果（index.php / search.php） ======== */
.sg-post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.75rem; }
.sg-post-card { background: var(--sg-card); border: 1px solid var(--sg-border); border-radius: var(--sg-radius); overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.sg-post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(33,30,22,0.1); }
.sg-post-card__link { display: block; color: inherit; text-decoration: none; }
.sg-post-card__thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.sg-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-post-card__title { font-family: var(--sg-font-serif); font-size: 1.15rem; font-weight: 600; margin: 1rem 1.1rem 0.5rem; }
.sg-post-card__excerpt { font-size: 0.9rem; color: var(--sg-fg-70); margin: 0 1.1rem 1.2rem; }
.sg-no-content { padding: 2rem 0; color: var(--sg-fg-70); }

.sg-search-count { color: var(--sg-muted-fg); font-size: 0.9rem; margin-top: 0.5rem; }
.sg-search-form-wrap { margin-bottom: 2.5rem; }
.sg-searchform { display: flex; gap: 0.5rem; max-width: 520px; }
.sg-searchform__label { flex: 1; }
.sg-searchform__input { width: 100%; padding: 0.7rem 1rem; border: 1px solid var(--sg-border); border-radius: var(--sg-radius); background: var(--sg-card); font-family: inherit; font-size: 1rem; }
.sg-searchform__input:focus { outline: none; border-color: var(--sg-accent); box-shadow: 0 0 0 3px rgba(74,53,16,0.2); }
.sg-searchform__submit { padding: 0.7rem 1.5rem; border: none; border-radius: var(--sg-radius); background: var(--sg-fg); color: var(--sg-bg); font-family: inherit; font-size: 0.95rem; cursor: pointer; transition: background 0.2s ease; }
.sg-searchform__submit:hover { background: #000; }

/* =============================================================================
 * Cocoon 互換クラス（旧 Cocoon 親テーマ定義の移植）
 *  既存コンテンツ本文（スケジュール / xo_event 等）が Cocoon 親テーマで定義された
 *  文字色・文字サイズクラスを使用しているため、Cocoon 削除後も見た目を保つ目的で
 *  .sg-article スコープに同等定義を持たせる。値は Cocoon の定義に一致させている。
 *    色: --cocoon-red #e60033 / blue #0095d9 / green #3eb370 / pink #e95295 / yellow #ffd900
 * ========================================================================== */
.sg-article .red { color: #e60033; }
.sg-article .bold-red { font-weight: 700; color: #e60033; }
.sg-article .blue { color: #0095d9; }
.sg-article .bold-blue { font-weight: 700; color: #0095d9; }
.sg-article .green { color: #3eb370; }
.sg-article .bold-green { font-weight: 700; color: #3eb370; }
.sg-article .pink { color: #e95295; }
.sg-article .yellow { color: #ffd900; }
.sg-article .red-under { border-bottom: 2px solid #e60033; }

.sg-article .fz-10px { font-size: 10px; }
.sg-article .fz-11px { font-size: 11px; }
.sg-article .fz-12px { font-size: 12px; }
.sg-article .fz-13px { font-size: 13px; }
.sg-article .fz-14px { font-size: 14px; }
.sg-article .fz-15px { font-size: 15px; }
.sg-article .fz-16px { font-size: 16px; }
.sg-article .fz-17px { font-size: 17px; }
.sg-article .fz-18px { font-size: 18px; }
.sg-article .fz-19px { font-size: 19px; }
.sg-article .fz-20px { font-size: 20px; }
.sg-article .fz-21px { font-size: 21px; }
.sg-article .fz-22px { font-size: 22px; }
.sg-article .fz-24px { font-size: 24px; }
.sg-article .fz-26px { font-size: 26px; }
.sg-article .fz-28px { font-size: 28px; }
.sg-article .fz-32px { font-size: 32px; }
.sg-article .fz-36px { font-size: 36px; }
.sg-article .fz-40px { font-size: 40px; }
.sg-article .fz-44px { font-size: 44px; }
.sg-article .fz-48px { font-size: 48px; }
.sg-article .fz-50px { font-size: 50px; }

/* =============================================================================
 * Lightbox（本文内の画像リンク用オーバーレイ）
 * ========================================================================== */
.sg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1rem;
	background: rgba(0, 0, 0, 0.85);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	animation: sg-lightbox-in 0.2s ease;
}
.sg-lightbox[hidden] { display: none; }

@keyframes sg-lightbox-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.sg-lightbox__figure {
	margin: 0;
	max-width: 92vw;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}
.sg-lightbox__img {
	max-width: 92vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
	border-radius: 4px;
	background: #fff;
}
.sg-lightbox__cap {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.85rem;
	text-align: center;
	max-width: 80vw;
}

.sg-lightbox__close,
.sg-lightbox__nav {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	line-height: 1;
}
.sg-lightbox__close:hover,
.sg-lightbox__nav:hover { background: rgba(255, 255, 255, 0.28); }

.sg-lightbox__close {
	top: 1rem;
	right: 1rem;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 1.8rem;
}
.sg-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 64px;
	border-radius: 6px;
	font-size: 2.4rem;
}
.sg-lightbox__nav--prev { left: 1rem; }
.sg-lightbox__nav--next { right: 1rem; }

@media (max-width: 640px) {
	.sg-lightbox__nav { width: 40px; height: 52px; font-size: 1.8rem; }
	.sg-lightbox__nav--prev { left: 0.4rem; }
	.sg-lightbox__nav--next { right: 0.4rem; }
}
