/* Author: goodjava@qq.com */
.stage.cinematic:has(.battle) { display: block; width: 100vw; height: 100dvh; }
.stage.cinematic > #field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: auto; overflow: clip; }
.stage.cinematic #field > div { top: 0; left: 0; }
.stage.cinematic #field::after { display: none; }
.stage.cinematic .battle { display: block; position: absolute; inset: 0; pointer-events: none; }
.stage.cinematic .game-nav { position: absolute; inset: 0 0 auto; height: 57px; padding: 9px 24px; background: linear-gradient(#112c26d9,#112c2640,transparent); border: 0; box-shadow: none; pointer-events: none; }
.stage.cinematic .game-nav > div { pointer-events: auto; }
.stage.cinematic .game-nav b { color: #f5e6bf; text-shadow: 0 2px 4px #0c241b; font-size: 23px; letter-spacing: .14em; }
.stage.cinematic .game-nav > div > span { display: none; }
.stage.cinematic .root-badge { background: #193b2fd9; border-color: #c1a669; color: #eed9a5; }
.stage.cinematic .nav-actions { gap: 8px; }
.stage.cinematic .nav-actions button { padding: 6px 18px; color: #f0e5c5; background: #17392fd9; border: 1px solid #c5ac72; border-radius: 5px; box-shadow: inset 0 0 0 2px #385548,0 2px 8px #0c201e44; }
.stage.cinematic .nav-actions button:hover { background: #3b5641; }
.stage.cinematic .dialog, .stage.cinematic .sheet { z-index: 50; }
.engine-input { pointer-events: auto; font-family: 'Songti SC','Noto Serif SC',serif; }
.fan-card { width: 184px; height: 306px; touch-action: none; }
.fan-card .card-slot { --card-width: 184px; --card-height: 306px; }
.fan-card .face { padding: 12px 14px 10px; border-radius: 10px; box-shadow: inset 0 0 0 3px #fff3d8,inset 0 0 0 4px #bba376,0 6px 14px #10251e66; background: linear-gradient(135deg,#fff6df,#e8dabc); }
.fan-card .face .card-top { height: 28px; }
.fan-card .face .cost { width: 29px; height: 29px; background: #5f6450; font-size: 21px; }
.fan-card .face .card-type { font-size: 11px; color: #4b4c38; }
.fan-card .face .card-picture { height: 81px; margin-top: 8px; border-radius: 3px; }
.fan-card .face .art { opacity: 1; }
.fan-card .face .name { font-size: 19px; margin: 8px 0 6px; padding-bottom: 7px; }
.fan-card .face .desc { font-size: 14px; line-height: 1.5; }
.fan-card .face .card-foot { font-size: 10px; padding-right: 24px; letter-spacing: 0; }
.fan-card .card-inspect { width: 26px; height: 24px; font-size: 11px; right: 7px; bottom: 7px; }
.fan-card.raised .face { border-color: #eec366; box-shadow: inset 0 0 0 2px #fff6dc,inset 0 0 0 4px #c4a05e,0 0 0 2px #f7d484,0 0 16px #f0cc6d9c,0 14px 30px #0f261b88; }
.fan-card .face.dim { background: linear-gradient(135deg,#ebe5d7,#d9d0bb); }
.fan-card .face.dim .art { opacity: .68; }
.fan-card .face[aria-disabled='true'] { cursor: help; }
.engine-end { width: 54px; min-height: 154px; padding: 16px 12px; writing-mode: vertical-rl; letter-spacing: .2em; color: #fff0c9; font-size: 22px; border: 2px solid #d6b370; border-radius: 18px 18px 20px 20px; background: linear-gradient(90deg,#6a3024,#92553a,#6a3024); box-shadow: inset 0 0 0 3px #66382b,inset 0 0 0 4px #c0995b,0 5px 18px #10281c77; }
.engine-end:hover { filter: brightness(1.15); }
.engine-end:disabled { filter: saturate(.4); opacity: .65; }
.engine-status { height: 46px; }
.engine-status-list { display: flex; align-items: flex-start; gap: 7px; }
.engine-status button { position: relative; width: 32px; height: 32px; flex: 0 0 32px; color: #fff4d3; border-radius: 5px; }
.engine-status img { display: block; width: 100%; height: 100%; object-fit: contain; }
.engine-status b { position: absolute; right: -3px; bottom: -2px; padding: 0 3px; min-width: 10px; border-radius: 3px; background: #102a20e8; font: 600 12px/16px Georgia,serif; border: 1px solid #c5b076; }
.engine-status small { position: absolute; top: 34px; left: 0; width: 100%; font-size: 9px; text-align: center; text-shadow: 0 1px 3px #081b15; }
.engine-status .buff-more, .engine-status .actor-info { background: #17372ce0; border: 1px solid #b5a169; font-size: 13px; }
.engine-status .actor-info { margin-left: auto; flex-basis: 24px; width: 24px; height: 24px; }
.engine-status button:focus-visible, .engine-end:focus-visible, .fan-confirm:focus-visible { outline: 2px solid #fff1b2; outline-offset: 3px; }
.fan-confirm { width: 164px; height: 42px; border: 1px solid #dcbe7a; border-radius: 5px; background: #173e31; box-shadow: 0 4px 20px #132e2299; color: #fff3d2; font-size: 16px; }
.fan-confirm[hidden] { display: none; }
.fan-confirm:disabled { background: #4a4c41; color: #d4cdb8; }
.combat-accessible { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.buff-detail article { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 16px 0; border-bottom: 1px solid #baab8b66; }
.buff-detail article img { width: 48px; height: 48px; }
.buff-detail article p { margin: 0; }
.buff-detail article small { display: block; color: #85714b; font-size: 12px; }
.buff-detail article div { grid-column: 1 / -1; font-size: 14px; line-height: 1.8; }
@media (max-width:700px) {
  .stage.cinematic .game-nav { height: 65px; padding: 8px 12px; align-items: flex-start; }
  .stage.cinematic .game-nav b { font-size: 18px; }
  .stage.cinematic .root-badge { display: block; width: max-content; margin: 3px 0 0; font-size: 9px; }
  .stage.cinematic .nav-actions { gap: 4px; }
  .stage.cinematic .nav-actions button { padding: 6px 9px; font-size: 12px; min-height: 34px; }
  .engine-end { width: 42px; min-height: 106px; padding: 12px 9px; font-size: 17px; border-radius: 12px; }
  .engine-status-list { gap: 5px; }
  .engine-status button { width: 27px; height: 27px; flex-basis: 27px; }
  .engine-status small { top: 29px; }
  .engine-status .actor-info { flex-basis: 20px; width: 20px; }
}
@media (max-height:520px) and (min-width:701px) {
  .stage.cinematic .game-nav { height: 43px; padding-block: 5px; }
  .stage.cinematic .game-nav b { font-size: 17px; }
  .engine-end { min-height: 112px; font-size: 18px; width: 45px; }
}
@media (prefers-reduced-motion:reduce) { .fan-card .face { transition: none; } }

/* 云纹尾饰与卡牌金弧均为矢量；动效仅改变透明度和引擎几何。 */
.engine-end { position: relative; min-height: 158px; border-radius: 18px 18px 22px 22px; padding-bottom: 24px; }
.engine-end > svg { position: absolute; left: 50%; bottom: -15px; width: 64px; height: 32px; transform: translateX(-50%); filter: drop-shadow(0 2px 2px #1a2c2199); }
.fan-card .face { overflow: hidden; }
.fan-card .card-slot::after, .fan-card .card-slot::before { content: ''; position: absolute; inset: 5px; border: 1px solid #bd9b5f80; border-radius: 8px; pointer-events: none; }
.fan-card .card-slot::before { inset: 9px; border-color: #c9ac6b50; }
.fan-card.raised .face { box-shadow: inset 0 0 0 2px #fff6dc,inset 0 0 0 4px #c4a05e,0 0 0 2px #f7d484,0 0 20px #f0cc6d80,0 14px 30px #0f261b88; }
.engine-status button:hover { filter: brightness(1.17); }
.engine-status [hidden] { display: none; }
.actor-status .engine-status-list { justify-content: center; gap: 6px; }
.actor-status.engine-status { height: 46px; }
.actor-status.engine-status button { width: 32px; height: 32px; flex-basis: 32px; background: #17372ce8; border: 1px solid #b5a169; box-shadow: 0 2px 5px #071b1599; }
.actor-status.engine-status .status-debuff { border-color: #d78d78; background: #392822e8; }
.actor-status.engine-status small { top: 33px; font-size: 10px; color: #fff2cb; }
.formation-layer.has-overhead-status .unit-intent { translate: 0 -56px; }
@media (max-width:700px), (max-height:520px) {
  .engine-end { min-height: 112px; padding-bottom: 18px; }
  .engine-end > svg { width: 50px; bottom: -13px; }
}
