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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink-900);
  color: var(--chalk);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* Das Licht im Raum folgt dem Sättigungsbogen. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(130% 70% at 50% -12%, rgb(var(--glow-rgb) / 0.18), transparent 62%),
    radial-gradient(90% 55% at 8% 108%, rgb(var(--glow-rgb) / 0.08), transparent 70%),
    linear-gradient(180deg, var(--ink-850) 0%, var(--ink-900) 60%);
  transition: background 1.4s var(--ease-out);
}

.sprite {
  display: none;
}

/* Ohne eigene Größe zeichnet der Browser SVGs 300 × 150 px groß.
   :where() hält die Spezifität bei null, damit .btn__icon & Co. gewinnen. */
:where(svg[class$='__icon'], .icon) {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgb(245 177 76 / 0.3);
}

/* ------------------------------------------------------------------- Ladebild */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-4);
}

.boot__mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--ink-600);
  border-top-color: var(--lamp);
  animation: spin 0.9s linear infinite;
}

.boot__text {
  font-family: var(--font-log);
  font-size: var(--text-sm);
  color: var(--mist-dim);
  letter-spacing: 0.08em;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* ------------------------------------------------------------------- Gerüst */
.app {
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + var(--space-4)) var(--space-4)
    calc(env(safe-area-inset-bottom) + 5.5rem);
}

.view {
  display: grid;
  gap: var(--space-4);
  animation: view-in 0.32s var(--ease-out) both;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.eyebrow {
  font-family: var(--font-log);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist-dim);
}

.muted {
  color: var(--mist);
}

.mono {
  font-family: var(--font-log);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ Kopfzeile */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.topbar__name {
  font-size: var(--text-xl);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.topbar__actions {
  display: flex;
  gap: var(--space-2);
}

/* --------------------------------------------------------------------- Bühne */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(20rem, 78vw);
  margin: var(--space-2) auto var(--space-1);
}

.stage__light {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 58%, rgb(var(--stage-light, 245 177 76) / 0.22), transparent 68%);
  filter: blur(6px);
  transition: background 0.9s var(--ease-out);
}

.stage__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.ring__track {
  fill: none;
  stroke: var(--ink-650);
  stroke-width: 3;
}

.ring__value {
  fill: none;
  stroke: var(--ring);
  stroke-width: 3.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgb(var(--glow-rgb) / 0.5));
  transition: stroke-dashoffset 0.9s var(--ease-out), stroke 0.9s var(--ease-out);
}

