/* 自動生成（src3d/build-journey-css.py）。直接編集しない：WordPress 用の調整は src3d/journey-wp.css へ */
:root {
  --sumi: #191919;
  --sumi-2: #2a2724;
  --vermilion: #b83b32;
  --vermilion-dark: #8f2b24;
  --gold: #c5a46d;
  --gold-soft: #e3d2ad;
  --washi: #f5f0e6;
  --washi-2: #ebe3d3;
  --indigo: #253c56;
  --bamboo: #697b57;
  --ink: #1f1d1a;
  --ink-soft: #5a5348;
  --line: #d9cfbd;
  --focus: #1d6fd6;

  --font-noto-sans: 'Noto Sans JP';
  --font-noto-serif: 'Noto Serif JP';
  --font-serif: var(--font-noto-serif), 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-sans: var(--font-noto-sans), 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;

  --radius: 4px;
  --shadow: 0 10px 30px rgba(25, 25, 25, 0.12);
  --wrap: 1180px;
  --header-h: 78px;
}

/* ─── Buttons ─── */
.journey .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 48px; padding: 0.7em 1.5em;
  border-radius: var(--radius); font-weight: 700; text-decoration: none; letter-spacing: 0.08em; border: 1px solid transparent;
  cursor: pointer; font-size: 1rem; font-family: var(--font-sans); transition: background 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.journey .btn:hover { transform: translateY(-1px); }
