/* App-specific styling.
 *
 * Almost nothing belongs here. As of portal-kit v0.9.0 the app shell
 * (.pk-app-header / .pk-app-title / .pk-app-user / .pk-app-main) and the
 * auth-page shell (.pk-login-page / .pk-login-card / .pk-login-links) are
 * styled by portal-kit's own theme.css. They used to live here only because
 * layout.js emitted those class names with no rule behind them.
 *
 * Keeping local copies would be worse than redundant: this file loads AFTER
 * theme.css on every page, so a stale copy silently wins the cascade — which
 * would, for instance, override the navigation's sliding indicator with the
 * old flat header.
 *
 * The page's base style (margin, background, colour, font) is portal-kit's
 * too since v0.98.0 (its adr/079): theme.css styles body.pk-app-page and the
 * sign-in pages.
 */

/* The gallery editor's picture grid — this application's own LAYOUT, not a
 * component: every control inside a tile is portal-kit's (.form-group,
 * .btn, the enhanced inputs), and every colour is a theme token, so the
 * grid follows the installation's branding and the dark theme without a
 * rule of its own. Kept here because no portal-kit screen draws a grid of
 * pictures with a caption field under each; the day one does, this moves. */

/* A small muted note under a control. Not portal-kit's .pk-field-hint: that
   is 12px and sits tight under its field, this is body text with air below
   — it introduces a list or a section as often as it explains a field. */
.app-note {
  margin: 6px 0 12px;
  color: var(--pk-text2);
}

/* The publication chain: a checkbox, and whatever it reveals to its right.
 * Nested — the row of revealed controls is itself one of these — so one
 * rule lays out both levels and the whole thing wraps as one line on a
 * narrow window. The gallery's chain and the one-box rows of the exhibitor,
 * sponsor and FAQ editors.
 *
 * align-items: flex-end, not center: the boxes stand beside .form-groups
 * that carry their label ABOVE the field, so the fields' bottoms are the
 * one edge every item shares. */
.app-publish {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.app-publish .form-group {
  margin: 0;
}

/* …but a box bottom-aligned with a field sits level with the field's lower
 * EDGE, visibly below its middle — the chain read as two rows of controls.
 * Each checkbox host is therefore as tall as a field and centres its box, so
 * the two middles are on one line, also for a host alone on a wrapped line.
 * The height is portal-kit's text field: 14px text at a normal line height,
 * 6px padding and a 1px border, top and bottom (theme.css, "Every text-like
 * field"). Anything below a field — a hint — stands under the chain instead
 * (app.html), because inside a .form-group it lifts that one field. */
.app-publish > span {
  display: flex;
  align-items: center;
  min-height: calc(1.2 * 14px + 2 * 6px + 2 * 1px);
}

/* The address on the website, under the chain. */
.gal-link {
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.gal-tile {
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius);
  background: var(--pk-surface);
  padding: 10px;
}

.gal-tile.is-cover {
  outline: 2px solid var(--pk-accent);
  outline-offset: 1px;
}

.gal-tile img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--pk-radius);
  background: var(--pk-bg);
}

.gal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
  font-size: 12px;
  color: var(--pk-text2);
}

.gal-tile .form-group {
  margin: 6px 0;
}

.gal-tile-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 6px;
}

/* The board's functions in the team dialog: the member's name, the
   function, and ▲▼ for the row's place in the list. On a phone the name
   goes above, the field and the buttons stay side by side. */
.team-functions { display: flex; flex-direction: column; gap: 8px; }
.team-function {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: minmax(8rem, 1fr) 2fr auto;
}
.team-function__name { overflow-wrap: anywhere; }
.team-function__order { display: flex; gap: 2px; }
@media (max-width: 560px) {
  .team-function { grid-template-columns: 1fr auto; }
  .team-function__name { grid-column: 1 / -1; }
}

/* The list of what converting a gallery changes, in its confirmation. */
.gal-convert { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* An exhibitor's days: the box for "is there", the location that day and
   where in its room the logo sits on the hall plan. The dropdowns keep a
   readable width; stacked on a phone. */
.app-day-row {
  display: grid; gap: 8px 12px; align-items: center;
  grid-template-columns: minmax(9rem, auto) minmax(12rem, 1fr) minmax(9rem, auto);
  margin-bottom: 6px;
}
@media (max-width: 560px) {
  .app-day-row { grid-template-columns: 1fr; }
}

/* "Platz im Saal" (app.js, pickCells): a room of the hall plan with its
   grid, in the confirmation layer above the editor. That layer is sized
   for a question; a floor plan needs the width. :has rather than a class
   set from the script, because nothing tells the script when the layer
   closes to take it off again. */
.pk-modal-backdrop-2 .pk-modal:has(.app-cellpicker) { width: 56rem; max-width: 100%; }
.app-cellpicker h4 { margin: 12px 0 4px; }
.app-cellpicker-plan {
  /* What the dialog (90vh) leaves beside its title, the hint and the
     buttons, so the room is seen whole without scrolling. */
  display: block; width: 100%; max-height: calc(90vh - 17rem); min-height: 12rem; margin: 8px 0;
  /* Dragging picks a block, on a touch screen too. */
  touch-action: none; user-select: none;
}
.app-cellpicker-room { fill: var(--pk-bg); stroke: var(--pk-text); stroke-width: 2; }
.app-cell { fill: transparent; stroke: var(--pk-border); stroke-width: 1; cursor: pointer; }
.app-cell:hover { stroke: var(--pk-accent); stroke-width: 2; }
.app-cell.is-taken { fill: var(--pk-muted); fill-opacity: 0.35; }
.app-cell.is-on { fill: var(--pk-accent); fill-opacity: 0.7; }
.app-cell.is-on.is-taken { stroke: var(--pk-text); stroke-dasharray: 3 2; }
.app-cellpicker-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }


/* The Programm page: the website's timetable from the editing side. A grid
   and not a <table>, because an item is placed over the empty cells it
   covers (grid-row: start / span n) — the slots stay buttons underneath,
   the item button lies on top. Scrolls sideways when the locations do not
   fit, with the time column pinned. */
.app-program-grid {
  display: grid;
  grid-template-columns: 4.5rem repeat(var(--app-program-cols, 1), minmax(9rem, 1fr));
  grid-auto-rows: minmax(2.25rem, auto);
  overflow-x: auto;
  border-top: 1px solid var(--pk-border);
  margin-top: 8px;
}
.app-program-corner,
.app-program-head,
.app-program-time {
  grid-row: 1;
  padding: 6px 8px;
  font-weight: 600;
  color: var(--pk-text2);
  border-bottom: 1px solid var(--pk-border);
  background: var(--pk-surface);
}
.app-program-corner { grid-column: 1; position: sticky; left: 0; z-index: 2; }
.app-program-time {
  grid-column: 1;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px dashed var(--pk-border);
  position: sticky; left: 0; z-index: 2;
}
.app-program-slot {
  border: 0;
  border-bottom: 1px dashed var(--pk-border);
  border-left: 1px solid var(--pk-border);
  background: transparent;
  cursor: pointer;
  min-height: 2.25rem;
}
.app-program-slot:hover,
.app-program-slot:focus-visible { background: var(--pk-surface2); }
.app-program-item {
  z-index: 1;
  margin: 2px 4px;
  padding: 6px 8px;
  display: flex; flex-direction: column; gap: 2px;
  align-items: flex-start; text-align: left;
  border: 1px solid var(--pk-accent);
  border-left-width: 4px;
  border-radius: var(--pk-radius);
  background: var(--pk-surface);
  color: var(--pk-text);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
}
.app-program-item:hover,
.app-program-item:focus-visible { background: var(--pk-surface2); }
/* "An allen Standorten" above the location picker in the item editor. */
.app-program-all { margin-bottom: 6px; }
.app-program-item-time { font-size: 12px; color: var(--pk-text2); font-variant-numeric: tabular-nums; }
.app-program-item-title { font-weight: 600; }
.app-program-item-audience { font-size: 12px; color: var(--pk-text2); }

