/*
 * Inbox styling. Deliberately one small hand-written file: the page must load
 * nothing from a foreign server, and there is no build step in this project.
 *
 * ★ Palette, spacing and the pill switcher are taken from SoftForge Reports
 * (public/dashboard.css there) so the two SoftForge tools read as one product.
 * Values copied, not eyeballed. Light and dark both, exactly as over there —
 * SoftForge Reports follows the system setting, and a sister tool that ignored it
 * would look broken next to it.
 *
 * No JavaScript anywhere: collapsible sections are <details>, and the enlarged
 * screenshot is a :target overlay. public/.htaccess forbids scripts outright.
 */

:root {
    color-scheme: light;
    --bg: #eef3fb;
    --bg-glow: #dce8fb;
    --card: #ffffff;
    --ink: #16202e;
    --ink-soft: #5a6a80;
    --line: #d8e2f0;
    --accent: #2f6fed;
    --accent-deep: #1b4fc4;
    --accent-wash: #d6e4ff;
    --warn: #b4341f;
    --warn-wash: #ffe6e0;
    --warn-line: #f0b7aa;
    --ok: #1f7a4d;
    --ok-wash: #dcf5e8;
    --shadow: 0 1px 2px rgba(20, 40, 80, 0.06), 0 8px 24px rgba(20, 40, 80, 0.06);
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0f141d;
        --bg-glow: #16233a;
        --card: #18202c;
        --ink: #e8eef8;
        --ink-soft: #96a5bb;
        --line: #26313f;
        --accent: #63a0ff;
        --accent-deep: #98c2ff;
        --accent-wash: #1d3050;
        --warn: #ff9d8a;
        --warn-wash: #3a1f1a;
        --warn-line: #7a3a2c;
        --ok: #7fd3a6;
        --ok-wash: #16301f;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.28);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
    background:
        radial-gradient(1200px 460px at 15% -8%, var(--bg-glow), transparent 65%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: var(--accent); }

main {
    max-width: 1120px;
    margin: 0 auto;
    /* Der letzte Zentimeter gehoert der angehefteten Fussleiste, sonst laege
       die unterste Zeile darunter und waere nicht erreichbar. */
    padding: 1.5rem 1rem 4.5rem;
}

/* --- header ------------------------------------------------------------- */

.top {
    position: relative;   /* Anker fuer alles, was sich daran ausrichtet */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: inherit;
    text-decoration: none;
}

/* Der Name und die Spielauswahl sind zwei verschiedene Dinge und muessen als
   zwei gelesen werden: Beim normalen 1rem-Abstand der Kopfleiste sahen sie aus
   wie eine gedraengte Gruppe. Die Linie dazwischen sagt es ausdruecklich.
   (Wortgleich von SoftForge Reports.) */
.top .brand {
    padding-right: 1.15rem;
    border-right: 1px solid var(--line);
    margin-right: 0.2rem;
}

/* Das Zeichen: ein Marienkaefer auf gelbem Grund, inline als SVG (siehe
   templates/partials/mark.html.twig). Warm in einer sonst blauen Oberflaeche,
   wie der Kompass bei SoftForge Reports -- so bleibt es ein Zeichen. */
svg.mark {
    width: 1.6rem;
    height: 1.6rem;
    flex: none;
    display: block;
}

.top .spacer { flex: 1; }

.only-project { color: var(--ink-soft); }

/* --- pill switcher (games) ---------------------------------------------- */

.switch {
    display: inline-flex;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.switch a {
    padding: 0.42rem 0.95rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    border-right: 1px solid var(--line);
    text-align: center;
}

.switch a:last-child { border-right: 0; }

.switch a:hover {
    color: var(--accent);
    background: var(--accent-wash);
}

.switch a[aria-current] {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    color: #fff;
    font-weight: 600;
}

/* ★ Feste Breiten, damit ein Sprachwechsel die Moebel nicht verschiebt.
   Werte von SoftForge Reports uebernommen, dort im Browser ausgemessen:
   "Abmelden" ist 98px breit, "DE"/"EN" je 49px. Ohne die Mindestbreiten
   springt bei jedem Sprachwechsel die ganze rechte Seite der Kopfleiste. */
.switch.lang a { min-width: 3.1rem; }

/* Gleiche Polsterung, Groesse und Rundung wie ein Umschalt-Knopf, damit die
   Reihe aus gleichen Teilen besteht und nicht aus einem Knopf neben etwas
   leicht Kleinerem. */
.top .logout {
    position: relative;
    margin-left: 1.3rem;
    padding: 0.42rem 0.95rem;
    min-width: 6.2rem;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    white-space: nowrap;
}

/* Die Trennlinie, wie die nach dem Namen. Von dieser Seite gezeichnet, weil der
   Umschalter daneben alles abschneidet, was uebersteht -- das muss er, wegen
   seiner runden Ecken.

   Der zu halbierende Abstand betraegt 2.3rem: 1rem Grundabstand der Kopfleiste
   plus der 1.3rem Aussenabstand oben. Die Haelfte davon ist 1.15rem --
   ausgemessen, nicht geschaetzt, weshalb sie vorher sichtbar schief sass. */
.top .logout::before {
    content: "";
    position: absolute;
    left: -1.15rem;
    top: 50%;
    width: 1px;
    height: 1.5rem;
    transform: translateY(-50%);
    background: var(--line);
}

.top .logout:hover { color: var(--accent); border-color: var(--accent); }

/* --- footer ------------------------------------------------------------- */

/* Wortgleich von SoftForge Reports uebernommen (dessen dashboard.css): an die
   Unterkante geheftet, ueber die volle Breite -- das Gegenstueck zur Kopfleiste.
   Undurchsichtig mit Absicht: Inhalt scrollt DARUNTER hindurch, nicht hindurch
   sichtbar. */
.site-foot {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    padding: 0.55rem 1.15rem;
    background: var(--card);
    border-top: 1px solid var(--line);
    text-align: right;
    font-size: 0.76rem;
    color: var(--ink-soft);
}

.site-foot a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.site-foot a:hover,
.site-foot a:focus-visible {
    color: var(--accent);
    border-bottom-color: currentColor;
}

/* --- login -------------------------------------------------------------- */

/* Keine angeheftete Fussleiste auf dieser Seite, also braucht sie auch den
   reservierten Platz nicht -- mit ihm bekaeme das kurze Formular grundlos
   eine Bildlaufleiste. */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    max-width: none;
}

.login {
    width: min(22rem, 100%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.6rem;
    box-shadow: var(--shadow);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.25rem;
}

.login-brand svg.mark {
    width: 4rem;
    height: 4rem;
}

/* Sitzt direkt unter dem Namen, leise genug, um ihm nicht die Schau zu stehlen. */
.login .by {
    margin-top: -0.25rem;
    color: var(--ink-soft);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.login .by a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.login .by a:hover,
.login .by a:focus-visible {
    color: var(--accent);
    border-bottom-color: currentColor;
}

.login label {
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 0.5rem;
}

.login input {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.login input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -1px;
}

.login button {
    margin-top: 1.2rem;
    padding: 0.62rem 1rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.login button:hover { filter: brightness(1.08); }

.login .error {
    background: var(--warn-wash);
    border: 1px solid var(--warn-line);
    color: var(--warn);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
}

/* --- breadcrumb --------------------------------------------------------- */

.crumbs {
    margin: 0 0 1.1rem;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.crumbs a { text-decoration: none; }

.crumbs a:hover { text-decoration: underline; }

.crumbs .sep { padding: 0 0.45rem; opacity: 0.6; }

/* --- the four numbers --------------------------------------------------- */

.numbers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.35rem;
}

.figure {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow);
}

/* A thin coloured edge — enough to lift the card off the page. */
.figure::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}

.figure.warn::before { background: var(--warn); }

.figure .value {
    display: block;
    font-size: 1.7rem;
    font-weight: 650;
    line-height: 1.15;
}

.figure .label {
    display: block;
    color: var(--ink-soft);
    font-size: 0.85rem;
}

/* --- notices ------------------------------------------------------------ */

.notice {
    background: var(--ok-wash);
    border: 1px solid var(--line);
    border-left: 3px solid var(--ok);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
}

.empty {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--ink-soft);
}

/* --- the list ----------------------------------------------------------- */

.list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.row {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.85rem 1rem;
}

.row.flagged { border-color: var(--warn-line); }

/* The preview. Fixed box with a cropped image inside, so a row keeps its height
   whatever shape the screenshot has — otherwise the list would be a staircase. */
.row .thumb {
    flex: none;
    width: 128px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--accent-wash);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-size: 0.72rem;
    text-align: center;
}

