/* G3 Prüfer – dunkles „Liquid Glass“. Farben nur für Status (siehe UI-Design-Plan). */
:root {
  --bg: #050505;
  --fg: #fafafa;
  --fg-2: #adadad;
  --fg-3: #d8d8d8;
  --glass: rgba(255, 255, 255, .055);
  --glass-hi: radial-gradient(130% 140% at 8% -35%, #ffffff20, transparent 74%),
    linear-gradient(155deg, #ffffff13, #ffffff05 58%, #ffffff0a);
  --glass-modal: radial-gradient(110% 72% at 15% -12%, #ffffff30, transparent 79%),
    radial-gradient(60% 46% at 100% 110%, #ffffff12, transparent 84%), #0e0e0edb;
  --edge: #ffffff25;
  --edge-soft: #ffffff16;
  --glass-shadow: inset 0 1px 0 #ffffff16, inset 0 -1px 0 #ffffff08, 0 18px 50px #0007;
  --glow-a: #ffffff26;
  --glow-b: #ffffff14;
  --green: #30D158;
  --yellow: #FFD60A;
  --orange: #FF9F0A;
  --red: #FF453A;
  --status: var(--fg);
  --spring: cubic-bezier(.2, .9, .25, 1.1);
  --spring-soft: cubic-bezier(.2, .8, .2, 1);
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .85); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

/* ---- Lichtfeld ---- */
.field { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.orb-a {
  left: calc(50% - 380px); top: 12%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--glow-a), transparent 70%);
  filter: blur(40px);
  animation: drift1 18s ease-in-out infinite;
  translate: calc(var(--mx, 0) * 30px) calc(var(--my, 0) * 30px);
}
.orb-b {
  left: calc(50% - 80px); top: 32%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--glow-b), rgba(255, 255, 255, 0) 70%);
  filter: blur(50px);
  animation: drift2 22s ease-in-out infinite;
  translate: calc(var(--mx, 0) * -22px) calc(var(--my, 0) * -22px);
}
@keyframes drift1 { 50% { transform: translate(120px, 60px) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: scale(1.1); } 50% { transform: translate(-140px, -50px) scale(.95); } }
body[data-screen="result"] .orb-a { left: auto; right: -80px; top: -120px; width: 620px; height: 620px; }

/* ---- Kopf ---- */
.top {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: min(1080px, 100%); margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 28px 0;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg); text-decoration: none;
  font-weight: 650; font-size: 16px; letter-spacing: -0.015em;
}
.brand > img { flex: none; width: 36px; height: 36px; padding: 4px; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass-hi); box-shadow: var(--glass-shadow); }
.top-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 8px; }
.top-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 6px 13px; border: 1px solid transparent; border-radius: 999px;
  color: var(--fg-3); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.top-link:hover, .top-link[aria-current='page'] { color: var(--fg); background: var(--glass-hi); border-color: var(--edge); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--edge-soft);
  font-size: 14px; white-space: nowrap;
}
.chip-quiet {
  height: auto; padding: 8px 16px; font-size: 13px; color: var(--fg-2);
  background: var(--glass); border-color: var(--edge);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}

main { position: relative; z-index: 1; }
.screen {
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 24px 64px;
}

