/* ==========================================================================
   Handy-Design
   Wird nach styles.css und landing.css geladen und gilt nur auf schmalen
   Bildschirmen. Desktop bleibt unverändert.

   Ziele: ruhige Flächen, klare Hierarchie, kurze Wege.
   - Einstieg (Sprache/Alter) füllt den Bildschirm statt als Karte zu schweben
   - Sprache als 2-Spalten-Raster, damit alles ohne Scrollen passt
   - App: feste Leiste unten mit Symbolen, schlanker Kopf, weniger Polster

   Die Einstiegs-Regeln tragen bewusst `body:not(.is-app)`, weil landing.css
   dieselben Bausteine mit dieser Spezifität gestaltet.
   ========================================================================== */

/* Symbole der App-Leiste gibt es nur auf dem Handy. */
.tab-ic {
  display: none;
}

/* Der Design-Schalter im Einstieg ist ein Handy-Thema: die Landung hat
   auf großen Bildschirmen weiterhin nur eine Optik. */
.gate-theme {
  display: none;
}

@media (max-width: 860px) {
  body:not(.is-app) {
    --m-accent: #8a5a3b;
    --m-accent-soft: rgba(138, 90, 59, 0.08);
    --m-accent-line: rgba(138, 90, 59, 0.26);
  }

  body.is-app {
    --m-accent: var(--honey);
    --m-accent-soft: rgba(234, 183, 125, 0.1);
    --m-accent-line: rgba(234, 183, 125, 0.26);
  }

  /* ------------------------------------------------------------ Einstieg -- */

  body:not(.is-app) .gate {
    padding: 0;
    place-items: stretch;
    overflow-y: auto;
    background: var(--bg);
    background-image: radial-gradient(560px 340px at 50% -14%, var(--m-accent-soft), transparent 72%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body:not(.is-app) .gate-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-height: none;
    min-height: 100svh;
    overflow: visible;
    padding: calc(env(safe-area-inset-top) + 24px) 18px calc(env(safe-area-inset-bottom) + 24px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
  }

  body:not(.is-app) .gate-top {
    margin: 0 0 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }

  body:not(.is-app) .gate-brand {
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  body:not(.is-app) .gate-brand .mark {
    width: 30px;
    height: 30px;
  }

  body:not(.is-app) .gate-brand em {
    color: var(--m-accent);
    font-style: normal;
  }

  body:not(.is-app) .gate .badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
  }

  body:not(.is-app) .gate-kicker {
    margin-bottom: 10px;
    color: var(--m-accent);
    font-size: 0.67rem;
    letter-spacing: 0.16em;
  }

  body:not(.is-app) .gate-card h1 {
    margin-bottom: 18px;
    font-size: clamp(1.6rem, 7.6vw, 2rem);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.03em;
  }

  body:not(.is-app) .gate-card h1 span {
    margin-top: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0;
    color: var(--muted);
  }

  body:not(.is-app) .gate-text {
    max-width: none;
    margin-bottom: 24px;
    font-size: 0.95rem;
  }

  /* Sprache: zwei Spalten, Code + Name, große Tippflächen, kein Scrollen. */
  body:not(.is-app) .lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
  }

  body:not(.is-app) .lang-btn {
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--bg-2);
    box-shadow: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  }

  body:not(.is-app) .gate .lang-btn:hover {
    background: var(--bg-2);
    border-color: var(--line);
    transform: none;
    box-shadow: none;
  }

  body:not(.is-app) .gate .lang-btn:active {
    transform: scale(0.982);
    border-color: var(--m-accent-line);
    background: var(--m-accent-soft);
  }

  body:not(.is-app) .lang-code {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--bg);
    color: var(--m-accent);
    font-size: 0.7rem;
    letter-spacing: 0.02em;
  }

  body:not(.is-app) .lang-copy strong {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  /* Untertitel und Pfeil kosten auf dem Handy nur Platz. */
  body:not(.is-app) .lang-copy small,
  body:not(.is-app) .lang-arrow {
    display: none;
  }

  body:not(.is-app) .gate-actions {
    display: grid;
    gap: 10px;
    margin-top: 2px;
  }

  body:not(.is-app) .gate-actions .btn {
    width: 100%;
    min-height: 52px;
    padding: 15px 20px;
    border-radius: 14px;
    font-size: 0.98rem;
  }

  body:not(.is-app) .gate-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 34px;
    padding-top: 0;
  }

  body:not(.is-app) .gate-dots span {
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: var(--line-strong);
    opacity: 0.6;
  }

  body:not(.is-app) .gate-dots span.is-on {
    width: 30px;
    background: var(--m-accent);
    opacity: 1;
  }

  body:not(.is-app) .gate-fine {
    margin: 10px 0 0;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
  }

  /* Design-Wahl ab dem ersten Bildschirm: Schalter neben der 18+-Marke. */
  body:not(.is-app) .gate-top-tools {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  body:not(.is-app) .gate-theme {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-2);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body:not(.is-app) .gate-theme:active {
    border-color: var(--m-accent-line);
    background: var(--m-accent-soft);
  }

  /* -------------------------------------------------- Dämmerung im Einstieg --
     Die Landung ist hell angelegt. Für das dunkle Design werden hier die
     Farbtöne gedreht und die wenigen fest weißen Flächen ersetzt – ohne die
     Desktop-Ansicht anzufassen. */

  html[data-theme="dark"] body:not(.is-app) {
    --land-bg: #0d0907;
    --land-soft: #171009;
    --land-line: #2a1d16;
    --land-line-2: #3a2921;
    --land-ink: #f6eee5;
    --land-body: #b3a194;
    --land-accent: #eab77d;

    --bg: #0d0907;
    --bg-2: #171009;
    --panel: #191110;
    --panel-2: #211714;
    --line: rgba(234, 183, 125, 0.16);
    --line-strong: rgba(234, 183, 125, 0.34);
    --text: #f6eee5;
    --muted: #b3a194;
    --muted-2: #8d7c70;
    --honey: #eab77d;
    --honey-soft: #f3cfa6;
    --clay: #c97a56;
    --ink: #f6eee5;

    --m-accent: #eab77d;
    --m-accent-soft: rgba(234, 183, 125, 0.1);
    --m-accent-line: rgba(234, 183, 125, 0.28);

    background: var(--bg);
    background-image: none;
    color: var(--text);
  }

  html[data-theme="dark"] body:not(.is-app) .header-bar {
    background: rgba(15, 11, 9, 0.92);
    border-bottom-color: var(--line);
  }

  html[data-theme="dark"] body:not(.is-app) input[type="text"],
  html[data-theme="dark"] body:not(.is-app) input[type="password"],
  html[data-theme="dark"] body:not(.is-app) input[type="number"],
  html[data-theme="dark"] body:not(.is-app) select,
  html[data-theme="dark"] body:not(.is-app) textarea {
    background: var(--panel-2);
    border-color: var(--line-strong);
    color: var(--text);
  }

  html[data-theme="dark"] body:not(.is-app) .auth-card {
    background: var(--panel);
    border-color: var(--line);
    box-shadow: none;
  }

  html[data-theme="dark"] body:not(.is-app) .auth-side {
    background: var(--panel-2);
    border-color: var(--line);
  }

  html[data-theme="dark"] body:not(.is-app) .tabs {
    background: var(--panel-2);
  }

  html[data-theme="dark"] body:not(.is-app) .tab.is-active {
    background: var(--panel);
    color: var(--text);
    box-shadow: none;
  }

  html[data-theme="dark"] body:not(.is-app) .btn-ghost {
    border-color: var(--line-strong);
    color: var(--text);
    background: transparent;
  }

  html[data-theme="dark"] body:not(.is-app) .btn-ghost:hover {
    border-color: var(--honey);
    background: rgba(234, 183, 125, 0.1);
  }

  html[data-theme="dark"] body:not(.is-app) .badge {
    border-color: var(--line-strong);
    color: var(--honey);
    background: rgba(234, 183, 125, 0.08);
  }

  html[data-theme="dark"] body:not(.is-app) .site-footer {
    background: var(--bg);
    border-top-color: var(--line);
  }

  html[data-theme="dark"] body:not(.is-app) .site-footer .badge {
    background: var(--panel-2);
    border-color: var(--line-strong);
    color: var(--honey);
  }

  /* Sprachkacheln heben sich warm vom dunklen Grund ab. */
  html[data-theme="dark"] body:not(.is-app) .lang-btn {
    background: rgba(234, 183, 125, 0.06);
    border-color: rgba(234, 183, 125, 0.18);
  }

  html[data-theme="dark"] body:not(.is-app) .gate .lang-btn:hover {
    background: rgba(234, 183, 125, 0.1);
    border-color: var(--line-strong);
  }

  /* Hauptknopf in Honig statt im dunklen Ton der hellen Landung. */
  html[data-theme="dark"] body:not(.is-app) .btn-primary {
    background: var(--honey);
    background-image: none;
    border-color: var(--honey);
    color: #1c110b;
    box-shadow: none;
  }

  html[data-theme="dark"] body:not(.is-app) .btn-primary:hover {
    background: var(--honey-soft);
    border-color: var(--honey-soft);
  }
}

