:root {
  font: 18px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #173b32;
  background: #f5f6f2;
  color-scheme: light;
  --green: #18523f;
  --green-dark: #123f30;
  --line: #d2ddd4;
  --muted: #435e52;
  --error: #7c2918;
  --error-bg: #fff4eb;
  --ok-bg: #edf5ed;
  --focus: #8c5109;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
header, main, footer { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 20px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
main { flex: 1; padding-top: 0; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--green); text-decoration: none; }
.chip { font-size: .85rem; background: var(--ok-bg); color: #174d36; border: 1px solid #a9c8b3; border-radius: 999px; padding: 4px 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.01em; hyphens: none; overflow-wrap: normal; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
p { margin: 10px 0 16px; }
.lead { font-size: 1.05rem; }
.muted { color: var(--muted); font-size: .95rem; }
button { font: inherit; font-weight: 650; min-height: 52px; width: 100%; border-radius: 10px; padding: 12px 18px; cursor: pointer; margin: 10px 0 0; border: 2px solid var(--green); background: var(--green); color: #fff; overflow-wrap: break-word; }
button.secondary { background: #fff; color: var(--green); }
button.danger { background: #fff; color: var(--error); border-color: #a44427; }
button.text { background: transparent; border-color: transparent; color: var(--green); text-decoration: underline; text-underline-offset: .2em; width: auto; min-height: 44px; padding: 8px 4px; font-weight: 500; margin: 0; }
button.small { min-height: 44px; width: auto; padding: 8px 16px; margin: 8px 8px 0 0; }
button:disabled { opacity: .6; cursor: wait; }
/* Fokusring nur bei Tastaturfokus. Programmatischer Fokus nach Ansichtswechsel (Überschriften, main; tabindex=-1) zeigt keinen Ring. */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
details { margin: 18px 0 0; }
summary { cursor: pointer; font-weight: 650; min-height: 44px; padding: 8px 0; }
#delete-box summary { color: var(--error); }
#notice { min-height: 1.6em; margin: 12px 0 16px; font-size: .95rem; }
#notice:empty { margin: 0; min-height: 0; }
#notice.error { color: var(--error); background: var(--error-bg); border-left: 4px solid #a44427; padding: 10px 14px; }
#notice.ok { color: #174d36; background: var(--ok-bg); border-left: 4px solid #267149; padding: 10px 14px; }
.error { color: var(--error); }
.devices { list-style: none; margin: 0; padding: 0; }
.device { border-top: 1px solid var(--line); padding: 14px 0; }
.device:first-child { border-top: 0; }
.device-main { display: flex; flex-direction: column; gap: 2px; }
.device-meta { color: var(--muted); font-size: .9rem; }
.device.revoked .device-label { text-decoration: line-through; color: var(--muted); }
.device-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.rename-form label { display: block; margin-top: 8px; }
.rename-form input { font: inherit; width: 100%; min-height: 48px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 8px; margin-top: 4px; }
.confirm { background: var(--error-bg); border-radius: 8px; padding: 10px 14px; margin-top: 8px; }
.confirm p { margin: 4px 0 8px; }
footer { font-size: .85rem; }
.skip { position: absolute; top: 0; left: 12px; transform: translateY(-200%); background: #fff; padding: 12px; z-index: 5; }
.skip:focus-visible { transform: none; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  header, main, footer { padding: 12px 14px; }
  .card { padding: 18px; }
  h1 { font-size: min(1.7rem, 8vw); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
