/* The launcher's look (ui/theme.slint, ui/components.slint): near-black warm ground, gold outlines
   and lettering, deep red for the primary action, Morpheus display type for headings. Surfaces
   separate by thin gold-brown borders; no shadows. */

@font-face { font-family: "Marcellus"; src: url("/static/fonts/marcellus.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Morpheus"; src: url("/static/fonts/morpheus.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --font-display: "Morpheus", Georgia, serif;
  --font-body: "Marcellus", Georgia, serif;

  /* Ground and surfaces */
  --bg: #0A0806;
  --bg-glow: radial-gradient(ellipse at 50% 0%, #1A130C 0%, #0A0806 75%);
  --panel: linear-gradient(180deg, #14100B 0%, #0E0B08 100%);
  --field: #0C0907;
  --row: linear-gradient(90deg, #1B140D 0%, #120E09 100%);
  --row-hover: linear-gradient(90deg, #241A10 0%, #16110B 100%);

  /* Lines: decorative panel edges, then interactive outlines */
  --line: #3A2C18;
  --outline: #8A6C3A;
  --outline-hover: #C9A24E;
  --outline-active: #F0CC6A;

  /* Lettering */
  --gold: #E8C25A;
  --gold-bright: #F6DD9A;
  --gold-heading: linear-gradient(180deg, #FBE7A1 0%, #D9A93E 100%);
  --text: #E9DCC0;
  --muted: #A89679;
  --disabled: #6E6250;

  /* Primary action: deep red */
  --crimson: linear-gradient(180deg, #5A1913 0%, #2B0907 100%);
  --crimson-hover: linear-gradient(180deg, #6E2018 0%, #36100B 100%);
  --control: linear-gradient(180deg, #17110B 0%, #0E0A07 100%);

  /* Status, semantic only */
  --ok: #5BE36F;
  --warn: #F0A030;
  --bad: #E0574A;

  --title: 30px;
  --heading: 21px;
  --body: 15px;
  --meta: 13px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }
/* Scrollbars like the launcher's scroll panels: a thin gold-brown thumb on the dark field colour */
* { scrollbar-width: thin; scrollbar-color: var(--outline) var(--field); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--field); }
::-webkit-scrollbar-thumb { background: var(--outline); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--outline-hover); }
/* The page itself never scrolls: the header stays, main scrolls below it. On pages with a list
   (.list as a child of main) only that list scrolls, so title, search and filters stay in view. */
body {
  margin: 0;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-glow) no-repeat, var(--bg);
  color: var(--text);
  font: var(--body)/1.55 var(--font-body);
}

a { color: var(--gold); text-underline-offset: 3px; }
/* Links that leave the site (GitHub) carry a small arrow */
a[rel~="external"]::after { content: "\00a0\2197"; font-size: .85em; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--outline-active); outline-offset: 2px; }
::selection { background: var(--outline); color: var(--gold-bright); }

main { flex: 1; min-height: 0; overflow-y: auto; padding: 24px max(16px, calc((100% - 1048px) / 2)); }
main:has(> .list) { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
main:has(> .list) > * { flex: none; }
main:has(> .list) > .list { flex: 1 1 auto; min-height: 0; overflow-y: auto; align-content: start; }
main:has(> .list) > .bottom { padding: 8px 16px; }

/* Header: the Morpheus logo above tab-like navigation, as in the launcher */
.top {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 20px 16px 16px; border-bottom: 1px solid var(--line);
}
.top nav { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.top nav > a:not(.button) {
  display: inline-block; padding: 8px 18px; border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--bg); color: var(--gold); font-size: 17px; text-decoration: none;
}
.top nav > a:not(.button):hover { border-color: var(--outline-hover); background: var(--control); }
.brand {
  font-family: var(--font-display); font-size: 44px; line-height: 1.1; text-decoration: none;
  background: var(--gold-heading); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand:hover { color: transparent; }
.bottom { color: var(--muted); font-size: var(--meta); text-align: center; padding: 24px 16px 0; margin-top: 24px; border-top: 1px solid var(--line); }
.bottom p { margin: 0; }

/* Headings: Morpheus gold between two fading rules, like "Class" and "Zone" in the game */
h1, h2, h3 { font-weight: 400; line-height: 1.25; }
h1 {
  display: flex; align-items: center; gap: 16px; margin: 8px 0 20px;
  font-family: var(--font-display); font-size: var(--title); color: var(--gold);
}
h1::before, h1::after { content: ""; flex: 1; height: 1px; min-width: 24px; }
h1::before { background: linear-gradient(90deg, transparent, var(--outline)); }
h1::after { background: linear-gradient(90deg, var(--outline), transparent); }
h2 { font-size: var(--heading); color: var(--gold); margin: 20px 0 8px; }
h3 { font-size: 17px; color: var(--gold); }

/* Buttons: a plain button is the screen's primary action (deep red, gold rim); .secondary is the
   outlined gold one; .danger is outlined with red lettering */
.button, button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 14px;
  border: 1px solid var(--outline-hover); border-radius: var(--radius);
  background: var(--crimson); color: var(--gold-bright); font: inherit; text-decoration: none; cursor: pointer;
}
.button:hover, button:hover { border-color: var(--outline-active); background: var(--crimson-hover); color: var(--gold-bright); }
button.secondary, .button.secondary { border-color: var(--outline); background: var(--control); color: var(--gold); }
button.secondary:hover, .button.secondary:hover { border-color: var(--outline-hover); }
button.danger, .button.danger { border-color: var(--outline); background: var(--control); color: var(--bad); }
button.danger:hover, .button.danger:hover { border-color: var(--bad); }
button.link { min-height: 0; padding: 0; border: none; background: none; color: var(--muted); font-size: var(--meta); }
button.link:hover { color: var(--gold); background: none; }
button:disabled, button:disabled:hover {
  border-color: var(--line); background: var(--control); color: var(--disabled); cursor: default;
}
form.inline { display: inline; margin: 0; }

/* Panels and cards */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 20px; margin-bottom: 16px;
}
.card { background: var(--row); }
.card:hover { background: var(--row-hover); border-color: var(--outline); }
.hero { padding: 40px 0; text-align: center; }
.hero h1 { font-size: 2.2rem; }
.hero > p { max-width: 640px; margin-left: auto; margin-right: auto; }
.hero .lead { font-size: 1.1rem; }
.actions.center { justify-content: center; }
/* The one action a page leads with: the launcher download on the home page */
.button.large { min-height: 44px; padding: 10px 24px; font-size: 1.1rem; }
/* Home page: three short points in a row, separated by a thin line, then the sections */
.home-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 0 0 32px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-points h3 { margin: 0 0 6px; }
.home-points p { margin: 0; color: var(--muted); }
.home-section { margin-bottom: 32px; }
.muted { color: var(--muted); }

/* Fields */
input, select, textarea {
  width: 100%; min-height: 38px; padding: 8px 12px; border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--field); color: var(--text); font: inherit;
}
input:hover, select:hover, textarea:hover { border-color: var(--outline-hover); }
input:focus, select:focus, textarea:focus { border-color: var(--outline-active); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--outline-active); outline-offset: 0; }
input::placeholder, textarea::placeholder { color: var(--disabled); }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); border-color: var(--line); }
/* Selects: a gold chevron drawn with gradients (no image, the CSP allows none) instead of the grey OS arrow */
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
select:disabled { background-image: none; cursor: default; }
option { background: var(--field); color: var(--text); }
optgroup { background: var(--field); color: var(--gold); font-style: normal; font-weight: 400; }
/* File inputs: the browser's grey "Choose file" button drawn like a .secondary button */
input[type="file"] { padding: 4px 6px; color: var(--muted); cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 4px 14px; min-height: 28px;
  border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--control); color: var(--gold); font: inherit; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--outline-hover); color: var(--gold-bright); }
