/* ============================================================
   Detox Quest — styles.css (handgeschrieben, kein Tailwind)
   Farbwerte kommen als CSS-Variablen aus app.js (Light/Dark).
   ============================================================ */

/* ---------- Reset & Basis ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #5b8a72;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#root {
  height: 100%;
}

body {
  font-family: Nunito, system-ui, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
button:disabled {
  cursor: default;
}
input {
  font: inherit;
  color: inherit;
}
img,
svg,
canvas {
  display: block;
  vertical-align: middle;
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4 {
  font-size: inherit;
  font-weight: inherit;
}
.hidden {
  display: none !important;
}

.font-display,
.screen-title,
.home-name,
.page-head h1,
.onb-title,
.onb-h2 {
  font-family: Poppins, system-ui, sans-serif;
}

/* kleine Utilities, die templates nutzen */
.center { display: flex; justify-content: center; }
.flex1 { flex: 1; }
.min0 { min-width: 0; }
.mt4 { margin-top: 4px; }
.mt8 { margin-top: 8px; }
.mt20 { margin-top: 20px; }
.mb12 { margin-bottom: 12px; }
.mb20 { margin-bottom: 20px; }
.mb24 { margin-bottom: 24px; }
.mb28 { margin-bottom: 28px; }
.mb32 { margin-bottom: 32px; }
.mute-ico { color: var(--mute); }
.accent-ico { color: var(--accent); }
.plain-btn { display: block; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- App-Shell (Spalte, responsive) ---------- */
.app-outer {
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}
.app-col {
  position: relative;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}
@supports (min-height: 100dvh) {
  .app-outer,
  .app-col {
    min-height: 100dvh;
  }
}
.content-pad {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: 96px;
}
.screen {
  padding: 0 20px 24px;
}

/* ---------- Animationen ---------- */
@keyframes dq-spin {
  to { transform: rotate(360deg); }
}
@keyframes screenIn {
  0% { opacity: 0.45; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
.screen-in { animation: screenIn 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes dqPop {
  0% { opacity: 0; transform: scale(0.78); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes dqRise {
  0% { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.dq-pop { animation: dqPop 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; }
.dq-rise { animation: dqRise 0.46s cubic-bezier(0.22, 1, 0.36, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .screen-in, .dq-pop, .dq-rise { animation: none; }
}

/* ---------- Tab-Leiste ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--navbg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px 24px calc(env(safe-area-inset-bottom, 0px) + 14px);
}
.tabbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--mute);
  transition: color 0.15s;
}
.tab-btn.active { color: var(--accent); }
.tab-btn span {
  font-family: Poppins, system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  padding: 10px 16px;
  color: #fff;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  pointer-events: none;
  background: var(--accent);
  box-shadow: 0 12px 28px -12px rgba(8, 20, 16, 0.6);
  opacity: 0;
  transform: translateX(-50%) translateY(-16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Bausteine ---------- */
.icon-tile {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 15%, var(--card));
  color: var(--accent);
}
.icon-tile.muted {
  background: var(--tile);
  color: var(--mute);
}

.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  color: var(--accent-strong);
}
.xp-badge.muted {
  background: var(--tile);
  color: var(--mute);
}

.check-dot {
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  flex-shrink: 0;
  border: 2px solid var(--checkbox);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.check-dot:not(.done):hover { border-color: var(--accent); }
.check-dot:not(.done):active { transform: scale(0.88); }
.check-dot.done { cursor: default; }
.check-dot.done {
  display: grid;
  place-items: center;
  border: 0;
  background: var(--accent);
  color: #fff;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
  margin: 0 0 8px 4px;
}
.section-label.nomargin { margin: 0; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 10px;
}
.section-heading-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading h3 {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.section-heading-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0 16px;
  margin-left: -8px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  color: var(--text);
  transition: transform 0.15s;
}
.icon-btn:active { transform: scale(0.9); }
.screen-title {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.page-head {
  padding: 8px 0 16px;
}
.page-head h1 {
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
}
.page-head p {
  font-size: 13px;
  color: var(--mute);
}

.caption {
  font-size: 12px;
  color: var(--mute);
  margin: 0 0 24px 4px;
}

/* ---------- Quest-Reihen & Swipe-Karten ---------- */
.quest-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
  user-select: none;
  -webkit-user-select: none;
}
.quest-row-body {
  min-width: 0;
  flex: 1;
}
.quest-row-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-row-title.done {
  color: var(--mute);
  text-decoration: line-through;
}
.quest-row-desc {
  font-size: 12.5px;
  margin-top: 2px;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quest-row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.quest-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.quest-card-under {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.quest-card-under-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transition: transform 0.12s ease;
}
.quest-card-front {
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  cursor: grab;
}

.cat-block { margin-bottom: 24px; }

.reload-card {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px dashed var(--border2);
}
.reload-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reload-card-row span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-strong);
}
.reload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
  background: var(--accent);
  transition: transform 0.15s;
}
.reload-btn:active { transform: scale(0.98); }

/* ---------- Home ---------- */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px;
}
.home-greeting {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
}
.home-name {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
}

.hero-card {
  display: block;
  width: 100%;
  border-radius: 26px;
  padding: 20px;
  margin-bottom: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-card.tappable { transition: transform 0.15s; }
.hero-card.tappable:active { transform: scale(0.985); }
.hero-chevron {
  position: absolute;
  top: 16px;
  right: 16px;
  opacity: 0.7;
}
.hero-chevron-inline { opacity: 0.7; flex-shrink: 0; }
.hero-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-body { flex: 1; padding-right: 16px; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-chip.mt8 { margin: 8px 0 0; }
.hero-goal {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.375;
  opacity: 0.95;
}
.hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  opacity: 0.75;
  margin-top: 4px;
}
.hero-sub {
  font-size: 12.5px;
  opacity: 0.8;
  margin-bottom: 2px;
}
.hero-name {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hero-total-num {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
}
.hero-total-label { font-size: 12px; opacity: 0.8; }
.hero-meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  opacity: 0.85;
  margin: 16px 0 6px;
}
.hero-meter {
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.hero-meter-fill {
  height: 100%;
  border-radius: 9999px;
  background: #fff;
}
.hero-xp-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 16px;
}
.hero-xp {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-xp-num {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
}
.hero-xp-label { font-size: 12px; opacity: 0.8; margin-bottom: 2px; }
.hero-xp-next { font-size: 11.5px; opacity: 0.8; }

.ring {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ring-center {
  position: absolute;
  text-align: center;
  color: #fff;
  line-height: 1;
}
.ring-value {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
}
.ring-total {
  font-size: 10px;
  opacity: 0.8;
  margin-top: -2px;
}

.swipe-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mute);
}
.swipe-hints span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Pull-to-Refresh ---------- */
.ptr-spacer {
  height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.ptr-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-bottom: 8px;
  opacity: 0;
}
.ptr-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px -8px rgba(8, 20, 16, 0.4);
  color: var(--accent);
}
.ptr-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--mute);
}
#ptr { touch-action: pan-y; }

/* ---------- Swipe-Back ---------- */
#swipe-root { min-height: 100vh; touch-action: pan-y; }
@supports (min-height: 100dvh) {
  #swipe-root { min-height: 100dvh; }
}
.swipeback-dot {
  display: none;
  position: fixed;
  top: 50%;
  z-index: 40;
  pointer-events: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}

/* ---------- Quest-Detail ---------- */
.detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -8px 0 20px;
}
.detail-head-body { flex: 1; }
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.cat-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent-strong);
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--tile);
  color: var(--mute);
}
.detail-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
}
.detail-desc {
  font-size: 14px;
  line-height: 1.625;
  margin-bottom: 24px;
  color: var(--mute);
}
.why-card {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  border: 1px solid var(--border);
}
.why-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.why-card-head h3 {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}
.why-card p {
  font-size: 13.5px;
  line-height: 1.625;
  color: var(--mute);
}
.how-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  margin: 0 0 12px 4px;
  color: var(--text);
}
.how-steps { margin-bottom: 28px; }
.how-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 16px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
}
.how-step-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  flex-shrink: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  background: var(--accent);
}
.how-step p {
  font-size: 13.5px;
  line-height: 1.375;
  padding-top: 2px;
  color: var(--text);
}

