/* ========================================
   場面3〜8（逆転 / 役員報酬 / 費用 / 社会保険 / 消費税 / 選び方）
   一場面 = 一つのまとまり。共通の見出しだけ先に決める。
   🚨 どの場面も padding の下は var(--caption-space)。字幕帯のぶんを空ける
   ======================================== */

/* ── 共通：見出し ───────────────────────── */
.scene-wakareme .head,
.scene-yakuin .head,
.scene-kosuto .head,
.scene-shakaihoken .head,
.scene-shouhizei .head,
.scene-choose .head {
  display: grid;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 16px;
}
.scene-wakareme .kicker,
.scene-yakuin .kicker,
.scene-kosuto .kicker,
.scene-shakaihoken .kicker,
.scene-shouhizei .kicker,
.scene-choose .kicker {
  animation: rise 0.5s var(--ease-out) var(--cue-0) both;
}
.scene-wakareme .title,
.scene-yakuin .title,
.scene-kosuto .title,
.scene-shakaihoken .title,
.scene-shouhizei .title,
.scene-choose .title {
  font-size: 38px;
  animation: slide-right 0.6s var(--ease-out) var(--cue-0) both;
}

/* ══════ 場面3 どこかで逆転する ══════ */
.scene-wakareme {
  padding: 24px 56px var(--caption-space);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.scene-wakareme .cross-wrap {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.scene-wakareme .cross { width: 100%; max-width: 660px; height: auto; }

.scene-wakareme .axis {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  animation: fade 0.5s ease var(--cue-0) both;
}
.scene-wakareme .zone { opacity: 0; }
.scene-wakareme .zone-l {
  fill: var(--kojin-soft);
  animation: fade 0.6s ease var(--cue-1) both;
}
.scene-wakareme .zone-r {
  fill: var(--hojin-soft);
  animation: fade 0.6s ease var(--cue-2) both;
}

.scene-wakareme .l-kojin,
.scene-wakareme .l-hojin {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
}
.scene-wakareme .l-kojin {
  stroke: var(--kojin);
  animation: draw 1.3s var(--ease-out) var(--cue-0) both;
}
.scene-wakareme .l-hojin {
  stroke: var(--hojin);
  animation: draw 1.3s var(--ease-out) calc(var(--cue-0) + 0.3s) both;
}

.scene-wakareme .xpoint {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s var(--ease-pop) var(--cue-3) both;
}
.scene-wakareme .xline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-dasharray: 5 6;
  animation: fade 0.5s ease var(--cue-3) both;
}
.scene-wakareme .side-t { font-size: 19px; font-weight: 800; }
.scene-wakareme .side-l {
  fill: var(--kojin);
  animation: fade 0.5s ease calc(var(--cue-1) + 0.2s) both;
}
.scene-wakareme .side-r {
  fill: var(--hojin);
  animation: fade 0.5s ease calc(var(--cue-2) + 0.2s) both;
}

.scene-wakareme .flag {
  padding: 6px 18px;
  background: var(--night);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  border-radius: 8px;
  animation: rise 0.5s var(--ease-pop) calc(var(--cue-3) + 0.2s) both;
}
.scene-wakareme .flag-n {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 900;
}
.scene-wakareme .flag em {
  color: #b9cfd4;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
}

.scene-wakareme .caveat {
  justify-self: center;
  font-size: 25px;
  font-weight: 800;
  text-align: center;
  animation: rise 0.6s var(--ease-out) var(--cue-4) both;
}
.scene-wakareme .warnline {
  display: inline-block;
  padding: 1px 10px;
  background: var(--warn);
  color: #fff;
  font-style: normal;
  border-radius: 6px;
}

/* cue-5「家族構成や経費の中身で動きます」＝ 分かれ目そのものが動くことを、線を揺らして見せる */
@keyframes wk-sway {
  0%   { translate: 0 0; }
  30%  { translate: -34px 0; }
  70%  { translate: 30px 0; }
  100% { translate: 0 0; }
}
.scene-wakareme .xpoint,
.scene-wakareme .xline,
.scene-wakareme .flag {
  animation-fill-mode: both;
}
.scene-wakareme .xline {
  animation: fade 0.5s ease var(--cue-3) both,
             wk-sway 2.2s var(--ease-out) var(--cue-5) both;
}
.scene-wakareme .xpoint {
  animation: pop 0.5s var(--ease-pop) var(--cue-3) both,
             wk-sway 2.2s var(--ease-out) var(--cue-5) both;
}

/* ══════ 場面4 利益を、自分の給与に移せる ══════ */
.scene-yakuin {
  padding: 22px 56px var(--caption-space);
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 14px;
}

.scene-yakuin .flow {
  justify-self: center;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
}
.scene-yakuin .box {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 18px;
  border: 3px solid var(--side, var(--ink));
  border-radius: 12px;
  background: var(--side-soft, var(--paper));
}
.scene-yakuin .box svg { width: 84px; height: 66px; }
.scene-yakuin .box-t { color: var(--side); font-size: 20px; font-weight: 900; }
.scene-yakuin .box-co {
  --side: var(--hojin);
  --side-soft: var(--hojin-soft);
  animation: slide-left 0.6s var(--ease-out) var(--cue-1) both;
}
.scene-yakuin .box-me {
  --side: var(--key);
  --side-soft: var(--key-soft);
  animation: slide-right 0.6s var(--ease-out) calc(var(--cue-1) + 0.3s) both;
}
.scene-yakuin .bldg { fill: var(--hojin); }
.scene-yakuin .win2 { fill: #fff; opacity: 0.86; }
.scene-yakuin .head-c,
.scene-yakuin .body-p { fill: var(--key); }

.scene-yakuin .arrow { display: grid; justify-items: center; gap: 2px; }
.scene-yakuin .arrow svg { width: 140px; height: 40px; }
.scene-yakuin .shaft {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  animation: draw 0.7s var(--ease-out) calc(var(--cue-1) + 0.5s) both;
}
.scene-yakuin .tip {
  fill: var(--ink);
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.4s var(--ease-pop) calc(var(--cue-1) + 1.1s) both;
}
.scene-yakuin .arrow-t {
  padding: 3px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  border-radius: 6px;
  animation: pop 0.5s var(--ease-pop) var(--cue-2) both;
}

.scene-yakuin .kojo {
  justify-self: center;
  width: min(100%, 720px);
  display: grid;
  gap: 10px;
  animation: rise 0.6s var(--ease-out) var(--cue-3) both;
}
.scene-yakuin .kojo-ttl {
  justify-self: center;
  font-size: 23px;
  font-weight: 800;
}
.scene-yakuin .kojo-ttl em {
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  font-style: normal;
}
.scene-yakuin .bar {
  position: relative;
  height: 20px;
  background: var(--paper-deep);
  border-radius: 10px;
}
.scene-yakuin .bar-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--key-soft), var(--key));
  border-radius: 10px;
  transform-origin: left center;
  scale: 0 1;
  animation: draw-x 1s var(--ease-out) calc(var(--cue-3) + 0.3s) both;
}
.scene-yakuin .pin {
  position: absolute;
  top: 28px;
  display: grid;
  justify-items: center;
}
.scene-yakuin .pin b {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 900;
  color: var(--key);
}
.scene-yakuin .pin i {
  color: var(--ink-soft);
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
}
.scene-yakuin .pin-lo {
  left: 0;
  animation: rise 0.5s var(--ease-pop) var(--cue-4) both;
}
.scene-yakuin .pin-hi {
  right: 0;
  animation: rise 0.5s var(--ease-pop) var(--cue-5) both;
}