.ring__tick {
  stroke: var(--ink-500);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.ring__tick--major {
  stroke: var(--ink-500);
  stroke-width: 2.5;
}

.ring__head {
  fill: var(--ring);
  transition: transform 0.9s var(--ease-out);
}

:root[data-level='overdue'] .ring__value {
  animation: ring-pulse 2.4s var(--ease-out) infinite;
}

@keyframes ring-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.stage__cat {
  position: relative;
  width: 74%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

/* Bildfolge: zwei Ebenen, damit der Wechsel zwischen Zuständen überblendet. */
.stage__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
}

.stage__frame.is-visible {
  opacity: 1;
}

.stage__fallback {
  width: 100%;
  height: 100%;
}

.stage__fallback[hidden] {
  display: none;
}

.stage__label {
  position: absolute;
  bottom: -0.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-pill);
  background: rgb(20 14 26 / 0.75);
  border: var(--line);
  font-family: var(--font-log);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------- Platzhalterkatze */
.catart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.catart__body,
.catart__head,
.catart__ear {
  fill: url(#cat-fur);
}

.catart__rim {
  fill: none;
  stroke: rgb(var(--stage-light, 245 177 76) / 0.55);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.catart__inner-ear {
  fill: var(--rose);
  opacity: 0.55;
}

.catart__eye {
  fill: var(--lamp-soft);
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 7s var(--ease-out) infinite;
}

.catart__eye--right {
  animation-delay: 0.12s;
}

.catart__pupil {
  fill: var(--ink-900);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1.2s var(--ease-out);
  transform: scaleX(var(--pupil, 0.42));
}

.catart__nose {
  fill: var(--rose);
}

.catart__whisker {
  stroke: rgb(255 255 255 / 0.35);
  stroke-width: 1.2;
  stroke-linecap: round;
  fill: none;
}

.catart__tail {
  fill: none;
  stroke: url(#cat-fur);
  stroke-width: 13;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: 12% 88%;
  animation: tail-sway 5.5s ease-in-out infinite;
}

.catart__mouth {
  fill: none;
  stroke: rgb(255 255 255 / 0.3);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.catart__extra {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(0.08); }
}

@keyframes tail-sway {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(9deg); }
}

/* Stimmungen der Platzhalterkatze */
[data-mood='hungry'] .catart__pupil { --pupil: 0.95; }
[data-mood='hungry'] .catart__tail { animation-duration: 2.4s; }

[data-mood='happy'] .catart__eye,
[data-mood='cuddle'] .catart__eye { animation: none; transform: scaleY(0.35) translateY(-2px); }
[data-mood='happy'] .catart__tail,
[data-mood='play'] .catart__tail { animation-duration: 1.6s; }
[data-mood='happy'] .catart__extra--hearts,
[data-mood='cuddle'] .catart__extra--hearts,
[data-mood='rollig'] .catart__extra--hearts {
  opacity: 1;
  animation: float-up 2.6s ease-out infinite;
}

[data-mood='eating'] .catart__head { animation: nibble 0.6s ease-in-out infinite; }
[data-mood='eating'] .catart__extra--bowl { opacity: 1; }

[data-mood='sleep'] .catart__eye { animation: none; transform: scaleY(0.06); }
[data-mood='sleep'] .catart__tail { animation-duration: 9s; }
[data-mood='sleep'] .catart__extra--zzz { opacity: 1; animation: float-up 3.4s ease-out infinite; }

[data-mood='grumpy'] .catart__eye { animation: none; transform: scaleY(0.55); }
[data-mood='grumpy'] .catart__mouth { d: path('M92 118 Q100 112 108 118'); }

[data-mood='sick'] .catart__eye { animation: none; transform: scaleY(0.4); }
[data-mood='sick'] .catart__head { animation: wobble 3s ease-in-out infinite; }

[data-mood='rollig'] .catart__tail { animation: tail-up 2.2s ease-in-out infinite; }

@keyframes nibble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2.5px); }
}

@keyframes wobble {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@keyframes tail-up {
  0%, 100% { transform: rotate(-24deg); }
  50% { transform: rotate(-34deg); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(4px) scale(0.8); }
  35% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-22px) scale(1.05); }
}

/* -------------------------------------------------------------------- Status */
.status {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  text-align: center;
  margin-top: var(--space-3);
}

.status__value {
  font-family: var(--font-log);
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--chalk);
}

.status__value sub {
  font-size: 0.34em;
  letter-spacing: 0.04em;
  vertical-align: baseline;
  color: var(--mist-dim);
  margin-left: 0.15em;
}

.status__line {
  font-size: var(--text-sm);
  color: var(--mist);
}

.status__line strong {
  color: var(--chalk);
  font-weight: 600;
}

/* ------------------------------------------------------------ Schnellzugriffe */
.quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.quick__btn {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: var(--space-3) var(--space-2);
  border: var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), border-color 0.18s, background 0.18s;
  -webkit-tap-highlight-color: transparent;
}

.quick__btn:hover {
  border-color: var(--ink-500);
}

.quick__btn:active {
  transform: scale(0.96);
}

.quick__btn.is-busy {
  animation: logged 0.5s var(--ease-out);
}

@keyframes logged {
  0% { box-shadow: 0 0 0 0 rgb(var(--glow-rgb) / 0.6); }
  100% { box-shadow: 0 0 0 16px rgb(var(--glow-rgb) / 0); }
}