.journey .btn-primary { background: var(--vermilion); color: #fff; }
.journey .btn-primary:hover { background: var(--vermilion-dark); color: #fff; }
.journey .btn-indigo { background: var(--indigo); color: #fff; }
.journey .btn-indigo:hover { background: #1a2c40; color: #fff; }
.journey .btn-ghost { background: rgba(245, 240, 230, 0.08); color: var(--washi); border-color: rgba(245, 240, 230, 0.6); backdrop-filter: blur(4px); }
.journey .btn-ghost:hover { background: var(--washi); color: var(--sumi); }
.journey .btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.journey .btn-outline:hover { background: var(--ink); color: var(--washi); }
.journey .btn-sm { min-height: 40px; padding: 0.45em 1em; font-size: 0.9rem; }
.journey .btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ─── Job cards ─── */
.job-card { background: #fffdf8; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.job-card h3 { font-size: 1.05rem; margin: 0; }
.job-card h3 a { color: var(--ink); text-decoration: none; }
.job-card h3 a::after { content: ''; position: absolute; inset: 0; }
.job-card h3 a:hover { color: var(--vermilion); }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.88rem; color: var(--ink-soft); margin: 0; padding: 0; list-style: none; }
.job-meta strong { color: var(--ink); }
.tag { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; background: var(--washi-2); color: var(--ink); border: 1px solid var(--line); }
.tag-red { background: var(--vermilion); color: #fff; border-color: var(--vermilion); }
.job-salary { font-weight: 700; color: var(--vermilion); font-size: 1.05rem; }

/* ─── トップページ（3D ジャーニー） ─── */
.journey { position: relative; isolation: isolate; color: var(--washi); }

/* 3D 舞台：画面固定・本文の背面 */
.gs-stage { position: fixed; inset: 0; z-index: -1; background: var(--sumi); }
.gs-stage canvas, .gs-stage .gs-canvas { position: absolute !important; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.gs-stage[data-ready='true'] canvas, .gs-stage[data-ready='true'] .gs-canvas { opacity: 1; }
.gs-stage[data-mode='static'] { display: none; }

/* 即時表示のポスター（3D 読み込み前・LCP 用、画像ファイル不要） */
.gs-poster {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 214, 160, 0.85) 0 5%, rgba(255, 180, 120, 0.35) 12%, transparent 30%),
    linear-gradient(180deg, #24324a 0%, #6b5a6e 38%, #e8a27c 62%, #3a2a24 63%, #2a201c 100%);
}
.gs-poster::before { /* 山並み */
  content: ''; position: absolute; left: 0; right: 0; top: 40%; height: 24%;
  background: linear-gradient(180deg, transparent, rgba(40, 46, 66, 0.6));
  clip-path: polygon(0 70%, 8% 40%, 16% 62%, 26% 22%, 36% 58%, 46% 35%, 55% 60%, 66% 18%, 76% 52%, 86% 30%, 100% 60%, 100% 100%, 0 100%);
}
.gs-poster::after { /* 門と町並みのシルエット */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 52%;
  background: #1c1512;
  clip-path: polygon(0 40%, 6% 30%, 12% 40%, 12% 45%, 20% 34%, 28% 45%, 28% 48%, 36% 38%, 38% 40%, 38% 8%, 41% 8%, 41% 4%, 59% 4%, 59% 8%, 62% 8%, 62% 40%, 64% 38%, 72% 48%, 72% 45%, 80% 34%, 88% 45%, 88% 40%, 94% 30%, 100% 40%, 100% 100%, 0 100%, 0 40%, 43% 100%, 43% 18%, 57% 18%, 57% 100%);
}
.gs-stage[data-ready='true'] .gs-poster { opacity: 0; transition: opacity 1.2s ease 0.3s; }

/* 進行バー・シーンナビ・操作 */
.gs-progress { position: fixed; top: var(--header-h); left: 0; right: 0; height: 3px; z-index: 40; background: rgba(255, 255, 255, 0.08); }
.gs-progress div { height: 100%; background: linear-gradient(90deg, var(--vermilion), var(--gold)); transform-origin: 0 50%; transform: scaleX(0); }
.scene-nav { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 30; }
.scene-nav ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.scene-nav a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 30px; text-decoration: none; color: var(--washi); flex-direction: row-reverse; }
.scene-nav .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(25, 25, 25, 0.5); transition: transform 0.3s, background 0.3s; flex: none; }
.scene-nav .label { font-size: 0.75rem; opacity: 0; transform: translateX(6px); transition: opacity 0.25s, transform 0.25s; background: rgba(25, 25, 25, 0.75); padding: 2px 8px; border-radius: 2px; white-space: nowrap; }
.scene-nav a:hover .label, .scene-nav a:focus-visible .label, .scene-nav a[aria-current] .label { opacity: 1; transform: none; }
.scene-nav a[aria-current] .dot { background: var(--vermilion); border-color: var(--vermilion); transform: scale(1.35); }
.a11y-controls { position: fixed; left: 16px; bottom: 16px; z-index: 30; }
@media (max-width: 900px) {
  .scene-nav { display: none; }
  .a11y-controls { bottom: auto; top: calc(var(--header-h) + 10px); left: auto; right: 8px; }
  .a11y-controls .btn { font-size: 0.7rem; min-height: 34px; padding: 0.25em 0.7em; background: rgba(25, 25, 25, 0.6); }
}

/* シーン共通 */
.scene { position: relative; min-height: 170vh; padding: 10vh 0 20vh; pointer-events: none; display: flex; flex-direction: column; }
.scene a, .scene button, .scene input, .scene select, .scene .panel, .scene .hero-copy, .scene .finale-copy { pointer-events: auto; }
.scene-inner { position: relative; flex: 1; width: min(100% - 32px, var(--wrap)); }
.scene .panel {
  position: sticky; top: calc(var(--header-h) + 5vh); max-width: 500px;
  background: rgba(22, 20, 18, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(197, 164, 109, 0.35); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.scene-right .panel { margin-left: auto; margin-right: 40px; }
.scene .panel .eyebrow { color: var(--gold); }
.scene .panel p { color: #e8e0d0; }
.scene .panel a:not(.btn) { color: var(--gold-soft); }
.scene .panel a:not(.btn):hover { color: #fff; }
.small { font-size: 0.85rem; }
.scene .small { color: #cfc6b5 !important; }
.small-h { font-size: 1rem; color: var(--gold); margin-top: 1.2em; }

/* 第一景：ヒーロー */
.scene-gate { min-height: 190vh; padding-top: 0; }
.hero-copy { position: sticky; top: calc(var(--header-h) + 9vh); max-width: 680px; padding: 24px 0; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.hero-eyebrow { color: var(--gold-soft) !important; font-size: 0.78rem; }
.hero-brand { font-family: var(--font-serif); font-size: clamp(1.1rem, 0.9rem + 1vw, 1.5rem); letter-spacing: 0.35em; margin: 0 0 18px; color: var(--washi); }
.hero-brand span { display: block; font-size: 0.8rem; letter-spacing: 0.2em; color: var(--gold-soft); margin-top: 6px; }
.hero-title { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.8rem); line-height: 1.35; margin-bottom: 0.4em; color: #fff; }
.hero-lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: #f3ead9; max-width: 34em; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-ctas .btn { min-width: 220px; }
.hero-skip { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.85rem; }
.hero-skip a { color: var(--gold-soft); }
.scroll-hint { position: sticky; top: 88vh; text-align: center; font-size: 0.75rem; letter-spacing: 0.3em; color: var(--washi-2); margin: 0; }
.scroll-hint::after { content: ''; display: block; width: 1px; height: 36px; margin: 8px auto 0; background: linear-gradient(var(--gold), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint::after { animation: hint 2s ease-in-out infinite; }
  @keyframes hint { 0%, 100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); } }
}

/* 第二景：サービス選択 */
.svc-list { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.svc-list button {
  width: 100%; min-height: 44px; border: 1px solid rgba(197, 164, 109, 0.5); background: rgba(255, 255, 255, 0.04); color: var(--washi);
  font-family: var(--font-serif); font-weight: 700; font-size: 0.92rem; border-radius: 2px; cursor: pointer; padding: 6px;
}
.svc-list button[aria-pressed='true'] { background: var(--vermilion); border-color: var(--vermilion); }
.svc-list button:hover { border-color: var(--gold); }
.washi-panel {
  background: #f6efe0; color: var(--ink); border-radius: 2px; padding: 18px 20px; position: relative;
  background-image: radial-gradient(rgba(150, 120, 80, 0.12) 1px, transparent 1px); background-size: 5px 5px;
  box-shadow: inset 0 0 0 1px #d8c9a8, 0 8px 20px rgba(0, 0, 0, 0.3);
}
.washi-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--vermilion); }
.washi-panel h3 { margin: 0 0 6px; font-size: 1.3rem; }
.scene .panel .washi-panel p { color: var(--ink); }
.washi-tag { font-family: var(--font-serif); color: var(--vermilion) !important; font-size: 0.85rem; margin: 4px 0; }
.svc-sub { font-size: 0.82rem; margin: 12px 0 0; }

/* 第三景 */
.role-list { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.role-list li::before { content: '◆ '; color: var(--vermilion); font-size: 0.7em; }

/* 第四景 */
.quick-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.quick-search input, .quick-search select { min-height: 44px; border-radius: 2px; border: 1px solid #b9ad97; padding: 8px 10px; font: inherit; }
.quick-search input { grid-column: 1 / -1; }
.solid-block { position: relative; background: var(--washi); color: var(--ink); padding: 64px 0; border-top: 4px solid var(--vermilion); }
.block-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.block-head h2 { margin: 0; }

/* 第五景 */
.bridge-steps { list-style: none; counter-reset: st; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.bridge-steps li { counter-increment: st; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; padding: 8px 10px; border-left: 2px solid rgba(197, 164, 109, 0.35); transition: background 0.3s, border-color 0.3s; }
.bridge-steps li::before { content: counter(st); grid-row: span 2; font-family: var(--font-serif); font-size: 1.3rem; color: var(--gold); }
.bridge-steps strong { color: #fff; }
.bridge-steps span { font-size: 0.85rem; color: #d4cbb9; }
.bridge-steps li[data-done] { border-left-color: var(--gold); }
.bridge-steps li[data-active] { background: rgba(184, 59, 50, 0.3); border-left-color: var(--vermilion); }

/* 第六景 */
.office-list { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.office-list button { width: 100%; min-height: 48px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(197, 164, 109, 0.45); color: var(--washi); cursor: pointer; border-radius: 2px; font-size: 0.8rem; line-height: 1.3; padding: 4px; }
.office-list button small { display: block; font-size: 0.68rem; color: var(--gold-soft); }
.office-list button[aria-pressed='true'] { background: var(--indigo); border-color: var(--gold); }
.office-detail { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(197, 164, 109, 0.35); padding: 14px 16px; border-radius: 2px; }
.office-detail h3 { margin: 0 0 4px; font-size: 1.1rem; }
.office-detail p { margin: 0 0 6px; font-size: 0.88rem; }
.office-detail .cov { color: #cfc6b5 !important; }

/* 第七景 */
.scene-finale { min-height: 190vh; }
.finale-copy { position: sticky; top: calc(var(--header-h) + 6vh); text-align: center; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5); }
.finale-title { font-size: clamp(1.8rem, 1.1rem + 3vw, 3.3rem); color: #fff; }
.finale-brand { font-family: var(--font-serif); letter-spacing: 0.5em; color: var(--gold-soft); margin-bottom: 28px; }
.finale-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; max-width: 860px; margin: 0 auto; text-shadow: none; }
.path-card { background: rgba(22, 20, 18, 0.8); backdrop-filter: blur(8px); border: 1px solid rgba(197, 164, 109, 0.45); padding: 24px; border-radius: var(--radius); text-align: left; }
.path-card h3 { color: var(--gold-soft); }
.path-card p { color: #e5dccb; font-size: 0.92rem; }
.path-card .tel { margin: 12px 0 0; }
.path-card .tel a { color: #fff; font-weight: 700; }

/* 静的モード（WebGL 非対応・モーション軽減・3D オフ） */
html[data-home3d='static'] .scene { min-height: auto; padding: 72px 0; }
html[data-home3d='static'] .scene .panel, html[data-home3d='static'] .hero-copy, html[data-home3d='static'] .finale-copy { position: static; }
html[data-home3d='static'] .scroll-hint { display: none; }
html[data-home3d='static'] .scene[data-theme='dawn'] { background: radial-gradient(circle at 70% 70%, rgba(241, 177, 132, 0.45), transparent 50%), linear-gradient(170deg, #24324a, #5b4a5a 60%, #2a201c); }
html[data-home3d='static'] .scene[data-theme='morning'] { background: linear-gradient(170deg, #3b4c63, #6b5a48); }
html[data-home3d='static'] .scene[data-theme='forge'] { background: radial-gradient(circle at 20% 70%, rgba(255, 122, 42, 0.35), transparent 45%), linear-gradient(170deg, #2a1f1c, #1d2733); }
html[data-home3d='static'] .scene[data-theme='noon'] { background: linear-gradient(170deg, #4a5f78, #6b5a48); }
html[data-home3d='static'] .scene[data-theme='day'] { background: linear-gradient(170deg, #3d556e, #8f2b24 160%); }
html[data-home3d='static'] .scene[data-theme='dusk'] { background: linear-gradient(170deg, #111a2a, #2f4260); }
html[data-home3d='static'] .scene[data-theme='golden'] { background: radial-gradient(circle at 50% 80%, rgba(243, 157, 82, 0.55), transparent 55%), linear-gradient(170deg, #3b4a78, #2a201c); }
html[data-home3d='static'] .gs-progress { display: none; }
/* 3D 判定前（JS 無効を含む）も読める配色にしておく */
html:not([data-home3d]) .journey { background: linear-gradient(170deg, #24324a, #2a201c); }
html:not([data-home3d]) .scene { min-height: auto; padding: 72px 0; }
html:not([data-home3d]) .scene .panel, html:not([data-home3d]) .hero-copy, html:not([data-home3d]) .finale-copy { position: static; }

@media (max-width: 900px) {
  /* スマホ：解説パネルは通常スクロール。パネルの後に約80vhの「3Dの窓」を設け、読む→見るを交互に */
  .scene { min-height: auto; padding: 56px 0 82vh; }
  .scene-gate { min-height: 100vh; padding: 0 0 70vh; }
  .scene-finale { min-height: auto; padding: 40vh 0 12vh; }
  .scene .panel { padding: 18px; max-width: none; position: relative; top: 0; }
  .hero-copy, .finale-copy { position: relative; top: 0; }
  .hero-copy { padding-top: 48px; }
  .scroll-hint { display: none; }
  .scene-right .panel { margin-right: 0; }
  .svc-list { grid-template-columns: repeat(2, 1fr); }
  .office-list { grid-template-columns: repeat(3, 1fr); }
  .role-list { grid-template-columns: 1fr; }
  .hero-ctas .btn { min-width: 0; flex: 1 1 100%; }
  .scene .panel > p:not(.eyebrow):not(.small) { font-size: 0.92rem; }
}

/* ─── WordPress（GS Home Refresh）版の調整 ─── */
:root:lang(vi) { --font-noto-sans: 'Noto Sans'; --font-noto-serif: 'Noto Serif'; }
html { font-size: 16px; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body.gshr-journey { margin: 0; background: var(--sumi); }
.gsj { background: var(--sumi); }
/* 3D 舞台（position: fixed）がフッターに重ならないよう、フッターを前面に */
.gsj .gshr-footer { position: relative; z-index: 1; }
.journey { font-family: var(--font-sans); line-height: 1.85; letter-spacing: 0.02em; font-feature-settings: 'palt' 1; }
.journey p { margin: 0 0 1em; }
.journey h1, .journey h2, .journey h3, .journey h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.45; letter-spacing: 0.04em; margin: 0 0 0.6em; }
.journey h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
.journey h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); }
.journey h3 { font-size: 1.2rem; }
.journey a { color: var(--gold-soft); text-underline-offset: 3px; }
.journey :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.journey canvas { display: block; max-width: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.journey .wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.journey .eyebrow { font-family: var(--font-serif); color: var(--vermilion); font-size: 0.85rem; letter-spacing: 0.25em; margin-bottom: 0.8em; display: block; }
.journey .grid { display: grid; gap: 20px; }
.journey .grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.journey .washi-panel h3 { margin: 0 0 6px; font-size: 1.3rem; }
.journey .washi-panel p { margin: 4px 0 10px; }
.journey .office-detail h3 { margin: 0 0 4px; font-size: 1.1rem; }
.journey .office-detail p { margin: 0 0 6px; }
.journey .block-head h2 { margin: 0; }
.journey .small-h { font-size: 1rem; color: var(--gold); margin-top: 1.2em; }
.journey .finale-title { font-size: clamp(1.8rem, 1.1rem + 3vw, 3.3rem); color: #fff; }
.journey .hero-title { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.8rem); line-height: 1.35; margin-bottom: 0.4em; color: #fff; }
.journey .path-card h3 { color: var(--gold-soft); }
.journey .solid-block a:not(.btn) { color: var(--indigo); }
.journey .job-card h3 a { color: var(--ink); text-decoration: none; }
.journey .job-card h3 { font-size: 1.05rem; margin: 0; }
.journey .job-salary, .journey .job-card .job-meta { margin: 0; }
.journey .btn-outline { color: var(--ink); }
.journey .btn-outline:hover { color: var(--washi); }
.journey .btn-primary, .journey .btn-indigo { color: #fff; }
.journey .btn-ghost { color: var(--washi); }
.journey .btn-ghost:hover { color: var(--sumi); }
.journey .svc-list, .journey .office-list, .journey .role-list, .journey .bridge-steps, .journey .hero-skip { margin-left: 0; }
.scene-nav a, .scene-nav a:hover { color: var(--washi); }
.office-detail p a, .path-card .tel a { color: #fff; }
.quick-search input, .quick-search select { background: #fff; color: var(--ink); width: 100%; }
.admin-bar .gs-progress { top: calc(var(--header-h) + 32px); }
@media (max-width: 900px) {
  :root { --header-h: 68px; }
}
/* 左下の「無料相談」ボタン（gs-float-cta）と重ならないよう、3D 切替ボタンをその上に */
@media (min-width: 901px) { .a11y-controls { bottom: 84px; } }
/* テーマが html/body に overflow: hidden を付けると sticky のヘッダーが効かなくなるため、clip に置き換える */
html, body.gshr-journey { overflow-x: clip !important; overflow-y: visible !important; }
/* ヘッダーの上に言語切替の細いバー（28px）が付いて一緒に追従するため、その分を足す */
:root { --header-h: 106px; }
@media (max-width: 900px) { :root { --header-h: 96px; } }