@media (max-width: 760px) {
  /* ------------------------------------------------------------ App-Kopf -- */

  body.is-app {
    padding-bottom: 0;
  }

  body.is-app .site-header {
    padding: env(safe-area-inset-top) 0 0;
    background: transparent;
    backdrop-filter: none;
  }

  /* Kein backdrop-filter im Kopf: ein Filter würde die feste Leiste unten
     an den Kopf binden statt an den Bildschirm. */
  body.is-app .header-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    max-width: none;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--header-bg);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.is-app .brand {
    gap: 8px;
    min-width: 0;
  }

  body.is-app .brand .mark {
    width: 26px;
    height: 26px;
  }

  body.is-app .brand-name {
    font-size: 0.98rem;
    white-space: nowrap;
  }

  body.is-app .header-tools {
    gap: 8px;
    margin-left: auto;
  }

  body.is-app .header-user {
    gap: 8px;
  }

  body.is-app .header-user .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  body.is-app .header-user .btn-ghost {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  body.is-app .lang-pick select {
    min-width: 58px;
    padding: 6px 20px 6px 9px;
    font-size: 0.78rem;
  }

  body.is-app .theme-toggle {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  /* Menü hinter dem Profilbild: auf dem Handy fast volle Breite. */
  body.is-app .app-menu-panel {
    top: 64px;
    width: calc(100% - 20px);
    max-height: calc(100% - 150px);
  }

  body.is-app .app-menu-row {
    padding: 17px 16px;
    font-size: 1.02rem;
  }

  body.is-app .app-menu-row svg {
    width: 23px;
    height: 23px;
  }

  /* ------------------------------------------------- Leiste am unteren Rand -- */

  body.is-app .app-tabs {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 130;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 2px;
    width: auto;
    margin: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: var(--header-bg);
    box-shadow: 0 -14px 34px -28px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    overflow: visible;
  }

  body.is-app .app-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3px;
    min-width: 0;
    padding: 7px 0 5px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font-size: 8.8px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
    position: relative;
  }

  body.is-app .app-tab:hover {
    background: transparent;
    color: var(--text);
  }

  body.is-app .app-tab .tab-ic {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
  }

  body.is-app .app-tab .tab-ic svg {
    width: 21px;
    height: 21px;
  }

  body.is-app .app-tab.is-active {
    background: var(--m-accent-soft);
    box-shadow: none;
    color: var(--text);
    font-weight: 600;
  }

  body.is-app .app-tab.is-active .tab-ic {
    color: var(--m-accent);
  }

  body.is-app .app-tab--bell .tab-bell {
    display: none;
  }

  /* Zähler sitzen über der eigenen Symbolmitte, damit sie nicht in den
     Nachbarreiter ragen. */
  body.is-app .app-tab .tab-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    right: auto;
    margin: 0 0 0 5px;
  }

  /* --------------------------------------------------------------- Inhalt -- */

  /* Die App füllt den Bildschirm: keine schwebende Karte, kein Rahmen –
     nur eine ruhige Fläche unter dem Kopf. */
  body.is-app #app,
  body.is-app .member {
    max-width: none;
    min-height: 0;
    margin: 0 auto;
    padding: 16px 14px calc(78px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    background-image: none;
    box-shadow: none;
    animation: none;
  }

  body.is-app #app .section-head {
    margin-bottom: 14px;
  }

  body.is-app #app .eyebrow {
    margin-bottom: 6px;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  /* Die Ziffern (03, 04, 05) stammen aus der Startseite und sagen in der
     App nichts – im Kopf des Bereichs bleibt nur der Name. */
  body.is-app #app .eyebrow .index {
    display: none;
  }

  body.is-app #app h2 {
    margin-bottom: 6px;
    font-size: 1.5rem;
  }

  body.is-app #app h3,
  body.is-app #app h4 {
    font-size: 1.12rem;
  }

  body.is-app #app .section-text {
    font-size: 0.92rem;
  }

  body.is-app #app .card,
  body.is-app #app .member-profile,
  body.is-app #app .member-settings,
  body.is-app #app .feed-post,
  body.is-app #app .feed-composer,
  body.is-app #app .feed-setting,
  body.is-app .member-card {
    padding: 14px;
    border-radius: 16px;
  }

  body.is-app .feed,
  body.is-app .topic-list,
  body.is-app .notif-list,
  body.is-app .member-list {
    gap: 12px;
  }

  /* Mitgliederfilter: eine Spalte, Beschriftung über dem Feld. */
  body.is-app .member-filters {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  body.is-app .member-filter,
  body.is-app .member-filter-wide {
    grid-column: auto;
    display: grid;
    gap: 6px;
  }

  body.is-app .member-filter .field-label {
    font-size: 0.72rem;
  }

  body.is-app .member-filter .chips {
    gap: 6px;
  }

  body.is-app .member-reset {
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
  }

  /* Formulare und Tippziele auf dem Handy in voller Breite. */
  body.is-app .settings-actions {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
  }

  body.is-app .settings-actions .btn {
    min-height: 46px;
  }

  body.is-app .field input,
  body.is-app .field textarea,
  body.is-app .field select,
  body.is-app .member-filter input,
  body.is-app .member-filter select,
  body.is-app #dmInput {
    font-size: 16px;
  }

  /* Moderation und Meldungen: Kopf und Aktion sauber untereinander. */
  body.is-app .notif-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Themen: erst die Liste, dann das Eröffnen-Formular. Auf dem Handy will
     man sehen, was da ist, bevor man selbst schreibt. */
  body.is-app #topics {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.is-app #topics > .section-head {
    order: 0;
    margin-bottom: 0;
  }

  body.is-app #topics > .topic-list {
    order: 1;
  }

  body.is-app #topics > .topic-composer {
    order: 2;
    margin: 0;
  }

  body.is-app #topics > .topic-detail {
    order: 3;
  }

  /* Ein offenes Thema braucht keinen doppelten Kopf und kein Formular:
     der Bereich beginnt direkt mit „← Alle Themen“. */
  body.is-app #topics:has(> .topic-detail:not([hidden])) > .section-head,
  body.is-app #topics:has(> .topic-detail:not([hidden])) > .topic-composer {
    display: none;
  }

  /* Beschriftung über dem Antwortfeld ist doppelt zum Platzhalter. */
  body.is-app .topic-reply .field-label {
    display: none;
  }

  body.is-app .topic-composer h3,
  body.is-app .topic-composer .field-label {
    font-size: 0.8rem;
  }

  /* Nachrichten: Eingabe und Senden bleiben in einer Zeile, Senden kompakt. */
  body.is-app .dm-composer {
    padding: 10px 12px;
    gap: 8px;
  }

  body.is-app .dm-composer-row {
    gap: 6px;
  }

  body.is-app .dm-composer-row .btn {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  body.is-app .dm-attach {
    width: 38px;
    height: 38px;
  }

  body.is-app .dm-thread-head {
    gap: 8px;
    padding: 10px 12px;
  }

  /* Bild-Vorschau: Entfernen-Knopf groß genug für den Daumen und ganz
     innerhalb der Ecke, damit ihn das Formular nicht abschneidet. */
  body.is-app .feed-preview-remove,
  body.is-app .dm-preview-remove {
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(12, 9, 8, 0.72);
    color: #fff;
  }

  /* Foto ohne Text: der Rahmen soll dünn sein, nicht wie ein Passepartout. */
  body.is-app .dm-bubble:has(.dm-image):not(:has(.dm-text)) {
    padding: 5px;
  }

  body.is-app .dm-bubble .dm-image {
    border-radius: 10px;
  }

  /* ------------------------------------------------------- Moderation -- */

  /* Erst die Meldungen, dann Konto-Werkzeuge, Rollen und Protokoll: die
     offenen Fälle sind die Arbeit, der Rest ist Verwaltung. */
  body.is-app #viewModeration {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.is-app #viewModeration > .member-top {
    order: 0;
    gap: 6px;
  }

  body.is-app #viewModeration > .mod-list {
    order: 1;
  }

  body.is-app #viewModeration > .mod-user-form {
    order: 2;
    margin: 0;
  }

  body.is-app #viewModeration > .mod-roles:not(.mod-log) {
    order: 3;
  }

  body.is-app #viewModeration > .mod-log {
    order: 4;
  }

  /* Anzahl offener Fälle als Chip statt loser Zeile. */
  body.is-app #viewModeration .mod-count {
    align-self: flex-start;
    padding: 4px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.75rem;
  }

  /* Konto-Formulare: Eingabe und Knöpfe untereinander in voller Breite,
     keine ungleichen Knopfzeilen mehr. */
  body.is-app .mod-user-form,
  body.is-app .mod-role-form {
    display: grid;
    gap: 8px;
  }

  body.is-app .mod-user-form .field,
  body.is-app .mod-role-form .field {
    flex: none;
    margin: 0;
  }

  body.is-app .mod-user-form .btn,
  body.is-app .mod-role-form .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Meldungskarten: zwei gleich breite Spalten für die vier Aktionen. */
  body.is-app .mod-card {
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }

  body.is-app .mod-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
  }

  body.is-app .mod-actions .btn {
    width: 100%;
    min-height: 44px;
    padding: 11px 10px;
    font-size: 0.82rem;
    white-space: normal;
    line-height: 1.2;
  }

  /* Rollen- und Protokollkarten: gleiche Rundung wie die Meldungen. */
  body.is-app #viewModeration .mod-roles {
    padding: 14px;
    border-radius: 16px;
  }

  /* Inhaberblock: Überschrift, Erklärung und Formular mit Luft dazwischen,
     statt Text und Label ohne Abstand. */
  body.is-app .mod-owner {
    display: grid;
    gap: 10px;
  }

  body.is-app .mod-owner h5 {
    margin: 0;
  }

  /* Protokoll: eine Zeile pro Ereignis statt vier untereinander. */
  body.is-app .mod-log-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'who when'
      'what what'
      'label label';
    gap: 2px 10px;
    padding: 9px 11px;
    border-radius: 12px;
  }

  body.is-app .mod-log-who {
    grid-area: who;
    font-weight: 600;
  }

  body.is-app .mod-log-when {
    grid-area: when;
    justify-self: end;
    color: var(--muted-2);
    font-size: 0.74rem;
  }

  body.is-app .mod-log-what {
    grid-area: what;
    color: var(--muted);
    font-size: 0.8rem;
  }

  body.is-app .mod-log-label {
    grid-area: label;
    color: var(--muted-2);
    font-size: 0.76rem;
  }

  body.is-app #viewModeration .mod-roles-head .section-text {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  /* Beitragsbild: hochkante Fotos dürfen den Feed nicht füllen. */
  body.is-app .feed-post img {
    max-height: 70svh;
    object-fit: cover;
  }

  /* Unterhaltung füllt den Bildschirm: Verlauf oben, Eingabe direkt über
     der Leiste – kein leerer Streifen darunter. */
  body.is-app #viewMessages {
    display: flex;
    flex-direction: column;
    /* Feste Höhe statt Mindesthöhe: wächst die Eingabe (z. B. durch die
       Bildvorschau), schrumpft der Verlauf – nichts rutscht unter die Leiste. */
    height: calc(100svh - 141px);
    min-height: 320px;
  }

  body.is-app .dm {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  body.is-app .dm-thread {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  body.is-app .dm-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    /* Zeilen nicht auseinanderziehen, sonst rutscht „Melden“ weit weg
       von der Nachricht, zu der es gehört. */
    align-content: start;
    /* Auf dem Handy schiebt man, statt eine Leiste im Verlauf zu sehen. */
    scrollbar-width: none;
  }

  body.is-app .dm-messages::-webkit-scrollbar {
    display: none;
  }
}

/* Sehr schmale Telefone: der Kopf bleibt einreihig, der Design-Schalter
   wandert in die Profileinstellungen (dort steht er ohnehin). */
@media (max-width: 430px) {
  body.is-app .theme-toggle {
    display: none;
  }

  body.is-app .header-user .btn-ghost {
    padding: 7px 10px;
    font-size: 0.74rem;
  }

  body.is-app .brand-name {
    font-size: 0.92rem;
  }
}