label { display: block; margin: 12px 0 4px; color: var(--gold); }
.field-error { color: var(--bad); font-size: var(--meta); margin-top: 4px; }

/* Notices and badges (the launcher's pill) */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: var(--radius);
  padding: 12px 16px; background: var(--panel); margin: 16px 0;
}
.notice.ok { border-left-color: var(--ok); }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap;
  border: 1px solid var(--outline); color: var(--gold);
}
.badge.ok { border-color: var(--ok); color: var(--ok); }
.badge.warn { border-color: var(--warn); color: var(--warn); }
.badge.bad { border-color: var(--bad); color: var(--bad); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* Tiles or list (view.js sets data-view on <html>); without JavaScript the tiles stay */
.result-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-bar p { margin: 8px 0; }
.view-toggle { display: inline-flex; border: 1px solid var(--outline); border-radius: var(--radius); overflow: hidden; }
html:not([data-view]) .view-toggle { display: none; }
.view-toggle button {
  gap: 6px; padding: 4px 12px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: var(--meta);
}
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button:hover { background: var(--control); color: var(--gold); }
/* The active half: filled, bright, a gold underline; set before the page is drawn via data-view */
.view-toggle button[aria-pressed="true"], html[data-view="tiles"] [data-set-view="tiles"], html[data-view="list"] [data-set-view="list"] {
  background: var(--control); color: var(--gold-bright); box-shadow: inset 0 -2px 0 var(--gold);
}
.view-icon { width: 14px; height: 14px; fill: currentColor; flex: none; }
html[data-view="list"] .grid { grid-template-columns: minmax(0, 1fr); gap: 6px; }
html[data-view="list"] .grid .card { display: flex; align-items: center; gap: 16px; padding: 10px 16px; margin: 0; }
html[data-view="list"] .grid .card > * { margin: 0; }
html[data-view="list"] .grid .card > :first-child { flex: 0 0 30%; min-width: 0; }
html[data-view="list"] .grid .card > p:not(:last-child) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-view="list"] .grid .card > :last-child { flex: none; }
html[data-view="list"] .grid .card .icon { width: 32px; height: 32px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold); font-weight: 400; }
.table-wrap { overflow-x: auto; }
code { word-break: break-all; color: var(--gold-bright); }

