/*
 * What every modlit app shares, on top of its own colours. Each app sets --bg, --panel, --text,
 * --muted, --border and --accent (and may change them for a dark theme); this file only uses them.
 *
 * The layout every app follows:
 *   header     .app-head: the modlit mark (back to the site), the app's name, one line on what it does,
 *              and on the right anything app-wide (a theme switch).
 *   stage      the picture first, full width, with a short status line inside it.
 *   quick      .quick: the few things most people press, right under the picture.
 *   side       tabs (Controls, How it works, ...) holding everything else, advanced settings folded.
 * Wider screens put the side beside the stage; phones stack them in that order.
 */

.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}
.app-head .home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.app-head .home:hover { border-color: var(--muted); }
.app-head .home svg { width: 20px; height: 20px; flex: none; }
.app-head .name { font-size: 18px; font-weight: 600; }
.app-head .what { color: var(--muted); font-size: 13px; margin-right: auto; min-width: 0; }
.app-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.app-head .what + .end { margin-left: 0; }

/* The row of common actions under the picture. On a phone it scrolls sideways rather than
   wrapping into a wall of buttons. */
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; max-width: 100%; }

@media (max-width: 640px) {
  .app-head { padding: 8px 12px; gap: 10px; }
  .app-head .what { display: none; }
  .app-head .name { margin-right: auto; }
  .quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -12px;
    padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .quick::-webkit-scrollbar { display: none; }
  .quick > * { flex: none; }
  /* Fingers need bigger targets than pointers. */
  .quick button, .quick select, .quick .file { min-height: 40px; }
}
/* Hints written for a mouse ("scroll to zoom") make no sense on a touch screen, and the other way round. */
@media (pointer: coarse) {
  .mouse-only { display: none !important; }
}
@media not (pointer: coarse) {
  .touch-only { display: none !important; }
}
