/* meet – Gestaltung. Hell/Dunkel folgt dem System. Keine externen Schriften. */

:root {
  color-scheme: light dark;
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #eff1ec;
  --text: #15171a;
  --muted: #5f666e;
  --line: #e3e6df;
  --line-2: #cdd2ca;
  --accent: #0d8a57;
  --accent-hover: #0a744a;
  --accent-soft: #e0f3e8;
  --on-accent: #ffffff;
  --on: #1db271;
  --cell: #ebeee8;
  --cell-hover: #dde2d9;
  --heat-lo: #d7f0e2;
  --heat-hi: #08663f;
  --heat-rgb: 8 102 63;
  --grid-hour: rgb(0 0 0 / 13%);
  --grid-half: rgb(0 0 0 / 5%);
  --danger: #c0392b;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgb(20 30 20 / 5%), 0 8px 28px rgb(20 30 20 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f666e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f11;
    --surface: #16191c;
    --surface-2: #1f2327;
    --text: #e8ebe7;
    --muted: #9aa19c;
    --line: #262b2f;
    --line-2: #363c41;
    --accent: #3cc78b;
    --accent-hover: #5bd9a0;
    --accent-soft: #15301f;
    --on-accent: #05140c;
    --on: #2bb673;
    --cell: #22272b;
    --cell-hover: #2c3237;
    --heat-lo: #183528;
    --heat-hi: #52e3a1;
    --heat-rgb: 82 227 161;
    --grid-hour: rgb(255 255 255 / 12%);
    --grid-half: rgb(255 255 255 / 4%);
    --danger: #ff7b6b;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px rgb(0 0 0 / 30%);
    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa19c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}

h1, h2, h3 { line-height: 1.2; }
a { color: var(--accent); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Kopf/Fuß */

.topbar {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 21px;
  letter-spacing: -0.03em;
}
.brand img { width: 30px; height: 30px; display: block; }
.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 16px calc(28px + env(safe-area-inset-bottom));
}
.site-foot a { color: var(--muted); margin-left: 10px; }

/* ---------------------------------------------------------------- Bausteine */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, color .15s, transform .1s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger, .btn-danger:hover { color: var(--danger); }
.btn-sm { min-height: 38px; padding: 6px 11px; font-size: 14px; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .25; cursor: default; }

.link-btn {
  border: 0;
  padding: 2px 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.field { margin: 0 0 24px; }
.label { display: block; font-weight: 650; margin: 0 0 8px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* verhindert Zoom beim Fokussieren auf iOS */
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
select.input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: var(--chev);
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  cursor: pointer;
}
.input-sm { width: auto; min-height: 36px; padding: 5px 32px 5px 10px; font-size: 15px; }

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: var(--surface-2);
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 15px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.seg input:checked + label { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 14%); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); }

.form-error { margin: 0 0 14px; color: var(--danger); font-weight: 550; }
.notice {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 15px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--accent); }
.chip .icon { width: 14px; height: 14px; color: var(--muted); }

.loading { text-align: center; color: var(--muted); padding: 64px 0; }
.notfound { max-width: 520px; margin: 40px auto; text-align: center; }
.notfound h1 { font-size: 22px; margin-top: 4px; }

/* ---------------------------------------------------------------- Startseite */