/* Einteilung: the teams down the left and the time windows along the top
   (both sticky), one column per option of the chosen categories, the people
   as chips. The grid is the scroller in both directions, never the page: a
   sticky head sticks to its nearest scroller, and overflow-x alone already
   makes the grid that, so against the page's scrolling it would never stick.
   How high it may get is fitRosterGrid's (app.js). */
.app-roster-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px;
  margin-bottom: 8px;
}
.app-roster-toolbar .form-group { margin-bottom: 0; min-width: 14rem; flex: 1 1 14rem; }
.app-roster-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-roster-grid {
  display: grid;
  /* fit-content: never narrower than the longest word of a team's name
     ("Kinderbastelecke"), wrapped beyond 16rem — a long name used to run
     into the first column, whose track stayed at its minimum. */
  grid-template-columns: fit-content(16rem) repeat(var(--app-roster-cols, 1), minmax(9rem, 1fr));
  overflow: auto;
  box-sizing: border-box;
  max-height: var(--app-roster-max-h, none);
  /* The sticky cells' z-indexes stay in here, under the toolbar's dropdowns. */
  isolation: isolate;
  border-top: 1px solid var(--pk-border);
  margin-top: 8px;
}
/* Nothing to show (no version, no teams, no columns): only the note above
   stands, without the grid's top border under it. */
