/* Existing dialogs must remain usable after removing the scaled desktop frame. */
html #settings-overlay { padding: 8px; }
html #settings-overlay .settings-card {
  width: 600px; max-height: 720px; padding: 12px; overflow: auto;
  transform: none !important; border-radius: 16px;
}
html .settings-card-header {
  position: static; transform: none; min-width: 0; padding: 8px; margin-bottom: 12px;
}
html .settings-card-header h3 { font-size: 20px; }
html .settings-switches { gap: 8px; flex-wrap: wrap; }
html .mode-options,
html .difficulty-options { gap: 8px; }
html .option-card { padding: 4px; height: 64px; font-size: 16px; gap: 4px; }
html .mode-icon { width: 36px; height: 36px; }
html .difficulty-card { height: 64px; }
html .difficulty-card span { font-size: 15px; }
html .group-title { font-size: 18px; }
html .micalo-warning-overlay { padding: var(--warning-overlay-padding, 16px); }
html .micalo-warning-card { min-width: 0 !important; max-width: var(--warning-card-width, 100%) !important; max-height: 100%; overflow: auto; }
html .micalo-warning-actions { flex-wrap: wrap; }
html .mode-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); }
html .difficulty-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr)); }
html .panel-title h2,
html #level-status-title .game-difficulty { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.release-dialog { position: absolute; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; padding: 12px; background: #062d4870; backdrop-filter: blur(6px); }
.release-dialog[hidden] { display: none; }
.release-dialog .settings-card { zoom: 1.2; }
#win-overlay.release-dialog, #lose-overlay.release-dialog { background: linear-gradient(#062d4866, #062d4866), url("../assets/images/backgrounds/game-bg.webp") center / cover; }
#win-overlay .result-wrapper, #lose-overlay .lose-wrapper { zoom: var(--result-card-scale, 1); }

@media (pointer: coarse) {
  .micalo-warning-overlay {
    --warning-overlay-padding: 88px 16px 16px;
    --warning-card-width: min(340px, 100%);
  }
}

/* Mode icons sit close to the card edge, independently of text direction. */
html .mode-options .option-card { position:relative; padding:4px 65px 4px 12px; justify-content:center; }
html .mode-options .mode-icon { position:absolute; right:5px; left:auto; top:50%; transform:translateY(-50%); width:52px; height:52px; object-fit:contain; }
