/* ============================================================
   Detail-Blatt — fährt am Telefon von unten ein.
   Farben, Schriften und Abstände aus tokens.css; kein eigener Look.
   ============================================================ */
.sheet-back { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.62); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-height: 84vh; overflow-y: auto;
  padding: var(--space-2) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom));
  background: var(--bg-1); border-top: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0; box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.62);
}
/* `hidden` allein reicht nicht, sobald ein display-Wert gesetzt ist. */
.sheet[hidden], .sheet-back[hidden] { display: none; }

.sheet__grip { width: 42px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: var(--space-1) auto var(--space-3); }
.sheet__head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.sheet__head .avatar { width: 44px; height: 44px; }
.sheet__name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__meta { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: var(--text-sm); color: var(--text-dim); }
.sheet__meta .mfr-tile { width: 16px; height: 16px; }
.sheet__meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sheet__time { font-family: var(--font-mono); font-size: var(--text-2xl); font-weight: 700; color: var(--cyan); margin: var(--space-2) 0 2px; }
.sheet__gap { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--magenta-soft); margin-bottom: var(--space-3); }

.sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sheet__kv { min-width: 0; padding: var(--space-2) 6px; text-align: center; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.sheet__kv--weit { grid-column: span 3; text-align: left; padding-left: var(--space-3); }
.sheet__k { font-size: var(--text-xs); letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-faint); }
.sheet__v { font-family: var(--font-mono); font-size: var(--text-md); font-weight: 700; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__hint { font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 400; color: var(--text-faint); }

.sheet__act { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-top: var(--space-4); }
.sheet__btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 0 var(--space-3); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.8px;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s;
}
.sheet__btn:active { transform: scale(0.975); }
.sheet__btn--1 { color: #05060a; background: var(--grad-main); box-shadow: 0 6px 22px rgba(255, 46, 151, 0.28); }
.sheet__btn--2 { color: var(--cyan-soft); border: 1px solid rgba(0, 229, 255, 0.3); background: rgba(0, 229, 255, 0.06); }
.sheet__btn--weit { grid-column: span 2; }
.sheet__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; flex-shrink: 0; }

/* Knopf „weitere anzeigen" unter der Rangliste (nur am Telefon sichtbar). */
.lb__more {
  display: block; width: 100%; min-height: var(--tap); margin: 0;
  border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: var(--cyan-soft); font-family: var(--font-ui); font-size: var(--text-md);
  font-weight: 600; letter-spacing: 1px; transition: background 0.2s, color 0.2s;
}
.lb__more[hidden] { display: none; }
.lb__more:active { background: rgba(0, 229, 255, 0.08); }

/* ============================================================
   Ziehen ohne Nebenwirkung (Marc, 15.08.2026)
   `overscroll-behavior: contain` haelt den Zug im Blatt — sonst reicht der
   Browser ihn an die Seite weiter und loest „Zum Aktualisieren ziehen" aus.
   `touch-action: none` auf der Ziehflaeche gibt die Bewegung an unsere Geste
   statt an den Browser. Beides gehoert zu js/components/_wischen.js; ohne das
   hier passiert dort nichts.
   Der Griff ist nur 4 px hoch — die Trefferflaeche wird unsichtbar auf 44 px
   vergroessert, sonst zieht man dauernd daneben.
   ============================================================ */
.sheet, .bnav-menu, .fsheet { overscroll-behavior: contain; }
.sheet__grip, .sheet__head,
.bnav-menu__grip, .bnav-menu__t,
.fsheet__grip, .fsheet__t { touch-action: none; }
.sheet__grip, .bnav-menu__grip, .fsheet__grip {
  position: relative; cursor: grab;
}
.sheet__grip::after, .bnav-menu__grip::after, .fsheet__grip::after {
  content: ''; position: absolute; left: -60px; right: -60px; top: -20px; bottom: -20px;
}
/* Solange ein Blatt offen ist, bewegt sich die Seite dahinter nicht. */
body.sheet-offen { overflow: hidden; overscroll-behavior: none; }

/* Schliessen-Knopf (26.08.2026). Vorher gab es hier GAR KEINE Regel — der
   nackte `<button>` mass 7 x 17 px, also die Groesse des Zeichens. Technisch
   reagierte er, treffen konnte ihn am Handy trotzdem niemand; Richtwert fuer
   eine Fingerflaeche sind 44 px. Gemeldet von Marc.
   `touch-action: manipulation` hebt das `none` des Kopfes wieder auf — der
   Kopf ist Ziehflaeche, der Knopf darin aber nicht. */
.sheet__head [data-close],
.sheet__head button[data-close] {
  margin-left: auto;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.sheet__head [data-close]:hover,
.sheet__head [data-close]:focus-visible {
  color: var(--text);
  border-color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 14%, var(--card));
}