.app-roster-grid:empty { display: none; }
.app-roster-corner,
.app-roster-head,
.app-roster-team,
.app-roster-foot {
  padding: 6px 8px;
  font-weight: 600;
  color: var(--pk-text2);
  border-bottom: 1px solid var(--pk-border);
  background: var(--pk-surface);
}
.app-roster-corner,
.app-roster-team { position: sticky; left: 0; z-index: 1; }
.app-roster-head { position: sticky; top: 0; z-index: 2; }
.app-roster-corner:not(.app-roster-foot) { top: 0; z-index: 3; }
.app-roster-team { color: var(--pk-text); }
.app-roster-foot { font-weight: 400; font-variant-numeric: tabular-nums; }
.app-roster-cell {
  min-width: 0;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--pk-border);
  border-left: 1px solid var(--pk-border);
  min-height: 2.5rem;
}
.app-roster-chip {
  padding: 2px 8px;
  border: 1px solid var(--pk-border);
  border-radius: 999px;
  background: var(--pk-surface2);
  font-size: 13px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Oneself, found at a glance: the accent and a star. */
.app-roster-me {
  border-color: var(--pk-accent);
  background: var(--pk-accent);
  color: var(--pk-accent-contrast);
  font-weight: 600;
}
/* What changed against the version shown before: new chips light up, a
   cell somebody left flashes once. */
.app-roster-added { animation: app-roster-added 1.6s var(--pk-ease, ease-out); }
.app-roster-removed { animation: app-roster-removed 1.6s var(--pk-ease, ease-out); }
@keyframes app-roster-added {
  0%, 40% { box-shadow: 0 0 0 3px var(--pk-green); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes app-roster-removed {
  0%, 40% { background: color-mix(in srgb, var(--pk-red) 18%, transparent); }
  100% { background: transparent; }
}
/* A card a link pointed at (#market/export): lit up once, then plain. */
.app-flash { animation: app-roster-added 2.4s var(--pk-ease, ease-out); }
/* The requirements (Bedarf), for the administrators: below the minimum
   red, exactly at it yellow — no reserve; everything else stays plain. The
   count and the requirement stand small on a line of their own. */
.app-roster-short { background: color-mix(in srgb, var(--pk-red) 18%, transparent); }
/* Not --pk-yellow: in the light theme that is amber (#b45309), and tinted
   it reads as a second shade of red. A real yellow in both themes. */
.app-roster-exact { background: light-dark(color-mix(in srgb, #facc15 38%, transparent), color-mix(in srgb, #fbbf24 32%, transparent)); }
/* What "Aktualisieren" changed, in its dialog. */
.app-roster-changes-head {
  margin: 1rem 0 0.25rem;
  font-size: 0.95rem;
}
.app-roster-changes {
  margin: 0;
  padding-left: 1.25rem;
}
.app-roster-changes li {
  margin: 0.15rem 0;
}

.app-roster-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: 4px 0 0; font-size: 12px; color: var(--pk-text2);
}
.app-roster-swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 3px;
  border: 1px solid var(--pk-border);
}
.app-roster-swatch + span { margin-right: 8px; }
.app-roster-need {
  flex: 0 0 100%;
  font-size: 11px;
  color: var(--pk-text2);
  font-variant-numeric: tabular-nums;
}
/* Two zones per cell: on duty, and under it the stand-ins (Ersatz), dimmed.
   An empty stand-in zone shows only as the drop target while a chip of
   its cell is dragged. ↓ and ↑ in a chip move it between the two. */
.app-roster-zone {
  flex: 0 0 100%;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px;
  min-width: 0;
  border-radius: 6px;
}
.app-roster-active { min-height: 1.5rem; }
.app-roster-reserve { padding-top: 4px; border-top: 1px dashed var(--pk-border); }
.app-roster-reserve.is-empty:not(.is-drop-target) { display: none; }
.app-roster-reserve-head {
  flex: 0 0 100%;
  font-size: 11px;
  color: var(--pk-text2);
}
.app-roster-chip-reserve {
  opacity: 0.6;
  border-style: dashed;
  background: transparent;
}
.app-roster-chip-reserve:hover,
.app-roster-chip-reserve:focus-within { opacity: 1; }
/* Oneself as a stand-in: the accent's border and star, but on a tint —
   .app-roster-me's contrast colour on the stand-in's transparent
   background was white on white, only the ⭐ left to see. */
.app-roster-chip-reserve.app-roster-me {
  background: color-mix(in srgb, var(--pk-accent) 14%, transparent);
  color: var(--pk-text);
  opacity: 0.85;
}
.app-roster-chip[draggable="true"] {
  display: inline-flex; align-items: center; gap: 2px;
  cursor: grab;
  padding-right: 2px;
}
.app-roster-chip-name { overflow: hidden; text-overflow: ellipsis; }
.app-roster-move {
  flex: none;
  border: 0; background: transparent; color: inherit;
  font: inherit; line-height: 1;
  padding: 1px 4px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.7;
}
.app-roster-move:hover,
.app-roster-move:focus-visible { opacity: 1; background: color-mix(in srgb, currentColor 15%, transparent); }
.app-roster-dragging .is-dragged { opacity: 0.35; }
.app-roster-dragging .is-drop-target { outline: 2px dashed var(--pk-accent); outline-offset: 2px; min-height: 1.5rem; }
.app-roster-dragging .is-drop-over { background: color-mix(in srgb, var(--pk-accent) 15%, transparent); }
.app-roster-size { font-size: 12px; font-weight: 400; color: var(--pk-text2); }
.app-roster-team { overflow-wrap: break-word; }
/* The row's filler under the team's name: Min and Max one under the
   other, ⇉ beside them. */
.app-roster-req-row { display: flex; align-items: flex-end; gap: 6px; margin-top: 6px; font-weight: 400; }
.app-roster-req-row .app-roster-req-fields { flex: 1 1 auto; min-width: 0; }
.app-roster-fill { flex: 0 0 auto; padding: 4px 8px; }
/* Editing the requirements: Min above Max, each a label and its field on
   one line, filling the cell — side by side, two fields with their
   spinners did not fit a 9rem column and ran into the next one. */
.app-roster-req { flex-direction: column; flex-wrap: nowrap; gap: 4px; align-items: stretch; }
.app-roster-req-fields { display: flex; flex-direction: column; gap: 4px; }
.app-roster-req-field {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-items: center; gap: 4px;
  min-width: 0;
  font-size: 11px; color: var(--pk-text2);
}
.app-roster-req-field > :last-child { min-width: 0; width: 100%; }
.app-roster-req-field .form-input { width: 100%; min-width: 0; padding: 4px 6px; box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  .app-roster-added { animation: none; outline: 2px solid var(--pk-green); }
  .app-roster-removed { animation: none; }
}

/* One line of fields and the button they belong to: "Neuer Standort" and
   "Neuer Lagerort" with Hinzufügen, the Spielebestand's scan field (a
   scanner types into it and presses Enter) with Suchen. Bottom-aligned, so
   the button stands level with the field; wraps on a phone.

   --fields is the same line without a button — Beginn and Ende in the
   program item — top-aligned instead, so an error line under one does not
   push the other out of line, with the dialog's spacing below it. */
.app-form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.app-form-row .form-group { flex: 1 1 16rem; margin: 0; }
.app-form-row--fields { align-items: flex-start; margin-bottom: 12px; }
.app-form-row--fields .form-group { flex: 0 0 10rem; }
/* The Inventur's location and shelf stand above the code field and camera. */
.app-st-place { margin-bottom: 16px; }
/* The market panel holds two lists; the second needs air above it. */
.app-card-gap { margin-top: 24px; }
/* The game editor's stock: one row per location (and shelf) with a number. */
.app-stock-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.app-stock-row {
  display: grid; gap: 6px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 9rem) 6rem auto;
}
.app-stock-row .form-group { margin: 0; }
/* The row's note (migration 089), under the row across its width. */
.app-stock-row > .app-stock-note { grid-column: 1 / -1; }
/* The row's barcode (the Inventur's, migration 073): shown, not edited. */
.app-stock-code { color: var(--pk-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .app-stock-row { grid-template-columns: minmax(0, 1fr) 5rem auto; }
  .app-stock-row > .app-stock-shelf { grid-column: 1 / -1; grid-row: 2; }
  .app-stock-row > .app-stock-code { grid-column: 1 / -1; grid-row: 3; }
}
/* A Spielebörse window on the Stammdaten page: the day, from, to, ✕. */
.app-window-row {
  display: grid; gap: 6px; align-items: center;
  grid-template-columns: minmax(0, 1fr) 6rem 6rem auto;
}
.app-window-row .form-group { margin: 0; }
@media (max-width: 560px) {
  .app-window-row { grid-template-columns: minmax(0, 1fr) 4.5rem 4.5rem auto; }
}
/* A bundle on the Stammdaten page: name, price, original, ▲▼✕ on the
   first line, the description and the saving under it. */
.app-bundle-row {
  display: grid; gap: 6px; align-items: center;
  grid-template-columns: minmax(0, 1fr) 6rem 6rem auto auto auto;
  padding-bottom: 6px; border-bottom: 1px dashed var(--pk-border);
}
.app-bundle-row .form-group { margin: 0; }
.app-bundle-row > .app-bundle-desc { grid-column: 1 / 4; }
.app-bundle-row > .app-bundle-saving { grid-column: 4 / -1; white-space: nowrap; margin: 0; }
@media (max-width: 560px) {
  .app-bundle-row { grid-template-columns: minmax(0, 1fr) 4.5rem 4.5rem; }
  .app-bundle-row > .app-bundle-desc { grid-column: 1 / -1; }
  .app-bundle-row > .app-bundle-saving { grid-column: 1 / -1; }
}
.app-copy-list { margin: 0 0 12px; padding-left: 1.2em; }

/* The Spielebörse's self-service and its handover (migration 033). The
   status line is a sentence, set off from the notes around it; the
   handover's list of registered games is one row per game, its buttons at
   the end — a list, because its rows are actions, not a sortable table. */
.app-market-status { font-weight: 600; margin: 8px 0 12px; }
.app-checkin-number { font-size: 1.4rem; font-weight: 600; margin: 0 0 4px; }
/* "Meine Spiele": what the person is for the Börse, three columns — the
   fact, its value set off, and what it means in the muted hint colour. */
.app-market-facts-wrap { margin-top: 8px; }
.app-market-facts th { width: 11rem; white-space: nowrap; vertical-align: top; }
.app-market-facts td.app-fact-value { font-weight: 600; white-space: nowrap; vertical-align: top; }
.app-market-facts { width: 100%; table-layout: auto; }
.app-market-facts td.app-fact-note { color: var(--pk-text2); white-space: normal; min-width: 14rem; }
/* The copy dialog: what each of its buttons does, under the facts. */
.app-copy-actions-help { margin: 12px 0 0; padding-left: 20px; color: var(--pk-text2); }
.app-copy-actions-help li + li { margin-top: 4px; }
/* On a phone the three columns do not fit (the note alone wants 14rem):
   each row becomes two lines — the fact and its value, the note under
   them across the full width. */
@media (max-width: 560px) {
  .app-market-facts, .app-market-facts tbody { display: block; }
  .app-market-facts tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--pk-border);
  }
  .app-market-facts tr:last-child { border-bottom: 0; }
  .app-market-facts th, .app-market-facts td { display: block; width: auto; padding: 0; border: 0; }
  .app-market-facts th { white-space: normal; }
  .app-market-facts td.app-fact-value { text-align: right; }
  .app-market-facts td.app-fact-note { grid-column: 1 / -1; min-width: 0; margin-top: 4px; }
}
/* The pre-printed label's number, read off the roll at arm's length. */
.app-label-input { font-size: 1.6rem; font-weight: 600; max-width: 10rem; }
.app-desk-actions { margin-bottom: 8px; justify-content: flex-end; }

/* The inventory's stage 2 (migration 034). The lending desk's result line
   is read from a step away; the till's total likewise. */
.app-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.app-lend-result { font-size: 1.4rem; font-weight: 600; margin: 12px 0; min-height: 1.8rem; }
.app-lend-result.is-error { color: var(--pk-red); }
.app-till-total { font-size: 1.4rem; font-weight: 600; text-align: right; margin: 8px 0; }
.app-basket { list-style: none; margin: 0; padding: 0; }
.app-basket li {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--pk-border);
}
.app-basket .app-basket-what { flex: 1 1 14rem; }
.app-basket .app-basket-price { font-weight: 600; white-space: nowrap; }
.app-settle-totals { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0 0 8px; }
.app-settle-totals div { display: flex; flex-direction: column; }
.app-settle-totals strong { font-size: 1.2rem; }
.app-sheet-lines { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.app-sheet-lines th, .app-sheet-lines td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--pk-border); }
.app-sheet-lines td.app-num, .app-sheet-lines th.app-num { text-align: right; white-space: nowrap; }
.app-sheet-sum { display: flex; justify-content: space-between; font-weight: 600; margin: 4px 0; }
/* Aushänge: the article's description above the list, its line breaks
   kept — "Menü 1: …" on a line of its own — on screen and on paper. */
.app-bulletin-desc { white-space: pre-line; margin: 0; }
/* The article on the page: its picture centred, without a box of its own,
   and the description centred under it. */
.app-bulletin-head { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 12px 0; }
.app-bulletin-head .app-bulletin-desc { text-align: center; }
/* The latecomers' table, under the bulletin's own. */
.app-bulletin-late { margin-top: 24px; }
.app-bulletin-image { display: block; max-width: 100%; max-height: 200px; width: auto; height: auto; }
/* The printed bulletin: every other row shaded rather than a line under
   each — thin lines come out unevenly heavy on paper (printBulletin). */
