/* CrazyGames desktop frame: wide and short. Fit all suspects without scrolling where possible. */
@media (min-width: 681px) and (max-height: 700px) and (min-aspect-ratio: 5/4) {
  .noir-game { gap: 5px 14px; padding: 6px 12px; }
  .noir-game .ng-tools > *, .noir-game .ng-actions > * { min-height: 0; height: 34px; }
  .noir-game .ng-tools, .noir-game .ng-actions { grid-template-rows: 34px; height: 34px; min-height: 0; }
  .noir-game .ng-tool svg, .noir-game .ng-tool img { max-height: 22px; }
  .noir-game .ng-tools { gap: 5px; }
  .ng-suspects { padding: 4px 0 2px; border-radius: 12px; }
  .ng-suspects > h2 { display: none; }
  .ng-strip {
    display: grid;
    grid-template-columns: repeat(var(--crazy-cols, 2), minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    gap: 5px 7px;
    padding: 2px 8px 4px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
  }
  .noir-game .ng-strip .suspect-card.ng-card {
    flex: none;
    grid-template-columns: var(--crazy-photo, 40px) minmax(0, 1fr);
    gap: 7px;
    padding: 5px 7px 5px 5px;
  }
  .noir-game .ng-strip .suspect-card.ng-card::after { top: 5px; right: 6px; width: 7px; height: 7px; }
  .ng-photo { padding: 3px 3px 9px; }
  .ng-photo::before { top: -4px; height: 8px; }
  .ng-card-body { gap: 3px; padding-top: 0; }
  .ng-name { padding: 0 10px 1px 0; font-size: 12.5px; gap: 4px; }
  .ng-name em { font-size: 8px; padding: 0 4px; }
  .ng-check { width: 14px; height: 14px; font-size: 9px; }
  .ng-clues { gap: 2px; }
  .noir-game .ng-clue { gap: 4px; padding: 1px 2px; font-size: 11px; line-height: 1.18; }
  .ng-clue-icon, .ng-clue-icon img { width: 16px; height: 16px; }
  .ng-clue-icon svg { width: 14px; height: 14px; }
  .ng-hints { font-size: 10.5px; gap: 1px; }
}
/* Desktop polaroid layout: put the polaroid beside its statement instead of above it. */
@media (min-width: 900px) and (max-height: 700px) and (min-aspect-ratio: 5/4) {
  .noir-game.campaign-ink .ng-strip .suspect-card.ng-card { display: flex; flex-direction: row; align-items: center; gap: 0; }
  .campaign-ink .ng-strip .ng-polaroid { flex: none; width: 52px; padding: 3px 3px 2px; }
  .campaign-ink .ng-strip .ng-polaroid .ng-photo { width: 100%; }
  .campaign-ink .ng-strip .ng-portrait-name { padding-top: 1px; font-size: 8.5px; letter-spacing: -.02em; overflow-wrap: normal; white-space: nowrap; }
  .campaign-ink .ng-strip .ng-card .ng-card-body { flex: 1 1 0; width: auto; min-width: 0; margin: 0 0 0 -8px; padding: 4px 6px 4px 12px; }
  .campaign-ink .ng-strip .ng-card .ng-clue { font-size: 11px; line-height: 1.22; }
  .campaign-ink .ng-strip .ng-card .ng-clues { gap: 3px; }
  .campaign-ink .ng-strip .ng-card .ng-clue-icon,
  .campaign-ink .ng-strip .ng-card .ng-clue-icon img { width: 15px; height: 15px; }
  .campaign-ink .ng-strip .ng-card .ng-hints { font-size: 10px; }
  .ng-strip { --crazy-cols: 2; }
}
@media (min-width: 1150px) and (max-height: 700px) and (min-aspect-ratio: 5/4) {
  .ng-strip { --crazy-cols: 3; }
}

/* Home: three folders side by side so all fit in a short frame. */
@media (min-width: 681px) and (max-height: 700px) and (min-aspect-ratio: 5/4) {
  .ink-home-shell { padding-top: 10px; padding-bottom: 10px; }
  .ink-home-header { padding-bottom: 6px; }
  .ink-campaigns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; margin-top: 18px; }
  .ink-campaign { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 10px 8px; text-align: center; }
  .ink-campaign-art .ink-photo-stack { width: 85px; height: 90px; }
  .ink-campaign-arrow { display: none; }
  .ink-campaign-copy { align-items: center; gap: 2px; }
  .ink-campaign-copy > span { font-size: 11px; line-height: 1.25; }
  .ink-campaign-progress { align-items: baseline; }
}

/* Menus and dialogs in a short frame: smaller header, scrollable dialogs. */
@media (min-width: 681px) and (max-height: 700px) and (min-aspect-ratio: 5/4) {
  .ink-menu .topbar { min-height: calc(54px + var(--safe-top)); }
  .ink-menu .view-scroll { padding-top: 8px; }
  .modal-backdrop { padding: 8px; }
  .modal-card { max-height: calc(100dvh - 16px); overflow-y: auto; }
}
@media (min-width: 681px) and (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .modal-card { zoom: .86; max-height: calc((100dvh - 16px) / .86); }
}
@media (min-width: 681px) and (max-height: 420px) and (min-aspect-ratio: 5/4) {
  .modal-card { zoom: .76; max-height: calc((100dvh - 16px) / .76); }
}