.quick__emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.quick__label {
  font-size: var(--text-xs);
  color: var(--mist);
  text-align: center;
  line-height: 1.25;
}

/* -------------------------------------------------------------------- Karten */
.card {
  border: var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  padding: var(--space-4);
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card__title {
  font-size: var(--text-md);
  font-weight: 620;
}

.card--flush {
  padding: var(--space-2) var(--space-2) var(--space-1);
}

/* ------------------------------------------------------------------ Zeitleiste */
.daygroup + .daygroup {
  margin-top: var(--space-4);
}

.daygroup__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-2) var(--space-2);
}

.daygroup__head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ink-600), transparent);
}

.entry {
  display: grid;
  grid-template-columns: 3.4rem 2rem 1fr auto;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s;
}

.entry:hover {
  background: rgb(255 255 255 / 0.035);
}

.entry + .entry {
  border-top: 1px solid rgb(255 255 255 / 0.045);
}

.entry__time {
  font-family: var(--font-log);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--mist-dim);
}

.entry__emoji {
  font-size: 1.15rem;
  text-align: center;
}

.entry__label {
  font-size: var(--text-md);
  line-height: 1.25;
}

.entry__meta {
  display: block;
  font-size: var(--text-xs);
  color: var(--mist-dim);
}

.entry__who {
  font-family: var(--font-log);
  font-size: var(--text-xs);
  color: var(--mist-dim);
  padding: 0.15rem 0.45rem;
  border: var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.entry[data-severity='good'] .entry__label { color: var(--chalk); }
.entry[data-severity='warn'] .entry__label { color: var(--lamp-soft); }
.entry[data-severity='alert'] .entry__label { color: var(--alert); }

/* --------------------------------------------------------------------- Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  padding: 0.3rem 0.7rem;
  border: var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--text-sm);
  color: var(--mist);
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.chip:hover {
  border-color: var(--ink-500);
  color: var(--chalk);
}

.chip.is-active {
  border-color: var(--ring);
  background: rgb(var(--glow-rgb) / 0.14);
  color: var(--chalk);
}

.chip--tag {
  cursor: default;
  font-family: var(--font-log);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 var(--space-4);
  border: var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--chalk);
  font-size: var(--text-md);
  font-weight: 550;
  cursor: pointer;
  transition: transform 0.16s var(--ease-spring), background 0.16s, border-color 0.16s, opacity 0.16s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}

.btn--primary {
  background: linear-gradient(180deg, var(--lamp-soft), var(--lamp));
  border-color: transparent;
  color: #2a1a05;
  font-weight: 650;
  box-shadow: 0 10px 26px -14px rgb(245 177 76 / 0.9);
}

.btn--wide {
  width: 100%;
}

.btn--quiet {
  border-color: transparent;
  color: var(--mist);
}

.btn--quiet:hover {
  background: rgb(255 255 255 / 0.05);
  color: var(--chalk);
}

.btn--danger {
  border-color: rgb(255 127 99 / 0.4);
  color: var(--alert);
}

.btn--icon {
  min-height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  border-radius: 50%;
  color: var(--mist);
}

.btn--icon:hover {
  color: var(--chalk);
  border-color: var(--ink-500);
}

.btn--icon .btn__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.btnrow {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btnrow--end {
  justify-content: flex-end;
}

/* ------------------------------------------------------------------ Formulare */
.field {
  display: grid;
  gap: 0.35rem;
}

.field__label {
  font-family: var(--font-log);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist-dim);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--mist-dim);
  line-height: 1.4;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: var(--line);
  border-radius: var(--r-sm);
  background: rgb(0 0 0 / 0.25);
  color: var(--chalk);
  font-size: var(--text-md);
  transition: border-color 0.16s, background 0.16s;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--ring);
  outline: none;
  background: rgb(0 0 0 / 0.35);
}