.app-bulletin-sheet { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.app-bulletin-sheet th, .app-bulletin-sheet td { text-align: left; padding: 4px 6px; border: none; }
.app-bulletin-sheet thead th { border-bottom: 1.5pt solid currentColor; }
.app-bulletin-sheet tbody tr:nth-child(even) td { background: #ececec; }
.app-bulletin-sheet tr { break-inside: avoid; }
.app-print-area .app-bulletin-sheet { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.app-print-area { display: none; }
@media print {
  body > *:not(#printArea) { display: none !important; }
  .app-print-area { display: block; color: #000; background: #fff; font-size: 11pt; }
  .app-print-area .app-sheet-lines th, .app-print-area .app-sheet-lines td { border-color: #999; }
}

/* "Spiel hinzufügen" (the photo wizard, portal-kit's PK.openWizard): the
   guide picture, the shutter row, the spinner line and the "recorded" line. */
.app-wz-guide { display: block; width: 100%; max-width: 260px; max-height: 38vh; object-fit: contain; height: auto; margin: 8px auto 12px; border-radius: var(--pk-radius); }
/* The photo contributed for an own edition (migration 065), cut. */
.app-wz-edphoto { display: block; max-width: 100%; max-height: 40vh; object-fit: contain; margin: 8px auto 12px; border-radius: var(--pk-radius); }
/* In the wizard the cropper shares the screen with the name and the
   buttons: a lower stage keeps "Übernehmen" in view on a phone. */
#wzEdCrop .pk-crop-view { height: min(42vh, 400px); }
/* The dialog's body is 60vh (tall): the hint and the turn buttons take 8.5rem. */
#picCrop .pk-crop-view { height: max(200px, calc(60vh - 8.5rem)); }
/* The photo step fits the window (2026-11-13: on a laptop the camera ran
   past it and "Foto machen" was out of sight; on an iPhone the cut photo's
   "Übernehmen" was reached through two scrollbars). Every box between the
   step and the camera or the cropper is a column that takes what the lines
   and buttons leave — portal-kit grows the camera's and the cropper's own
   box (theme.css, the wizard on the whole screen). */
.pk-modal-screen .pk-wizard-panel :is(#wzPhotoLive, .app-wz-photo, #wzPhotoCrop, #wzPhotoCropArea):not(.hidden) {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
}
/* "Bild zuschneiden" in the game editor, under the cover. */
.app-cover-crop { margin-top: 8px; }
.app-cover-actions:not(.hidden) { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.app-cover-cam { min-height: 320px; }
.app-cover-crop .pk-crop-view { height: min(50vh, 480px); }
.app-crop-tools { margin-top: 6px; }
.app-wz-em { color: var(--pk-accent); font-weight: 700; }
.app-wz-question { margin: 0; color: var(--pk-text2); }
/* The matches' publisher filter (migration 093): a row of toggles above
   the tiles, the count of each beside its name; it wraps on a phone. */
.app-wz-pubs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.app-wz-pubs[hidden] { display: none; }
.app-wz-pub { border: 1px solid var(--pk-border); background: var(--pk-surface); color: var(--pk-text);
  border-radius: 999px; padding: 4px 12px; font: inherit; cursor: pointer; }
.app-wz-pub.is-on { border-color: var(--pk-accent); background: var(--pk-accent); color: var(--pk-bg); }
.app-wz-pub-n { opacity: 0.7; font-size: 0.85em; }
.app-wz-pub-why { color: var(--pk-muted); font-size: 0.85em; }
.app-wz-candidate { margin: 4px 0; font-size: 1.5rem; font-weight: 700; overflow-wrap: anywhere; }
/* A proposal's cover beside its title: enough to tell "I AM DONE" from a
   German box at a glance, small enough for a phone. */
.app-wz-candidate-row { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: start; }
.app-wz-candidate-row > div { min-width: 0; }
.app-wz-cover { flex: 0 0 auto; width: 72px; max-height: 96px; object-fit: contain; border-radius: 4px; }
/* Without a cover: portal-kit's crossed-out picture in a square frame. */
.app-wz-cover.pk-no-picture { height: 72px; background: var(--pk-surface2); }
/* A cover opens large on a tap (bindCoverZoom): a bare button around it,
   portal-kit's lens badge in its corner, smaller to suit the 72 px. */
.app-wz-cover-zoom {
  position: relative; flex: 0 0 auto; display: inline-flex;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: zoom-in;
}
.app-wz-cover-zoom:focus-visible { outline: 3px solid var(--pk-accent); outline-offset: 2px; border-radius: 4px; }
.app-wz-cover-zoom .pk-picture-lens { width: 26px; height: 26px; right: -6px; bottom: -6px; }
.app-wz-cover-zoom .pk-picture-lens svg { width: 16px; height: 16px; }
/* A cover that did not load is portal-kit's placeholder: nothing to enlarge. */
.app-wz-cover-zoom:has(.pk-no-picture) { cursor: default; }
.app-wz-cover-zoom .pk-no-picture ~ .pk-picture-lens { display: none; }
.app-wz-bgg { margin: 8px 0 0; }
.app-wz-ean { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.app-wz-trouble { text-align: center; margin-bottom: 0; }
.app-wz-shoot { justify-content: center; margin-top: 12px; }
.app-wz-shoot .btn { min-width: 12rem; }
/* The photo step on a phone: a line why, and "Foto machen" opens the
   full-screen camera — no empty black box and no second start button
   before it (the iPhone test of 2026-10-27). */
.app-wz-open, .app-wz-photo-intro { display: none; }
@media (pointer: coarse) {
  .app-wz-photo-intro { display: block; }
  .app-wz-open { display: flex; justify-content: center; }
  .app-wz-open .btn { min-width: 12rem; }
  .app-wz-photo .pk-camera:is([data-state="idle"], [data-state="paused"]) .pk-camera-view { display: none; }
  /* The camera's own start button; the step's buttons moved into the row stay. */
  .app-wz-photo .pk-camera-tools .btn:not(.pk-camera-pick):not([data-wz]):not(#wzShoot) { display: none; }
}
.app-wz-wait { display: flex; align-items: center; gap: 8px; margin: 24px 0; }
.app-wz-done { font-size: 1.3rem; font-weight: 600; text-align: center; margin: 32px 0; }

/* The take-over layer at the desk: the fields, and the picked game's cover
   at the top right as the last look that the box in hand is that game
   (openTakeModal, takeCover). Above the fields on a phone. The large
   picture on hover or a tap is portal-kit's imagepreview.js. */
.app-take { display: flex; gap: 16px; align-items: flex-start; }
.app-take-fields { flex: 1 1 auto; min-width: 0; }
.app-take-cover { flex: 0 0 8rem; }
/* The desk card's edition (migration 061): the chosen edition's cover beside
   its name and "Andere Ausgabe", or the whole picker (PK.pictureChoice). */
.app-desk-editions:empty { display: none; }
.app-desk-edition { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-desk-edition img { width: 72px; height: 72px; object-fit: contain; border-radius: 4px; background: var(--pk-bg); }
/* The game editor's own editions (migration 065): photo, who and when,
   the actions on the right. */
.app-own-editions { display: flex; flex-direction: column; gap: 8px; }
.app-own-edition { display: flex; align-items: center; gap: 12px; }
.app-own-edition img { width: 72px; height: 72px; object-fit: contain; border-radius: 4px; background: var(--pk-bg); flex: none; }
.app-own-edition-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.app-own-edition-actions { display: flex; gap: 4px; flex: none; }
.app-own-edition-pending { color: var(--pk-yellow); font-weight: 600; }
/* A cover proposal (migration 066) in the Spiele list where the cover is
   missing: the photo, framed as not approved yet. */
.app-thumb-pending .pk-thumb { outline: 2px dashed var(--pk-yellow); outline-offset: 1px; }
/* The editor's "Cover zur Freigabe": the photo large enough to judge. */
.app-own-edition .app-proposal-img { flex: none; padding: 0; border: 0; background: var(--pk-bg); border-radius: 4px; cursor: zoom-in; }
.app-own-edition .app-proposal-img img { display: block; width: 120px; height: 120px; object-fit: contain; border-radius: 4px; }
label.app-proposal-pick { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px; width: auto; margin: 0; font-size: inherit; font-weight: normal; cursor: pointer; }
.app-proposal-pick input[type="radio"] { flex: none; width: auto; height: auto; margin: 0; }
/* "Bilder zur Freigabe": one row per photo, the picture large enough to judge. */
.app-pictures { display: flex; flex-direction: column; gap: 16px; padding: 0 16px 16px; }
.app-picture { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-picture-img { flex: none; padding: 0; border: 0; background: var(--pk-bg); border-radius: 6px; cursor: zoom-in; }
.app-picture-img img, .app-picture-img .pk-no-picture { display: block; width: 160px; height: 160px; object-fit: contain; border-radius: 6px; }
.app-picture-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.app-picture .pk-actions { margin: 0; }
.app-tab-count { margin-left: 6px; }
#invPicturesPanel .card > .app-note { padding: 0 16px; }
.app-take-img { display: block; cursor: zoom-in; }
.app-take-img img { display: block; width: 8rem; max-height: 10rem; object-fit: contain; border-radius: var(--pk-radius); background: var(--pk-surface2); }
.app-take-nocover {
  width: 8rem; height: 8rem; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--pk-border); border-radius: var(--pk-radius); color: var(--pk-muted); font-size: 13px; padding: 8px;
}
@media (max-width: 480px) {
  .app-take { flex-direction: column-reverse; }
  .app-take-cover { flex-basis: auto; align-self: center; }
}

/* A barcode camera while its code is looked up (scanBox): the picture gives
   way to a spinner in the same place, the height stays. So it does to the
   two seconds' "counted" (scanConfirmed), its proposal card laid out as one
   row to fit the wizard's strip. */
.app-scan-box { position: relative; }
.app-scan-wait { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 8px; }
/* The children too: portal-kit keeps a paused camera's video visibility:
   visible, which a hidden parent does not overrule. */
.app-scan-box.is-searching > :first-child,
.app-scan-box.is-searching > :first-child .pk-camera .pk-camera-video { visibility: hidden; }
.app-scan-box.is-searching > .app-scan-wait { display: flex; }
.app-scan-done { display: none; position: absolute; inset: 0; align-items: center; }
.app-scan-box.is-confirmed { min-height: 88px; }
.app-scan-box.is-confirmed > :first-child,
.app-scan-box.is-confirmed > :first-child .pk-camera .pk-camera-video { visibility: hidden; }
.app-scan-box.is-confirmed > .app-scan-done { display: flex; }
.app-scan-done > div { width: 100%; }
.app-scan-done .pk-proposal { flex-direction: row; gap: 12px; padding: 8px; }
.app-scan-done .pk-proposal-item { flex: 1; min-width: 0; width: auto; text-align: left; }
.app-scan-done .pk-proposal-actions { gap: 16px; }
.app-scan-done .pk-proposal-btn { width: 56px; height: 56px; font-size: 24px; }

/* The desk scan (mountDeskScan): the camera strip on the left, the
   stage — what the last scan is — on the right; one column on a phone.
   The notes are a coloured left edge, the card the take-over's fields. */
.app-desk { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.app-desk-cam { flex: 0 0 22rem; max-width: 40%; }
.app-desk-main { flex: 1 1 auto; min-width: 0; }
.app-desk-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.app-desk-bar input { flex: 1 1 auto; min-width: 0; }
.app-desk-count { color: var(--pk-muted); font-size: 13px; white-space: nowrap; }
.app-desk-stage { min-height: 6rem; }
.app-desk-prompt { font-size: 1.05rem; margin: 8px 0; }
.app-desk-note { border-left: 4px solid var(--pk-accent); background: var(--pk-surface2); padding: 8px 12px; margin: 8px 0; border-radius: var(--pk-radius); }
.app-desk-note.is-warning { border-left-color: var(--pk-yellow); }
.app-desk-note.is-error { border-left-color: var(--pk-red); }
.app-desk-note.is-success { border-left-color: var(--pk-green); }
.app-st-acts { white-space: nowrap; }
.app-st-rownote { margin-top: 4px; font-size: 0.9em; color: var(--pk-muted); white-space: pre-line; }
.app-thanks-note { margin-top: 2px; font-size: 0.9em; color: var(--pk-yellow); white-space: pre-line; }
.app-note-count.is-over { color: var(--pk-red); font-weight: 600; }
.app-note.is-warning { border-left: 4px solid var(--pk-yellow); padding-left: 8px; }
.app-st-notecell { max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-desk-title { margin: 4px 0; font-size: 1.15rem; }
.app-desk-buttons, .app-desk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.app-desk-actions { border-top: 1px solid var(--pk-border); padding-top: 12px; }
.app-desk-picks { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.app-desk-pickrow { justify-content: flex-start; text-align: left; }
@media (max-width: 720px) {
  .app-desk { flex-direction: column; }
  .app-desk-cam { flex-basis: auto; max-width: none; width: 100%; }
}

/* The game editor's "Von BoardGameGeek" block: a two-column list of what
   the BGG sync wrote, and the videos by language. */
.app-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
.app-facts dt { color: var(--pk-text2); }
.app-facts dd { margin: 0; overflow-wrap: anywhere; }
.app-videos { margin: 4px 0; }
.app-videos ul { margin: 4px 0 8px; padding-left: 20px; }
.app-videos li { margin: 2px 0; }
@media (max-width: 560px) {
  .app-facts { grid-template-columns: 1fr; gap: 0; }
  .app-facts dd { margin-bottom: 6px; }
}

/* The game editor's "Ausgabe wählen …" beside the edition's number, and the
   cover picker it opens under the field (migration 061). */
.app-edition-row { align-items: center; }
.app-edition-row input { flex: 1 1 8rem; }
.app-edition-grid:not(:empty) { margin-top: 12px; }
/* "Meine Spiele"' editor: the box's edition as it stands, its picture
   beside the name, and "Ausgabe wählen …" after them. */
.app-mi-edition { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-mi-edition-now { display: flex; align-items: center; gap: 10px; }
.app-mi-edition-now img { width: 48px; height: 48px; object-fit: contain; border-radius: 4px; }
/* The game editor's "Auf BGG suchen …": one row per hit, its cover, its
   title and year; a click takes it. */
.app-bgg-hits:not(:empty) { margin-top: 12px; display: grid; gap: 6px; }
.app-bgg-hit { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 8px; text-align: start;
  background: var(--pk-surface); color: inherit; border: 1px solid var(--pk-border); border-radius: 6px; cursor: pointer; font: inherit; }
.app-bgg-hit:hover, .app-bgg-hit:focus-visible { border-color: var(--pk-accent); }
.app-bgg-hit-cover { flex: 0 0 auto; width: 48px; height: 48px; object-fit: contain; border-radius: 4px; }
.app-bgg-hit-cover.pk-no-picture { background: var(--pk-surface2); }
.app-bgg-hit-title { font-weight: 600; overflow-wrap: anywhere; }

/* The games sync (internal/gamesync): the line above the games, and the
   game editor's conflicts — both sides' values side by side, each with its
   choice under it. */
.app-sync-status { margin: 0 0 8px; }
.app-sync-error { color: var(--pk-red); }
.app-sync-conflict {
  border: 1px solid var(--pk-border);
  border-left: 3px solid var(--pk-yellow);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 12px;
}
.app-sync-conflict p { margin: 0 0 8px; }
.app-sync-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-sync-sides > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.app-sync-side { color: var(--pk-text2); font-size: 0.9em; }
.app-sync-cover { max-width: 120px; max-height: 120px; border-radius: 4px; }
.app-sync-cover.pk-no-picture { width: 120px; height: 120px; background: var(--pk-surface2); }
@media (max-width: 560px) {
  .app-sync-sides { grid-template-columns: 1fr; }
}

/* The press mail's confirmation lists every address it goes to; a long
   distribution list scrolls inside the popup instead of pushing its
   buttons away. */
.app-press-recipients {
  max-height: 40vh;
  overflow: auto;
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

/* The press send view: a bar for how far the sending is, the addresses in
   a box of their own that scrolls (the row being sent kept in view), and a
   failed row's answer in red — what the admin has to act on. */
.app-press-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--pk-border);
  overflow: hidden;
}
.app-press-progress > div {
  height: 100%;
  width: 0;
  background: var(--pk-accent);
  transition: width .3s;
}
.app-press-mailing {
  position: relative; /* the rows' offsetTop is measured against it */
  max-height: 50vh;
  overflow: auto;
}
.app-press-mailing .app-press-state { white-space: nowrap; }
.app-press-mailing .app-press-reply { font-size: 0.85em; color: var(--pk-muted); overflow-wrap: anywhere; }
.app-press-mailing .app-press-attempts { font-size: 0.85em; }
.app-press-mailing tr.app-press-sent .app-press-state { color: var(--pk-green); }
.app-press-mailing tr.app-press-failed .app-press-state,
.app-press-mailing tr.app-press-failed .app-press-reply { color: var(--pk-red); }
.app-press-cell-failed { color: var(--pk-red); }

/* "Bestand leeren": one location per line, the button at its end. */
.app-loc-clear { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; flex-wrap: wrap; }
.app-loc-clear-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Website-Statistik: the controls in a row, the tiles, the hand-drawn
 * trend, and the bar lists. Every colour is a theme token, so the page
 * follows the branding and the dark theme. */
.app-ws-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
}
.app-ws-controls > .form-group { min-width: 220px; margin-bottom: 0; }
.app-ws-range { display: flex; gap: 8px; }
.app-ws-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.app-ws-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.app-ws-tile {
  border: 1px solid var(--pk-border);
  border-radius: var(--pk-radius);
  padding: 12px 14px;
  background: var(--pk-surface);
}
.app-ws-tile-label { color: var(--pk-text2); font-size: 13px; }
.app-ws-tile-value { font-size: 28px; font-weight: 700; color: var(--pk-text); }
.app-ws-tile-sub { color: var(--pk-text2); }
.app-ws-trend-wrap { overflow-x: auto; overflow-y: hidden; }
.app-ws-trend { width: 100%; min-width: 300px; height: 180px; display: block; }
.app-ws-hit { fill: transparent; }
.app-ws-trend g[data-day] { cursor: pointer; }
.app-ws-trend g[data-day]:hover .app-ws-hit { fill: var(--pk-accent); opacity: 0.08; }
.app-ws-sel .app-ws-hit { fill: var(--pk-accent); opacity: 0.15; }
.app-ws-trend-picking g:not(.app-ws-sel) .app-ws-bar,
.app-ws-trend-picking g:not(.app-ws-sel) .app-ws-bar-visitors { opacity: 0.2; }
.app-ws-selected { margin-right: auto; align-self: center; font-weight: 600; }
.app-ws-days { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 24px; }
.app-ws-days-row { display: grid; grid-template-columns: 1fr 120px 130px; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--pk-border); }
.app-ws-days-row > span + span { text-align: right; }
.app-ws-days-row > span:last-child { color: var(--pk-text2); }
.app-ws-fair { fill: var(--pk-yellow); opacity: 0.25; }
.app-ws-bar { fill: var(--pk-accent); opacity: 0.45; }
.app-ws-bar-guessed { opacity: 0.25; }
.app-ws-bar-today { stroke: var(--pk-accent); stroke-dasharray: 3 2; }
.app-ws-bar-visitors { fill: var(--pk-accent); }
.app-ws-gap { fill: var(--pk-red); }
.app-ws-prev { fill: none; stroke: var(--pk-text2); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.app-ws-axis { position: relative; height: 16px; min-width: 300px; color: var(--pk-text2); font-size: 11px; }
.app-ws-axis > span { position: absolute; top: 2px; white-space: nowrap; }
.app-ws-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.app-ws-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 8px; }
.app-ws-key-views { background: var(--pk-accent); opacity: 0.45; }
.app-ws-key-visitors { background: var(--pk-accent); }
.app-ws-key-fair { background: var(--pk-yellow); opacity: 0.5; }
.app-ws-key-prev { border-top: 2px dashed var(--pk-text2); height: 0; }
.app-ws-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 16px;
  align-items: start;
}
.app-ws-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 4px 0;
}
.app-ws-row-label { overflow-wrap: anywhere; }
/* Instagram-Posts: the cover as a small square beside the post's first line. */
.app-ws-post-cover-col { width: 72px; }
.app-ws-post-cover { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--pk-surface2); }
.app-ws-post-text { overflow-wrap: anywhere; max-width: 42ch; }
.app-ws-post-meta { font-size: .85em; opacity: .75; }
.app-ws-row-count { text-align: right; font-variant-numeric: tabular-nums; }
.app-ws-row-bar { grid-column: 1 / -1; height: 4px; background: var(--pk-border); border-radius: 2px; }
.app-ws-row-bar > span { display: block; height: 100%; background: var(--pk-accent); border-radius: 2px; }
.app-ws-row-bar-err > span { background: var(--pk-red); }
.app-ws-path { display: block; color: var(--pk-text2); font-size: 12px; }
.app-ws-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 120px; align-items: end; }
.app-ws-hour { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.app-ws-hour > span { display: block; background: var(--pk-accent); border-radius: 2px 2px 0 0; min-height: 1px; }
.app-ws-hour > em { font-style: normal; font-size: 10px; color: var(--pk-text2); text-align: center; }
.app-ws-status { font-weight: 700; font-variant-numeric: tabular-nums; }
.app-ws-status-5 { color: var(--pk-red); }
.app-ws-errlink { text-align: left; overflow-wrap: anywhere; }
.app-ws-event { padding: 6px 0; border-bottom: 1px solid var(--pk-border); }
.app-ws-alert { margin-left: 6px; cursor: pointer; font: inherit; font-size: 12px; }
.app-ws-tabs { margin-top: 16px; }
@media (max-width: 640px) {
  .app-ws-hours > .app-ws-hour:nth-child(odd) > em { visibility: hidden; }
}

/* ★ / ☆ "Unsere Empfehlung" in the games list: a pick glows amber, the
   others stay a faint outline. !important for the reason portal-kit gives
   at .pk-action-danger: .btn-ghost's hover would recolour it. */
.app-staff-pick { color: var(--pk-muted) !important; }
.app-staff-pick[aria-pressed="true"] {
  color: var(--pk-yellow) !important;
  border-color: var(--pk-yellow);
  background: color-mix(in srgb, var(--pk-yellow) 16%, transparent);
}

/* The Dankeschön's head: the status lines, "Deine Wahl" with its button,
   then the tab bar. A .pk-tabs bar has no outer margin by design (portal-kit
   theme.css): the air above it is the container's, here. */
.app-thanks-claim { margin-bottom: 4px; }
#thTabs:not(:empty) { margin-top: 16px; }

/* ── The Börse wizard (openDeskWizard) ───────────────────────────────────
   A whole window at 16" notebooks (portal-kit's wizard size 'full'): large
   covers to pick across the desk, the sticker drawn large, a basket with
   its covers. */
.app-desk-start { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 0 20px; }
.app-desk-start-btn { font-size: 1.25rem; padding: 18px 36px; border-radius: 12px; }
.app-desk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.app-desk-head h3 { margin: 0; font-size: 1.4rem; }
.app-desk-number { margin: 4px 0 0; font-size: 1.1rem; }
.app-desk-count {
  flex: none; font-weight: 700; font-size: 1.1rem; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--pk-accent) 14%, var(--pk-surface)); color: var(--pk-text);
}
/* The counter is a button (the list of what was taken): no border of its
   own, the pill a shade stronger on hover and portal-kit's ring on focus. */
button.app-desk-count { border: 0; font-family: inherit; cursor: pointer; }
button.app-desk-count:hover { background: color-mix(in srgb, var(--pk-accent) 26%, var(--pk-surface)); }
button.app-desk-count:focus-visible { outline: 2px solid var(--pk-accent); outline-offset: 2px; }
/* That list, on portal-kit's second layer (PK.showInfoLayer): a small
   cover, the title, label · price · condition. */
.app-desk-takenlist { list-style: none; margin: 0; padding: 0; }
.app-desk-takenrow { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--pk-border); }
.app-desk-takenrow:last-child { border-bottom: 0; }
.app-desk-takenrow .app-desk-cover { flex: none; width: 56px; height: 56px; object-fit: contain; }
.app-desk-takeninfo { min-width: 0; }
.app-desk-takentitle { font-weight: 700; overflow-wrap: anywhere; }
.app-desk-takenmeta { color: var(--pk-muted); font-size: 0.9rem; }
.app-desk-modeq { font-size: 1.3rem; text-align: center; margin: 8px 0 16px; }
.app-desk-modes { max-width: 760px; margin: 0 auto; width: 100%; }
.app-desk-modes .pk-picture-caption { font-size: 1.25rem; }
.app-desk-modes .pk-picture-sub { font-size: 0.95rem; }
.app-desk-tiles .pk-picture-caption { font-size: 1rem; }
.app-desk-headside { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.app-desk-seller { max-width: 640px; }
.app-desk-seller-row { display: flex; gap: 8px; align-items: stretch; }
.app-desk-seller-row > :first-child { flex: 1; min-width: 0; }
.app-desk-newperson { margin-top: 16px; padding: 16px; border: 1px solid var(--pk-border); border-radius: var(--pk-radius); }
.app-desk-newperson h4 { margin: 0 0 12px; }
.app-desk-split { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 24px; align-items: start; }
.app-desk-cover { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 6px; background: var(--pk-bg); }
.app-desk-chosen .app-desk-caption { font-weight: 700; font-size: 1.15rem; margin: 8px 0 0; }
.app-desk-codefield { font-size: 1.4rem; padding: 10px 12px; letter-spacing: 0.05em; }
.app-desk-match { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px; border-radius: var(--pk-radius); border: 2px solid var(--pk-border); margin-top: 12px; }
.app-desk-match:not(:has(> .app-desk-cover)) { grid-template-columns: 1fr; }
.app-desk-match.is-ok { border-color: var(--pk-green, #2e7d32); }
.app-desk-match.is-warn { border-color: var(--pk-yellow, #b7791f); }
.app-desk-match h3 { margin: 4px 0 8px; }
.app-desk-ok { color: var(--pk-green, #2e7d32); font-weight: 700; margin: 0; }
.app-desk-warn { font-weight: 600; margin: 0 0 8px; }
.app-desk-cands { display: grid; gap: 10px; margin: 8px 0; }
.app-desk-cand { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center; }
.app-desk-cand img, .app-desk-cand .pk-no-picture { width: 80px; height: 80px; object-fit: contain; }
.app-desk-note { padding: 10px 14px; border-radius: var(--pk-radius); margin: 10px 0; font-size: 1.05rem; }
.app-desk-note.is-error { background: color-mix(in srgb, var(--pk-red, #c62828) 14%, var(--pk-surface)); }
.app-desk-note.is-warning { background: color-mix(in srgb, var(--pk-yellow, #b7791f) 18%, var(--pk-surface)); }
.app-desk-note.is-info { background: color-mix(in srgb, var(--pk-accent) 12%, var(--pk-surface)); }
.app-desk-note.is-success { background: color-mix(in srgb, var(--pk-green, #2e7d32) 14%, var(--pk-surface)); }
.app-desk-price { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 32px; align-items: start; }
.app-desk-crop, .app-desk-cam { flex: 1; min-height: 320px; }
.app-desk-labelwrap { display: grid; grid-template-columns: minmax(280px, 640px) 1fr; gap: 32px; align-items: center; }
.app-desk-sticker { width: 100%; height: auto; display: block; }
.app-desk-sticker-hand { fill: var(--pk-accent); }
.app-desk-sticker-sample { max-width: 300px; margin: 8px 0; }
.app-desk-instr { font-size: 1.35rem; line-height: 1.4; margin: 0 0 12px; }
.app-desk-big { font-size: 1.15rem; padding: 12px 24px; }
.app-desk-otherlabel { margin-top: 20px; }
.app-desk-sell { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.app-desk-sellcard { display: grid; grid-template-columns: minmax(160px, 280px) 1fr; gap: 20px; padding: 14px; border: 2px solid var(--pk-accent); border-radius: var(--pk-radius); }
.app-desk-sellcard h3 { margin: 4px 0; font-size: 1.4rem; }
.app-desk-prompt { font-weight: 700; margin: 0; }
.app-desk-auto { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.app-desk-auto label { margin: 0; font-weight: 600; }
.app-desk-autonote { margin: 8px 0 0; color: var(--pk-muted); min-height: 1.4em; }
/* The auto-confirm's bar: it runs down along the foot of "Ja, das ist es"
   in the chosen seconds (--app-desk-auto, set per card). */
.app-desk-sellcard [data-dk="sellYes"] { position: relative; overflow: hidden; }
.app-desk-sellcard [data-dk="sellYes"].is-counting::after { content: ""; position: absolute; left: 0; bottom: 0; height: 5px; width: 100%; background: currentColor; opacity: 0.7; animation: app-desk-auto var(--app-desk-auto, 2s) linear forwards; }
@keyframes app-desk-auto { from { width: 100%; } to { width: 0; } }
/* The till's warning on a checkout left standing (event.market_pay_alert):
   the whole window pulses red, under one fixed line. About one pulse a
   second, far below the three flashes a second WCAG 2.3.1 forbids; clicks
   go through to the wizard, which takes it away. */
.app-desk-pay-alert { position: fixed; inset: 0; z-index: 100000; pointer-events: none; display: flex; justify-content: center; align-items: flex-start; animation: app-desk-pay-alert 0.6s ease-in-out infinite alternate; }
.app-desk-pay-alert-text { margin: 24px 16px 0; padding: 14px 24px; background: var(--pk-red, #c62828); color: #fff; font-size: 1.6rem; font-weight: 700; text-align: center; border-radius: var(--pk-radius); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
@keyframes app-desk-pay-alert {
  from { background: rgba(220, 0, 0, 0.04); box-shadow: inset 0 0 0 16px rgba(220, 0, 0, 0.3); }
  to { background: rgba(220, 0, 0, 0.3); box-shadow: inset 0 0 0 16px rgba(220, 0, 0, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .app-desk-pay-alert { animation: none; background: rgba(220, 0, 0, 0.18); box-shadow: inset 0 0 0 16px rgba(220, 0, 0, 1); }
}
.app-desk-sellfacts { font-size: 1.1rem; }
.app-desk-receipt td { vertical-align: middle; }
.app-desk-receipt td:first-child { width: 104px; }
.app-desk-receipt .app-desk-cover { width: 96px; height: 96px; }
.app-desk-amount { text-align: right; white-space: nowrap; font-weight: 700; }
.app-desk-total { text-align: right; font-size: 1.2rem; font-weight: 700; }
/* The checkout fills the step; the list of games on the left scrolls on
   its own (the user's request, 2026-11-11) — the total and the change stay
   where they are. The right column has its own overflow only for a window
   too low to hold the total and the change at all; it never scrolls with
   the list. */
.app-desk-checkout {
  display: grid; grid-template-columns: minmax(320px, 3fr) minmax(280px, 2fr); grid-template-rows: minmax(0, 1fr);
  gap: 32px; flex: 1; min-height: 0;
}
.app-desk-checkout-list, .app-desk-checkout-pay { min-height: 0; overflow-y: auto; }
.app-desk-grand { font-size: 1.4rem; margin: 0 0 16px; }
.app-desk-grand strong { font-size: 2.6rem; display: block; }
.app-desk-change { display: flex; flex-direction: column; gap: 10px; }
.app-desk-change-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--pk-border); border-radius: var(--pk-radius); background: var(--pk-bg);
}
.app-desk-money-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.app-desk-money { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.app-desk-note-img { height: 44px; width: auto; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.app-desk-coin { height: 34px; width: 34px; }
.app-desk-money-value { font-size: 0.85rem; color: var(--pk-muted); }
.app-desk-money-arrow { font-size: 1.6rem; color: var(--pk-muted); }
@media (max-width: 900px) {
  .app-desk-checkout { grid-template-rows: none; flex: none; }
  .app-desk-checkout-list, .app-desk-checkout-pay { overflow: visible; }
  .app-desk-split, .app-desk-labelwrap, .app-desk-sell, .app-desk-checkout, .app-desk-sellcard, .app-desk-match { grid-template-columns: 1fr; }
}
/* The same at a narrow WIZARD: the zoom control (portal-kit's openWizard
   zoom, 2026-11-12) leaves less width than the window has, which only a
   container query sees. */
@container pk-wizard (max-width: 900px) {
  .app-desk-checkout { grid-template-rows: none; flex: none; }
  .app-desk-checkout-list, .app-desk-checkout-pay { overflow: visible; }
  .app-desk-split, .app-desk-labelwrap, .app-desk-sell, .app-desk-checkout, .app-desk-sellcard, .app-desk-match { grid-template-columns: 1fr; }
}
/* A zoomed vh is a larger vh: divided back so a cover or a list keeps its
   share of the window. */
.app-desk-cover { max-height: calc(50vh / var(--pk-zoom, 1)); }
.app-desk-picks { max-height: calc(40vh / var(--pk-zoom, 1)); }
.app-desk-crop, .app-desk-cam { min-height: min(320px, calc(45vh / var(--pk-zoom, 1))); }
.app-desk-fact { min-width: min(200px, 100%); }
/* The two big tiles of the first step are as wide as they are high: at
   200 % they would not fit the window's height, so their row is no wider
   than the height leaves room for. */
.app-desk-modes { max-width: max(320px, min(760px, calc(2 * (100dvh / var(--pk-zoom, 1) - 240px)))); }
/* The hub's scan field over the covers, the label start under the
   person's number, and the price beside the chosen cover (2026-11-12). */
.app-desk-hubscan { max-width: 640px; margin-bottom: 8px; }
.app-desk-hubscan .form-group { margin-bottom: 4px; }
.app-desk-labelstart { margin: 4px 0 0; color: var(--pk-muted); font-size: 0.95rem; display: flex; align-items: center; gap: 4px; }
.app-desk-price-tag { font-size: 1.35rem; margin: 6px 0 0; }
/* Age and difficulty under the label: where the box goes on the tables.
   Large, with symbols, a colour per difficulty. */
.app-desk-facts { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; }
.app-desk-fact {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center;
  padding: 12px 18px; border: 2px solid var(--pk-border); border-radius: 12px;
  min-width: 200px;
}
.app-desk-fact-icon, .app-desk-wbars { grid-row: 1 / span 2; color: var(--pk-accent); display: flex; }
.app-desk-fact-big { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.app-desk-fact-text { font-size: 0.95rem; color: var(--pk-muted); }
.app-desk-fact.is-unknown { opacity: 0.7; border-style: dashed; }
.app-desk-fact.is-unknown .app-desk-fact-text { grid-row: 1 / span 2; font-size: 1.1rem; }
.app-desk-fact.is-unknown .app-desk-fact-icon { color: var(--pk-muted); }
.app-desk-wbars { align-items: flex-end; gap: 4px; height: 40px; }
.app-desk-wbar { width: 10px; border-radius: 3px; background: var(--pk-border); }
.app-desk-wbar:nth-child(1) { height: 14px; }
.app-desk-wbar:nth-child(2) { height: 26px; }
.app-desk-wbar:nth-child(3) { height: 40px; }
.app-desk-weight-leicht { border-color: var(--pk-green); }
.app-desk-weight-leicht .app-desk-wbar.is-on { background: var(--pk-green); }
.app-desk-weight-mittel { border-color: var(--pk-yellow); }
.app-desk-weight-mittel .app-desk-wbar.is-on { background: var(--pk-yellow); }
.app-desk-weight-schwer { border-color: var(--pk-red); }
.app-desk-weight-schwer .app-desk-wbar.is-on { background: var(--pk-red); }
.app-desk-opencount { font-weight: 700; color: var(--pk-accent); }
/* The game editor's Börse boxes with a checkbox each (moving them). */
.app-copy-list-pick { list-style: none; padding-left: 0; }
.app-copy-list-pick li { margin: 2px 0; }
.app-copy-move { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }

/* The till's card for a new Dankeschön request (thanksAlertCard): portal-kit's
   notification card, marked in the accent colour, with its one button. */
.app-thanks-alert { border-left-color: var(--pk-accent); }
.app-thanks-alert-open { margin-top: 8px; }

/* The Börsenschluss's settlement assistant (openClosingWizard). */
.app-closing-banner { margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, var(--pk-red, #b42318) 12%, transparent); color: var(--pk-red, #b42318); font-weight: 600; }
.app-cl-checks { list-style: none; padding: 0; margin: 12px 0; }
.app-cl-check { padding: 6px 0; font-size: 1.05em; }
.app-cl-check.is-ok span { color: var(--pk-green, #127a3a); font-weight: 700; }
.app-cl-check.is-bad { color: var(--pk-red, #b42318); font-weight: 600; }
.app-cl-manual { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--border-color, #ddd); border-radius: 8px; }
.app-cl-manual ul { margin: 6px 0 0 18px; }
.app-cl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.app-cl-running, .app-cl-warn { color: var(--pk-red, #b42318); font-weight: 600; }
.app-cl-ok { color: var(--pk-green, #127a3a); font-weight: 600; }
.app-cl-scanfield { font-size: 1.6em; max-width: 420px; }
.app-cl-msg { margin: 8px 0 16px; padding: 10px 14px; border-radius: 8px; font-size: 1.15em; }
.app-cl-msg:empty { padding: 0; margin: 0; }
.app-cl-msg.is-ok { background: color-mix(in srgb, var(--pk-green, #127a3a) 14%, transparent); color: var(--pk-green, #127a3a); }
.app-cl-msg.is-neutral { background: color-mix(in srgb, currentColor 8%, transparent); }
.app-cl-msg.is-bad { background: color-mix(in srgb, var(--pk-red, #b42318) 14%, transparent); color: var(--pk-red, #b42318); font-size: 1.35em; }
.app-cl-issues { margin: 16px 0; padding: 10px 14px; border: 2px solid var(--pk-red, #b42318); border-radius: 8px; }
.app-cl-issues ul { list-style: none; padding: 0; margin: 6px 0 0; }
.app-cl-issues li { padding: 4px 0; }
.app-cl-empty { font-size: 1.2em; color: var(--pk-green, #127a3a); font-weight: 600; }
.app-cl-stolenlist { max-height: 40vh; overflow: auto; }
.app-cl-give { margin: 12px 0; }
.app-cl-give { max-width: 44rem; }
/* The figure first, then what it is: "0 €  Aus der Kasse". */
.app-cl-give-row { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-color, #ddd); font-size: 1.25em; }
.app-cl-give-row strong { flex: 0 0 6rem; font-size: 1.2em; text-align: right; white-space: nowrap; }
.app-cl-cash strong { font-size: 1.6em; }
/* Under the label, not under the figure: the figure's 6rem plus the row's
   16px gap, and the bullet inside that. */
.app-cl-games { margin: 4px 0 8px calc(6rem + 16px); padding-left: 1.2em; }
.app-cl-done h3 { margin-top: 0; }
.app-cl-counts { margin: 12px 0; padding-left: 18px; }
.app-cl-counts li { padding: 2px 0; }
/* One date is no full-width field (the closing's day, Stammdaten's). */
.app-cl-date .pk-date-wrap, .app-field-date .pk-date-wrap { max-width: 16rem; }
/* Cancel in the closing's confirmations: the keyboard focus ring, also
   after a mouse click (confirmSafe). */
.btn.app-focus-ring:focus { outline: 2px solid var(--pk-accent); outline-offset: 2px; }
[data-closing-hide-done][hidden] { display: none !important; }
