/* Zessi Calculator
   Farben angelehnt an deutsche Verkehrszeichen:
   Autobahnblau (RAL 5017), Verkehrsgelb (RAL 1023, Ortstafel), Signalbraun (touristische Hinweise). */

@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --blue: #005a9c;
  --yellow: #f4c300;
  --brown: #7a4a2e;
  --sign-black: #000;
  --sign-white: #fff;

  --bg: #e3e5e1;          /* Beton */
  --surface: #f3f4f2;
  --ink: #1f2322;
  --ink-soft: #545b58;
  --line: #c5c9c4;
  --toast-bg: #1f2322;
  --toast-ink: #f3f4f2;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sign: "Barlow Condensed", "Arial Narrow", sans-serif;

  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a2d2c;        /* Asphalt */
    --surface: #343837;
    --ink: #eceeeb;
    --ink-soft: #a9b0ac;
    --line: #4a504d;
    --toast-bg: #eceeeb;
    --toast-ink: #2a2d2c;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

body.booting .app, body.booting .login { visibility: hidden; }

.app {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.app[hidden], .login[hidden] { display: none; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 6px;
}
.skip:focus { top: 8px; }

/* ---------- Kopf ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter) 10px;
}

.brand {
  margin: 0;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: .01em;
  line-height: 1.2;
}

.sync {
  font-size: .8125rem;
  color: var(--ink-soft);
  min-height: 1em;
}

main {
  min-height: 0;
  padding-bottom: calc(var(--tabs-h) + var(--safe-b));
}

.view[hidden] { display: none !important; }

/* ---------- Zähler: Schilder ---------- */

.view-counter {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px var(--gutter) 12px;
}
.view-counter[hidden] { display: none; }
.view-counter .signs { flex: 1 1 auto; }

.signs {
  height: 100%;
  min-height: calc(100dvh - var(--tabs-h) - var(--safe-b) - 140px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sign {
  flex: 1 1 0;
  min-height: 128px;
  display: flex;
  padding: 6px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}

.sign:active {
  transform: translateY(2px) scale(.99);
  box-shadow: 0 0 0 rgba(0, 0, 0, .18);
}

.sign-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  padding: 12px 16px 12px 18px;
  border: 3px solid;
  border-radius: 7px;
}

.sign-blue   { background: var(--blue);   color: var(--sign-white); }
.sign-yellow { background: var(--yellow); color: var(--sign-black); }
.sign-brown  { background: var(--brown);  color: var(--sign-white); }

.sign-blue .sign-inner,
.sign-brown .sign-inner { border-color: var(--sign-white); }
.sign-yellow .sign-inner { border-color: var(--sign-black); }

.sign-label {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: clamp(1.875rem, 9.5vw, 2.75rem);
  line-height: 1;
  letter-spacing: .005em;
}

.sign-count {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: clamp(3.5rem, 19vw, 6rem);
  line-height: .85;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.sign-today {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  opacity: .85;
}
.sign-today b { font-weight: 800; font-variant-numeric: tabular-nums; }

.sign-count.bump { animation: bump 260ms cubic-bezier(.3, 1.6, .5, 1); }

@keyframes bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* ---------- Seiten (Statistik, Regeln) ---------- */

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px var(--gutter) 32px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
}

.block { margin-top: 32px; }
.block:first-child { margin-top: 0; }

.block h2 {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Zeitraum */
.range {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.range button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  min-height: 36px;
}
.range button[aria-checked="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* Summe + Anteile */
.sum {
  margin: 0 0 16px;
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.1;
  color: var(--ink-soft);
}
.sum span {
  display: block;
  font-weight: 800;
  font-size: 4.5rem;
  line-height: .9;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.totals { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.totals li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  row-gap: 6px;
}
.totals .t-name { font-weight: 600; }
.totals .t-val { font-variant-numeric: tabular-nums; }
.totals .t-val small { color: var(--ink-soft); font-size: .875rem; margin-left: 6px; }
.totals .t-bar {
  grid-column: 1 / -1;
  height: 12px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
}
.totals .t-bar i { display: block; height: 100%; border-radius: 3px; min-width: 2px; }

/* Farben für Diagramme */
.c-zugezogen { background: var(--blue); }
.c-zessi     { background: var(--yellow); box-shadow: inset 0 0 0 1px var(--sign-black); }
.c-ultra     { background: var(--brown); }

/* Säulendiagramme */
.chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  border-bottom: 1px solid var(--ink);
}
.chart-hours { gap: 2px; }
.chart .col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column-reverse;
}
.chart .col i { display: block; width: 100%; }
.chart .col i:last-child { border-radius: 2px 2px 0 0; }

.axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: .8125rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.axis-week span { flex: 1 1 0; text-align: center; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: -4px 0 12px;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  color: var(--ink-soft);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

/* Fakten */
.facts { margin: 0; display: grid; gap: 0; }
.facts div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* Leerer Zustand */
.empty {
  padding: 32px 0;
}
.empty p { margin: 0 0 16px; font-size: 1.125rem; }
.empty-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--yellow);
  color: var(--sign-black);
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--sign-black);
}

/* ---------- Regeln ---------- */

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: para;
}
.rules > li {
  counter-increment: para;
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.rules > li:last-child { border-bottom: 1px solid var(--line); }
.rules > li::before {
  content: "§\00a0" counter(para);
  grid-row: 1 / span 3;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}
.rules h2 {
  margin: 0 0 4px;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
}
.rules p { margin: 0; max-width: 34em; }

/* Definition: eigener Abschnitt unter den Regeln */
.definition { margin-top: 56px; }
.definition h2 {
  margin: 0 0 16px;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
}
.definition p { margin: 0; max-width: 34em; font-size: 1.0625rem; }

/* Ortsnamen als kleine Ortstafeln */
.places {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.places li {
  padding: 7px 11px 6px;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--sign-black);
  box-shadow: inset 0 0 0 3px var(--yellow), inset 0 0 0 5px var(--sign-black);
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}

/* ---------- Kopf: Konto und Admin ---------- */

.top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .9375rem;
}
.top-link span {
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-link svg {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.top-link[aria-current="page"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.top-gear[hidden] { display: none; }
.top { align-items: center; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); padding-bottom: 6px; }
.sync:empty { display: none; }
.sync { margin-right: 4px; }

/* ---------- Zurücknehmen ---------- */

.undo-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 6px 6px 6px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.undo-text {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.3;
  color: var(--ink-soft);
}
.undo-text b { color: var(--ink); font-weight: 600; }
.undo-btn {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.undo-btn.confirm {
  background: var(--ink);
  color: var(--bg);
}
.undo-btn[hidden] { display: none; }

/* ---------- Formulare ---------- */

.form { display: grid; gap: 16px; max-width: 420px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .9375rem; }
.field small { color: var(--ink-soft); font-size: .8125rem; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem; /* verhindert Auto-Zoom auf iOS */
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input::placeholder { color: var(--ink-soft); opacity: .8; }

.check { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fbe3dd;
  color: #7a1d0c;
  font-weight: 500;
}
.form-error[hidden] { display: none; }
.hint { margin: 0; color: var(--ink-soft); font-size: .9375rem; }
.hint[hidden] { display: none; }
.form-info {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  font-weight: 500;
}
.form-info[hidden] { display: none; }
.login .btn[hidden] { display: none; }

.top-gear { position: relative; }
.badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #c4300f;
  color: #fff;
  font-size: .6875rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.badge[hidden] { display: none; }

.requests li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 0;
}
.requests .r-actions { display: flex; gap: 8px; }
.block[hidden] { display: none; }

.btn {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
}
.btn-primary {
  background: var(--yellow);
  color: var(--sign-black);
  box-shadow: inset 0 0 0 2px var(--sign-black);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-small { min-height: 40px; padding: 0 14px; font-size: .9375rem; }
.btn-danger { background: transparent; color: #a3260f; box-shadow: inset 0 0 0 1.5px #a3260f; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Anmeldung ---------- */

.login {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) var(--gutter) calc(var(--safe-b) + 24px);
}
.login-inner { width: 100%; max-width: 420px; margin: 0 auto; }
.login-sign {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin-bottom: 32px;
  padding: 22px 16px 16px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--sign-black);
  box-shadow: inset 0 0 0 6px var(--yellow), inset 0 0 0 9px var(--sign-black), 0 2px 0 rgba(0, 0, 0, .18);
  text-align: center;
}
.login-sign-name {
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: clamp(2.25rem, 12vw, 3.25rem);
  line-height: 1;
}
.login-sign-sub {
  font-family: var(--font-sign);
  font-weight: 600;
  font-size: 1.125rem;
}
.login .btn { width: 100%; }

.force-title {
  margin: 0 0 8px;
  font-family: var(--font-sign);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.05;
}
.force-text { margin: 0 0 24px; font-size: 1.0625rem; }

/* ---------- Konto ---------- */

.whoami { margin: 0; font-size: 1.0625rem; }
.whoami span { color: var(--ink-soft); }

/* ---------- Statistik: Personen ---------- */

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.people li {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 5px;
  align-items: baseline;
}
.people .p-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .p-name.none { font-weight: 500; color: var(--ink-soft); }
.people .p-sum { font-variant-numeric: tabular-nums; }
.people .p-bar { grid-column: 1 / -1; display: flex; height: 10px; }
.people .p-bar i { display: block; height: 100%; }
.people .p-bar i:first-child { border-radius: 3px 0 0 3px; }
.people .p-bar i:last-child { border-radius: 0 3px 3px 0; }
.people .p-bar i:only-child { border-radius: 3px; }
.people .me .p-name::after { content: " (du)"; font-weight: 500; color: var(--ink-soft); }

/* ---------- Admin ---------- */

.credential {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  max-width: 420px;
}
.credential[hidden] { display: none; }
.credential p { margin: 0 0 8px; }
.credential .pw {
  display: inline-block;
  margin-right: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .04em;
  user-select: all;
  -webkit-user-select: all;
}
.credential small { display: block; margin-top: 8px; color: var(--ink-soft); }

.users { list-style: none; margin: 0; padding: 0; }
.users > li { border-top: 1px solid var(--line); }
.users > li:last-child { border-bottom: 1px solid var(--line); }
.users summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
.users summary::-webkit-details-marker { display: none; }
.users summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-3px);
  grid-row: 1 / span 2;
  grid-column: 2;
}
.users details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.u-name { font-weight: 600; font-size: 1.0625rem; }
.u-meta { grid-column: 1; color: var(--ink-soft); font-size: .875rem; }
.u-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  vertical-align: 2px;
  background: var(--ink);
  color: var(--bg);
}
.u-tag.locked { background: #a3260f; color: #fff; }
.u-tag.pending { background: var(--yellow); color: var(--sign-black); }
.u-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
.u-actions .credential { flex-basis: 100%; margin-top: 4px; }

@media (prefers-color-scheme: dark) {
  .form-error { background: #4a1d14; color: #ffd9cf; }
  .btn-danger { color: #ff9a85; box-shadow: inset 0 0 0 1.5px #ff9a85; }
  .u-tag.locked { background: #ff9a85; color: #2a2d2c; }
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  z-index: 20;
  min-height: 56px;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 10px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  animation: toast-in 180ms ease-out;
}
.toast[hidden] { display: none; }
.toast-text { font-weight: 500; }
.toast-action {
  border: 0;
  background: var(--yellow);
  color: var(--sign-black);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  min-height: 40px;
}

@keyframes toast-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- Tab-Leiste ---------- */

.tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 500;
}
.tabs svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"] svg { stroke-width: 2.2; }
.tabs a:focus-visible { outline-offset: -4px; }

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 720px) {
  .view-counter { max-width: 640px; margin: 0 auto; width: 100%; }
}

/* Querformat auf dem Handy: Schilder nebeneinander */
@media (orientation: landscape) and (max-height: 520px) {
  .signs { flex-direction: row; min-height: calc(100dvh - var(--tabs-h) - var(--safe-b) - 130px); }
  .sign { min-height: 0; }
  .sign-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .sign-label { grid-row: 1; font-size: 1.75rem; }
  .sign-count { grid-column: 1; grid-row: 2; text-align: left; font-size: 3.5rem; }
  .sign-today { grid-row: 3; }
  .view-counter { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
  .sign-count.bump { animation: none; }
}
