.mobile-balances { display: none; }
.mobile-control-settings { display: flex; align-items: center; gap: 10px; }
.mobile-control-settings > summary { display: none; }
.mobile-settings-fields { display: flex; align-items: center; gap: 10px; }
.mobile-control-settings:not([open]) > .mobile-settings-fields { display: none; }
.mobile-control-settings > .speed-label,
.mobile-control-settings > .auto-label { margin: 0; }
@media (max-width: 720px) {
  body[data-view="game"] { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .game { min-width: 0; }
  .mobile-balances { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 14px 0 20px; }
  .mobile-balances[hidden] { display: none; }
  .mobile-balance-card { min-width: 0; border: 1px solid #aaa0bd42; border-radius: 14px; padding: 13px; background: #252a40; }
  .mobile-balance-card h2 { font-size: 15px; line-height: 1.5; margin: 0 0 9px; overflow-wrap: anywhere; color: #f3e8ed; }
  .mobile-balance-card span { display: block; font-size: 12px; line-height: 1.6; color: #bbb9ce; }
  .mobile-balance-card strong { display: block; font-size: 20px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; margin: 1px 0 8px; font-variant-numeric: tabular-nums; }
  .mobile-balance-card strong:last-child { margin-bottom: 0; color: #d9c9c5; }
  .controls,
  #choice-dialog .controls { position: fixed; inset: auto 0 0; z-index: 80; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) 60px; gap: 8px; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #1c2138f5; border-top: 1px solid #bba6c54d; box-shadow: 0 -8px 24px #11152940; box-sizing: border-box; }
  .controls .compact { min-height: 48px; padding: 10px 5px; font-size: 14px; letter-spacing: 0; white-space: nowrap; }
  .controls #pause { color: #f5e5eb; border-color: #d8acbd90; background: #533e57; }
  .controls .mobile-control-settings { position: static; display: block; margin: 0; border: 0; padding: 0; }
  .mobile-control-settings > summary { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 14px; cursor: pointer; border: 1px solid #b3abc34d; border-radius: 9px; list-style: none; }
  .mobile-control-settings > summary::-webkit-details-marker { display: none; }
  .mobile-control-settings[open] { position: static; padding: 0; border: 0; background: none; }
  .mobile-control-settings[open] > .mobile-settings-fields { padding: 15px; position: absolute; bottom: calc(78px + env(safe-area-inset-bottom)); right: 12px; width: min(300px,calc(100vw - 24px)); box-sizing: border-box; display: grid; gap: 12px; background: #2a2e47; border: 1px solid #8e7e9b; border-radius: 14px; box-shadow: 0 10px 40px #070c20b3; }
  .mobile-control-settings[open] > summary { margin-bottom: 0; }
  .mobile-settings-fields { display: grid; gap: 12px; }
  .controls .speed-label, .controls .auto-label, .controls .quiet { font-size: 14px; line-height: 1.5; min-height: 48px; }
  .controls .speed-label { display: flex; justify-content: space-between; gap: 12px; }
  .controls .speed-label select { min-height: 48px; max-width: none; min-width: 100px; font-size: 16px; }
  .controls .auto-label { display: flex; gap: 10px; }
  .controls input[type="checkbox"] { width: 20px; height: 20px; }
  .controls #home-button { width: 100%; }
  #choice-dialog[data-mobile-controls="true"] { max-height: calc(100dvh - 122px - env(safe-area-inset-bottom)); margin-bottom: calc(100px + env(safe-area-inset-bottom)); padding-bottom: 24px; }
  #choice-dialog { overflow-x: hidden; }
  #choice-dialog .choice-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; }
  #choice-dialog .choice-tabs button { min-width: 0; white-space: normal; overflow-wrap: anywhere; padding: 9px 2px; }
  #choice-dialog .choice, #choice-dialog .context-return { min-height: 48px; }
  #choice-dialog .choice strong { font-size: 15px; }
  #choice-dialog .choice small, #choice-dialog .choice-summary, #choice-dialog .stat-fact p, #choice-dialog .context-note { font-size: 14px; }
  #choice-dialog .choice-tabs button { min-height: 44px; font-size: 14px; }
  .game .profiles { order: 1; }
  .game .timeline-panel { order: 2; }
  .game .profile dt, .game .profile dd { font-size: 14px; }
  .game .profile h2 { font-size: 18px; }
  .game .finance-summary { font-size: 14px; }
}