.scene-yakuin .plus-b {
  margin-right: 8px;
  padding: 1px 12px;
  background: var(--key);
  color: #fff;
  font-family: var(--font-en);
  font-weight: 900;
  border-radius: 6px;
}
.scene-yakuin .plus {
  justify-self: center;
  margin-top: 30px;
  font-size: 25px;
  font-weight: 800;
  animation: rise 0.6s var(--ease-out) var(--cue-6) both;
}

/* ══════ 場面5 持つだけで、お金がかかる ══════ */
.scene-kosuto {
  padding: 22px 56px var(--caption-space);
  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 14px;
}

.scene-kosuto .cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-content: center;
}
.scene-kosuto .col {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px 22px 16px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 14px;
}
.scene-kosuto .col-make { animation: rise 0.6s var(--ease-out) var(--cue-1) both; }
.scene-kosuto .col-keep { animation: rise 0.6s var(--ease-out) var(--cue-4) both; }

.scene-kosuto .col-ttl {
  justify-self: start;
  padding: 4px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  border-radius: 6px;
}
.scene-kosuto .rows { display: grid; gap: 8px; }
.scene-kosuto .row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 2px dotted var(--line);
}
.scene-kosuto .r-n { font-size: 21px; font-weight: 700; }
.scene-kosuto .r-v {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 900;
}
.scene-kosuto .row.is-warn .r-n,
.scene-kosuto .row.is-warn .r-v { color: var(--warn); }