.search { margin-bottom: 16px; }
.filters { display: flex; gap: 16px; flex-wrap: wrap; }
.filters > div { min-width: 180px; }
.card h2 { font-size: var(--heading); margin: 0; }
.card h2 a {
  text-decoration: none; background: var(--gold-heading); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card h2 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
/* The title link covers the whole card, so a click anywhere opens it; other links stay on top */
.card { position: relative; cursor: pointer; }
.card h2 a::after { content: ""; position: absolute; inset: 0; }
.card:has(h2 a:focus-visible) { outline: 2px solid var(--outline-active); outline-offset: 2px; }
.card h2 a:focus-visible { outline: none; }
.card p a { position: relative; z-index: 1; }
.card-head { display: flex; gap: 12px; align-items: center; }
.card p { margin: 8px 0 0; }
.icon { border-radius: var(--radius); border: 1px solid var(--outline); background: var(--field); flex: none; }
.icon.big { width: 96px; height: 96px; }
.addon-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.back { margin: 0 0 8px; font-size: var(--meta); }
.back a::before { content: "\2190\00a0"; }
.addon-head h1 { display: block; margin: 0; }
.addon-head h1::before, .addon-head h1::after { content: none; }
.download h2 { margin-top: 0; }
.findings { padding-left: 0; list-style: none; }
.findings li { padding: 8px 0; border-bottom: 1px solid var(--line); }
pre { background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; overflow-x: auto; white-space: pre-wrap; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.shots figcaption { color: var(--muted); font-size: var(--meta); }
.caption-form { display: flex; gap: 6px; margin: 6px 0; }
.caption-form input { flex: 1; min-width: 0; min-height: 34px; }
.caption-status { margin: 0 0 6px; min-height: 1.2em; font-size: var(--meta); color: var(--muted); }
.caption-status.bad { color: var(--bad); }
.actions.shot-tools { align-items: center; gap: 6px; }
.icon-button { min-width: 38px; min-height: 38px; padding: 0; }
.icon-button svg { display: block; }
.drag-handle { display: inline-grid; place-items: center; width: 38px; height: 38px; color: var(--muted); cursor: grab; border: 1px dashed var(--line); border-radius: var(--radius); }
.drag-handle:hover { color: var(--gold); border-color: var(--outline); }
.shots figure.dragging { opacity: .4; }
@media (pointer: coarse) { .drag-handle { display: none; } }
.icon-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.icon-row button svg { margin-right: 6px; }

/* Picking the icon's square on the picked image */
.cropper { margin: 12px 0; }
.cropper-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.crop-preview { margin: 0; text-align: center; font-size: var(--meta); }
.crop-preview canvas { display: block; width: 64px; height: 64px; margin-bottom: 4px; }
.cropper-frame { position: relative; width: fit-content; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.cropper-frame img { display: block; max-width: min(420px, calc(100vw - 80px)); max-height: 420px; user-select: none; -webkit-user-drag: none; }
.cropper input[type="range"] { max-width: 420px; }
.cropper-square:focus-visible { outline: 2px solid var(--outline-active); outline-offset: 2px; }
.cropper-square { position: absolute; border: 2px solid var(--gold); box-shadow: 0 0 0 9999px rgba(5, 4, 3, .6); cursor: move; touch-action: none; }

/* Screenshot viewer: the whole window, zoom with the wheel, the buttons or a double click, drag to move */
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: none; background: rgba(5, 4, 3, .95); color: var(--text); }
dialog.lightbox[open] { display: flex; flex-direction: column; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox-stage { flex: 1; min-height: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.lightbox-stage img { max-width: 96vw; max-height: calc(100vh - 72px); transform-origin: center; user-select: none; -webkit-user-drag: none; }
.lightbox-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.lightbox-caption { flex: 1; min-width: 0; margin: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-bar form { margin: 0; }
.description img { max-width: 100%; height: auto; }
.description table { display: block; overflow-x: auto; }
/* API playground: only the fields the chosen endpoint uses. */
.playground:has(option[value="registry"]:checked) .pg-slug,
.playground:has(option[value="registry"]:checked) .pg-tag,
.playground:has(option[value="addon"]:checked) .pg-tag,
.playground:has(option[value="versions"]:checked) .pg-tag { display: none; }
/* API docs: side navigation and highlighted code. */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.toc { position: sticky; top: 0; max-height: calc(100vh - 120px); overflow-x: hidden; overflow-y: auto; font-size: var(--meta); }
.toc-title { margin: 0 0 8px; color: var(--gold); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li.sub { padding-left: 12px; }
.toc a { display: block; overflow-wrap: anywhere; padding: 3px 8px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); border-left-color: var(--outline-hover); }
.toc a[aria-current] { color: var(--gold-bright); border-left-color: var(--outline-active); }
.description h3[id], .description h4[id] { scroll-margin-top: 16px; }
.tok-keyword { color: var(--gold); }
.tok-string { color: var(--ok); }
.tok-number { color: var(--warn); }
.tok-comment { color: var(--muted); font-style: italic; }
pre code { color: var(--text); word-break: normal; }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
}
.pager { display: flex; justify-content: space-between; margin-top: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-row h1 { flex: 1; }
.subnav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 4px 12px; border: 1px solid var(--outline); border-radius: var(--radius); text-decoration: none; }
.subnav a:hover { border-color: var(--outline-hover); background: var(--control); }
.subnav a[aria-current="page"] { border-color: var(--outline-active); background: var(--crimson); color: var(--gold-bright); }
.danger-link { color: var(--bad); }
.danger-link:hover { color: var(--bad); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
/* Tick boxes as in the launcher: a gold-rimmed field, a gold square when ticked */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0;
  border: 1px solid var(--outline); border-radius: var(--radius); background: var(--field); cursor: pointer;
}
input[type="checkbox"]:hover { border-color: var(--outline-hover); }
input[type="checkbox"]:checked { background: var(--gold); box-shadow: inset 0 0 0 4px var(--field); }
input[type="checkbox"]:focus-visible { outline: none; border: 2px solid var(--outline-active); box-shadow: inset 0 0 0 3px var(--field); }
input[type="checkbox"]:not(:checked):focus-visible { box-shadow: none; }
input[type="checkbox"]:disabled { border-color: var(--line); cursor: default; }
label.check input { width: 20px; }
fieldset.picker { border: 1px solid var(--line); border-radius: var(--radius); margin: 16px 0 0; padding: 4px 12px; }
fieldset.picker legend { color: var(--gold); padding: 0 6px; }
label.pick { flex-wrap: wrap; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
label.pick:last-child { border-bottom: none; }
.pick-name { color: var(--gold); }
.pack-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pack-row:last-child { border-bottom: none; }
.pack-row select { margin-top: 6px; }
.removed-note { display: none; color: var(--bad); }
.pack-row:has(input[name="keep"]:not(:checked)) .removed-note { display: block; margin-top: 4px; }
.pack-row:has(input[name="keep"]:not(:checked)) select { opacity: .5; }
input[readonly] { color: var(--gold-bright); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.copy-row button { flex: none; }
.member { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-action input { width: 12em; min-height: 34px; }
.preview { border: 1px dashed var(--outline); border-radius: var(--radius); padding: 12px; min-height: 48px; background: var(--field); }
.htmx-indicator { display: none; }
/* Search results being reloaded: dimmed until the new ones arrive */
#results { transition: opacity .15s; }
#results.htmx-request { opacity: .5; pointer-events: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

.tile { display: block; text-decoration: none; color: var(--text); }
.tile:hover { border-color: var(--outline-hover); }
.tile strong { font-family: var(--font-display); color: var(--gold); font-size: 1.6rem; font-weight: 400; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 12px; }
.admin-actions label { margin: 0; flex-basis: 100%; }
.admin-actions input { flex: 1 1 220px; width: auto; }
input.narrow { width: 6em; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Too low for a fixed frame (phone held sideways): main scrolls as a whole again */
@media (max-height: 560px) {
  main:has(> .list) { display: block; overflow-y: auto; padding-bottom: 24px; }
  main:has(> .list) > .list { overflow-y: visible; }
}

@media (max-width: 640px) {
  .brand { font-size: 32px; }
  h1 { font-size: 24px; gap: 10px; }
  .addon-head { flex-direction: column; }
  .hero { padding: 24px 0; }
  .hero h1 { font-size: 1.6rem; }
  .top nav > a:not(.button) { padding: 8px 12px; font-size: var(--body); }
  /* Leave the list as much room as possible: filters side by side, no footer under it */
  .search .filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .search .filters > div { min-width: 0; }
  html[data-view="list"] .grid .card { flex-wrap: wrap; gap: 4px 16px; }
  html[data-view="list"] .grid .card > :first-child { flex: 1 1 100%; }
  html[data-view="list"] .grid .card > p:not(:last-child) { display: none; }
  main:has(> .list) > .bottom { display: none; }
  /* Pack content: one block per addon, name and check on top, version and folders below */
  .pack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pack-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .pack-table td { padding: 0; border: none; }
  .pack-table td.check { grid-row: 1; grid-column: 2; }
  .pack-table td:nth-child(2), .pack-table td:nth-child(4) { grid-column: 1 / -1; font-size: var(--meta); color: var(--muted); }
}

/* Touch screens: controls of at least 44px, like the launcher in Game Mode */
@media (pointer: coarse) {
  .button, button:not(.link), .top nav > a:not(.button) { min-height: 44px; }
  input:not([type="checkbox"]), select { min-height: 44px; }
}

/* Repo field of the publish forms: the account, a slash, the name; suggestions below it */
.repo-input { display: flex; align-items: center; gap: 8px; }
.repo-input input { flex: 1; width: auto; min-width: 0; }
.repo-input select { flex: none; width: auto; max-width: 45%; }
.repo-owner { color: var(--gold-bright); }
.repo-slash { color: var(--muted); }
.suggestions { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
button.suggestion {
  justify-content: flex-start; gap: 8px; text-align: left; flex-wrap: wrap;
  border-color: var(--line); background: var(--row); color: var(--text);
}
button.suggestion:hover { border-color: var(--outline-hover); background: var(--row-hover); color: var(--gold-bright); }
