/* ============================ Reset & Base ============================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: var(--fs-md); }
a { color: var(--accent); text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }

::selection { background: var(--accent-200); }

/* Sanfte Tiefe im Hintergrund (dezente Akzent-Schimmer) */
body {
  background:
    radial-gradient(120% 60% at 100% -10%, var(--accent-100) 0%, transparent 55%),
    radial-gradient(90% 50% at -10% 8%, var(--accent-100) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

/* App-Frame: zentriert, app-artige Breite */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

/* Scroll-Container für Views (Tab-Seiten) */
.view-scroll {
  padding-top: calc(env(safe-area-inset-top, 0px) + 8px);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
}

/* ============================ Buttons ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 22px;
  font-size: var(--fs-md);
  font-weight: 700;
  background: var(--accent);
  color: var(--accent-contrast);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-outline {
  background: var(--surface);
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent-200);
}
.btn-block { width: 100%; }

/* ============================ Inputs ============================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-soft); }

.input, .textarea, .select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-100);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.55; }

/* ============================ Utility ============================ */
.container { padding: 0 18px; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.section-title { font-size: var(--fs-lg); font-weight: 800; margin: 26px 0 12px; }
.page-head { padding: 22px 18px 6px; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head .sub { color: var(--text-soft); margin-top: 4px; }