/* ---- Start ---- */
.screen-start { gap: 25px; }
.screen-start h1 { --d: 30ms; }
.screen-start .model-picker { --d: 100ms; }
.screen-start .drop { --d: 175ms; }
.screen-start > .hint { --d: 220ms; }
.model-picker { width: min(688px, 100%); min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.model-picker legend { margin: 0 auto 14px; padding: 0; font-size: 14px; color: var(--fg-2); }
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.model-option { position: relative; display: block; cursor: pointer; }
.model-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.model-card {
  position: relative; display: grid; gap: 4px; height: 100%;
  padding: 12px 14px 16px; overflow: hidden; text-align: center;
  background: var(--glass-hi);
  border: 1px solid var(--edge); border-radius: 25px; box-shadow: var(--glass-shadow);
  transition: transform .32s var(--spring), border-color .22s, background-color .22s, box-shadow .22s;
}
.model-card:hover { border-color: #ffffff65; transform: translateY(-3px); }
.model-option:active .model-card { transform: scale(.978); }
.model-option input:focus-visible + .model-card { outline: 2px solid #fff; outline-offset: 3px; }
.model-option input:checked + .model-card { border-color: #ffffff85; background-color: #ffffff13; box-shadow: inset 0 1px 0 #ffffff4a, 0 10px 30px #0006; }
.model-card::after {
  content: ''; position: absolute; inset: 10px 10px auto auto; width: 19px; height: 19px; border-radius: 50%;
  background: #fafafa; opacity: 0; transform: scale(.7); transition: opacity .22s, transform .32s var(--spring);
}
.model-card::before {
  content: ''; position: absolute; z-index: 1; right: 15px; top: 15px; width: 9px; height: 5px;
  border-left: 1.6px solid #111; border-bottom: 1.6px solid #111; transform: rotate(-45deg); opacity: 0;
}
.model-option input:checked + .model-card::after { opacity: 1; transform: scale(1); }
.model-option input:checked + .model-card::before { opacity: 1; }
.model-card img {
  width: 100%; height: clamp(66px, 17vw, 141px); object-fit: contain;
  margin-bottom: 8px;
  filter: brightness(1.12) drop-shadow(0 4px 7px rgba(0, 0, 0, .38));
}
.model-card strong { font-size: clamp(14px, 2.5vw, 17px); }
.drop:disabled { cursor: default; opacity: .57; pointer-events: none; }
h1 {
  font-family: var(--display);
  margin: 0; max-width: 16ch;
  font-size: clamp(34px, 6vw, 56px); font-weight: 600; line-height: 1.08;
  letter-spacing: -0.03em; text-align: center; text-wrap: balance;
}
.drop {
  position: relative;
  width: min(470px, 100%); min-height: 176px; padding: 23px 20px;
  border-radius: 30px; border: 1px solid var(--edge);
  background: var(--glass-hi);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--glass-shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: transform .32s var(--spring), border-color .25s, box-shadow .25s, opacity .25s;
}
.drop:hover { border-color: #ffffff68; transform: translateY(-3px); }
.drop:active { transform: scale(.982); }
.drop.over {
  animation: none;
  transform: scale(1.06, 1.04);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 0 0 8px rgba(255, 255, 255, .04), 0 40px 100px rgba(0, 0, 0, .6);
}
.drop.busy { pointer-events: none; opacity: .6; }
.drop-ring { position: relative; width: 56px; height: 56px; margin-bottom: 4px; }
.drop-sheen {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #ffffff1a, #ffffffe5, #ffffff38, #ffffff1a);
  animation: spin 6s linear infinite;
}
.drop-core {
  position: absolute; inset: 1px; border-radius: 50%;
  background: linear-gradient(155deg, #2a2a2a, #101010 70%);
  display: flex; align-items: center; justify-content: center;
}
.drop-title { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.drop-core svg { width: 27px; height: 27px; }
.drop-sub { font-size: 14px; color: var(--fg-2); }
@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  margin: 0; font-size: 15px; color: var(--fg-2); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hint svg { flex: none; }
.error {
  margin: -16px 0 0; max-width: 420px;
  padding: 12px 18px; border-radius: 16px;
  background: rgba(255, 69, 58, .1); border: 1px solid rgba(255, 69, 58, .4);
  font-size: 15px; text-align: center;
  animation: rise .5s var(--spring) both;
}
.turnstile { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 5; }
.turnstile:empty { display: none; }

/* ---- Analyse ---- */
.screen-analyse { gap: 44px; }
.ring { position: relative; width: 240px; height: 240px;  }
.ring-glass {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
  border: 1px solid var(--edge);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 8; }
.ring-arc {
  fill: none; stroke: url(#ring-grad); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 691.15; stroke-dashoffset: 691.15;
  transition: stroke-dashoffset .6s var(--spring-soft);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35));
}
.ring-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.ring-pct { font-size: 64px; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring-file {
  max-width: 170px; font-size: 14px; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.step {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  font-size: 15px; color: var(--fg-2);
  transition: background .4s, border-color .4s, color .4s, transform .4s var(--spring);
}
.step-mark { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); transition: background .3s; }
.step.now {
  color: var(--fg); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4);
  transform: scale(1.04); animation: pulse 1.2s ease-in-out infinite;
}
.step.now .step-mark { background: var(--fg); }
.step.done { color: var(--fg); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); }
.step.done .step-mark {
  width: 16px; height: 16px; background: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2330D158' stroke-width='2.4'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E");
  animation: pop .35s var(--spring) both;
}
@keyframes pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }

/* ---- Ergebnis ---- */
.screen-result {
  justify-content: flex-start; align-items: stretch; gap: 22px;
  width: 100%; max-width: 1000px; margin: 0 auto; padding-top: 34px;
}
.card {
  position: relative;
  border-radius: 32px;
  background: var(--glass-hi);
  border: 1px solid var(--edge);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  box-shadow: var(--glass-shadow);
}
.verdict {
  padding: 21px 23px; border-radius: 26px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
}
.verdict[data-verdict="original"] { --status: var(--green); }
.verdict[data-verdict="getunt"] { --status: var(--orange); }
.verdict[data-verdict="unbekannt"] { --status: var(--yellow); }
.verdict[data-verdict="gefaehrlich"] { --status: var(--red); }
.verdict-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.verdict-icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--status);
  background: color-mix(in srgb, var(--status) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--status) 50%, transparent);
}
.verdict-icon svg { width: 24px; height: 24px; }
.verdict-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.verdict-word { font-family: var(--display); font-size: 29px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.verdict-sub { font-size: 13px; color: var(--fg-2); }
.verdict-hints { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--fg-2); }
.file-evidence { min-width: 0; max-width: 100%; font-size: 13px; color: var(--fg-3); }
.file-evidence[open] { flex-basis: 100%; }
.file-evidence summary { cursor: pointer; width: fit-content; }
.file-evidence dl { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 6px 14px; margin: 10px 0 0; }
.file-evidence dd { margin: 0; overflow-wrap: anywhere; }

.hazards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hazards li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 18px; border-radius: 18px;
  background: rgba(255, 69, 58, .08); border: 1px solid rgba(255, 69, 58, .35);
  font-size: 15px;
}
.hazards svg { flex: none; color: var(--red); margin-top: 2px; }