.row .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.row .body { flex: 1; min-width: 0; }

.row .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
}

.row .game { color: var(--accent); font-weight: 600; }

/* Two lines of the description, then it stops. A cap in characters would cut
   mid-word on one screen and leave a gap on another. */
.row .excerpt {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.row .actions {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.button {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.button:hover { color: var(--accent); border-color: var(--accent); }

.button.primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-deep));
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

.button.primary:hover { color: #fff; filter: brightness(1.08); }

.button.danger { color: var(--warn); border-color: var(--warn-line); }

.button.danger:hover { color: #fff; background: var(--warn); border-color: var(--warn); }

/* --- flag badge --------------------------------------------------------- */

.flag {
    display: inline-block;
    background: var(--warn-wash);
    border: 1px solid var(--warn-line);
    color: var(--warn);
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
}

/* --- panels (detail page) ----------------------------------------------- */

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.9rem 1rem 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.panel > h2 {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
}

.desc {
    white-space: pre-wrap;
    margin: 0.4rem 0 0;
    font-size: 1.05rem;
}

.mail { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.6rem; }

/*
 * ★ UNTEREINANDER, nicht nebeneinander (Nutzer-Ansage 18.08.2026).
 *
 * Nebeneinander sahen die vier Bloecke aufgeraeumt aus und verbargen dabei
 * genau das, wofuer sie da sind: Die Werte sind lang (Prozessortyp,
 * Grafikkarte, "3440x1440 @ 100 Hz, scale 1.0"), die Zellen brechen nicht um,
 * und was nicht in die schmale Spalte passte, verschwand hinter dem Rand des
 * Rollkastens. Gemessen an einem echten Bericht: Engine, Renderer und Monitor
 * waren angeschnitten. Volle Breite heisst ein paar Zeilen mehr und dafuer
 * jede Angabe lesbar -- ein Fehlerbericht wird gelesen, nicht angeschaut.
 */
.head-tables {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

/* --- tables -------------------------------------------------------------- */

/*
 * ★ Every table sits in its own scrolling box. The tower table has sixteen
 * columns; without this the whole page would scroll sideways on a phone and the
 * header would drift away from the content.
 */
.scroll { overflow-x: auto; max-width: 100%; }

table {
    border-collapse: collapse;
    font-size: 0.85rem;
    width: 100%;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 0.3rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}

thead th, table th[scope="col"] {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

td.k { color: var(--ink-soft); white-space: normal; }
td.v { white-space: normal; }

tr:last-child th, tr:last-child td { border-bottom: 0; }

/* --- collapsible sections ------------------------------------------------ */

details {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0.6rem;
    background: var(--card);
}

summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
}

details[open] > summary { margin-bottom: 0.5rem; }

pre {
    overflow-x: auto;
    font-size: 0.8rem;
    color: var(--ink-soft);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0;
}

.extras {
    color: var(--ink-soft);
    font-size: 0.82rem;
    word-break: break-word;
    margin-top: 0.6rem;
}

/* --- screenshot and its enlargement -------------------------------------- */

.shot-link { display: block; }

.shot {
    display: block;
    /* ★ Gedeckelt, damit das Vergroessern etwas bringt.
     *
     * Ohne die Hoehengrenze fuellt ein 1280er Spielfeld-Foto die ganze
     * Spaltenbreite -- die Ueberlagerung zeigte dann fast dasselbe Bild noch
     * einmal, und der Klick waere eine leere Geste. So bleibt die Seite
     * ueberschaubar, und wer genau hinsehen will, bekommt beim Klick die volle
     * Aufloesung ueber das ganze Fenster.
     *
     * Bei einem Bild, das ohnehin kleiner ist als diese Grenze, vergroessert
     * der Klick natuerlich nichts -- dann gibt es nichts zu vergroessern. */
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.shot-hint {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/*
 * ★ Enlarging without a single line of script.
 *
 * The overlay is hidden until its own id is the address fragment; clicking the
 * picture jumps to "#gross", :target makes it visible, and clicking the overlay
 * goes back. The browser's back button closes it too, because it is just a
 * position in the history.
 *
 * The obvious alternative — a click handler — is not available here:
 * public/.htaccess sends "script-src 'none'".
 */
.lightbox {
    display: none;
}

.lightbox:target {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: rgba(8, 12, 20, 0.92);
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox .close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
}

/* --- delete confirmation -------------------------------------------------- */

.confirm {
    background: var(--card);
    border: 1px solid var(--warn-line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    max-width: 640px;
}

.confirm h1 { margin: 0 0 0.4rem; font-size: 1.25rem; }

.confirm .quote {
    border-left: 3px solid var(--line);
    padding-left: 0.9rem;
    margin: 1rem 0;
    color: var(--ink-soft);
    white-space: pre-wrap;
}

.actions-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.hint { color: var(--ink-soft); font-size: 0.9rem; }

h1.page-title { margin: 0 0 0.2rem; font-size: 1.3rem; }

.page-sub { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 1.35rem; }

/* --- narrow screens ------------------------------------------------------ */

@media (max-width: 640px) {
    .row { flex-wrap: wrap; }
    .row .thumb { width: 100%; height: 140px; }
    .row .actions { flex-direction: row; width: 100%; justify-content: flex-end; }
}
