/* MamaPhone — Mobile-first „Smartphone“-UI */

:root {
  --bg-deep: #0a0a0f;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --text: #f4f4f8;
  --text-muted: rgba(244, 244, 248, 0.65);
  --accent: #ff6b9d;
  --accent-2: #7c6cf5;
  --success: #5ee4a3;
  --radius-phone: 2.25rem;
  --radius-app: 1.35rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tap-size: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg-deep);
  font-family: var(--font);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  touch-action: manipulation;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(2vw, 16px);
  padding-top: calc(min(2vw, 16px) + var(--safe-top));
  padding-bottom: calc(min(2vw, 16px) + var(--safe-bottom));
}

/* Geräte-Rahmen */
.device {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: min(100dvh - 24px - var(--safe-top) - var(--safe-bottom), 860px);
  border-radius: var(--radius-phone);
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  background: #111118;
}

/* ——— Sperrbildschirm ——— */
.lock-screen {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: calc(1.25rem + var(--safe-top)) 1.5rem calc(2.5rem + var(--safe-bottom));
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.45s ease;
}

.lock-screen.is-unlocking {
  transform: translateY(-100%);
  opacity: 0;
}

.lock-screen.is-hidden {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.lock-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255, 107, 157, 0.35), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(124, 108, 245, 0.3), transparent 45%),
    linear-gradient(165deg, #1a1528 0%, #0d0d14 50%, #12101c 100%);
  z-index: 0;
}

.lock-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.lock-brand {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 0.35rem;
}

.lock-status {
  font-size: 4.25rem;
  font-weight: 200;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.lock-message {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 500;
}

.lock-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2rem;
  animation: bounce-hint 2s ease-in-out infinite;
}

.lock-chevron {
  font-size: 1.25rem;
  opacity: 0.8;
}

@keyframes bounce-hint {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.lock-swipe-zone {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

.lock-swipe-zone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

/* ——— Haupt-UI ——— */
.phone-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #0e0e14;
}

.phone-ui.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.status-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.35rem + var(--safe-top)) 1.25rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.status-signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.status-signal .bar {
  width: 3px;
  background: var(--text);
  border-radius: 1px;
  opacity: 0.35;
}

.status-signal .bar:nth-child(1) {
  height: 4px;
}
.status-signal .bar:nth-child(2) {
  height: 6px;
}
.status-signal .bar:nth-child(3) {
  height: 8px;
}
.status-signal .bar:nth-child(4) {
  height: 10px;
  opacity: 1;
}

.status-wifi {
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.9;
}

.status-battery-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 5px 2px 4px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  min-width: 56px;
}

.status-battery-outer {
  width: 26px;
  height: 11px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1px;
  position: relative;
  flex-shrink: 0;
}

.status-battery-outer::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 0 1px 1px 0;
}

.status-battery {
  display: block;
  height: 100%;
  width: 70%;
  min-width: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--success), #8bedc1);
  transition: width 0.6s ease, background 0.4s ease;
}

