/* basis.css – Rücksetzen, Seite, Schrift, Knöpfe, Felder (Teil A). Keine verschachtelten Kästen: Karten liegen direkt auf dem Seitengrund. */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, svg { display: block; max-inline-size: 100%; }
  button, input, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  a { color: inherit; -webkit-tap-highlight-color: transparent; }
  [hidden] { display: none !important; }
}

@layer basis {
  html { background: var(--hg); }  /* fester Hintergrund: Safari 26+ färbt die Leisten danach */
  body {
    min-block-size: 100dvh;
    background: var(--hg); color: var(--text);
    font-family: var(--schrift); font-size: var(--fs-text); line-height: var(--zeilenhoehe);
    font-variant-numeric: tabular-nums;  /* Zahlen mit festen Ziffernbreiten */
    padding-inline: max(var(--rand), env(safe-area-inset-left)) max(var(--rand), env(safe-area-inset-right));
    padding-block-end: calc(var(--leiste-hoehe) + max(var(--a4), env(safe-area-inset-bottom)) + var(--a6));
    overflow-x: clip;
  }
  #ansichten { max-inline-size: 640px; margin-inline: auto; }
  :focus-visible { outline: 3px solid var(--akzent-text); outline-offset: 2px; border-radius: 6px; }

  .unsichtbar { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .fussnote { font-size: var(--fs-fussnote); color: var(--text-3); }
  .nebentext { font-size: var(--fs-neben); color: var(--text-2); }

  /* Knöpfe: Haupt (Akzentfläche), Zweit (Füllung), Text (nur Schrift) */
  .knopf-haupt, .knopf-zweit, .knopf-text {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--a2);
    min-block-size: var(--tipp); padding-inline: var(--a4); border-radius: 12px;
    font-size: var(--fs-text); font-weight: 600; text-decoration: none; text-align: center;
    transition: opacity var(--dauer), background-color var(--dauer);
  }
  .knopf-haupt { min-block-size: 50px; background: var(--akzent); color: var(--akzent-kontrast); }
  .knopf-zweit { background: var(--fuellung); color: var(--akzent-text); }
  .knopf-text { color: var(--akzent-text); padding-inline: var(--a2); }
  .knopf-haupt:active, .knopf-zweit:active, .knopf-text:active { opacity: .6; }
  .knopf-haupt:disabled, .knopf-zweit:disabled { opacity: .45; cursor: default; }
  .breit { inline-size: 100%; }
  .knopf-haupt svg, .knopf-zweit svg, .knopf-text svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

  /* Felder */
  .feld { display: grid; gap: var(--a1); }
  .beschriftung { font-size: var(--fs-neben); color: var(--text-2); font-weight: 500; }
  input[type="text"], input[type="search"], textarea, select {
    inline-size: 100%; min-block-size: var(--tipp); padding: 10px var(--a3);
    border: 1px solid var(--trenner); border-radius: 12px; background: var(--karte-2);
    font-size: max(16px, var(--fs-text));  /* unter 16 px zoomt iOS beim Tippen hinein */
  }
  select {
    -webkit-appearance: none; appearance: none; padding-inline-end: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  }
  textarea { min-block-size: 96px; resize: vertical; line-height: 1.4; }
  input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent-text); outline-offset: 0; border-color: transparent; }
  .feld-fehler { font-size: var(--fs-neben); color: var(--fehler-text); min-block-size: 0; }
  .feld-fehler:empty { display: none; }
}