.primary-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  padding: 16px 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 24px -12px var(--accent);
  transition: transform 0.15s;
}
.primary-btn:active:not(:disabled) { transform: scale(0.98); }

/* ---------- Punkte ---------- */
.tier-card {
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 24px;
  background: var(--card);
  border: 1px solid var(--border);
}
.tier-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
}
.tier-row.hairline { border-bottom: 1px solid var(--hairline); }
.tier-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.tier-range {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--accent-strong);
}

/* ---------- Quests-Screen ---------- */
.seg-tabs {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 16px;
  background: var(--tile);
}
.seg-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 2px 8px -3px rgba(8, 20, 16, 0.3);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.seg-indicator.right { left: 50%; }
.seg-btn {
  position: relative;
  z-index: 10;
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  color: var(--mute);
  transition: color 0.15s;
}
.seg-btn.active { color: var(--accent); }

.completed-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
}
.completed-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.completed-summary-left span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-strong);
}
.completed-summary-xp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-strong);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  margin-top: 48px;
  padding: 0 32px;
}
.empty-state .icon-tile {
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}
.empty-state p {
  font-size: 13.5px;
  color: var(--mute);
}

/* ---------- Einstellungen ---------- */
.settings-group {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
}
.settings-row,
.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hairline);
}
.settings-row.last,
.info-row.last { border-bottom: none; }
.row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent);
}
.row-icon.danger {
  background: color-mix(in srgb, #d8694f 15%, var(--card));
  color: #d8745c;
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}
.row-title.danger { color: #d8745c; }
.row-sub {
  font-size: 12px;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-chevron {
  color: var(--mute);
  opacity: 0.6;
  flex-shrink: 0;
}

.toggle {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 28px;
  border-radius: 9999px;
  background: var(--checkbox);
  transition: background 0.15s;
}
.toggle.on { background: var(--accent); }
.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(8, 20, 16, 0.3);
  transition: left 0.15s;
}
.toggle.on .toggle-knob { left: 20px; }

.card-box {
  border-radius: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}

.perm-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.perm-text {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}
.perm-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 0;
  text-align: center;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  background: var(--tile);
  color: var(--text);
  transition: transform 0.15s;
}
.perm-btn.accent {
  background: var(--accent);
  color: #fff;
}
.perm-btn:disabled { opacity: 0.5; }
.perm-btn:active:not(:disabled) { transform: scale(0.98); }

.time-input {
  border-radius: 12px;
  padding: 6px 12px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  outline: none;
  border: 1px solid var(--border2);
  background: var(--tile);
  color: var(--text);
  color-scheme: light dark;
}

/* Darstellung (Appearance) */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  padding: 10px;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s;
}
.mode-btn.selected { border: 2px solid var(--accent); }
.mode-preview {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
}
.mode-preview.light {
  background: #f2f5f3;
  border: 1px solid #e6ebe8;
}
.mode-preview.light .bar1 { height: 10px; margin: 8px 8px 0; border-radius: 9999px; background: #d7ded9; }
.mode-preview.light .bar2 { height: 10px; margin: 6px 8px 0; width: 50%; border-radius: 9999px; background: #e3e8e4; }
.mode-preview.dark {
  background: #161d1b;
  border: 1px solid #2c3633;
}
.mode-preview.dark .bar1 { height: 10px; margin: 8px 8px 0; border-radius: 9999px; background: #39433f; }
.mode-preview.dark .bar2 { height: 10px; margin: 6px 8px 0; width: 50%; border-radius: 9999px; background: #2a322f; }
.mode-preview.auto { display: flex; }
.mode-preview.auto .half { width: 50%; height: 100%; }
.mode-preview.auto .half.light { background: #f2f5f3; }
.mode-preview.auto .half.dark { background: #161d1b; }
.mode-btn-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
}
.mode-btn.selected .mode-btn-label { color: var(--accent); }
.mode-btn-label span {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.mode-btn.selected .mode-btn-label span { color: var(--accent); }

.accent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 16px;
}
.accent-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.accent-swatch {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  color: #fff;
  transition: box-shadow 0.15s;
}
.accent-name {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--mute);
}
.accent-name.selected { color: var(--text); }

.preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 16px;
  margin-top: 24px;
  background: var(--soft);
  border: 1px solid var(--border);
}
.preview-card-body { flex: 1; }
.preview-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.preview-sub {
  font-size: 12px;
  color: var(--mute);
}

/* Sprache */
.lang-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: var(--tile);
  color: var(--mute);
}
.lang-badge.selected {
  background: var(--accent);
  color: #fff;
}
.sel-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
}

/* Ziele */
.goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.goal-sub {
  font-size: 13px;
  color: var(--mute);
}
.goal-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-strong);
}
.goal-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 6px;
  color: var(--mute);
}
.dq-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  outline: none;
}
.dq-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 6px #08141040;
  cursor: pointer;
}
.dq-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 2px 6px #08141040;
  cursor: pointer;
}

.focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px 4px;
}
.focus-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mute);
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.focus-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.focus-tile.selected {
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  border: 1.5px solid var(--accent);
}
.focus-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--tile);
  color: var(--mute);
}
.focus-ico.selected {
  background: var(--accent);
  color: #fff;
}
.focus-label {
  flex: 1;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.focus-label.selected { color: var(--accent-strong); }

/* ---------- Avatar & Profil ---------- */
.avatar-img {
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 9999px;
}
.avatar-fallback {
  display: grid;
  place-items: center;
  border-radius: 9999px;
  flex-shrink: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}
.avatar-fallback.on-accent { background: rgba(255, 255, 255, 0.22); }

.avatar-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.avatar-picker-stage { position: relative; }
.avatar-cam {
  position: absolute;
  bottom: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  color: #fff;
  background: var(--accent);
  border: 3px solid var(--bg);
  transition: transform 0.15s;
}
.avatar-cam:active { transform: scale(0.9); }
.avatar-picker-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chip-btn {
  border-radius: 9999px;
  padding: 6px 14px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  background: var(--tile);
  color: var(--text);
}
.chip-btn.mute { color: var(--mute); }
.chip-btn.big {
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 15px;
}

.text-input {
  display: block;
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  outline: none;
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border2);
}

/* ---------- Onboarding ---------- */
.onb-col {
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.onb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.onb-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
}
.onb-step {
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
}
.onb-title {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
}
.onb-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
}
.onb-bar {
  height: 6px;
  border-radius: 9999px;
  flex: 1;
  background: var(--tile);
  transition: background 0.15s;
}
.onb-bar.filled { background: var(--accent); }
.onb-body { flex: 1; }
.onb-h2 {
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 6px;
  color: var(--text);
}
.onb-sub {
  font-size: 13.5px;
  margin-bottom: 24px;
  color: var(--mute);
}
.onb-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Sonstiges ---------- */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.load-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 60vh;
  padding: 0 32px;
  text-align: center;
  color: var(--mute);
}