.home { max-width: 660px; margin: 0 auto; }
.hero h1 {
  margin: 18px 0 8px;
  font-size: clamp(30px, 7vw, 44px);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero .lead { margin: 0 0 22px; color: var(--muted); font-size: 17px; max-width: 34em; }

.picker { margin-top: 14px; }
.picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.cal { user-select: none; -webkit-user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 650; }
.cal-wds, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-wds span { padding: 2px 0 4px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 600; }
.cal-grid, .wd-row {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.cal-day {
  height: clamp(40px, 11.5vw, 52px);
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--cell);
  color: var(--text);
  font: inherit;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .08s;
}
.cal-day.other { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.on { background: var(--on); color: #fff; box-shadow: none; }
.cal-day:disabled { background: transparent; color: var(--muted); opacity: .35; cursor: default; box-shadow: none; }
@media (hover: hover) {
  .cal-grid:not(.is-dragging) .cal-day:not(:disabled):not(.on):hover { background: var(--cell-hover); }
}

.wd-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd-chip {
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--cell);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wd-chip.on { background: var(--on); color: #fff; }

.time-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.time-row select { flex: 1 1 110px; width: auto; }

.recent { margin-top: 30px; }
.recent h2 { margin: 0 0 10px; color: var(--muted); font-size: 15px; font-weight: 650; }
.recent-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.recent-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 3px 3px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.recent-list a {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  color: var(--text);
  font-weight: 550;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.recent-list a:hover { color: var(--accent); }
.recent-list .icon-btn { color: var(--muted); }

/* ---------------------------------------------------------------- Terminseite */

.ev-head { margin: 4px 0 18px; }
.ev-head h1 {
  margin: 10px 0 4px;
  font-size: clamp(26px, 5.5vw, 36px);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.ev-meta { margin: 0 0 14px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share .url {
  flex: 1 1 280px;
  min-width: 0;
  min-height: 44px;
  border-color: transparent;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
}
.tz-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.tz-row .icon { width: 16px; height: 16px; }
.tz-row select { width: 14em; max-width: 100%; }
.tz-note { flex-basis: 100%; }
.tz-note:empty { display: none; }

.tabs { display: none; }

.panels { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) {
  .panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panels.aligned { grid-template-rows: auto auto auto 1fr; }
  /* Spalte fest auf Kartenbreite begrenzen, sonst wächst sie mit vielen Tagen über die Karte hinaus. */
  .panels.aligned .panel { display: grid; grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .panels.aligned .panel > * { min-width: 0; }
  .panels.aligned .panel-sub { min-height: 0; }
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-title { min-width: 0; }
.panel h2 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.who { display: block; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.panel-sub { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 12px; min-height: 66px; }

.legend, .heat-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 13px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sw-on { background: var(--on); }
.sw-off { background: var(--cell); margin-left: 10px; }
.heat-steps { display: inline-flex; gap: 2px; }
.heat-step { width: 18px; height: 14px; border-radius: 3px; background: var(--cell); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.status .icon { width: 15px; height: 15px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-saved { color: var(--accent); }
.status-saving .dot { animation: pulse 1s ease-in-out infinite; }
.status-error .link-btn { color: var(--danger); font-size: 13px; }
@keyframes pulse { 50% { opacity: .25; } }

.panel-actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px -6px 0; }

.join { max-width: 440px; }
.join h2 { font-size: 21px; }
.lead-sm { margin: 4px 0 20px; color: var(--muted); }
.existing:not(:empty) { margin-top: 22px; }
.existing .hint { margin-bottom: 8px; }

/* ---------------------------------------------------------------- Raster */

.grid-box { position: relative; }

.grid-scroll {
  overflow: auto;
  max-height: max(320px, calc(100dvh - 190px));
  border-radius: 10px;
  outline: none;
  scrollbar-width: thin;
}
.grid-scroll:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

.grid {
  --axis: 54px;
  --colmin: 46px;
  --rowh: 20px;
  position: relative;
  display: grid;
  grid-template-columns: var(--axis) repeat(var(--cols), minmax(var(--colmin), 1fr));
  grid-template-rows: auto;
  grid-auto-rows: var(--rowh);
  column-gap: 3px;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.grid.step-15 { --rowh: 13px; }
.grid.step-30 { --rowh: 20px; }
.grid.step-60 { --rowh: 32px; }
@media (pointer: coarse) {
  .grid.step-15 { --rowh: 16px; }
  .grid.step-30 { --rowh: 24px; }
  .grid.step-60 { --rowh: 38px; }
}

.g-corner, .g-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}
.g-head { z-index: 4; }
.g-corner { left: 0; z-index: 5; }
.g-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 0 7px;
  border: 0;
  box-shadow: 0 1px 0 var(--line);
  color: var(--text);
  font: inherit;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}
button.g-head { cursor: pointer; }
.g-wd { font-size: 13px; font-weight: 700; }
.g-dm { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.g-head { container-type: inline-size; }
@container (max-width: 48px) { .g-mon { display: block; } }
@media (hover: hover) { button.g-head:hover .g-wd, button.g-axis:hover .g-time { color: var(--accent); } }

.g-axis {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
}
button.g-axis { cursor: pointer; }
.g-time {
  position: absolute;
  top: 0;
  right: 7px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
}
.g-axis.first { z-index: 3; }   /* Beschriftung der ersten Zeile darf bei niedrigen Zeilen nach unten überstehen */
.g-axis.first .g-time { transform: translateY(3px); }

.cell { background: var(--cell); }
.cell.hour { box-shadow: inset 0 1px 0 var(--grid-hour); }
.cell.half { box-shadow: inset 0 1px 0 var(--grid-half); }
.cell.first { box-shadow: none; }
.cell.gap { box-shadow: inset 0 2px 0 var(--muted); }
.cell.void {
  background: repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px);
  box-shadow: none;
}

.grid-edit .cell:not(.void) { cursor: pointer; }
.grid-edit .cell.on { background: var(--on); }
@media (hover: hover) {
  .grid-edit:not(.is-dragging) .cell:not(.on):not(.void):hover { background: var(--cell-hover); }
}
.grid-heat .cell:not(.void) { cursor: default; }
.cell.inspected, .cell.cursor { outline: 2px solid var(--text); outline-offset: -2px; position: relative; z-index: 1; }

/* ---------------------------------------------------------------- Vollbild */

.legend-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.fs-btn { min-height: 34px; padding: 4px 11px; font-size: 13px; }
.fs-btn .icon { width: 16px; height: 16px; }

html.fs-open, html.fs-open body { overflow: hidden; overscroll-behavior: none; }
.fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--surface);
}
.fs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 6px 6px 10px;
  border-bottom: 1px solid var(--line);
}
.fs-bar .seg { flex: none; padding: 3px; }
.fs-bar .seg label { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.fs-bar .status, .fs-bar .heat-legend { flex: 1; min-width: 0; font-size: 12px; }
.fs-bar .heat-step { width: 13px; height: 12px; }
.fs-title { flex: 1; }
.fs-close { margin-left: auto; }
.fs-body { flex: 1; min-height: 0; display: flex; padding: 2px 4px 4px 0; }
.fs-body .grid-scroll {
  flex: 1;
  min-width: 0;
  max-height: none;
  border-radius: 0;
  overscroll-behavior: contain;
}
.grid.fs-grid { --colmin: 30px; --axis: 46px; }
.grid.dense .cell.half { box-shadow: none; }
.grid.sparse .g-axis.odd .g-time { display: none; }

/* ---------------------------------------------------------------- Gruppe */

.empty-note { margin-top: -2px; }
.people, .best { margin-top: 22px; }
.people h3, .best h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px;
  font-size: 15px;
}
.best h3 .icon { width: 16px; height: 16px; color: var(--accent); }
.chip-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--on); flex: none; }
.chip.empty .chip-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.chip.off { opacity: .5; }
.chip.off span:not(.chip-dot) { text-decoration: line-through; }
.chip.off .chip-dot { background: var(--line-2); box-shadow: none; }
.you { color: var(--muted); }

.best ol { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.best-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.best-item:hover { border-color: var(--accent); }
.best-count {
  min-width: 48px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.best-count.full { background: var(--accent); color: var(--on-accent); }
.best-item.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.best-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.best-without { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* Rahmen um die besten Zeiten direkt im Gruppenraster */
.best-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 2px solid var(--text);
  border-radius: 5px;
  pointer-events: none;
}
.best-frame.active { border-width: 3px; border-color: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.best-badge {
  position: absolute;
  top: 1px;
  left: 1px;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--text);
  color: var(--surface);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 15px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.best-frame.active .best-badge { background: var(--accent); color: var(--on-accent); }
.grid-scroll { scroll-margin-top: 72px; }

.cellinfo {
  position: fixed;
  z-index: 60;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 40px rgb(0 0 0 / 20%);
  font-size: 14px;
}
.cellinfo.float {
  width: max-content;
  max-width: min(380px, calc(100vw - 16px));
  pointer-events: none;
}
.cellinfo.float:not(.pinned) .ci-close { display: none; }
.cellinfo.pinned { pointer-events: auto; }
.cellinfo.sheet {
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(10px + env(safe-area-inset-bottom));
  max-width: 560px;
  max-height: 46vh;
  max-height: 46dvh;
  margin: 0 auto;
  overflow: auto;
  overscroll-behavior: contain;
  animation: sheet-in .18s ease-out;
}
@keyframes sheet-in { from { transform: translateY(14px); opacity: 0; } }
.ci-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ci-close { width: 34px; height: 34px; margin: -6px -8px 0 0; }
.ci-when { font-weight: 700; }
.ci-count { color: var(--muted); font-size: 13px; }
.ci-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 9px; }
.ci-col h4 { margin: 0 0 3px; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.ci-yes h4 { color: var(--accent); }
.ci-col ul { margin: 0; padding: 0; list-style: none; }
.ci-col li { padding: 1px 0; overflow-wrap: anywhere; }
.ci-no li, .ci-col li.none { color: var(--muted); }

/* ---------------------------------------------------------------- Schmale Bildschirme */

@media (max-width: 959px) {
  .tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 6px;
    margin: 0 -16px 10px;
    padding: 8px 16px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    background: var(--surface-2);
    color: var(--muted);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tab[aria-selected="true"] { background: var(--text); color: var(--bg); }
  .tab-count {
    min-width: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    line-height: 22px;
  }
  .tab[aria-selected="true"] .tab-count { background: var(--accent); color: var(--on-accent); }
  .panels[data-tab="mine"] .panel-group,
  .panels[data-tab="group"] .panel-mine { display: none; }
  .grid-scroll { max-height: max(300px, calc(100dvh - 140px)); }
}

#topnav .short { display: none; }
@media (max-width: 420px) {
  #topnav .long { display: none; }
  #topnav .short { display: inline; }
  .tab .icon { display: none; }
}

@media (max-width: 560px) {
  .card { padding: 18px 16px; border-radius: 16px; }
  .panel { margin: 0 -8px; padding: 14px 10px 12px; border-radius: 16px; }
  .panel-head, .panel-sub, .people, .best, .panel-actions, .join, .empty-note { margin-left: 4px; margin-right: 4px; }
  .grid { --axis: 42px; --colmin: 38px; column-gap: 2px; }
  .g-time { right: 5px; }
  .share .url { display: none; }
  .share .btn { flex: 1; }
  .hero h1 { margin-top: 10px; }
}