.scene-kosuto .r1 { animation: slide-right 0.5s var(--ease-out) var(--cue-2) both; }
.scene-kosuto .r2 { animation: slide-right 0.5s var(--ease-out) var(--cue-3) both; }
.scene-kosuto .r3 { animation: slide-right 0.5s var(--ease-out) var(--cue-5) both; }
.scene-kosuto .r4 { animation: slide-right 0.5s var(--ease-out) var(--cue-6) both; }

.scene-kosuto .col-note {
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 700;
}
.scene-kosuto .col-make .col-note { animation: fade 0.5s ease var(--cue-3) both; }
.scene-kosuto .col-note.is-warn {
  justify-self: start;
  padding: 3px 12px;
  background: var(--warn);
  color: #fff;
  border-radius: 6px;
  animation: pop 0.5s var(--ease-pop) calc(var(--cue-5) + 0.3s) both;
}

/* ══════ 場面6 社会保険 ══════ */
.scene-shakaihoken {
  padding: 20px 56px var(--caption-space);
  display: grid;
  align-content: center;
  gap: 22px;
}

.scene-shakaihoken .versus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.scene-shakaihoken .vs {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 18px 14px;
  border: 3px solid var(--side, var(--ink));
  border-radius: 14px;
  background: var(--side-soft, var(--paper));
}
.scene-shakaihoken .vs-n { color: var(--side); font-size: 21px; font-weight: 800; }
.scene-shakaihoken .vs-v { font-size: 34px; font-weight: 900; line-height: 1.2em; }
.scene-shakaihoken .vs-s { color: var(--ink-soft); font-size: 17px; font-weight: 700; }
.scene-shakaihoken .vs-hojin {
  --side: var(--warn);
  --side-soft: #f8e6e1;
  animation: slide-left 0.6s var(--ease-out) var(--cue-1) both;
}
.scene-shakaihoken .vs-hojin .vs-v { color: var(--warn); }
.scene-shakaihoken .vs-hojin .vs-s { animation: fade 0.5s ease var(--cue-2) both; }
.scene-shakaihoken .vs-kojin {
  --side: var(--kojin);
  --side-soft: var(--kojin-soft);
  animation: slide-right 0.6s var(--ease-out) var(--cue-3) both;
}
.scene-shakaihoken .vs-kojin .vs-v { color: var(--kojin); }

.scene-shakaihoken .biggest {
  justify-self: center;
  font-size: 27px;
  font-weight: 800;
  animation: rise 0.6s var(--ease-pop) var(--cue-4) both;
}


/* ══════ 場面7 消費税は、昔と違う ══════ */
.scene-shouhizei {
  padding: 22px 56px var(--caption-space);
  display: grid;
  align-content: center;
  gap: 18px;
}

