/* The modes screen (Daily, Practice, Scenarios) and the shoot-out canvas. Everything else a scenario shows reuses app.css. */

#pens { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

/* Two full-size buttons side by side on the home menu, so the menu is no taller than it was. */
.menu .modes-row .btn { font-size: 10px; padding-left: 6px; padding-right: 6px; }
#app[data-narrow="1"] .menu .modes-row .btn { font-size: 9px; letter-spacing: 0; }

/* A sheet over the whole game. The header stays put and the list scrolls inside a box that is held clear of
   the safe-area insets and of rounded or cut-off window corners (--sat and friends carry the corner guards
   from js/shape.js), so nothing scrolls under a corner on a folded or split-view Duo. */
#modes { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: #10142e; }
.modes-head { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--sat)) calc(12px + var(--sar)) 4px calc(12px + var(--sal)); }
.modes-head .lbl { font-size: 10px; color: var(--cream); }
#modes-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 0 var(--sar) var(--sab) var(--sal); padding: 0 12px 20px; }
#modes-body::-webkit-scrollbar { display: none; }
#modes-body > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
#modes-body h2 { font-weight: 400; margin-top: 18px; margin-bottom: 2px; padding: 0 6px; color: var(--amber); font-size: 9px; }
#modes-body h2:first-child { margin-top: 6px; }
.mode-sub { margin-top: 0; margin-bottom: 4px; padding: 0 6px; color: var(--mute); font-size: 19px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 8px; align-items: stretch; }
.mode-grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.mode-card { display: flex; flex-direction: column; padding: 8px 8px 4px; margin: 8px 6px; min-width: 0; }
.mode-card.hot { background: #1d2350; }
.mode-card.hot::after { content: 'TODAY'; position: absolute; top: -9px; right: 6px; font-family: 'Press Start 2P', monospace; font-size: 7px; letter-spacing: 1px; padding: 4px 5px 2px; background: var(--amber); color: #1a1530; }
.mode-art { width: 100%; aspect-ratio: 112 / 44; image-rendering: pixelated; image-rendering: crisp-edges; display: block; margin-bottom: 8px; box-shadow: 0 0 0 2px var(--line); }
.mode-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mode-head h3 { font-family: 'Press Start 2P', monospace; font-weight: 400; font-size: 10px; line-height: 1.5; letter-spacing: 1px; margin: 2px 0 4px; text-transform: uppercase; color: var(--cream); }
.stars { flex: none; color: var(--amber); font-family: system-ui, sans-serif; font-size: 15px; letter-spacing: 1px; line-height: 1; }
.mode-card p { margin: 2px 0 6px; font-size: 20px; line-height: 1.02; color: #c9cdea; }
.mode-card p b { font-weight: 400; color: var(--cream); }
.mode-card p.mode-meta { font-family: 'Press Start 2P', monospace; font-size: 7px; line-height: 1.7; letter-spacing: 0.5px; color: var(--mute); margin-top: auto; padding-top: 4px; }
.mode-card p.mode-meta b { color: var(--mint); }
.mode-card > p:not(.mode-meta):last-of-type { flex: 1 1 auto; }
.mode-card .row { margin: 2px -4px 0; }
.mode-card .row .btn { margin: 6px 5px 8px; }
.mode-card .row .btn:not(.primary) { flex: 0 1 38%; }

/* result: the "what really happened" line, and the row labels of a shoot-out grid */
#res-fact { margin: 2px 6px 8px; color: var(--cream); font-size: 19px; }
#res-grid div .lbl { min-width: 30px; text-align: left; font-size: 7px; }

/* the question filter: competition and era chips, in the Practice dialog and above the scenarios */
.filters { margin-top: 6px; margin-bottom: 8px; padding: 0 2px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 2px 0; }
.filter-row .lbl { flex: 0 0 100%; margin: 6px 6px 0; font-size: 7px; }
.filter-row .chip { flex: 1 1 auto; margin: 5px 4px 7px; padding: 10px 8px 8px; font-size: 7px; white-space: nowrap; }
#modal-body .filters + .btn { display: block; width: calc(100% - 12px); margin-top: 10px; }
#modes .filters { max-width: 1120px; }
#modes .filters .filter-row { max-width: 720px; }
/* a phone on its side: the filter dialog in two tight lines, so KICK OFF is on screen without scrolling */
@media (max-height: 420px) {
  #modal-body .filters ~ .btn, #modal-body .filters { margin-top: 0; }
  #modal-body > div > p.fine:first-child { display: none; }
  #modal-body .filter-row { flex-wrap: nowrap; }
  #modal .modal-panel:has(.filters) { max-width: 680px; }
  #modal-body .filter-row .lbl { flex: 0 0 86px; margin: 0 4px; }
  #modal-body .filter-row .chip { padding: 8px 6px 6px; margin: 4px 3px 6px; }
  #modal-body .filters + .btn { padding-top: 10px; padding-bottom: 8px; margin-top: 4px; }
}
