/* Brief, interruptible motion for play, training, and the interface. */
.share-preview{display:block;width:min(100%,410px);height:auto;aspect-ratio:1200/630;object-fit:cover;border-radius:10px;border:1px solid #77956d70;margin:14px 0 18px;box-shadow:0 12px 28px #0004}
:root{--motion-ease:cubic-bezier(.22,.8,.25,1)}
.capture-ghost{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:5}
.capture-burst{position:absolute;inset:9%;z-index:6;pointer-events:none;border-radius:50%;border:2px solid #ffe6a4}
.square.drag-target{box-shadow:inset 0 0 0 4px #f9df8b!important}
.game-result-strip{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 17px;margin:0 0 12px;background:#293d2c;border:1px solid #789668;border-radius:10px}
.game-result-strip strong{display:block;font:500 25px/1.15 Georgia,serif;color:#eff8e7;margin:4px 0}
.game-result-strip p{font-size:12px;color:#d3e0cd}
.game-result-strip .btn{font-size:12px;min-height:44px;flex:none;background:#142318;border-color:#718568}
.result-eyebrow{color:#cbe4ae;text-transform:uppercase;font:650 11px/1.4 ui-sans-serif,system-ui,sans-serif;letter-spacing:.14em}
.game-finished .turn-label{background:#c9dfa9;color:#172315;font-weight:700}
.game-finished .board-note strong{font-weight:650}
.game-result-dialog{width:min(470px,calc(100% - 28px));text-align:center;padding:32px;overflow:auto;border-color:#7f966e;background:radial-gradient(ellipse at 50% 0,#334630 0,transparent 65%),#18221c}
.result-close{position:absolute;right:12px;top:12px;border:0;background:transparent;min-width:44px;min-height:44px}
.result-emblem{display:grid;place-items:center;width:76px;height:76px;border:1px solid #829b6970;background:#b9d69612;border-radius:50%;margin:2px auto 19px}
.result-emblem .piece{width:49px;height:53px;--piece-fill:#d5e9b7;--piece-line:#26331f}
.game-result-dialog h2{font:500 clamp(32px,7vw,44px)/1.1 Georgia,serif;letter-spacing:-.02em;margin:10px 0;color:#f0f6e8;outline-offset:8px}
.result-reason{color:#d1dfc7;font-size:15px;margin:0 0 20px}
.result-score{display:flex;align-items:center;justify-content:center;gap:24px;padding:15px 0;border-block:1px solid #71846640;margin-bottom:20px}
.result-score span{font-size:12px;color:#b6c5ad}.result-score strong{font:500 29px/1.2 Georgia,serif;font-variant-numeric:tabular-nums;color:#edf5e6}
.result-description{font-size:15px;line-height:1.6;color:#bacab5;margin:0 auto 24px;max-width:340px}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.result-actions .btn{font-size:14px;padding:12px 8px;min-height:48px;white-space:normal}
.result-board{margin-top:14px;min-height:44px;font-size:13px}
.game-result-dialog[data-outcome=loss]{background:radial-gradient(ellipse at 50% 0,#343d36 0,transparent 65%),#18221c}
.game-result-strip[data-outcome=loss],.game-result-strip[data-outcome=draw]{background:#29352d;border-color:#75816e}
@media(max-width:540px){.game-result-dialog{padding:25px 20px}.result-emblem{width:64px;height:64px;margin-bottom:15px}.result-emblem .piece{height:46px;width:43px}.game-result-strip{padding:10px 12px;gap:10px;margin-bottom:8px}.game-result-strip strong{font-size:22px}.game-result-strip .btn{font-size:11px;padding:8px 10px}.game-result-strip p{font-size:11px}}
@media(max-height:500px){.game-result-dialog{padding:22px;max-height:calc(100dvh - 24px)}.result-emblem{display:none}.game-result-dialog h2{font-size:32px;margin:7px 0}.result-reason{margin-bottom:10px}.result-score{padding:8px 0;margin-bottom:10px}.result-description{margin-bottom:14px}.result-board{margin-top:5px}}
@media(prefers-reduced-motion:no-preference){
 .btn,.nav-button,.choice,.theme-choice,.companion-tabs button,.lobby-tabs button,.training-tabs button,.play-choice,.training-card,.lobby-row,.promotion-options button,.segment span,.text-button,.swatch,select,input,.switch-line input:before{transition:transform 180ms var(--motion-ease),background-color 180ms ease,border-color 180ms ease,box-shadow 180ms ease,opacity 160ms ease,color 160ms ease}
 .choice .piece,.promotion-options .piece,.training-card-piece{transition:transform 220ms var(--motion-ease)}
 @media(hover:hover) and (pointer:fine){
  .btn:hover:not(:disabled),.play-choice:hover,.training-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px #0003}
  .btn.primary:hover:not(:disabled){box-shadow:0 5px 20px #bfda9c25}
  .choice:hover,.theme-choice:hover,.promotion-options button:hover{transform:translateY(-3px)}
  .choice:hover .piece,.promotion-options button:hover .piece,.training-card:hover .training-card-piece{transform:rotate(-5deg) scale(1.07)}
  .text-button:hover{transform:translateY(-1px)}
 }
 button:active:not(:disabled),.btn:active:not(:disabled),.segment:active span{transform:scale(.97);transition-duration:80ms}
 .square:active:not(:disabled){transform:none}
 .square.selected .piece,.square.selected .letter-piece{animation:piece-lift 190ms var(--motion-ease) both}
 .square.legal:before{animation:legal-pop 180ms var(--motion-ease) both}
 .square.hinted{animation:hint-glow 1.2s ease-in-out 2}
 .square.move-arrival:after{animation:last-glow 450ms ease-out}
 .square.move-check{animation:check-glow 600ms ease-out}
 .drag-piece{filter:drop-shadow(0 12px 10px #0008);transform:scale(1.08)}
 .nav-button .icon{transition:transform 180ms var(--motion-ease)}
 .nav-button.active .icon{animation:nav-arrive 220ms var(--motion-ease)}
 .companion-tabs button,.training-tabs button,.lobby-tabs button{position:relative}
 .companion-tabs button:after,.training-tabs button:after,.lobby-tabs [role=tab]:after{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--accent);transform:scaleX(0);transition:transform 200ms var(--motion-ease)}
 .companion-tabs button[aria-selected=true]:after,.training-tabs button[aria-selected=true]:after,.lobby-tabs [role=tab][aria-selected=true]:after{transform:scaleX(1)}
 .game-result-dialog[open] .result-emblem{animation:emblem-arrive 400ms var(--motion-ease) both}
 .game-result-dialog[open] .result-score{animation:result-arrive 260ms 70ms var(--motion-ease) backwards}
 dialog[open]{animation:result-arrive 240ms var(--motion-ease)}
 dialog[open]::backdrop{animation:backdrop-enter 200ms ease-out}
 .busy .coach-glyph,.busy .icon.wave{animation:breathe 1.2s ease-in-out 3}
 @supports(transition-behavior:allow-discrete) and (overlay:auto){
  dialog{opacity:0;transform:translateY(8px) scale(.98);transition:opacity 180ms ease,transform 220ms var(--motion-ease),display 220ms,overlay 220ms;transition-behavior:allow-discrete}
  dialog[open]{opacity:1;transform:none;animation:none}
  @starting-style{dialog[open]{opacity:0;transform:translateY(8px) scale(.98)}}
 }
 @keyframes piece-lift{from{transform:none}to{transform:translateY(-3px) scale(1.06)}}
 @keyframes legal-pop{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}
 @keyframes hint-glow{50%{box-shadow:inset 0 0 0 4px #ffe29d}}
 @keyframes last-glow{from{background:#f6e6719c}to{background:#eddb4b33}}
 @keyframes check-glow{50%{box-shadow:inset 0 0 0 4px #ffd4ad}}
 @keyframes nav-arrive{from{transform:scale(.85)}to{transform:scale(1)}}
 @keyframes emblem-arrive{from{opacity:0;transform:translateY(7px) rotate(-8deg) scale(.9)}to{opacity:1;transform:none}}
 @keyframes result-arrive{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:none}}
 @keyframes backdrop-enter{from{opacity:0}to{opacity:1}}
}
.keyboard-input *,.keyboard-input *:before,.keyboard-input *:after{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.drag-piece{transform:none}.capture-burst,.capture-ghost{display:none}.game-result-dialog{opacity:1;transform:none}}
@media print{.capture-burst,.capture-ghost,.game-result-strip .btn{display:none!important}.game-result-strip{background:white;color:#111;border-color:#777}.game-result-strip strong,.game-result-strip p,.result-eyebrow{color:#111}}