.input[type='time'],
.input[type='datetime-local'],
.input[type='number'] {
  font-family: var(--font-log);
  font-variant-numeric: tabular-nums;
}

.textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.55;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%),
    linear-gradient(135deg, var(--mist) 50%, transparent 50%);
  background-position: calc(100% - 18px) 1.25rem, calc(100% - 13px) 1.25rem;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

.select option {
  background: var(--ink-800);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.stack {
  display: grid;
  gap: var(--space-4);
}

.stack--tight {
  gap: var(--space-3);
}

/* Schalter */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  cursor: pointer;
}

.switch__text {
  display: grid;
  gap: 0.1rem;
}

.switch__title {
  font-size: var(--text-md);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__box {
  position: relative;
  flex: none;
  width: 2.9rem;
  height: 1.7rem;
  border-radius: var(--r-pill);
  border: var(--line);
  background: rgb(0 0 0 / 0.3);
  transition: background 0.2s, border-color 0.2s;
}

.switch__box::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--mist-dim);
  transition: transform 0.22s var(--ease-spring), background 0.2s;
}

.switch input:checked + .switch__box {
  background: rgb(var(--glow-rgb) / 0.25);
  border-color: var(--ring);
}

.switch input:checked + .switch__box::after {
  transform: translateX(1.18rem);
  background: var(--ring);
}

.switch input:focus-visible + .switch__box {
  outline: 2px solid var(--lamp);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------- Leere */
.empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--mist-dim);
}

.empty__mark {
  font-size: 1.8rem;
  opacity: 0.8;
}

/* ------------------------------------------------------------------ Tab-Leiste */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 0.7rem);
  transform: translateX(-50%);
  display: flex;
  gap: 0.15rem;
  padding: 0.35rem;
  border: var(--line);
  border-radius: var(--r-pill);
  background: rgb(25 18 34 / 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-lift);
  z-index: 20;
}

.tab {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  min-width: 4.2rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-pill);
  color: var(--mist-dim);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  transition: color 0.18s, background 0.18s;
}

.tab__icon {
  width: 1.35rem;
  height: 1.35rem;
}

.tab:hover {
  color: var(--mist);
}

.tab.is-active {
  color: var(--chalk);
  background: rgb(255 255 255 / 0.07);
}

.tab.is-active .tab__icon {
  color: var(--ring);
}

/* ------------------------------------------------------------------ Sheet */
.sheet {
  width: min(34rem, 100%);
  max-height: 88dvh;
  margin: auto auto 0;
  padding: 0;
  border: var(--line);
  border-bottom: 0;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--ink-800);
  color: var(--chalk);
  overflow: hidden;
}

.sheet::backdrop {
  background: rgb(10 6 14 / 0.62);
  backdrop-filter: blur(3px);
}

.sheet[open] {
  animation: sheet-in 0.3s var(--ease-out);
}

@keyframes sheet-in {
  from {
    transform: translateY(14%);
    opacity: 0.4;
  }
}

.sheet__inner {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4) calc(env(safe-area-inset-bottom) + var(--space-5));
  max-height: 88dvh;
  overflow-y: auto;
}

.sheet__grip {
  width: 2.5rem;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--ink-600);
  justify-self: center;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.sheet__title {
  font-size: var(--text-lg);
  font-weight: 620;
}

/* --------------------------------------------------------------------- Toast */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 5.2rem);
  transform: translateX(-50%);
  display: grid;
  gap: var(--space-2);
  width: min(30rem, calc(100% - 2rem));
  z-index: 30;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.7rem 0.7rem 0.7rem 1rem;
  border: var(--line);
  border-radius: var(--r-pill);
  background: rgb(30 22 40 / 0.94);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(12px);
  font-size: var(--text-sm);
  pointer-events: auto;
  animation: toast-in 0.28s var(--ease-spring);
}

.toast.is-leaving {
  animation: toast-out 0.22s var(--ease-out) forwards;
}

.toast__text {
  flex: 1;
  min-width: 0;
}