.findings-overview { display: grid; gap: 10px; min-width: 0; }
.findings-overview h2, .profile-overview h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  letter-spacing: -.02em;
}
.profile-overview { display: grid; gap: 8px; min-width: 0; }
.profile-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.profile-table th, .profile-table td { padding: 9px 8px; text-align: center; }
.profile-table thead { background: rgba(255, 255, 255, .035); }
.profile-table thead th { color: var(--fg-2); font-size: 14px; }
.profile-table tbody tr { border-top: 1px solid var(--edge-soft); }
.profile-table th:first-child { width: 23%; padding-left: 12px; text-align: left; }
.profile-table tbody td { font-weight: 650; font-variant-numeric: tabular-nums; }
.profile-table .profile-missing { color: var(--fg-3); font-size: 13px; font-weight: 400; }
.profile-table .profile-conflict { color: var(--yellow); font-size: 13px; font-weight: 500; }
.profile-context { display: block; font-size: 11px; color: var(--fg-2); font-weight: 450; }
.profile-hint { margin: 0; color: var(--fg-2); font-size: 13px; }
.findings-list { display: grid; gap: 10px; min-width: 0; }
.finding-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--edge-soft);
  border-radius: 22px;
  background: var(--glass-hi);
  box-shadow: inset 0 1px 0 #ffffff0d;
}
.finding-group-head { padding: 11px 16px; background: #ffffff08; }
.finding-group-head h3 { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--fg-3); font-size: 14px; font-weight: 600; }
.finding-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--edge-soft); }
.finding-item > .edit-slot { margin-inline-end: 12px; }
.finding-item:has(> .edit-slot:not([hidden])) .finding-row { padding-inline-end: 5px; }
.finding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) 30px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 7px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.finding-row:hover, .finding-row:focus-visible { background: rgba(255, 255, 255, .055); }
.finding-row:focus-visible { outline-offset: -3px; }
.finding-row-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 7px;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.finding-row-title svg { flex: none; align-self: center; color: #ff8178; }
.finding-caution { color: var(--yellow); font-size: 11px; font-weight: 500; }
.finding-row-values { min-width: 0; }
.finding-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 6px;
  color: var(--fg-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.finding-values > * { min-width: 0; }
.finding-values strong { color: var(--fg); font-weight: 650; }
.value-arrow { color: var(--fg-2); }
.finding-difference { font-size: 12px; }
.finding-difference::before { content: '·'; margin-right: 6px; color: var(--fg-2); }
.finding-difference.bad { color: #ff8178; }
.finding-help {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 27px;
  height: 27px;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--glass);
  color: var(--fg-3);
  font-size: 14px;
  font-weight: 650;
}
.finding-row:hover .finding-help, .finding-row:focus-visible .finding-help {
  border-color: #ffffff62;
  background: #ffffff1a;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.finding-comparison {
  padding: 12px 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
}
.finding-values-detail { font-size: 19px; gap: 4px 9px; overflow-wrap: break-word; }
.value-hint { display: block; margin-top: 4px; color: var(--fg-3); font-size: 13px; }
.extra-findings {
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--edge-soft);
  border-radius: 14px;
}
.extra-findings > summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
.extra-findings > summary span { margin-inline-start: 4px; color: var(--fg-3); font-size: 13px; }
.extra-findings[open] { padding-bottom: 12px; }
.unresolved { border-style: dashed; }
.open-findings { margin: 0; padding: 12px 16px; color: var(--fg-2); font-size: 14px; }

.more { font-size: 13px; color: var(--fg-2); }

.signed { margin: 0; font-size: 14px; color: var(--fg-2); text-align: center; }
.signed.bad { color: var(--red); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.profile-inline { display: inline-flex; align-items: center; gap: 3px; }
.profile-hint .edit-slot { margin-inline-start: 4px; vertical-align: middle; }
.edit-button {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--fg-2); cursor: pointer;
}
.edit-button { transition: transform .28s var(--spring), background .2s, border-color .2s, color .2s; }
.edit-button:hover, .edit-button.edit-pending { color: var(--fg); background: #ffffff1b; border-color: var(--edge); }
.edit-button:active { transform: scale(.87); }
.edit-button:disabled { opacity: .5; cursor: default; }
.edit-dialog {
  width: min(498px, calc(100% - 36px)); max-width: none; max-height: min(700px, calc(100dvh - 36px));
  overflow: auto; overscroll-behavior: contain; margin: auto; padding: 26px;
  border: 1px solid #ffffff30; border-radius: 33px;
  background: var(--glass-modal); color: var(--fg);
  -webkit-backdrop-filter: blur(32px); backdrop-filter: blur(32px);
  box-shadow: inset 0 1px 0 #ffffff40, inset 0 -1px 0 #ffffff0c, 0 28px 100px #000b;
}
.edit-dialog[open] { animation: editor-in .4s var(--spring) both; }
.edit-dialog[open]::backdrop {
  background: #0008;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  animation: fade .26s ease-out both;
}
.edit-dialog[open].closing { animation: editor-out .19s ease-in both; pointer-events: none; }
.edit-dialog[open].closing::backdrop { animation: fade .19s ease-in reverse both; }
@keyframes editor-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes editor-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
.edit-dialog form { display: grid; gap: 18px; }
.edit-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.edit-dialog h2 { margin: 0; font-family: var(--display); font-size: clamp(22px, 5vw, 28px); letter-spacing: -.04em; line-height: 1.12; }
.edit-dialog .hint { margin: 0; justify-content: flex-start; text-align: left; font-size: 13px; }
.editor-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 9px; }
.editor-value-card {
  display: grid; align-self: stretch; align-content: space-between; gap: 8px; min-height: 101px;
  padding: 12px 14px; border: 1px solid var(--edge-soft); border-radius: 19px; background: #0003;
}
.editor-value-caption { color: var(--fg-2); font-size: 13px; font-weight: 550; }
.editor-value-content { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
#editor-current, #editor-value {
  color: var(--fg); font: 650 clamp(22px, 6vw, 34px)/1.12 var(--display);
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.editor-original #editor-current { color: var(--fg-3); overflow-wrap: anywhere; }
.editor-unit { color: var(--fg-2); font-size: 12px; white-space: nowrap; }
.editor-unit:empty { display: none; }
.editor-arrow { color: var(--fg-2); transition: transform .3s var(--spring); }
.editor-next { background: var(--glass-hi); box-shadow: inset 0 1px 0 #ffffff22; transition: border-color .2s, background-color .2s, box-shadow .3s; }
.editor-next:focus-within { border-color: #ffffff8c; }
.edit-dialog[data-changed] .editor-next { background-color: #ffffff0b; box-shadow: inset 0 1px 0 #ffffff26, 0 0 20px #ffffff0b; }
.edit-dialog[data-changed] .editor-arrow { color: var(--fg); transform: translateX(2px); }
#editor-control { flex: 1; min-width: 0; }
#editor-value { display: block; width: 100%; min-width: 0; min-height: 38px; background: transparent; border: 0; padding: 2px 0; }
#editor-value:focus-visible { outline-offset: 1px; border-radius: 4px; }
#editor-value[type='number'] { appearance: textfield; }
#editor-value::-webkit-inner-spin-button, #editor-value::-webkit-outer-spin-button { appearance: none; margin: 0; }
.edit-dialog[data-value-type='options'] :is(#editor-current, #editor-value) { font-size: 16px; letter-spacing: -.015em; line-height: 1.25; }
#editor-value option { background: #202020; color: var(--fg); }
#builder-search {
  width: 100%; min-height: 46px; padding: 8px 14px; font: inherit; color: var(--fg);
  border: 1px solid var(--edge); border-radius: 15px; background: #0003;
}
.editor-actions { display: flex; justify-content: flex-end; }
.edit-dialog .btn:disabled { color: var(--fg-2); background: #ffffff13; cursor: default; transform: none; }
.edit-dialog .hint:empty, .editor-status:empty { display: none; }
.builder-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.builder-actions a { text-decoration: none; }
.editor-status { margin: 0; }
.editor-value-pane { display: grid; gap: 15px; }
.edit-dialog[open] :is(.editor-value-pane, #builder-overview):not([hidden]) { animation: editor-content .28s var(--spring-soft) both; }
@keyframes editor-content { from { transform: translateY(7px); opacity: .35; } }
.builder-back { justify-self: start; border: 0; background: none; color: var(--fg-3); padding: 0; cursor: pointer; }
.builder-list { margin-top: 11px; display: grid; gap: 0; border: 1px solid var(--edge-soft); border-radius: 17px; background: #0002; overflow: hidden; }
.builder-list:has(> p) { padding: 14px; }
.builder-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 47px; padding: 8px 13px; border: 0; color: var(--fg);
  background: transparent; text-align: left; cursor: pointer;
  transition: background .2s;
}
.builder-row + .builder-row { border-top: 1px solid var(--edge-soft); }
.builder-row:hover { background: #ffffff0c; }
.builder-row:focus-visible { outline-offset: -3px; }
.builder-row span:last-child { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-2); text-align: right; }
.builder-row svg { flex: none; }
.notice-content { display: grid; gap: 15px; }
.notice-dialog p { margin: 9px 0 0; color: var(--fg-3); font-size: 14px; line-height: 1.55; }
.notice-icon {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px;
  border: 1px solid var(--edge); border-radius: 50%; background: var(--glass-hi);
  color: var(--fg); font-size: 20px; font-weight: 650;
}
.notice-icon-risk { color: var(--orange); border-color: #ff9f0a55; }
.notice-progress {
  appearance: none; width: 100%; height: 4px; overflow: hidden; border: 0; border-radius: 999px;
  background: #ffffff18; accent-color: var(--fg);
}
.notice-progress::-webkit-progress-bar { background: #ffffff18; }
.notice-progress::-webkit-progress-value { background: var(--fg); border-radius: 999px; transition: width .16s linear; }
.notice-progress::-moz-progress-bar { background: var(--fg); border-radius: 999px; }
#usage-notice-accept { justify-content: center; }
.notice-changes {
  display: grid; margin: 0; padding: 0; list-style: none; max-height: 8rem; overflow: auto;
  border: 1px solid var(--edge-soft); border-radius: 15px; background: #0003;
}
.notice-changes li {
  display: flex; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap;
  padding: 8px 11px; font-size: 13px;
}
.notice-changes li + li { border-top: 1px solid var(--edge-soft); }
.notice-changes strong { font-weight: 650; overflow-wrap: anywhere; }
.notice-consent {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 12px; border: 1px solid var(--edge); border-radius: 16px; background: var(--glass);
  color: var(--fg); cursor: pointer; font-size: 14px; line-height: 1.5;
}
.notice-consent input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--fg); cursor: pointer; }
.notice-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.notice-actions .btn { justify-content: center; padding-inline: 15px; }
@media (max-width: 360px) {
  .notice-actions { grid-template-columns: 1fr; }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(178deg, #fff, #ececec); color: #080808; border: 1px solid #fff3; font-size: 15px; font-weight: 650;
  box-shadow: 0 4px 14px #0004;
  transition: transform .24s var(--spring), opacity .2s, background-color .2s;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.97); }
.btn-quiet { background: var(--glass-hi); color: var(--fg); border-color: var(--edge); box-shadow: var(--glass-shadow); }
.copy-fallback {
  width: 100%; min-height: 180px; padding: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .04); color: var(--fg); border: 1px solid var(--edge-soft);
  font: 13px/1.5 var(--mono); resize: vertical;
}

.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .12); border-top-color: var(--fg);
  animation: spin 1s linear infinite; margin-bottom: 20px;
}

/* ---- Detail-Blatt ---- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 10;
  background: #0008;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fade .35s ease both;
}
.sheet {
  position: fixed; z-index: 11;
  left: 50%; top: 50%;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  translate: -50% -50%;
  padding: 36px 40px;
  border-radius: 36px;
  background: var(--glass-modal);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(32px); -webkit-backdrop-filter: blur(32px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 40px 120px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 24px;
  animation: grow .5s var(--spring) both;
}
.sheet:focus { outline: none; }
.sheet.closing { animation: shrink .25s ease-in both; }
.sheet-backdrop.closing { animation: fade .25s ease reverse both; }
.sheet-grip { display: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sheet-title { min-width: 0; margin: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; }
.sheet-title svg { flex: none; }
.close {
  flex: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--edge); background: var(--glass-hi);
  display: flex; align-items: center; justify-content: center;
  transition: transform .24s var(--spring), background-color .2s;
}
.close:hover { background-color: #ffffff1f; }
.close:active { transform: scale(.9); }
.sheet-body { display: flex; flex-direction: column; gap: 32px; }
.finding { display: flex; flex-direction: column; gap: 14px; }
.finding + .finding { padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .08); }
.finding-label { font-size: 15px; color: var(--fg-2); }
.sentence { margin: 0; font-size: 16px; line-height: 1.5; color: var(--fg-2); }
.finding-context { margin: 0; color: var(--fg-3); font-size: 14px; overflow-wrap: anywhere; }
.time-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; }
.time-preview .btn { justify-self: start; grid-column: 1 / -1; }
.time-preview progress { width: 100%; height: 8px; accent-color: var(--fg); }
.time-preview [aria-live] { font-size: 13px; color: var(--fg-2); min-width: 64px; }

/* ---- Eintritts-Animationen ---- */
.enter { animation: rise .52s var(--spring) backwards; animation-delay: var(--d, 0s); }
.screen-result > :is(.verdict, .builder-actions, .profile-overview, .findings-overview) { animation: rise .44s var(--spring-soft) both; }
.screen-result > .profile-overview { animation-delay: 65ms; }
.screen-result > .findings-overview { animation-delay: 115ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { opacity: 0; transform: scale(.86) translateY(30px); } }
@keyframes shrink { to { opacity: 0; transform: scale(.94) translateY(16px); } }


/* ---- Breiten ---- */
@media (max-width: 640px) {
  .top { padding: max(18px, env(safe-area-inset-top)) 18px 0; }
  .screen { padding: 20px 16px 48px; }
  .screen-start { gap: 20px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .model-card { padding: 8px 5px 10px; border-radius: 14px; }
  .model-card img { height: clamp(92px, 29vw, 141px); margin-bottom: 3px; }
  .model-card strong { font-size: 13px; line-height: 1.25; }
  .drop { min-height: 156px; padding-block: 17px; }
  .screen-result { padding-top: 24px; gap: 14px; }
  .verdict { padding: 12px 14px; border-radius: 16px; gap: 8px 12px; }
  .verdict-icon { width: 38px; height: 38px; }
  .verdict-icon svg { width: 20px; height: 20px; }
  .verdict-word { font-size: 23px; }
  .finding-group { border-radius: 19px; }
  .finding-group-head { padding: 8px 12px; }
  .finding-row { grid-template-columns: minmax(0, 1fr) 30px; gap: 2px 8px; padding: 8px 12px; }
  .finding-row-title { font-size: 15px; }
  .finding-row-values { grid-column: 1; }
  .finding-help { grid-column: 2; grid-row: 1 / span 2; }
  .ring { width: 200px; height: 200px; }
  .ring-pct { font-size: 52px; }
  .step { height: 36px; padding: 0 14px; font-size: 14px; }
  .edit-dialog {
    inset: auto 0 0; width: 100%; max-height: min(85dvh, 650px); margin: 0;
    padding: 23px max(18px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    border-radius: 27px 27px 0 0; border-bottom: 0;
  }
  .edit-dialog[open] { animation-name: editor-up; }
  .edit-dialog[open].closing { animation-name: editor-down; }
  .edit-dialog .close { width: 44px; height: 44px; }
  .editor-actions .btn { width: 100%; justify-content: center; }
  .builder-actions { display: grid; }
  .builder-actions .btn { justify-content: center; }
  .finding-item > .edit-slot { margin-inline-end: 8px; }
  .finding-item .edit-button { width: 44px; height: 44px; }
  .editor-value-card { min-height: 94px; padding: 12px; }
  .profile-inline .edit-button { width: 28px; height: 34px; }
  /* Detail als Bottom-Sheet */
  .sheet {
    left: 0; right: 0; top: auto; bottom: 0; translate: none;
    width: 100%; max-height: 88dvh;
    padding: 12px 20px calc(28px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0; border-bottom: 0;
    animation: up .5s var(--spring) both;
  }
  .sheet.closing { animation: down .25s ease-in both; }
  .sheet-grip { display: block; width: 40px; height: 5px; margin: 0 auto -8px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .tech-cell.address { grid-column: auto; }
}
@keyframes editor-up { from { opacity: .5; transform: translateY(36px) scale(.985); } }
@keyframes editor-down { to { opacity: 0; transform: translateY(28px); } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }

/* ---- Weniger Bewegung: nur Überblenden ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .2s !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .2s !important;
    scroll-behavior: auto !important;
  }
  .orb, .drop, .drop-sheen, .step.now, .spinner { animation: none !important; }
  .orb { translate: none; }
  .enter, .error, .sheet, .sheet.closing, .step.done .step-mark { animation-name: fade !important; }
  .sheet.closing, .sheet-backdrop.closing { animation-direction: reverse !important; }
  .edit-dialog[open], .edit-dialog[open] :is(.editor-value-pane, #builder-overview), .screen-result > * { animation-name: fade !important; }
  .btn:hover, .btn:active, .step.now, .drop.over, .drop:hover, .model-card:hover, .model-option:active .model-card,
  .edit-button:active, .close:active, .edit-dialog[data-changed] .editor-arrow { transform: none; }
}
