@layer interaction {
  .adventure-main .command-box { scroll-margin-bottom: 14px; background: #111d2cf5; backdrop-filter: blur(12px); }
  .command-row textarea { scroll-margin-block: 180px; }
  .turn-progress { align-items: flex-start; flex-direction: column; gap: 3px; }
  .turn-progress::before { display: none; }
  .turn-progress small { color: var(--muted); font-size: 11px; }
  .turn-progress.is-committed { border-color: #749b89; background: #243e35; color: #c4decf; }
  .turn-progress.is-committed strong::before { content: "✓ "; }
  .turn-progress.is-committed small { color: #c4decf; }
  .turn-technical-log { color: var(--muted); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .action-disclosure { min-width: 0; }
  .action-disclosure > summary { cursor: pointer; padding: 9px; min-height: 40px; color: var(--muted); font-size: 12px; border-radius: 8px; }
  .action-options { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 6px; }
  .action-disclosure[open] { flex-basis: 100%; }
  .action-confirm-dialog { background: var(--surface-elevated); color: var(--text); border: 1px solid var(--border-strong); border-radius: 16px; padding: 22px; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; box-shadow: var(--shadow-panel); }
  .action-confirm-dialog::backdrop { background: #080e19ba; }
  .action-confirm-dialog h2 { font-size: 20px; margin: 0; }
  .action-confirm-dialog p { color: var(--muted); line-height: 1.8; overflow-wrap: anywhere; }
  .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
  .confirm-actions button { min-height: 44px; }
  .action-confirm-dialog[open] { animation: dialog-arrive 140ms ease-out; }
  .button:active, .mini-button:active, .quick-action:active { transform: translateY(1px); }
  .recent-entity-row { animation: dialog-arrive 180ms ease-out; }
  @keyframes dialog-arrive { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
  @media (max-width: 720px) {
    .adventure-main .command-box { scroll-margin-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 14px); }
    .keyboard-open .adventure-main .command-box { scroll-margin-bottom: 12px; }
    .keyboard-open .game-summary { position: static; }
    .action-disclosure > summary { min-height: 44px; }
    .turn-progress-mini { max-width: 90px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .action-confirm-dialog[open], .recent-entity-row { animation: none; }
    .button:active, .mini-button:active, .quick-action:active { transform: none; }
  }
}