/* ---------- Buddy (Pixel-Hund) ---------- */
.page-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 6px 12px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: color-mix(in srgb, #e8b64a 22%, var(--card));
  color: color-mix(in srgb, #8a6212 70%, var(--text));
  white-space: nowrap;
}

.pixel {
  display: block;
  image-rendering: pixelated;
}

.buddy-scene {
  /* Himmel (Tageszeit) und Boden (Jahreszeit) über Variablen */
  --sky: #7ec3e8;
  --sky-mix: 26%;
  --ground: #7dbb6c;
  --ground-mix: 30%;
  --grass: #5f9e59;
  --grass-mix: 40%;
  position: relative;
  height: 190px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--sky) var(--sky-mix), var(--card)) 0%,
    color-mix(in srgb, var(--sky) calc(var(--sky-mix) / 2), var(--card)) 58%,
    color-mix(in srgb, var(--ground) var(--ground-mix), var(--card)) 58%,
    color-mix(in srgb, var(--ground) calc(var(--ground-mix) * 0.72), var(--card)) 100%
  );
  transition: background 0.6s ease;
}
/* Tageszeiten */
.buddy-scene.t-morning { --sky: #eeb46a; --sky-mix: 34%; }
.buddy-scene.t-day { --sky: #7ec3e8; --sky-mix: 26%; }
.buddy-scene.t-evening { --sky: #d97a5f; --sky-mix: 40%; }
.buddy-scene.t-night { --sky: #2c3a5e; --sky-mix: 62%; }
.buddy-scene.t-night .buddy-grass,
.buddy-scene.t-night .scene-house,
.buddy-scene.t-night .dog-wrap,
.buddy-scene.t-night .scene-ball,
.buddy-scene.t-night .scene-bone,
.buddy-scene.t-night .scene-duck,
.buddy-scene.t-night .scene-bowl,
.buddy-scene.t-night .ground-deco {
  filter: brightness(0.82) saturate(0.85);
}
/* Jahreszeiten */
.buddy-scene.s-spring { --ground: #85c46f; --ground-mix: 32%; --grass: #64a85c; }
.buddy-scene.s-summer { --ground: #6db35c; --ground-mix: 38%; --grass: #529c48; }
.buddy-scene.s-autumn { --ground: #c09455; --ground-mix: 38%; --grass: #a87c42; }
.buddy-scene.s-winter { --ground: #dbe6ee; --ground-mix: 55%; --grass: #c2d2de; --grass-mix: 55%; }

.buddy-grass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  background: color-mix(in srgb, var(--grass) var(--grass-mix), var(--card));
}

/* Himmel- und Boden-Deko */
.sky-sun {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 34px;
}
.sky-sun.low { top: 52px; right: 40px; width: 30px; }
.sky-sun.rising { top: 44px; left: 28px; right: auto; width: 30px; }
.sky-moon {
  position: absolute;
  top: 16px;
  right: 26px;
  width: 30px;
}
.sky-star {
  position: absolute;
  width: 12px;
  opacity: 0.9;
}
.sky-star.s1 { top: 24px; left: 36px; }
.sky-star.s2 { top: 48px; left: 96px; width: 9px; }
.sky-star.s3 { top: 18px; right: 88px; width: 10px; }
.sky-sun svg, .sky-moon svg, .sky-star svg { width: 100%; height: auto; }

.ground-deco { position: absolute; }
.ground-deco svg { width: 100%; height: auto; }
.flower.f1 { left: 30px; bottom: 44px; width: 16px; }
.flower.f2 { right: 26px; bottom: 20px; width: 14px; }
.leaf.l1 { left: 34px; bottom: 40px; width: 14px; }
.leaf.l2 { right: 30px; bottom: 22px; width: 12px; transform: rotate(40deg); }
.leaf.l3 { left: 120px; bottom: 16px; width: 12px; transform: rotate(-30deg); }

.dog-wrap {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 165px;
  z-index: 2;
}
.dog-shadow {
  position: absolute;
  left: 12%;
  right: 22%;
  bottom: -4px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20, 30, 20, 0.18);
  z-index: -1;
}
.dog-wrap svg {
  width: 100%;
  height: auto;
}
.dog-wrap .frame-b {
  position: absolute;
  inset: 0;
}
/* Idle: zwei Frames wechseln sich ab (Schwanzwedeln) */
@keyframes dogFrameA {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes dogFrameB {
  0%, 49.9% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
.dog-wrap .frame-a { animation: dogFrameA 0.9s steps(1) infinite; }
.dog-wrap .frame-b { animation: dogFrameB 0.9s steps(1) infinite; }
/* Füttern: schnelleres Wedeln + Animation je Leckerli-Sorte */
.dog-wrap.feeding .frame-a { animation-duration: 0.3s; }
.dog-wrap.feeding .frame-b { animation-duration: 0.3s; }
@keyframes dogHop {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  12% { transform: translateX(-50%) translateY(-20px); }
  24% { transform: translateX(-50%) translateY(0); }
  36% { transform: translateX(-50%) translateY(-16px); }
  48% { transform: translateX(-50%) translateY(0); }
  62% { transform: translateX(-50%) translateY(-22px); }
  76% { transform: translateX(-50%) translateY(0); }
  86% { transform: translateX(-50%) translateY(-10px); }
  94% { transform: translateX(-50%) translateY(0); }
}
.dog-wrap.anim-hop { animation: dogHop 2.8s ease; }
@keyframes dogBigHop {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  14% { transform: translateX(-50%) translateY(-44px) scale(1.08); }
  30% { transform: translateX(-50%) translateY(0) scale(0.96); }
  46% { transform: translateX(-50%) translateY(-38px) scale(1.06); }
  62% { transform: translateX(-50%) translateY(0) scale(0.97); }
  78% { transform: translateX(-50%) translateY(-46px) scale(1.1); }
  92% { transform: translateX(-50%) translateY(0) scale(1); }
}
.dog-wrap.anim-bighop { animation: dogBigHop 3.2s ease; }
@keyframes dogSpin {
  0% { transform: translateX(-50%) rotate(0deg); }
  28% { transform: translateX(-50%) rotate(360deg) translateY(-10px); }
  54% { transform: translateX(-50%) rotate(720deg); }
  66% { transform: translateX(-50%) rotate(720deg) translateY(-16px); }
  90%, 100% { transform: translateX(-50%) rotate(1080deg); }
}
.dog-wrap.anim-spin { animation: dogSpin 3.2s ease-in-out; }
@keyframes dogFlip {
  0% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  18% { transform: translateX(-50%) translateY(-44px) rotate(-180deg); }
  34% { transform: translateX(-50%) translateY(0) rotate(-360deg); }
  46% { transform: translateX(-50%) translateY(-6px) rotate(-360deg); }
  60% { transform: translateX(-50%) translateY(-46px) rotate(-540deg); }
  76% { transform: translateX(-50%) translateY(0) rotate(-720deg); }
  86% { transform: translateX(-50%) translateY(-12px) rotate(-720deg); }
  95%, 100% { transform: translateX(-50%) translateY(0) rotate(-720deg); }
}
.dog-wrap.anim-flip { animation: dogFlip 3.2s ease-in-out; }
@keyframes dogWiggle {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  6% { transform: translateX(calc(-50% - 11px)) rotate(-8deg); }
  14% { transform: translateX(calc(-50% + 11px)) rotate(8deg); }
  22% { transform: translateX(calc(-50% - 10px)) rotate(-7deg); }
  30% { transform: translateX(calc(-50% + 10px)) rotate(7deg); }
  38% { transform: translateX(-50%) rotate(0deg); }
  48% { transform: translateX(-50%) translateY(-14px) rotate(0deg); }
  56% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  64% { transform: translateX(calc(-50% - 10px)) rotate(-7deg); }
  72% { transform: translateX(calc(-50% + 10px)) rotate(7deg); }
  80% { transform: translateX(calc(-50% - 8px)) rotate(-5deg); }
  88% { transform: translateX(calc(-50% + 7px)) rotate(4deg); }
}
.dog-wrap.anim-wiggle { animation: dogWiggle 3s ease-in-out; }
@keyframes dogZoomies {
  0% { transform: translateX(-50%) scaleX(1); }
  10% { transform: translateX(calc(-50% - 105px)) scaleX(1); }
  14% { transform: translateX(calc(-50% - 105px)) scaleX(-1); }
  30% { transform: translateX(calc(-50% + 105px)) scaleX(-1); }
  34% { transform: translateX(calc(-50% + 105px)) scaleX(1); }
  50% { transform: translateX(calc(-50% - 105px)) scaleX(1); }
  54% { transform: translateX(calc(-50% - 105px)) scaleX(-1); }
  70% { transform: translateX(calc(-50% + 105px)) scaleX(-1); }
  74% { transform: translateX(calc(-50% + 105px)) scaleX(1); }
  90% { transform: translateX(-50%) scaleX(1); }
  95% { transform: translateX(-50%) translateY(-12px) scaleX(1); }
  100% { transform: translateX(-50%) scaleX(1); }
}
.dog-wrap.anim-zoomies { animation: dogZoomies 3.4s ease-in-out; }
.dog-wrap.preview { opacity: 0.92; }

.breed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.breed-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  padding: 10px 6px;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.breed-tile.selected {
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
  border: 2px solid var(--accent);
}
.breed-thumb {
  width: 78px;
  height: auto;
}
.breed-name {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  text-align: center;
  color: var(--mute);
}
.breed-name.selected { color: var(--accent-strong); }

.dog-hearts {
  position: absolute;
  inset: -115px 0 0 0;
  pointer-events: none;
}
.heart {
  position: absolute;
  bottom: 0;
  width: 20px;
  opacity: 0;
  animation: heartRise 2.1s ease-out forwards;
}
.heart:nth-child(even) {
  animation-name: heartRiseSway;
}
.heart .heart-px {
  width: 100%;
  height: auto;
}
@keyframes heartRise {
  0% { opacity: 0; transform: translateY(26px) scale(0.5) rotate(-6deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-105px) scale(1.35) rotate(8deg); }
}
@keyframes heartRiseSway {
  0% { opacity: 0; transform: translate(6px, 26px) scale(0.5) rotate(6deg); }
  12% { opacity: 1; }
  50% { transform: translate(-8px, -40px) scale(1) rotate(-6deg); }
  100% { opacity: 0; transform: translate(8px, -105px) scale(1.35) rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .dog-wrap.anim-hop, .dog-wrap.anim-bighop, .dog-wrap.anim-spin,
  .dog-wrap.anim-flip, .dog-wrap.anim-wiggle, .dog-wrap.anim-zoomies { animation: none; }
  .heart { animation-duration: 0.8s; }
}

.scene-house {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 110px;
  z-index: 1;
}
.scene-house svg {
  width: 100%;
  height: auto;
}
.scene-ball,
.scene-bone,
.scene-duck,
.scene-bowl {
  position: absolute;
}
.scene-ball { left: 22px; bottom: 18px; width: 26px; }
.scene-bone { left: 58px; bottom: 14px; width: 32px; }
.scene-duck { left: 100px; bottom: 16px; width: 30px; }
.scene-bowl { right: 132px; bottom: 14px; width: 34px; }
.scene-ball svg,
.scene-bone svg,
.scene-duck svg,
.scene-bowl svg {
  width: 100%;
  height: auto;
}

/* Wurf-Animationen: Spielzeug fliegt in Bögen von rechts ein,
   der Hund sprintet hin, dreht um und bringt es zurück. */
@keyframes toyFlyBall {
  0% { transform: translate(300px, 64px) scale(1.3); opacity: 1; }
  10% { transform: translate(224px, -58px); }
  22% { transform: translate(158px, 8px); }
  32% { transform: translate(108px, -36px); }
  42% { transform: translate(66px, 4px); }
  50% { transform: translate(34px, -18px); }
  58% { transform: translate(0, 0); opacity: 1; }
  62%, 90% { transform: translate(0, 0); opacity: 0; }
  100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes toyFlyBone {
  0% { transform: translate(300px, 64px) rotate(0deg) scale(1.25); opacity: 1; }
  10% { transform: translate(224px, -58px) rotate(220deg); }
  22% { transform: translate(158px, 8px) rotate(420deg); }
  32% { transform: translate(108px, -36px) rotate(600deg); }
  42% { transform: translate(66px, 4px) rotate(760deg); }
  50% { transform: translate(34px, -18px) rotate(900deg); }
  58% { transform: translate(0, 0) rotate(1080deg); opacity: 1; }
  62%, 90% { transform: translate(0, 0) rotate(1080deg); opacity: 0; }
  100% { transform: translate(0, 0) rotate(1080deg); opacity: 1; }
}
.fly-ball { animation: toyFlyBall 3s ease-in-out; z-index: 3; }
.fly-bone { animation: toyFlyBone 3s ease-in-out; z-index: 3; }
@keyframes dogChase {
  0% { transform: translateX(-50%) scaleX(1); }
  8% { transform: translateX(-50%) scaleX(1); }
  32% { transform: translateX(calc(-50% + var(--chase, -90px))) scaleX(1); }
  40% { transform: translateX(calc(-50% + var(--chase, -90px))) translateY(-10px) scaleX(1); }
  48% { transform: translateX(calc(-50% + var(--chase, -90px))) scaleX(-1); }
  84% { transform: translateX(-50%) scaleX(-1); }
  92% { transform: translateX(-50%) translateY(-10px) scaleX(-1); }
  100% { transform: translateX(-50%) scaleX(1); }
}
.dog-wrap.chase { animation: dogChase 3s ease-in-out; }
.dog-wrap.chase .frame-a { animation-duration: 0.25s; }
.dog-wrap.chase .frame-b { animation-duration: 0.25s; }
@media (prefers-reduced-motion: reduce) {
  .fly-ball, .fly-bone, .dog-wrap.chase { animation-duration: 0.9s; }
}

.play-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  flex-shrink: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: transform 0.15s;
}
.play-btn:active { transform: scale(0.92); }
.play-btn svg { width: 26px; height: auto; }

/* Shop: Kategorien & Produktkarten */
.shop-section {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.shop-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 14px;
}
.shop-head {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 10px -8px;
}
.shop-head .shop-title { margin-bottom: 0; }
.shop-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.shop-cat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: transform 0.15s;
}
.shop-cat-card:active { transform: scale(0.97); }
.shop-cat-name {
  flex: 1;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
}
.product-photo {
  display: grid;
  place-items: center;
  width: 100%;
  height: 84px;
  border-radius: 12px;
  background: var(--tile);
  margin-bottom: 2px;
}
.product-photo svg {
  width: auto;
  height: 62px;
  max-width: 80%;
  image-rendering: pixelated;
}
.product-photo.small {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  margin: 0;
}
.product-photo.small svg { height: 32px; }
.product-name {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
}
.product-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--mute);
  min-height: 32px;
}

.buddy-scene.teaser .dog-wrap { bottom: 20px; }
.buddy-adopt-title {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  margin-bottom: 6px;
}
.buddy-adopt-sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--mute);
  margin-bottom: 16px;
}
.buddy-missing {
  text-align: center;
  font-size: 12.5px;
  color: var(--mute);
  margin-top: 10px;
}

.feed-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mute);
  margin: 0 0 8px 4px;
}
.feed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.treats-left {
  font-size: 12.5px;
  color: var(--mute);
}
.treat-btn {
  position: relative;
}
.treat-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 9999px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.shop-buy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9999px;
  padding: 7px 14px;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: var(--accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.shop-buy:active:not(:disabled) { transform: scale(0.95); }
.shop-buy.poor {
  background: var(--tile);
  color: var(--mute);
}
.shop-owned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-strong);
  flex-shrink: 0;
}
.shop-hint {
  font-size: 11.5px;
  color: var(--mute);
  flex-shrink: 0;
  max-width: 90px;
  text-align: right;
}

/* ---------- Responsive (Tablet/Desktop) — muss NACH den
   Komponenten-Regeln stehen, sonst verliert es die Kaskade ----------
   Full-Screen-Layout: Die App füllt den Bildschirm; der Inhalt bekommt
   eine bequeme Lesebreite und Quest-Listen werden mehrspaltig. */
.app-col.onb-col {
  max-width: 34rem; /* Onboarding-Formular bleibt zentriert */
}

@media (min-width: 768px) {
  .screen {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 24px;
  }
  .tabbar-inner {
    max-width: 28rem;
    margin: 0 auto;
  }
  .quest-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .quest-list .reload-card {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .screen {
    max-width: 960px;
  }
  .focus-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .accent-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .quest-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