.scene-shouhizei .thenNow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 18px;
}
.scene-shouhizei .tn {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 20px 18px;
  border-radius: 14px;
}
.scene-shouhizei .tn-l {
  justify-self: start;
  padding: 3px 12px;
  font-size: 17px;
  font-weight: 800;
  border-radius: 5px;
}
.scene-shouhizei .tn-b { font-size: 24px; font-weight: 800; line-height: 1.5em; }

.scene-shouhizei .tn-old {
  position: relative;
  background: var(--paper-deep);
  animation: rise 0.6s var(--ease-out) var(--cue-0) both;
}
.scene-shouhizei .tn-old .tn-l { background: var(--ink-soft); color: #fff; }
.scene-shouhizei .tn-old .tn-b {
  position: relative;
  width: max-content;
  color: var(--ink-soft);
}
.scene-shouhizei .tn-old .tn-b { animation: fade 0.5s ease var(--cue-1) both; }
.scene-shouhizei .tn-strike {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 52%;
  height: 5px;
  background: var(--warn);
  border-radius: 3px;
  transform-origin: left center;
  scale: 0 1;
  animation: draw-x 0.6s var(--ease-out) var(--cue-2) both;
}

.scene-shouhizei .tn-ar {
  align-self: center;
  color: var(--ink-soft);
  font-size: 36px;
  font-weight: 900;
  animation: fade 0.5s ease var(--cue-2) both;
}

.scene-shouhizei .tn-new {
  background: var(--key-soft);
  border: 3px solid var(--key);
  animation: rise 0.6s var(--ease-out) var(--cue-3) both;
}
.scene-shouhizei .tn-new .tn-l { background: var(--key); color: #fff; }
.scene-shouhizei .tn-new .tn-b em {
  color: var(--key);
  font-style: normal;
  font-weight: 900;
}
.scene-shouhizei .tn-new .tn-b em {
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  animation: fade 0.5s ease var(--cue-4) both;
}

.scene-shouhizei .why {
  justify-self: center;
  color: var(--ink-soft);
  font-size: 21px;
  font-weight: 700;
  animation: fade 0.6s ease var(--cue-5) both;
}
.scene-shouhizei .stop {
  justify-self: center;
  font-size: 26px;
  font-weight: 800;
  animation: rise 0.6s var(--ease-pop) var(--cue-6) both;
}
.scene-shouhizei .warnline {
  display: inline-block;
  padding: 1px 10px;
  background: var(--warn);
  color: #fff;
  font-style: normal;
  border-radius: 6px;
}

/* ══════ 場面8 選び方は、ひとつだけ ══════ */
.scene-choose {
  padding: 22px 56px var(--caption-space);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  align-content: center;
  gap: 12px;
}

.scene-choose .theq {
  justify-self: center;
  font-size: 28px;
  font-weight: 800;
  animation: pop 0.6s var(--ease-pop) var(--cue-1) both;
}
.scene-choose .theq em {
  background: linear-gradient(transparent 58%, var(--marker) 58%);
  font-style: normal;
  animation: fade 0.5s ease var(--cue-2) both;
}

.scene-choose .answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-content: center;
}
.scene-choose .ans {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 20px 18px;
  border: 3px solid var(--side, var(--ink));
  border-radius: 14px;
  background: var(--side-soft, var(--paper));
}
.scene-choose .ans-if {
  padding: 2px 12px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 800;
  border-radius: 5px;
}
.scene-choose .ans-name { color: var(--side); font-size: 30px; font-weight: 900; }
.scene-choose .is-kojin { animation: slide-left 0.6s var(--ease-out) var(--cue-3) both; }
.scene-choose .is-hojin { animation: slide-right 0.6s var(--ease-out) var(--cue-4) both; }

.scene-choose .closing {
  justify-self: center;
  font-size: 27px;
  font-weight: 800;
  animation: rise 0.6s var(--ease-pop) var(--cue-6) both;
}
.scene-choose .disc {
  justify-self: center;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 700;
  animation: fade 0.6s ease var(--cue-5) both;
}
