/* =====================================================================
   受託者向けLP A-1「1周の体験」2026-10-24
   登録後の流れ（姿を選ぶ→査定→依頼を選ぶ→応募→仕事→昇格→依頼の解放）を、
   ページを読みながら自分の操作で1周できるようにする。状態は上部の冒険者カード（HUD）に残る
   ===================================================================== */

/* ---------- FVの流れる列: 下の帯に隠れないよう、余白を取って全体を見せる ---------- */
.hero { padding-bottom: clamp(80px, 9vw, 140px); }
.hero .reel img { height: clamp(110px, 11vw, 160px); }

/* ---------- 章の入口 ---------- */
.journey { position: relative; }
.j-intro { text-align: center; }
.j-intro .lead { margin-inline: auto; }
.j-intro .small { margin: 0; }

/* ---------- 冒険者カード（HUD）: 章のあいだ画面上部に留まり、選んだ姿・ランク・進み具合を見せる ---------- */
.j-hud {
  position: sticky; top: 70px; z-index: 40; width: min(760px, 100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px; border-radius: 999px;
  background: rgba(12, 13, 18, .88); border: 1px solid var(--gold-line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); backdrop-filter: blur(6px);
}
.j-hud-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; background: #2a2418; border: 1px solid var(--gold); }
.j-hud-id { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.j-hud-rank { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px; font-family: var(--num); font-size: 18px; color: #1a1206; background: #555; transition: background .4s, transform .4s; }
.j-hud-rank.on { background: radial-gradient(circle at 40% 35%, #ffe3a3, var(--gold)); }
.j-hud-rank.pop { animation: rankPop .8s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes rankPop { 40% { transform: scale(1.6) rotate(-8deg); } }
.j-hud-steps { display: flex; justify-content: flex-end; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.j-hud-steps li { padding: 4px 9px; border-radius: 999px; color: var(--ink-2); border: 1px solid transparent; white-space: nowrap; }
.j-hud-steps li.done { color: var(--gold-2); }
.j-hud-steps li.done::before { content: "✓ "; }
.j-hud-steps li.now { border-color: var(--gold); color: var(--ink); }

/* ---------- 場面 ---------- */
.j-scene .wrap { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.j-scene.rev .wrap { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.j-scene.rev .j-text { order: 2; }
.j-text .h-sec { font-size: clamp(26px, 3.2vw, 42px); }
.j-text .lead { margin-bottom: .6em; }
.j-npc { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: end; margin-top: 18px; }
.j-npc img { width: 64px; height: 80px; object-fit: cover; object-position: 50% 6%; border-radius: 10px; border: 1px solid var(--gold-line); background: #1b1a17; }
.j-npc p { position: relative; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--paper); color: var(--paper-ink); font-weight: 700; font-size: 14px; line-height: 1.6; }
.j-npc p::before { content: ""; position: absolute; left: -7px; bottom: 14px; border: 7px solid transparent; border-right-color: var(--paper); border-left: 0; }

/* 操作パネル（サービスの画面に寄せた見た目） */
.j-panel { position: relative; border-radius: 12px; background: linear-gradient(180deg, rgba(26, 24, 20, .96), rgba(12, 12, 15, .96)); border: 1px solid var(--gold-line); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); padding: clamp(16px, 2vw, 24px); }
.j-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 14px; font-family: var(--serif); font-weight: 900; color: var(--gold-2); font-size: 15px; letter-spacing: .06em; }
.j-panel-h small { font-family: var(--sans); font-weight: 500; color: var(--ink-2); font-size: 12px; letter-spacing: 0; }
.j-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 1.6em; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(180deg, #ffbf3c, var(--gold)); color: #1a1206; font: 900 16px/1 var(--sans); box-shadow: 0 4px 0 #7a5100; transition: transform .12s, box-shadow .12s, opacity .3s; }
.j-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #7a5100; }
.j-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a5100; }
.j-btn[disabled] { opacity: .35; cursor: default; transform: none; }
.j-btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); box-shadow: none; }
.j-hint { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); min-height: 1.6em; }

/* 0: 姿を選ぶ */
.j-pick { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: end; }
.j-pick-big { position: relative; aspect-ratio: 3 / 3.6; border-radius: 10px; overflow: hidden; background: radial-gradient(60% 50% at 50% 40%, rgba(221, 147, 0, .25), transparent 70%), #0b0c10; }
.j-pick-big img { position: absolute; inset: auto 0 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .6)); }
.j-pick-big img.swap { animation: avaIn .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes avaIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.j-pick-big .nm { position: absolute; left: 10px; top: 10px; padding: 2px 10px; border-radius: 4px; background: rgba(0, 0, 0, .6); font-family: var(--serif); font-weight: 900; color: var(--gold-2); }
.j-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.j-pick-grid button { aspect-ratio: 1; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #17161a; border: 1px solid rgba(255, 255, 255, .1); transition: transform .15s, border-color .2s; }
.j-pick-grid button:hover { transform: translateY(-2px); }
.j-pick-grid button[aria-pressed="true"] { border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(221, 147, 0, .45); }
.j-pick-grid img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; }

/* 1: 査定 */
.j-appraise { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #050810; }
.j-appraise video { width: 100%; height: 100%; object-fit: cover; display: block; }
.j-appraise .start { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 8, 16, .45); transition: opacity .4s; }
.j-appraise.playing .start, .j-appraise.revealed .start { opacity: 0; pointer-events: none; }
.j-result { position: absolute; inset: 0; display: grid; grid-template-columns: 34% 1fr; align-items: center; gap: 4%; padding: 5%; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(40, 26, 8, .92), rgba(16, 11, 4, .96)); }
.j-appraise.revealed .j-result { opacity: 1; animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; filter: brightness(3); } 30% { opacity: 1; filter: brightness(2); } }
.j-result .ava { height: 100%; width: 100%; object-fit: contain; object-position: bottom; }
.j-result .rk { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--gold-line); border-radius: 8px; background: rgba(0, 0, 0, .35); }
.j-result .rk span { font-size: 12px; color: var(--ink-2); }
.j-result .rk strong { display: block; font-family: var(--serif); color: var(--gold-2); font-size: clamp(16px, 1.8vw, 22px); }
.j-result .rk b { font-family: var(--serif); font-size: clamp(44px, 6vw, 76px); line-height: 1; color: var(--gold-2); text-shadow: 0 0 24px rgba(255, 196, 80, .6); }
.j-appraise.revealed .j-result .rk b { animation: slam .7s cubic-bezier(.2, .9, .3, 1.3) .25s both; }
@keyframes slam { from { transform: scale(2.6); opacity: 0; } }
.j-result ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.j-result li { padding: 4px 6px; border-radius: 4px; text-align: center; font-size: 12px; font-weight: 700; color: var(--gold-2); border: 1px solid var(--gold-line); opacity: 0; }
.j-appraise.revealed .j-result li { animation: chipIn .4s ease both; }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.j-appraise.revealed .j-result li:nth-child(1) { animation-delay: .7s; } .j-appraise.revealed .j-result li:nth-child(2) { animation-delay: .8s; }
.j-appraise.revealed .j-result li:nth-child(3) { animation-delay: .9s; } .j-appraise.revealed .j-result li:nth-child(4) { animation-delay: 1s; }
.j-appraise.revealed .j-result li:nth-child(5) { animation-delay: 1.1s; } .j-appraise.revealed .j-result li:nth-child(6) { animation-delay: 1.2s; }

/* 2: 依頼掲示板 */
.j-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.j-quest { position: relative; display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px; border-radius: 10px; cursor: pointer; color: var(--ink);
  background: #101116; border: 1px solid rgba(255, 255, 255, .1); font: inherit; transition: transform .15s, border-color .2s, box-shadow .2s; }
.j-quest:hover { transform: translateY(-3px); }
.j-quest[aria-pressed="true"] { border: 2px solid var(--gold); box-shadow: 0 0 22px rgba(221, 147, 0, .4); }
.j-quest .cat { font-size: 11px; color: #7fd3ff; }
.j-quest .tt { font-weight: 900; font-size: 14px; line-height: 1.45; min-height: 4.35em; }
.j-quest .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.j-quest .tags i { font-style: normal; font-size: 10px; padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); color: var(--ink-2); }
.j-quest .rw { font-size: 12px; color: var(--ink-2); }
.j-quest .rw b { font-family: var(--num); font-size: 20px; color: var(--gold-2); margin: 0 2px; }
.j-quest .need { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; }
.j-quest .need > span { white-space: nowrap; }
.j-quest .need > span + span { color: var(--gold-2); }
.j-quest .need b { color: var(--ink); }
.j-quest.locked { cursor: not-allowed; }
.j-quest.locked::after { content: "ランクAで解放"; position: absolute; inset: 0; display: grid; place-items: center; border-radius: 10px; background: rgba(8, 8, 12, .72); color: var(--gold-2); font-weight: 900; letter-spacing: .08em; backdrop-filter: blur(2px); }
.j-quest.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.j-quest.unlocking { animation: unlock 1.1s ease; }
@keyframes unlock { 0% { box-shadow: 0 0 0 rgba(255, 210, 120, 0); } 40% { box-shadow: 0 0 40px rgba(255, 210, 120, .9); transform: scale(1.04); } }

/* 3: 応募 → 依頼者の机 */
.j-apply { display: grid; grid-template-columns: .9fr 1.1fr; gap: 14px; align-items: start; }
.j-apply .mine .tt { font-weight: 900; font-size: 15px; line-height: 1.5; margin: 0 0 12px; }
.j-client { border-radius: 10px; background: #f4f6fb; color: #1d2433; padding: 12px; font-size: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.j-client .ch { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-weight: 900; font-size: 13px; }
.j-client .ch small { font-weight: 500; color: #6b7487; }
.j-client ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.j-client li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid #e3e7ef; }
.j-client li img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 6%; background: #dfe3ea; }
.j-client li .who { font-weight: 900; }
.j-client li .rkb { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10px; color: #2546c9; border: 1px solid #b9c6f5; }
.j-client li .meta { color: #6b7487; font-size: 11px; }
.j-client li.me { border: 2px solid var(--gold); background: #fffaf0; animation: slideIn .7s cubic-bezier(.2, .9, .3, 1.1); }
.j-client li.me[hidden] { display: none; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } }

/* 4: 仕事 */
.j-flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: f; }
.j-flow li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 11px; text-align: center; color: var(--ink-2); }
.j-flow li::before { counter-increment: f; content: counter(f); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #2a2d35; color: var(--ink-2); font-weight: 700; transition: background .3s, transform .3s; }
.j-flow li.done::before { content: "✓"; background: #1f9d55; color: #fff; }
.j-flow li.now::before { background: #2f6ee8; color: #fff; transform: scale(1.15); }
.j-work-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.j-box { padding: 12px; border-radius: 8px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; }
.j-box .k { color: var(--gold-2); font-weight: 700; font-size: 12px; }
.j-box .v { font-family: var(--num); font-size: 22px; }
.j-box .s { font-size: 12px; color: var(--ink-2); }
.j-box .s.ok { color: #49d17d; }
.j-bar { height: 8px; margin: 8px 0 4px; border-radius: 4px; background: #2a2d35; overflow: hidden; }
.j-bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--gold), #ffd37e); transition: width 1.8s ease; }
.j-stars { font-size: 22px; letter-spacing: 2px; color: #3a3d45; }
.j-stars i { font-style: normal; display: inline-block; }
.j-stars.on i { color: #ffc531; animation: star .4s cubic-bezier(.2, .9, .3, 1.5) both; }
.j-stars.on i:nth-child(2) { animation-delay: .12s; } .j-stars.on i:nth-child(3) { animation-delay: .24s; }
.j-stars.on i:nth-child(4) { animation-delay: .36s; } .j-stars.on i:nth-child(5) { animation-delay: .48s; }
@keyframes star { from { transform: scale(0) rotate(-90deg); } }
.j-toast { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: rgba(47, 110, 232, .18); border: 1px solid rgba(47, 110, 232, .5); font-size: 13px; font-weight: 700; }
.j-toast[hidden] { display: none; }

/* 5: 昇格 */
.j-rankup { display: grid; grid-template-columns: .95fr 1.05fr; gap: 16px; align-items: center; }
.j-rankup video { width: 100%; border-radius: 10px; border: 1px solid var(--gold-line); background: #0b0c10; display: block; }
.j-ladder { display: flex; gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; }
.j-ladder li { flex: 1; display: grid; place-items: center; aspect-ratio: 1; border-radius: 6px; font-family: var(--num); font-size: clamp(13px, 1.4vw, 18px); color: var(--ink-2); border: 1px solid rgba(255, 255, 255, .1); transition: all .4s; }
.j-ladder li.cur { color: #1a1206; background: radial-gradient(circle at 40% 35%, #ffe3a3, var(--gold)); border-color: var(--gold); transform: scale(1.12); }
.j-new { opacity: .25; transition: opacity .6s; }
.j-new.on { opacity: 1; }
.j-new .k { margin: 0 0 8px; font-weight: 900; color: var(--gold-2); font-size: 14px; }
.j-loop { margin-top: 16px; }

/* ---------- 最終CTA: 一行が旅立つ場面をゆっくり寄せる ---------- */
body .final::before { background: var(--bg); animation: drift 30s ease-in-out infinite alternate; }
/* 背景は画面に近づいてから読み込む（JSが無いときは最初から） */
body .final.bg-in::before, html:not(.lazybg) body .final::before { background: linear-gradient(180deg, var(--bg), rgba(14, 16, 21, .55) 40%, var(--bg)), url(../assets/scenes-20261023/opt/departure-bg.webp) center / cover; }
@keyframes drift { to { transform: scale(1.08) translateY(-2%); } }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .j-scene .wrap, .j-scene.rev .wrap { grid-template-columns: 1fr; }
  .j-scene.rev .j-text { order: 0; }
  .j-hud-steps li { padding: 4px 6px; }
}
@media (max-width: 640px) {
  .j-hud { top: 58px; gap: 8px; }
  .j-hud-ava { width: 32px; height: 32px; }
  .j-hud-id .nm { display: none; }
  .j-hud-steps { font-size: 0; gap: 5px; }
  .j-hud-steps li { width: 10px; height: 10px; padding: 0; border-radius: 50%; background: #3a3d45; border: 0; }
  .j-hud-steps li.done { background: var(--gold); }
  .j-hud-steps li.done::before { content: none; }
  .j-hud-steps li.now { background: #fff; }
  .j-pick { grid-template-columns: 1fr; }
  .j-pick-big { aspect-ratio: 4 / 3; }
  .j-pick-grid { grid-template-columns: repeat(6, 1fr); }
  .j-board { grid-template-columns: 1fr; }
  .j-quest .tt { min-height: 0; }
  .j-apply, .j-work-body, .j-rankup { grid-template-columns: 1fr; }
  .j-flow li { font-size: 9px; }
  .j-result { grid-template-columns: 30% 1fr; padding: 4%; }
  .j-result ul { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body .final::before, .j-pick-big img.swap, .j-hud-rank.pop, .j-client li.me, .j-quest.unlocking, .j-quest.shake { animation: none; }
  .j-appraise.revealed .j-result, .j-appraise.revealed .j-result .rk b, .j-appraise.revealed .j-result li, .j-stars.on i { animation: none; opacity: 1; }
  .j-bar i { transition: none; }
}
.hero h1 + div { margin-top: 28px; }