.toast__action {
  flex: none;
  min-height: 2rem;
  padding: 0 0.85rem;
  border: var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--lamp);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.toast--alert {
  border-color: rgb(255 127 99 / 0.5);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* --------------------------------------------------------------------- Muster */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: var(--space-2);
}

.stat {
  padding: var(--space-3);
  border: var(--line);
  border-radius: var(--r-md);
  background: rgb(0 0 0 / 0.18);
}

.stat__value {
  font-family: var(--font-log);
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--mist-dim);
  margin-top: 0.15rem;
}

.bars {
  display: flex;
  align-items: stretch;
  gap: 3px;
  height: 8.5rem;
  padding-top: var(--space-2);
}

.bars__col {
  flex: 1;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 4px;
  min-width: 0;
}

.bars__bar {
  align-self: end;
  width: 100%;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, var(--ring), rgb(var(--glow-rgb) / 0.35));
  min-height: 2px;
  transition: height 0.5s var(--ease-out);
}

.bars__bar--empty {
  background: var(--ink-650);
  height: 2px;
}

.bars__tick {
  font-family: var(--font-log);
  font-size: 0.6rem;
  color: var(--mist-dim);
  text-align: center;
  white-space: nowrap;
}

.dial {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  align-items: end;
  height: 56px;
}

.dial__hour {
  border-radius: 2px;
  background: var(--ink-500);
  min-height: 4px;
}

.dial__hour.is-hot {
  background: var(--ring);
}

.dial__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-log);
  font-size: 0.6rem;
  color: var(--mist-dim);
  margin-top: 0.3rem;
}

.rank {
  display: grid;
  gap: var(--space-2);
}

.rank__row {
  display: grid;
  grid-template-columns: 1.4rem 1fr 2.5rem;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.rank__bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--ink-650);
  overflow: hidden;
}

.rank__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--ring);
}

.rank__count {
  font-family: var(--font-log);
  font-size: var(--text-xs);
  color: var(--mist-dim);
  text-align: right;
}

/* -------------------------------------------------------------------- Notizen */
.note {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border: var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
}

.note--pinned {
  border-color: rgb(245 177 76 / 0.45);
  background: linear-gradient(180deg, rgb(245 177 76 / 0.08), var(--ink-800));
}

.note__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.note__title {
  font-size: var(--text-md);
  font-weight: 620;
  line-height: 1.3;
}

.note__text {
  font-size: var(--text-md);
  color: var(--mist);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------- Gate */
.gate {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-4);
  min-height: 80dvh;
  text-align: center;
}

.gate__pin {
  width: 9rem;
  text-align: center;
  font-family: var(--font-log);
  font-size: var(--text-xl);
  letter-spacing: 0.35em;
}

/* --------------------------------------------------------------------- Banner */
.banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--line);
  border-radius: var(--r-md);
  background: rgb(255 127 99 / 0.08);
  border-color: rgb(255 127 99 / 0.28);
  font-size: var(--text-sm);
}

.banner--info {
  background: rgb(147 169 219 / 0.08);
  border-color: rgb(147 169 219 / 0.28);
}

.banner__text {
  flex: 1;
  min-width: 0;
}

/* ------------------------------------------------------- Anleitung in Schritten */
.steps {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps__item {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: var(--space-3);
  align-items: start;
  font-size: var(--text-md);
  line-height: 1.5;
}

.steps__item::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: var(--line);
  background: rgb(var(--glow-rgb) / 0.12);
  font-family: var(--font-log);
  font-size: var(--text-xs);
  color: var(--ring);
}

/* ------------------------------------------------------------------ Feineres */
.list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.row + .row {
  border-top: 1px solid rgb(255 255 255 / 0.05);
}

.divider {
  height: 1px;
  background: var(--ink-600);
  border: 0;
  margin: var(--space-2) 0;
}

@media (min-width: 46rem) {
  .app {
    width: min(44rem, 100%);
  }

  .quick {
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  }
}

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