.status-battery.low {
  background: linear-gradient(90deg, #ffb347, #ff6b4a);
}

.status-battery.critical {
  background: linear-gradient(90deg, #ff4466, #cc2244);
  animation: pulse-batt 1.2s ease infinite;
}

@keyframes pulse-batt {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}

.status-battery-text {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.notch-spacer {
  height: 6px;
}

.screen {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-phone) var(--radius-phone);
}

/* Startbildschirm */
.home-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.home-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% -10%, rgba(124, 108, 245, 0.25), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(255, 107, 157, 0.2), transparent 40%),
    linear-gradient(180deg, #16161f 0%, #0a0a10 100%);
}

.home-inner {
  position: relative;
  flex: 1;
  padding: 0.5rem 1rem 0;
  display: flex;
  flex-direction: column;
}

.home-date {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.25rem 0 1rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem 0.75rem;
  padding: 0 0.25rem;
  justify-items: center;
}

.app-icon {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: transform 0.15s ease;
}

.app-icon:active {
  transform: scale(0.92);
}

.app-icon-bg {
  width: 62px;
  height: 62px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-icon:hover .app-icon-bg,
.app-icon:focus-visible .app-icon-bg {
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.app-bg-1 {
  background: linear-gradient(145deg, #4facfe, #00f2fe);
}
.app-bg-2 {
  background: linear-gradient(145deg, #fa709a, #fee140);
}
.app-bg-3 {
  background: linear-gradient(145deg, #a18cd1, #fbc2eb);
}
.app-bg-4 {
  background: linear-gradient(145deg, #ff6b9d, #c471f5);
}
.app-bg-5 {
  background: linear-gradient(145deg, #11998e, #38ef7d);
}

.app-bg-6 {
  background: linear-gradient(145deg, #f7971e, #ffd200);
}

.app-label {
  font-size: 0.65rem;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  max-width: 100px;
}

.dock {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.85rem 1.25rem calc(1rem + var(--safe-bottom));
  margin: 0 1rem 0.5rem;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dock-btn {
  width: var(--tap-size);
  height: var(--tap-size);
  border-radius: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s;
}

.dock-btn:active {
  transform: scale(0.9);
}

.dock-btn:focus-visible {
  outline: 2px solid var(--accent);
}

/* App-Layer */
.app-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.app-layer.is-open {
  pointer-events: auto;
}

.app-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #14141c 0%, #0c0c12 100%);
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.35s ease;
}

.app-panel.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.app-panel-header {
  display: flex;
  align-items: center;
  padding: calc(0.5rem + var(--safe-top)) 0.5rem 0.75rem 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.app-back {
  width: var(--tap-size);
  height: var(--tap-size);
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.75rem;
  transition: background 0.2s;
}

.app-back:active {
  background: rgba(255, 255, 255, 0.08);
}

.app-panel-title {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  padding-right: var(--tap-size);
}

.app-panel-spacer {
  width: var(--tap-size);
}

.app-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.25rem calc(1.5rem + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.app-line {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

.app-line.highlight {
  font-size: 1.05rem;
}

.app-line.small {
  font-size: 0.82rem;
}

.muted {
  color: var(--text-muted);
}

.app-error {
  background: rgba(255, 68, 102, 0.15);
  border: 1px solid rgba(255, 68, 102, 0.35);
  color: #ff8fa3;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-app);
  font-weight: 600;
  margin: 0 0 1rem;
}

.system-banner {
  display: inline-block;
  background: var(--glass-strong);
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.app-center {
  text-align: center;
}

.love-big {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.heart {
  display: inline-block;
  animation: heart-beat 1.2s ease infinite;
}

@keyframes heart-beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.15);
  }
  30% {
    transform: scale(1);
  }
}

/* Medien-Platzhalter: Inhalt durch img/video oder background-image ersetzen */
.media-placeholder {
  margin: 1.25rem 0 0;
}

.media-placeholder.wide .media-box {
  min-height: 160px;
}

.media-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.media-box {
  min-height: 120px;
  border-radius: var(--radius-app);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.image-ph {
  background:
    linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(124, 108, 245, 0.12)),
    rgba(255, 255, 255, 0.03);
}

.video-ph {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 8px,
      rgba(255, 255, 255, 0.07) 8px,
      rgba(255, 255, 255, 0.07) 16px
    );
  position: relative;
}

.video-ph::after {
  content: "▶";
  position: absolute;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
  pointer-events: none;
}

.battery-card {
  background: var(--glass);
  border-radius: var(--radius-app);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.battery-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.battery-meter {
  height: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 7px;
  overflow: hidden;
}

.battery-meter-fill {
  height: 100%;
  width: 2%;
  border-radius: 7px;
  background: linear-gradient(90deg, #ff4466, #ffb347);
  transition: width 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.battery-meter-fill.charging {
  background: linear-gradient(90deg, var(--success), #8bedc1);
}

.battery-percent {
  margin: 0.5rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pill-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(124, 108, 245, 0.35);
  transition: transform 0.15s ease, filter 0.2s;
}

.pill-btn:active {
  transform: scale(0.98);
}

/* Essen??? — Zufallsrezept */
.essen-vorschlag {
  margin-top: 1rem;
}

.essen-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.essen-gericht-name {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.essen-bild-wrap {
  position: relative;
  border-radius: var(--radius-app);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  margin-bottom: 0.65rem;
  min-height: 180px;
}

.essen-bild-wrap.is-empty {
  background: rgba(0, 0, 0, 0.25);
}

.essen-bild-wrap.is-empty .essen-gericht-bild,
.essen-bild-wrap.is-empty .essen-bild-skeleton {
  display: none;
}

.essen-bild-leer {
  margin: 0;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-app);
}

.essen-bild-wrap:not(.is-empty) .essen-bild-leer {
  display: none;
}

.essen-gericht-bild {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  vertical-align: middle;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.essen-gericht-bild.is-loading {
  opacity: 0;
}

.essen-bild-skeleton {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.04) 90%
  );
  background-size: 200% 100%;
  animation: essen-shimmer 1.2s ease infinite;
}

.essen-bild-skeleton.is-active {
  display: block;
}

@keyframes essen-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.essen-rezept-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 1rem;
  color: #7eb8ff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.essen-rezept-link:active {
  opacity: 0.85;
}

.essen-wuerfeln {
  margin-top: 0.25rem;
}

/* Was macht Max??? */
.max-foto-frame {
  margin: 0 0 1rem;
  padding: 0;
  border-radius: var(--radius-app);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.max-foto-frame--hochformat {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.max-foto {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  vertical-align: middle;
}

.max-foto-frame--hochformat .max-foto {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(68dvh, 520px);
  object-fit: contain;
  object-position: center top;
  background: #0a0810;
  min-height: 120px;
}

.max-foto-hint {
  display: block;
  padding: 0.85rem 1rem;
}

.max-refresh-btn {
  margin: 0.5rem 0 0.85rem;
}

.mono-path {
  font-size: 0.76em;
  font-family: ui-monospace, "Cascadia Code", monospace;
  color: #b8acf5;
}

/* Entspannung */
.entspan-card .battery-meter-fill {
  transition: width 0.55s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.entspan-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.entspan-tip {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--radius-app);
  background: rgba(124, 108, 245, 0.12);
  border: 1px solid rgba(124, 108, 245, 0.25);
}

.entspan-tip-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c9bfff;
  margin-bottom: 0.5rem;
}

.entspan-tip-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Zimmer Aufräumen — Ladeszene */
.zimmer-phase {
  text-align: center;
}

.zimmer-load-title {
  margin-bottom: 1rem !important;
}

.zimmer-loader {
  position: relative;
  height: 100px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zimmer-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  animation: zimmer-spin 2.8s linear infinite;
}

.zimmer-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(255, 107, 157, 0.6);
}

.zimmer-dot:last-child {
  top: auto;
  bottom: -6px;
  background: linear-gradient(135deg, var(--accent-2), #5ee4a3);
  animation-delay: 0s;
}

@keyframes zimmer-spin {
  to {
    transform: rotate(360deg);
  }
}

.zimmer-progress-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  margin: 1rem auto 0;
  max-width: 260px;
  overflow: hidden;
}

.zimmer-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.12s linear;
}

/* Max Anrufen */
.anruf-stage {
  position: relative;
}

.anruf-stage.is-playing::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: calc(var(--radius-app, 1rem) + 6px);
  border: 2px solid rgba(124, 108, 245, 0.45);
  animation: anruf-ring-pulse 1.35s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}

.anruf-stage.is-playing > * {
  position: relative;
  z-index: 1;
}

@keyframes anruf-ring-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.96);
  }
  55% {
    opacity: 0.25;
    transform: scale(1.02);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

.anruf-kopfzeile {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.anruf-emoji {
  font-size: 1.5rem;
  animation: anruf-pulse 2s ease-in-out infinite;
}

@keyframes anruf-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.anruf-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 72px;
  margin: 0 auto 1.25rem;
  padding: 0.35rem 0.65rem 0;
}

.anruf-visualizer span {
  display: block;
  width: 7px;
  height: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.anruf-visualizer.is-playing span {
  animation: anruf-bar 0.42s ease-in-out infinite alternate;
}

.anruf-visualizer.is-playing span:nth-child(1) {
  animation-delay: 0s;
}
.anruf-visualizer.is-playing span:nth-child(2) {
  animation-delay: 0.08s;
}
.anruf-visualizer.is-playing span:nth-child(3) {
  animation-delay: 0.14s;
}
.anruf-visualizer.is-playing span:nth-child(4) {
  animation-delay: 0.2s;
}
.anruf-visualizer.is-playing span:nth-child(5) {
  animation-delay: 0.1s;
}
.anruf-visualizer.is-playing span:nth-child(6) {
  animation-delay: 0.18s;
}
.anruf-visualizer.is-playing span:nth-child(7) {
  animation-delay: 0.04s;
}

@keyframes anruf-bar {
  from {
    height: 10px;
    background: rgba(124, 108, 245, 0.55);
    box-shadow: 0 0 6px rgba(124, 108, 245, 0.35);
  }
  to {
    height: 52px;
    background: rgba(255, 107, 157, 0.95);
    box-shadow:
      0 0 14px rgba(255, 107, 157, 0.65),
      0 0 22px rgba(124, 108, 245, 0.35);
  }
}

.note-list em {
  font-style: italic;
}

/* Konfetti (App „Kette“, über App-Overlay) */
.confetti-root {
  position: absolute;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  100% {
    transform: translateY(105vh) translateX(var(--confetti-drift, 0px)) rotate(720deg);
    opacity: 0.65;
  }
}

.kette-bild-frame {
  margin: 0 auto 1rem;
  border-radius: var(--radius-app);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.kette-bild-frame img {
  display: block;
  width: 100%;
  max-height: min(50dvh, 420px);
  object-fit: contain;
}

.note-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.toggle {
  min-width: 52px;
  text-align: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.on {
  background: rgba(94, 228, 163, 0.35);
  color: var(--success);
}

/* Toasts */
.toast-stack {
  position: absolute;
  top: calc(2.5rem + var(--safe-top));
  left: 0.75rem;
  right: 0.75rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: rgba(30, 30, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.45s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  cursor: pointer;
}

.toast.is-out {
  animation: toast-out 0.35s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

.toast-app {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.toast-body {
  font-size: 0.85rem;
  line-height: 1.4;
}

.toast-badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #ff8fa3;
  font-weight: 600;
}

@media (min-width: 480px) {
  .app-grid {
    gap: 1.25rem 1rem;
  }

  .app-icon-bg {
    width: 68px;
    height: 68px;
  }
}

/* Echtes Handy: randlos & vollflächig */
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: stretch;
  }

  .device {
    max-width: none;
    width: 100%;
    height: 100dvh;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .screen {
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
