/* ==========================================================================
   AssistWrite — Design „Variante A / Klar"
   Stylesheet aus dem Design-Handoff (design_handoff_assistwrite_keyboard).
   Alle Design-Tokens, Farbschemata und Komponenten-Styles.
   ========================================================================== */
@property --p { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; background: #2a2f37; }

/* ===== Lade-/Boot-Screen ===== */
.aw-boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: #EEF1F4; color: #1E2530; font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; }
.aw-boot-logo { width: 84px; height: 84px; border-radius: 24px; background: #0FA89F; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(15,168,159,.3); animation: awBootPulse 1.6s ease-in-out infinite; }
.aw-boot-logo svg { width: 46px; height: 46px; }
@keyframes awBootPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.aw-boot-name { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
#aw-loading-msg { font-size: 16px; font-weight: 700; color: #76828F; }
.aw-boot-bar { width: 220px; height: 6px; border-radius: 999px; background: #E1E6EC; overflow: hidden; }
.aw-boot-bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: 999px; background: #0FA89F; animation: awBootBar 1.2s ease-in-out infinite; }
@keyframes awBootBar { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ===== Grundgerüst + Schema „Klar" (Standard) ===== */
.aw {
  width: 100vw; height: 100vh; display: flex; flex-direction: column;
  gap: 14px; padding: 16px 20px;
  background: var(--bg); color: var(--txt); overflow: hidden;
  font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  --bg:#EEF1F4; --field:#FFFFFF; --field-br:#E4E8ED; --key:#FFFFFF; --key-br:#E1E6EC; --track:#E5EAEF;
  --txt:#1E2530; --muted:#76828F; --accent:#0FA89F; --accent-ink:#FFFFFF; --accent-soft:rgba(15,168,159,.12);
  --radius:16px; --key-radius:14px; --shape-word-bg:#E9EDF1;
  --key-shadow:0 1px 0 #EAEEF2, 0 2px 6px rgba(20,30,50,.05);
}
.aw-scheme-assistuk { --bg:#F0F1F4; --field:#FFFFFF; --field-br:#E3E6EB; --key:#FFFFFF; --key-br:#E1E5EA; --track:#E5E8ED;
  --txt:#1A2230; --muted:#5A6675; --accent:#4B698C; --accent-ink:#fff; --accent-soft:rgba(75,105,140,.13); --shape-word-bg:#E9EDF2; }
.aw-scheme-creme { --bg:#F3EAD6; --field:#FBF6E9; --field-br:#E6D8BC; --key:#FBF7EC; --key-br:#E5D7BA; --track:#EBE0C8;
  --txt:#3B3326; --muted:#867A60; --accent:#B5742A; --accent-ink:#fff; --accent-soft:rgba(181,116,42,.15); --shape-word-bg:#EFE6D0;
  --key-shadow:0 1px 0 #F0E7D2, 0 2px 6px rgba(90,70,30,.06); }
.aw-scheme-dunkel { --bg:#14181F; --field:#1B212A; --field-br:#2A323D; --key:#222A34; --key-br:#323B47; --track:#1B222C;
  --txt:#E8EDF3; --muted:#8B97A6; --accent:#36C2B4; --accent-ink:#06231F; --accent-soft:rgba(54,194,180,.16); --shape-word-bg:#2A323D;
  --key-shadow:0 1px 0 rgba(255,255,255,.03), 0 3px 10px rgba(0,0,0,.40); }
.aw-scheme-kontrast { --bg:#FFFFFF; --field:#FFFFFF; --field-br:#000000; --key:#FFFFFF; --key-br:#000000; --track:#EAEAEA;
  --txt:#000000; --muted:#000000; --accent:#0046C7; --accent-ink:#FFFFFF; --accent-soft:rgba(0,70,199,.13); --shape-word-bg:#ECECEC;
  --key-shadow:none; }
.aw-scheme-kontrast .aw-key, .aw-scheme-kontrast .aw-pred, .aw-scheme-kontrast .aw-side,
.aw-scheme-kontrast .aw-top-btn, .aw-scheme-kontrast .aw-field { border-width: 2.5px; }

/* ===== Topbar ===== */
.aw-top { flex: 0 0 auto; height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.aw-brand { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.aw-logo { width: 50px; height: 50px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.aw-logo .aw-ic { width: 27px; height: 27px; }
.aw-brand-name { font-size: 25px; font-weight: 700; letter-spacing: -0.4px; }
.aw-menu-btn { position: relative; display: inline-flex; align-items: center; gap: 16px; height: 80px; padding: 0 36px 0 28px; border-radius: 20px;
  border: 2px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; cursor: pointer;
  box-shadow: var(--key-shadow); transition: transform .08s, border-color .1s; }
.aw-menu-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.aw-menu-btn:active { transform: scale(.98); }
.aw-menu-btn .aw-ic { width: 38px; height: 38px; color: var(--accent); }
.aw-menu-btn-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.aw-menu-btn-txt b { font-size: 24px; font-weight: 800; }
.aw-menu-btn-sub { font-size: 14px; font-weight: 700; color: var(--muted); }
.aw-seg-wrap { display: flex; gap: 3px; background: var(--track); padding: 4px; border-radius: 13px; }
.aw-seg { border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 15px; font-weight: 700; padding: 8px 17px; border-radius: 9px; cursor: pointer; }
.aw-seg.is-on { background: var(--accent); color: var(--accent-ink); }
.aw-top-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.aw-top-btn { height: 46px; padding: 0 16px; border-radius: 13px; border: 1.5px solid var(--key-br); background: var(--key);
  color: var(--txt); display: flex; align-items: center; gap: 9px; font-family: inherit; font-weight: 700; font-size: 15.5px; cursor: pointer; }
.aw-top-btn .aw-ic { width: 21px; height: 21px; color: var(--muted); }
.aw-top-btn.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.aw-top-btn.is-on .aw-ic { color: var(--accent); }
.aw-top-btn--icon { padding: 0; width: 46px; justify-content: center; }

/* ===== Textfeld ===== */
.aw-textarea { flex: 0 0 150px; min-height: 0; display: flex; gap: 12px; }
.aw-side { position: relative; width: 112px; flex: 0 0 112px; align-self: stretch; border-radius: var(--radius); border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-family: inherit; box-shadow: var(--key-shadow); transition: transform .08s, border-color .1s; }
.aw-side:hover { border-color: var(--accent); transform: translateY(-1px); }
.aw-side:active { transform: scale(.98); }
.aw-side .aw-ic { width: 38px; height: 38px; }
.aw-side-lab { font-size: 14px; font-weight: 700; text-align: center; line-height: 1.05; }
.aw-side--read { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.aw-side--del { color: var(--muted); }
.aw-side--clear { background: rgba(229,72,77,.10); color: #E5484D; border-color: transparent; }
.aw-side--clear:hover { border-color: #E5484D; }
.aw-side-col { display: flex; flex-direction: column; gap: 12px; width: 96px; }

.aw-field { flex: 1; min-height: 0; min-width: 0; background: var(--field); border: 1.5px solid var(--field-br); border-radius: var(--radius);
  padding: 18px 24px; overflow-y: auto; display: flex; align-items: flex-start; box-shadow: var(--key-shadow);
  --wfs: 31px; --u: 25px; }
.aw-field.aw-fs-gross { --wfs: 38px; --u: 30px; }
.aw-field.aw-fs-xl { --wfs: 46px; --u: 36px; }
.aw-field-text { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 13px 9px; line-height: 1.25; width: 100%; }

.aw-word { display: inline-block; font-size: var(--wfs); font-weight: 700; color: var(--txt);
  padding: 3px 11px 4px; border-radius: 10px; border-bottom: 3px solid transparent; line-height: 1.1; }
.aw-word.is-sel { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent); }
/* Karaoke-Vorlesen: aktuell gesprochenes Wort (Farbe via --hl, Default Akzent) */
.aw-word.is-speaking { background: var(--hl, var(--accent)) !important; color: var(--hl-ink, var(--accent-ink)) !important;
  border-bottom-color: var(--hl, var(--accent)) !important; box-shadow: 0 0 0 4px rgba(0,0,0,.08);
  border-radius: 10px; transition: background .08s, color .08s; }
.aw-word.is-speaking .bf { background: var(--hl-ink, #fff); color: var(--hl, var(--accent)); }
.aw-word-sym { margin-right: 6px; font-size: .92em; line-height: 1; }
.aw-pred-sym { flex: 0 0 auto; margin-right: 12px; font-size: 28px; line-height: 1; }
.aw-word--tap { cursor: pointer; }
.aw-word--tap:hover { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.aw-word--tap:active { transform: scale(.97); }
.aw-punct { font-size: var(--wfs, 31px); font-weight: 700; color: var(--txt); align-self: flex-end; padding-bottom: 4px; }
.aw-break { flex-basis: 100%; height: 0; }

/* Wortgestalt — nachgezeichnete Form der Buchstaben */
.aw-word--shape { background: var(--shape-word-bg); display: inline-flex; align-items: flex-end; gap: 1px; padding: 3px 5px 4px; }
.bf { display: inline-flex; align-items: flex-end; justify-content: center; background: #fff; color: #233040;
  border-radius: 4px; width: calc(var(--u) * 0.8); font-size: calc(var(--u) * 0.92); font-weight: 700; line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.10); }
.bf-x { height: var(--u); }
.bf-asc { height: calc(var(--u) * 1.34); }
.bf-desc { height: calc(var(--u) * 1.28); margin-bottom: calc(var(--u) * -0.28); padding-bottom: calc(var(--u) * 0.28); }
.bf-pun { height: calc(var(--u) * 0.5); width: calc(var(--u) * 0.46); }

.aw-partial { display: inline-flex; align-items: flex-end; font-size: var(--wfs); font-weight: 700; color: var(--accent);
  padding: 3px 2px 4px 4px; border-bottom: 3px dashed var(--accent); }
.aw-partial--shape { gap: 1px; border-bottom: none; }
.aw-partial--shape .bf { background: #fff; color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.aw-caret { width: 3px; height: calc(var(--u, 25px) * 1.2); background: var(--accent); margin-left: 4px; border-radius: 2px;
  align-self: flex-end; animation: aw-blink 1.05s step-end infinite; }
@keyframes aw-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== Geister-Vorschau im Mitteilungsfenster ===== */
.aw-ghost { display: inline-flex; align-items: center; font-size: var(--wfs); font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 2px dashed var(--accent); border-radius: 10px; padding: 2px 10px 3px;
  opacity: .85; animation: awGhostPulse 1.4s ease-in-out infinite; }
@keyframes awGhostPulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
.aw-ghost .aw-word-sym { margin-right: 6px; }

/* ===== Prüf-Slot (Wort prüfen) ===== */
.aw-prev { flex: 0 0 auto; min-height: 56px; display: flex; align-items: center; gap: 14px; padding: 6px 4px; }
.aw-prev-info { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.aw-prev-sym { font-size: 34px; line-height: 1; flex: 0 0 auto; }
.aw-prev-word { font-size: 30px; font-weight: 800; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-prev-aids { display: flex; gap: 8px; flex: 0 0 auto; }
.aw-prev-btn { height: 52px; padding: 0 16px; border-radius: 13px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: var(--key-shadow); }
.aw-prev-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.aw-prev-btn .aw-ic { width: 22px; height: 22px; }
.aw-prev-act { display: flex; gap: 8px; flex: 0 0 auto; }
.aw-prev-cancel, .aw-prev-ok { height: 52px; padding: 0 20px; border-radius: 13px; font-family: inherit; font-weight: 800; font-size: 17px;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1.5px solid var(--key-br); }
.aw-prev-cancel { background: var(--key); color: var(--muted); }
.aw-prev-cancel:hover { border-color: #E5484D; color: #E5484D; }
.aw-prev-ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.aw-prev-cancel .aw-ic, .aw-prev-ok .aw-ic { width: 22px; height: 22px; }
.aw-pred.is-preview { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft), var(--key-shadow); }

/* ===== Satzvorhersage-Leiste ===== */
.aw-sent { flex: 0 0 auto; min-height: 112px; display: flex; align-items: center; gap: 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.aw-sent::-webkit-scrollbar { display: none; }
.aw-sent-lab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding-right: 2px; }
.aw-sent-lab .aw-ic { width: 18px; height: 18px; }
.aw-sent-chip { position: relative; flex: 0 0 auto; height: 100px; display: inline-flex; align-items: center; gap: 10px; padding: 0 30px;
  border-radius: 18px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  font-family: inherit; font-size: 23px; font-weight: 700; cursor: pointer; box-shadow: var(--key-shadow); white-space: nowrap; }
.aw-sent-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.aw-sent-arrow { color: var(--accent); font-weight: 800; font-size: 24px; }

/* ===== Vorhersage ===== */
.aw-pred-head { flex: 0 0 auto; height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.aw-keys { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.aw-pred-title { font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.aw-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 5px 13px; border-radius: 999px; }
.aw-hint-glow { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: aw-pulse 1.8s ease-out infinite; }
@keyframes aw-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-soft); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.aw-pred-row { flex: 1 1 0; display: flex; gap: 10px; min-height: 0; }
.aw-pred { position: relative; flex: 1; min-width: 0; background: var(--key); border: 1.5px solid var(--key-br); border-radius: var(--radius);
  display: flex; align-items: center; padding: 0 18px; cursor: pointer; box-shadow: var(--key-shadow); overflow: hidden; font-family: inherit; }
.aw-pred:hover { border-color: var(--accent); }
.aw-pred.is-top { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft), var(--key-shadow); }
.aw-pred-word { font-size: 27px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-pred-typed { color: var(--muted); font-weight: 400; opacity: .6; }
.aw-pred-rest { font-weight: 800; }
.aw-pred-dot { position: absolute; top: 11px; right: 13px; width: 9px; height: 9px; border-radius: 50%; opacity: .85; }
.aw-pred.is-top .aw-pred-dot { display: none; }
.aw-pred-conf { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--key-br); }
.aw-pred-conf-fill { position: absolute; left: 0; bottom: 0; height: 4px; width: 90%; background: var(--accent); border-radius: 0 3px 0 0; }

/* Zentrierter Verweil-Ring auf jeder Vorhersagekarte (App- oder Geräte-Dwell) */
.aw-pdwell { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px;
  border-radius: 50%; pointer-events: none; --p: 0deg; opacity: .9; z-index: 2;
  background: conic-gradient(var(--accent) var(--p), transparent 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 62%);
  mask: radial-gradient(farthest-side, transparent 60%, #000 62%); }

/* ===== Dwell (alt, nur noch ungenutzt) ===== */
.aw-dwell { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; pointer-events: none; }
.aw-dwell svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.aw-dwell-trk { fill: none; stroke: var(--key-br); stroke-width: 4; }
/* Ring füllt sich NICHT dauerhaft — nur beim tatsächlichen Verweilen (Blick/Hover) auf der Top-Karte */
.aw-dwell-prg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dashoffset: 106.8; opacity: .45; }
@keyframes aw-dwell-fill { from { stroke-dashoffset: 106.8; } to { stroke-dashoffset: 0; } }
.aw-dwell-dot { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  transform: translate(-50%,-50%) scale(.8); opacity: .4; }
.aw--dwell .aw-pred.is-top:hover .aw-dwell-prg { opacity: 1; animation: aw-dwell-fill 2.6s linear infinite; }
.aw--dwell .aw-pred.is-top:hover .aw-dwell-dot { animation: aw-dwell-glow 2.6s ease-in-out infinite; }
@keyframes aw-dwell-glow { 0%,100% { opacity: .4; transform: translate(-50%,-50%) scale(.8); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.25); } }

/* ===== Tastatur ===== */
.aw-kb-wrap { flex: 4 1 0; position: relative; display: flex; min-height: 0; }
.aw-kb { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.aw-kb-row { flex: 1; display: flex; gap: 10px; min-height: 0; }
/* AEIOU: einheitlich große Zellen, linksbündig, leerer Bereich rechts */
.aw-kb--aeiou .aw-kb-row { justify-content: flex-start; }
.aw-kb--aeiou .aw-key { flex: 0 0 calc((100% - 50px) / 6); }
.aw-key { flex: 1; min-width: 0; position: relative; border: 1.5px solid var(--key-br); border-radius: var(--key-radius);
  background: var(--key); color: var(--txt); font-family: inherit; font-size: 30px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--key-shadow); overflow: hidden;
  transition: transform .08s, border-color .1s, background .1s; }
.aw-key:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.aw-key:active { transform: translateY(0) scale(.97); }
.aw-key .aw-ic { width: 30px; height: 30px; }
.aw-key--shift.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.aw-key--fn { color: var(--muted); font-size: 19px; }
.aw-key--anlaut { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.aw-key--space { font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.aw-key--group { padding: 8px; }
.aw-grid6 { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 4px 8px; }
.g6c { font-size: 22px; font-weight: 800; line-height: 1; }

/* Dwell-Ring auf Taste (nur im Dwell-Modus, bei Hover) */
.kd { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 52%; max-width: 50px; aspect-ratio: 1;
  border-radius: 50%; opacity: 0; pointer-events: none;
  background: conic-gradient(var(--accent) var(--p,0deg), transparent 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 64%);
  mask: radial-gradient(farthest-side, transparent 62%, #000 64%); }
.aw--dwell .aw-key:hover .kd { opacity: .8; animation: kdfill 1.3s linear forwards; }
@keyframes kdfill { from { --p: 0deg; } to { --p: 360deg; } }

/* ===== Augenwisch (dwell-frei) ===== */
.aw-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.aw-trail path { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  opacity: .25; transition: opacity .4s; }
.aw-trail path.fade { opacity: 0; }
.aw--swipe .aw-kb-wrap { cursor: crosshair; }
.aw--swipe .aw-key { touch-action: none; }
.aw--swipe .aw-key:hover .kd { display: none; }
.aw-hint--swipe { gap: 10px; }
.aw-hint--swipe .aw-ic { width: 17px; height: 17px; }
.aw-hint-demo { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-family: inherit; font-weight: 700; font-size: 12.5px;
  padding: 4px 10px 4px 8px; border-radius: 999px; }
.aw-hint-demo .aw-ic { width: 12px; height: 12px; }
.aw-hint-reset { background: var(--key); color: var(--accent); border: 1.5px solid var(--accent); }
.aw-hint-txt { display: inline; }
.aw-hint--swipe { max-width: none; }
.aw-kb-wrap--swipe.aw-kb-wrap--target { gap: 12px; }
/* Fixations-Ring (Pause auf Buchstabe / Leertaste) */
.aw-fixring { position: absolute; z-index: 7; pointer-events: none; display: none; }
.aw-fixring-prog { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%,-50%); opacity: .8;
  border-radius: 50%; background: conic-gradient(var(--accent) var(--p,0deg), transparent 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 64%); mask: radial-gradient(farthest-side, transparent 62%, #000 64%); }
@keyframes awFix { from { --p: 0deg; } to { --p: 360deg; } }
/* Leertaste als Wortende-Ziel hervorheben */
.aw-kb-wrap--spaceend .aw-key--space { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-soft), var(--key-shadow); }

/* ===== Unmögliche Buchstaben – ruhig abblenden, Auswahl gesperrt ===== */
.aw-key.is-off, .aw-ckey.is-off { opacity: .24; box-shadow: none; cursor: default; }
.aw-key.is-off:hover, .aw-ckey.is-off:hover { transform: none; border-color: var(--key-br); background: var(--key); }
.aw-key.is-off .kd, .aw-ckey.is-off .kd { display: none; }
.aw-key--group.is-off { opacity: .4; }
.g6c.is-off { opacity: .22; }

/* ===== Kreisrunde Tastatur ===== */
.aw-circle-wrap { flex: 4 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.aw-circle { position: relative; height: 100%; aspect-ratio: 1; max-width: 100%; }
.aw-ckey { position: absolute; transform: translate(-50%,-50%); width: clamp(46px, 7.4%, 74px); aspect-ratio: 1;
  border-radius: 50%; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit;
  font-size: clamp(19px, 3.3vh, 30px); font-weight: 700; cursor: pointer; box-shadow: var(--key-shadow);
  display: flex; align-items: center; justify-content: center; overflow: visible; transition: transform .08s, border-color .1s, background .1s; }
.aw-ckey:hover { border-color: var(--accent); background: var(--accent-soft); transform: translate(-50%,-50%) scale(1.14); z-index: 3; }
.aw-ckey:active { transform: translate(-50%,-50%) scale(1.02); }
.aw--dwell .aw-ckey:hover .kd { opacity: .8; animation: kdfill 1.3s linear forwards; }
.aw-chub { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: var(--field); border: 1.5px solid var(--field-br); box-shadow: var(--key-shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px,1.6vh,14px); padding: 5%; }
.aw-chub-prev { max-width: 90%; font-size: clamp(17px,2.6vh,25px); font-weight: 800; color: var(--accent);
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-chub-prev.is-empty { color: var(--muted); font-weight: 700; opacity: .65; letter-spacing: .4px; }
.aw-chub-go { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: clamp(8px,1.5vh,13px) clamp(16px,2.4vw,26px); border-radius: 999px;
  border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-family: inherit; font-weight: 800;
  font-size: clamp(15px,2.1vh,20px); cursor: pointer; transition: transform .08s; }
.aw-chub-go.is-ready { background: var(--accent); color: var(--accent-ink); }
.aw-chub-go:active { transform: scale(.97); }
.aw-chub-go .aw-ic { width: clamp(18px,2.4vh,22px); height: clamp(18px,2.4vh,22px); }
.aw-chub-ctrl { display: flex; gap: 8px; }
.aw-chub-b { position: relative; width: clamp(44px,6vh,54px); height: clamp(44px,6vh,54px); border-radius: 14px; border: 1.5px solid var(--key-br);
  background: var(--key); color: var(--muted); display: grid; place-items: center; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 15px; }
.aw-chub-b.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.aw-chub-b .aw-ic { width: 22px; height: 22px; }
.aw-wt { flex: 0 0 168px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.aw-wt-go { flex: 1 1 0; min-height: 0; border-radius: var(--radius); border: 2.5px solid var(--accent); background: var(--accent-soft);
  color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
  font-family: inherit; box-shadow: var(--key-shadow); transition: transform .08s, background .12s; padding: 8px; }
.aw-wt-go.is-ready { background: var(--accent); color: var(--accent-ink); }
.aw-wt-go:active { transform: scale(.98); }
.aw-wt-prev { font-size: 21px; font-weight: 800; line-height: 1.1; text-align: center; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.aw-wt-lab { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; }
.aw-wt-lab .aw-ic { width: 20px; height: 20px; }
.aw-wt-reset { flex: 0 0 62px; border-radius: var(--radius); border: 1.5px solid var(--key-br); background: var(--key); color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 9px; font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: var(--key-shadow); }
.aw-wt-reset:hover { border-color: var(--accent); color: var(--accent); }
.aw-wt-reset .aw-ic { width: 20px; height: 20px; }

/* ===== Menü (Vollbild, große Kacheln) ===== */
.aw-menu-scrim { position: fixed; inset: 0; background: rgba(15,22,33,.42); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.aw-menu { width: min(1180px, 96vw); height: 94vh; max-height: 94vh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.32); padding: 22px 26px 24px; animation: drawerIn .26s cubic-bezier(.25,1,.5,1); }
.aw-menu-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.aw-menu-title { font-size: 27px; font-weight: 800; color: var(--txt); }
.aw-menu-close { display: inline-flex; align-items: center; gap: 11px; height: 60px; padding: 0 24px; border-radius: 16px;
  border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: var(--key-shadow); }
.aw-menu-close:hover { border-color: var(--accent); }
.aw-menu-close .aw-ic { width: 22px; height: 22px; color: var(--accent); }
.aw-menu-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.aw-menu-group { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.aw-menu-gtitle { flex: 0 0 auto; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.aw-menu-grid { flex: 1 1 0; min-height: 0; display: flex; gap: 14px; }
.aw-mtile { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-radius: 18px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit;
  cursor: pointer; box-shadow: var(--key-shadow); padding: 10px; transition: transform .08s, border-color .1s; }
.aw-mtile:hover { border-color: var(--accent); transform: translateY(-2px); }
.aw-mtile:active { transform: scale(.98); }
.aw-mtile-ic { width: 50px; height: 50px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: 0 0 auto; }
.aw-mtile-ic .aw-ic { width: 26px; height: 26px; }
.aw-mtile-lab { font-size: 17px; font-weight: 700; text-align: center; line-height: 1.1; }
.aw-mtile.is-on { border-color: var(--accent); background: var(--accent-soft); }
.aw-mtile.is-on .aw-mtile-ic { background: var(--accent); color: var(--accent-ink); }
.aw-mtile.is-danger .aw-mtile-ic { background: rgba(229,72,77,.12); color: #E5484D; }
.aw-mtile.is-danger .aw-mtile-lab { color: #E5484D; }

/* ===== Satz-Werkstatt ===== */
.aw-menu.aw-werk { display: flex; flex-direction: column; }
.aw-werk-sentence { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px 0; flex: 0 0 auto; }
.aw-werk-word { font-size: 28px; font-weight: 700; color: var(--txt); background: var(--key); border: 1.5px solid var(--key-br);
  border-bottom: 3px solid var(--key-br); border-radius: 12px; padding: 10px 18px; cursor: pointer; box-shadow: var(--key-shadow);
  font-family: inherit; transition: transform .08s, border-color .1s; }
.aw-werk-word:hover { border-color: var(--accent); transform: translateY(-1px); }
.aw-werk-word.is-sel { box-shadow: 0 0 0 3px var(--accent-soft), var(--key-shadow); border-color: var(--accent); }
.aw-werk-alts { flex: 1 1 0; min-height: 0; overflow-y: auto; border-top: 1.5px solid var(--key-br); padding-top: 14px; }
.aw-werk-altlab { font-size: 15px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.aw-werk-altrow { display: flex; flex-wrap: wrap; gap: 12px; }
.aw-werk-alt { font-size: 24px; font-weight: 700; color: var(--txt); background: var(--key); border: 1.5px solid var(--key-br);
  border-bottom: 3px solid var(--key-br); border-radius: 12px; padding: 12px 22px; cursor: pointer; box-shadow: var(--key-shadow); font-family: inherit; }
.aw-werk-alt:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.aw-werk-none { color: var(--muted); font-size: 17px; padding: 8px 0; }

/* ===== Kommunikationsseiten ===== */
.aw-menu.aw-comm { display: flex; flex-direction: column; }
.aw-comm-cur { color: var(--accent) !important; font-size: 20px !important; }
.aw-comm-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding-top: 14px; }
.aw-comm-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.aw-comm-cat { min-height: 120px; border-radius: 18px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  font-family: inherit; font-size: 21px; font-weight: 800; cursor: pointer; box-shadow: var(--key-shadow); padding: 14px;
  display: flex; align-items: center; justify-content: center; text-align: center; transition: transform .08s, border-color .1s; }
.aw-comm-cat:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.aw-comm-cat:active { transform: scale(.98); }
.aw-comm-cat.is-danger { border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.08); color: #E5484D; }
.aw-comm-cat.is-danger:hover { border-color: #E5484D; background: rgba(229,72,77,.14); }
.aw-comm-phrases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.aw-comm-phrase { min-height: 80px; border-radius: 16px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  font-family: inherit; font-size: 24px; font-weight: 700; cursor: pointer; box-shadow: var(--key-shadow); padding: 14px 20px;
  display: flex; align-items: center; text-align: left; transition: transform .08s, border-color .1s; }
.aw-comm-phrase:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.aw-comm-phrase:active { transform: scale(.99); }
.aw-comm-phrases.is-danger .aw-comm-phrase { border-color: rgba(229,72,77,.4); }
.aw-comm-phrases.is-danger .aw-comm-phrase:hover { border-color: #E5484D; background: rgba(229,72,77,.12); color: #E5484D; }

/* ===== Persönliche Wörter ===== */
.aw-menu.aw-words { display: flex; flex-direction: column; }
.aw-words-add { display: flex; gap: 10px; margin: 14px 0 16px; flex: 0 0 auto; }
.aw-words-input { flex: 1; height: 56px; border-radius: 14px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-size: 18px; padding: 0 18px; }
.aw-words-input:focus { outline: none; border-color: var(--accent); }
.aw-words-type { height: 56px; border-radius: 14px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-size: 16px; padding: 0 12px; cursor: pointer; }
.aw-words-addbtn { height: 56px; padding: 0 24px; border-radius: 14px; border: 0; background: var(--accent); color: var(--accent-ink); font-family: inherit; font-weight: 800; font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.aw-words-addbtn .aw-ic { width: 20px; height: 20px; }
.aw-words-addbtn:active { transform: scale(.97); }
.aw-words-list { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; }
.aw-words-chip { display: inline-flex; align-items: center; gap: 11px; padding: 11px 12px 11px 18px; border-radius: 14px; border: 1.5px solid var(--key-br); border-bottom: 3px solid var(--key-br); background: var(--key); box-shadow: var(--key-shadow); height: 56px; }
.aw-words-w { font-size: 20px; font-weight: 700; color: var(--txt); }
.aw-words-t { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.aw-words-x { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--track); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.aw-words-x .aw-ic { width: 18px; height: 18px; }
.aw-words-x:hover { background: rgba(229,72,77,.15); color: #E5484D; }
.aw-words-empty { color: var(--muted); font-size: 16px; max-width: 600px; line-height: 1.5; padding: 24px 8px; }

/* ===== Satz-Board ===== */
.aw-menu.aw-sb { display: flex; flex-direction: column; }
.aw-sb-tools { display: flex; gap: 10px; margin: 14px 0 10px; flex: 0 0 auto; }
.aw-sb-tool { width: 56px; height: 56px; flex: 0 0 auto; border-radius: 14px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.aw-sb-tool .aw-ic { width: 22px; height: 22px; }
.aw-sb-tool:hover { border-color: var(--accent); color: var(--accent); }
.aw-sb-packs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; flex: 0 0 auto; }
.aw-sb-packlab { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.aw-sb-pack { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.aw-sb-pack:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.aw-sb-body { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.aw-sb-group { margin-bottom: 16px; }
.aw-sb-gtitle { font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 4px 0 8px; }
.aw-sb-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.aw-sb-chip { display: flex; align-items: stretch; flex: 0 0 auto; width: 100%; max-width: 760px; min-height: 96px; border-radius: 16px;
  border: 1.5px solid var(--key-br); border-bottom: 3px solid var(--key-br); background: var(--key); box-shadow: var(--key-shadow); overflow: hidden; }
.aw-sb-chip:hover { border-color: var(--accent); }
.aw-sb-text { position: relative; flex: 1; border: 0; background: transparent; color: var(--txt); font-family: inherit; font-size: 23px;
  font-weight: 700; padding: 16px 20px; cursor: pointer; text-align: left; display: flex; align-items: center; line-height: 1.2; }
.aw-sb-chip:hover { border-color: var(--accent); }
.aw-sb-chip:hover .aw-sb-text { background: var(--accent-soft); }
.aw-sb-pin { border: 0; border-left: 1.5px solid var(--key-br); background: transparent; color: var(--key-br); width: 46px; display: grid; place-items: center; cursor: pointer; }
.aw-sb-pin .aw-ic { width: 20px; height: 20px; }
.aw-sb-pin:hover { color: var(--accent); }
.aw-sb-pin.is-on { color: var(--accent); }
.aw-sb-pin.is-on .aw-ic { fill: var(--accent); }
.aw-sent-more { color: var(--accent); border-style: dashed; font-weight: 800; }

/* ===== AssistUK-Logo + Menü-Footer ===== */
.aw-auk-logo { height: 1.05em; width: auto; vertical-align: -0.12em; color: var(--txt); }
.aw-menu-foot { flex: 0 0 auto; display: flex; justify-content: center; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--key-br); }
.aw-menu-foot-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; cursor: pointer;
  font-family: inherit; color: var(--muted); font-size: 14px; font-weight: 700; padding: 8px 14px; border-radius: 12px; }
.aw-menu-foot-btn:hover { background: var(--accent-soft); color: var(--accent); }
.aw-menu-foot-logo { height: 20px; color: var(--txt); }
.aw-menu-foot-lab { font-size: 13px; }
.aw-menu-foot-legal { font-size: 13px; }

/* ===== Info & Rechtliches ===== */
.aw-menu.aw-info { display: flex; flex-direction: column; }
.aw-info-tabs { flex: 0 0 auto; display: flex; gap: 6px; background: var(--track); padding: 5px; border-radius: 14px; margin: 12px 0 4px; }
.aw-info-tab { flex: 1; border: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 16px; font-weight: 700; padding: 12px; border-radius: 10px; cursor: pointer; min-height: 50px; }
.aw-info-tab.is-on { background: var(--accent); color: var(--accent-ink); }
.aw-info-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 8px 4px 4px; }
.aw-legal { max-width: 720px; }
.aw-legal-title { font-size: 24px; font-weight: 800; color: var(--txt); margin: 6px 0 14px; }
.aw-legal-h { font-size: 16px; font-weight: 800; color: var(--accent); margin: 18px 0 4px; }
.aw-legal-p { font-size: 16px; line-height: 1.55; color: var(--txt); margin: 0 0 10px; }
.aw-legal-p a { color: var(--accent); }
.aw-legal-stand { color: var(--muted); font-size: 14px; }
.aw-info-brand { display: flex; align-items: center; gap: 16px; margin: 8px 0 18px; }
.aw-info-applogo { width: 60px; height: 60px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: 0 0 auto; }
.aw-info-applogo .aw-ic { width: 32px; height: 32px; }
.aw-info-appname { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--txt); }
.aw-info-tag { font-size: 15px; font-weight: 700; color: var(--muted); }
.aw-info-maker { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); }
.aw-info-makerlab { font-size: 15px; font-weight: 700; color: var(--muted); }
.aw-info-auk { height: 30px; color: var(--txt); }
.aw-info-links { display: flex; gap: 18px; margin-top: 8px; }
.aw-info-links a { color: var(--accent); font-weight: 700; font-size: 16px; }

/* ===== Popover (Bearbeiten / Teilen) ===== */
.aw-pop-scrim { position: fixed; inset: 0; z-index: 40; }
.aw-pop { position: absolute; top: 74px; width: 308px; background: var(--key); border: 1.5px solid var(--key-br);
  border-radius: 18px; box-shadow: 0 18px 50px rgba(15,25,45,.22); padding: 10px; animation: popIn .18s ease-out both; }
.aw-pop--edit { right: 162px; } .aw-pop--share { right: 88px; }
@keyframes popIn { from { transform: translateY(-8px); } to { transform: none; } }
.aw-pop-title { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 8px 12px 6px; }
.aw-pop-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 11px 12px; border: 0; background: transparent;
  border-radius: 12px; cursor: pointer; color: var(--txt); font-family: inherit; text-align: left; }
.aw-pop-item:hover { background: var(--accent-soft); }
.aw-pop-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--track); display: grid; place-items: center; color: var(--muted); flex: 0 0 auto; }
.aw-pop-item:hover .aw-pop-ic { color: var(--accent); }
.aw-pop-ic .aw-ic { width: 21px; height: 21px; }
.aw-pop-txt { font-size: 17px; font-weight: 700; display: flex; flex-direction: column; }
.aw-pop-sub { font-size: 13px; font-weight: 500; color: var(--muted); }
.aw-pop-item.is-danger .aw-pop-ic { color: #E5484D; }
.aw-pop-item.is-danger .aw-pop-txt { color: #E5484D; }

/* ===== Einstellungen (Drawer) ===== */
.aw-drawer-scrim { position: fixed; inset: 0; background: rgba(15,22,33,.34); z-index: 50; display: flex; justify-content: flex-end; }
.aw-drawer { width: 430px; max-width: 94vw; height: 100%; background: var(--key); border-left: 1.5px solid var(--key-br);
  box-shadow: -24px 0 70px rgba(0,0,0,.22); display: flex; flex-direction: column; animation: drawerIn .28s cubic-bezier(.25,1,.5,1); }
@keyframes drawerIn { from { transform: translateX(48px); } to { transform: none; } }
.aw-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; font-size: 21px; font-weight: 800;
  color: var(--txt); border-bottom: 1.5px solid var(--key-br); }
.aw-drawer-x { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--key-br); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.aw-drawer-x .aw-ic { width: 22px; height: 22px; }
.aw-drawer-body { padding: 4px 24px 36px; overflow-y: auto; }
.set-group { font-size: 12.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--key-br); }
.set-lab-t { font-size: 17.5px; font-weight: 700; color: var(--txt); }
.set-lab-s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.set-toggle { width: 72px; height: 42px; border-radius: 999px; background: var(--track); border: 0; position: relative; cursor: pointer; transition: background .2s; flex: 0 0 auto; }
.set-toggle.is-on { background: var(--accent); }
.set-knob { position: absolute; top: 4px; left: 4px; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.set-toggle.is-on .set-knob { left: 34px; }
.set-step { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.set-step-b { width: 50px; height: 50px; border-radius: 12px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--accent); font-family: inherit; font-size: 26px; font-weight: 800; cursor: pointer; line-height: 1; }
.set-step-b:hover { border-color: var(--accent); background: var(--accent-soft); }
.set-step-b:active { transform: scale(.96); }
.set-step-val { min-width: 86px; text-align: center; font-size: 17px; font-weight: 800; color: var(--txt); }
.set-seg { display: flex; gap: 4px; background: var(--track); padding: 4px; border-radius: 13px; flex: 0 0 auto; }
.set-seg-b { border: 0; background: transparent; color: var(--muted); font-family: inherit; font-weight: 700; font-size: 16px; padding: 12px 18px; border-radius: 9px; cursor: pointer; min-height: 50px; }
.set-seg-b.is-on { background: var(--accent); color: var(--accent-ink); }
.set-schemes { display: flex; flex-direction: column; gap: 8px; }
.set-scheme { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--key-br); background: transparent; cursor: pointer; font-family: inherit; color: var(--txt); }
.set-scheme.is-on { border-color: var(--accent); background: var(--accent-soft); }
.set-sw { width: 42px; height: 42px; border-radius: 11px; border: 1px solid rgba(0,0,0,.14); display: grid; place-items: center; flex: 0 0 auto; }
.set-sw-dot { width: 18px; height: 18px; border-radius: 50%; }
.set-scheme-t { font-size: 17px; font-weight: 700; }
.set-scheme-s { font-size: 13.5px; color: var(--muted); margin-left: auto; }
.set-scheme-ck { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-left: 12px; flex: 0 0 auto; }
.set-scheme-ck .aw-ic { width: 15px; height: 15px; }
.set-voicewrap { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.set-voice { max-width: 220px; height: 50px; border-radius: 12px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-size: 15px; padding: 0 10px; cursor: pointer; }
.set-voice-play { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 12px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.set-voice-play:hover { border-color: var(--accent); background: var(--accent-soft); }
.set-voice-play .aw-ic { width: 22px; height: 22px; }
.set-hl { display: flex; gap: 8px; flex: 0 0 auto; }
.set-hl-sw { width: 42px; height: 42px; border-radius: 11px; border: 2px solid rgba(0,0,0,.15); cursor: pointer; display: grid; place-items: center; color: #fff; }
.set-hl-sw.is-on { box-shadow: 0 0 0 3px var(--accent); }
.set-hl-sw .aw-ic { width: 18px; height: 18px; }
.set-layouts { flex-direction: row; flex-wrap: wrap; }
.set-lay { flex: 1 1 42%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px; border-radius: 14px; border: 1.5px solid var(--key-br); background: transparent; font-family: inherit; font-weight: 700; font-size: 16px; color: var(--txt); cursor: pointer; position: relative; }
.set-lay.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ===== KI-Korrektur-Modal ===== */
.aw-aimodal { width: min(680px, 94vw); background: var(--bg); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.32);
  padding: 24px 26px; animation: drawerIn .24s cubic-bezier(.25,1,.5,1); }
.aw-aimodal-head { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--txt); margin-bottom: 16px; }
.aw-aimodal-head .aw-ic { width: 24px; height: 24px; color: var(--accent); }
.aw-aimodal-row { margin-bottom: 14px; }
.aw-aimodal-lab { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.aw-aimodal-orig { font-size: 19px; color: var(--muted); padding: 10px 14px; border-radius: 12px; background: var(--track); }
.aw-aimodal-new { font-size: 21px; font-weight: 700; color: var(--txt); padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.aw-aimodal-btns { display: flex; gap: 12px; margin-top: 18px; }
.aw-aimodal-cancel, .aw-aimodal-ok { flex: 1; height: 60px; border-radius: 16px; font-family: inherit; font-weight: 800; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; border: 1.5px solid var(--key-br); }
.aw-aimodal-cancel { background: var(--key); color: var(--muted); }
.aw-aimodal-cancel:hover { border-color: #E5484D; color: #E5484D; }
.aw-aimodal-ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.aw-aimodal-ok:active, .aw-aimodal-cancel:active { transform: scale(.98); }
.aw-aimodal-cancel .aw-ic, .aw-aimodal-ok .aw-ic { width: 20px; height: 20px; }
.aw-aibusy { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff;
  padding: 12px 22px; border-radius: 14px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; z-index: 70; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.aw-aibusy-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: awSpin .8s linear infinite; }
@keyframes awSpin { to { transform: rotate(360deg); } }

/* ===== Toast ===== */
.aw-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff;
  padding: 12px 20px; border-radius: 14px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 60; animation: toastIn .22s ease-out both; }
@keyframes toastIn { from { transform: translate(-50%, 10px); } to { transform: translateX(-50%); } }
.aw-toast .aw-ic { width: 20px; height: 20px; color: #34d399; }

/* ==========================================================================
   Seiten-System — ganzseitig, 10x6-Hilfraster, Footer unten
   Jede Seite = vollflächiges Grid: Kopf (Reihe 1) · Inhalt (Reihen 2-5) · Footer (Reihe 6).
   Buttons orientieren sich am 10er-Spaltenraster, mindestens 1 Zelle gross.
   ========================================================================== */
:root { --page-pad: clamp(16px, 2.4vh, 30px); --page-gap: clamp(10px, 1.3vw, 18px); --cell-h: clamp(74px, 12.4vh, 130px); }

.aw-page { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--txt);
  display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(6, 1fr);
  gap: var(--page-gap); padding: var(--page-pad); animation: awPageIn .18s ease-out both; }
@keyframes awPageIn { from { opacity: 0; transform: scale(.99); } to { opacity: 1; transform: none; } }

.aw-page-head { grid-column: 1 / 11; grid-row: 1; display: flex; align-items: center; gap: 18px; min-height: 0; }
.aw-page-title { font-size: clamp(23px, 3.3vh, 33px); font-weight: 800; color: var(--txt); white-space: nowrap; }
.aw-page-sub { font-size: clamp(18px, 2.4vh, 24px); font-weight: 800; color: var(--accent); }
.aw-page-back { display: inline-flex; align-items: center; gap: 10px; height: 64px; padding: 0 24px; border-radius: 16px;
  border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt); font-family: inherit; font-weight: 800;
  font-size: 19px; cursor: pointer; box-shadow: var(--key-shadow); }
.aw-page-back:hover { border-color: var(--accent); color: var(--accent); }
.aw-page-back .aw-ic { width: 24px; height: 24px; }
.aw-page-head-sp { flex: 1 1 auto; }

/* Body = Blättern statt Scrollen: overflow hidden, Inhalt in Seiten gemessen.
   Mess-Container (.aw-page-meas) liegt unsichtbar deckungsgleich darüber. */
.aw-page-body { grid-column: 1 / 11; grid-row: 2 / 6; min-height: 0; position: relative; overflow: hidden; }
.aw-page-body.is-scroll { overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.aw-page-meas { position: absolute; top: 0; left: 0; right: 0; height: auto; visibility: hidden; pointer-events: none; }
.aw-page-vis { min-height: 0; }
.aw-page-body.is-grid, .aw-page-vis.is-grid, .aw-page-meas.is-grid {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: var(--page-gap); grid-auto-rows: auto; align-content: start; }
.aw-page-body.is-list, .aw-page-vis.is-list, .aw-page-meas.is-list { display: flex; flex-direction: column; gap: var(--page-gap); }
.is-list .set-schemes, .is-list .set-layouts { width: 100%; }
.aw-page-body.is-wrap, .aw-page-vis.is-wrap, .aw-page-meas.is-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-content: start; }
.is-wrap .aw-words-add { flex: 1 1 100%; }
/* Rechtstext: Abstände nur über gap (sonst stimmt die Seiten-Messung nicht) */
.is-list.aw-legal .aw-legal-p, .is-list.aw-legal .aw-legal-h, .is-list.aw-legal .aw-legal-title { margin: 0; }
.is-list.aw-legal .aw-legal-h { margin-top: 6px; }

/* Pager (Blättern) — Footer-Mitte */
.aw-pager { display: inline-flex; align-items: center; gap: 12px; }
.aw-pager-btn { position: relative; width: 72px; height: 64px; border-radius: 16px; border: 1.5px solid var(--key-br);
  background: var(--key); color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--key-shadow); font-family: inherit; }
.aw-pager-btn:hover { border-color: var(--accent); }
.aw-pager-btn .aw-ic { width: 30px; height: 30px; }
.aw-pager-btn.is-off { opacity: .35; pointer-events: none; }
.aw-pager-lab { font-size: 17px; font-weight: 800; color: var(--txt); min-width: 116px; text-align: center; }

.aw-page-foot { grid-column: 1 / 11; grid-row: 6; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; border-top: 1px solid var(--key-br); min-height: 0; }
.aw-page-foot-brand { display: inline-flex; align-items: center; gap: 9px; background: transparent; border: 0; cursor: pointer;
  color: var(--muted); padding: 10px 14px; border-radius: 12px; font-family: inherit; }
.aw-page-foot-brand:hover { background: var(--accent-soft); color: var(--accent); }
.aw-page-foot-logo { height: 22px; color: var(--txt); }
.aw-page-foot-lab, .aw-page-foot-legal { font-size: 13px; font-weight: 700; }
.aw-page-foot-actions { display: inline-flex; align-items: center; gap: 12px; }
.aw-page-done { display: inline-flex; align-items: center; gap: 12px; height: 72px; min-width: 210px; justify-content: center;
  padding: 0 34px; border-radius: 18px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-family: inherit; font-weight: 800; font-size: 22px; cursor: pointer; box-shadow: 0 6px 18px rgba(20,30,50,.14); }
.aw-page-done:hover { filter: brightness(1.06); }
.aw-page-done:active { transform: scale(.98); }
.aw-page-done .aw-ic { width: 26px; height: 26px; }
.aw-page-foot-2 { height: 72px; padding: 0 26px; border-radius: 18px; border: 1.5px solid var(--key-br); background: var(--key);
  color: var(--txt); font-family: inherit; font-weight: 800; font-size: 19px; cursor: pointer; display: inline-flex;
  align-items: center; gap: 10px; box-shadow: var(--key-shadow); }
.aw-page-foot-2:hover { border-color: var(--accent); color: var(--accent); }
.aw-page-foot-2 .aw-ic { width: 22px; height: 22px; }

/* Raster-Kacheln: orientieren sich am 10er-Spaltenraster, min. 1 Zelle */
.aw-gtile { grid-column: span 2; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 8px; min-height: var(--cell-h); border-radius: 18px; border: 1.5px solid var(--key-br); border-bottom: 3px solid var(--key-br);
  background: var(--key); box-shadow: var(--key-shadow); color: var(--txt); font-family: inherit; cursor: pointer;
  padding: 14px 20px; text-align: left; }
.aw-gtile:hover { border-color: var(--accent); transform: translateY(-2px); }
.aw-gtile:active { transform: scale(.985); }
.aw-gtile.is-on { border-color: var(--accent); background: var(--accent-soft); }
.aw-gtile.is-danger { border-color: rgba(229,72,77,.45); background: rgba(229,72,77,.07); color: #E5484D; }
.aw-gtile.is-danger:hover { border-color: #E5484D; background: rgba(229,72,77,.13); }
.aw-gtile-ic { width: 34px; height: 34px; color: var(--accent); flex: 0 0 auto; }
.aw-gtile.is-danger .aw-gtile-ic { color: #E5484D; }
.aw-gtile-lab { font-size: clamp(17px, 2.3vh, 22px); font-weight: 800; line-height: 1.06; }
.aw-gtile-sub { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 1.15; }
.aw-gtile.is-on .aw-gtile-sub, .aw-gtile.is-danger .aw-gtile-sub { color: inherit; opacity: .8; }
.aw-gtile-ck { position: absolute; top: 12px; right: 14px; color: var(--accent); }
.aw-gtile-ck .aw-ic { width: 24px; height: 24px; }
/* Spannweiten (Spalten) */
.col1 { grid-column: span 1; } .col2 { grid-column: span 2; } .col3 { grid-column: span 3; }
.col4 { grid-column: span 4; } .col5 { grid-column: span 5; } .col6 { grid-column: span 6; }
.col7 { grid-column: span 7; } .col8 { grid-column: span 8; } .col10 { grid-column: span 10; }
.rspan2 { grid-row: span 2; }
/* Gruppen-Überschrift als ganze Rasterzeile */
.aw-grow { grid-column: 1 / 11; align-self: center; font-size: 13px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted); min-height: 0; padding: 10px 2px 2px; }

/* Einstellungs-Zeile als breite Rasterkachel (Label + Steuerung) */
.aw-prow { grid-column: 1 / 11; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: var(--cell-h); padding: 12px 22px; border-radius: 16px; border: 1.5px solid var(--key-br);
  background: var(--key); box-shadow: var(--key-shadow); }
.aw-prow-lab-t { font-size: clamp(17px, 2.2vh, 21px); font-weight: 800; color: var(--txt); }
.aw-prow-lab-s { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 3px; max-width: 60ch; line-height: 1.35; }

/* Dev-Raster (Taste „G") — exakt dieselben Grid-Maße wie .aw-page */
.aw-devgrid { position: fixed; inset: var(--page-pad); z-index: 90; pointer-events: none;
  display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(6, 1fr); gap: var(--page-gap); }
.aw-dgc { border: 1px dashed rgba(15,168,159,.45); border-radius: 6px; position: relative; }
.aw-dgc span { position: absolute; top: 3px; left: 5px; font-size: 10px; font-weight: 800; color: rgba(15,168,159,.7); }
.aw-devgrid-tag { position: fixed; right: var(--page-pad); bottom: calc(var(--page-pad) + 4px); z-index: 91;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }

/* ==========================================================================
   Lesehilfen (für Lese-/Schreibschwäche) — wirken im Mitteilungsfeld
   ========================================================================== */
.aw--dys, .aw--dys input, .aw--dys select, .aw--dys button, .aw--dys textarea {
  font-family: 'OpenDyslexic', 'Atkinson Hyperlegible', system-ui, sans-serif; }
.aw-field { position: relative; }
.aw-field.aw-ls-weit  { letter-spacing: .05em; }
.aw-field.aw-ls-extra { letter-spacing: .11em; }
.aw-field.aw-ws-weit .aw-field-text { gap: 14px 22px; }
.aw-field.aw-lh-weit  .aw-field-text { line-height: 1.7; }
.aw-field.aw-lh-extra .aw-field-text { line-height: 2.05; }
/* Leselineal: Markierungsband auf der Cursor-Zeile */
.aw-ruler { position: absolute; left: 10px; right: 10px; top: 0; height: 40px; z-index: 0; opacity: 0;
  background: var(--accent-soft); border-radius: 8px; pointer-events: none; transition: top .12s ease, height .12s ease, opacity .12s; }
.aw-ruler-on .aw-field-text { position: relative; z-index: 1; }

/* ==========================================================================
   Tastersteuerung (Scanning) — Leuchtrahmen-Overlay (immun gegen Re-Renders)
   ========================================================================== */
.aw-scan-overlay { position: fixed; pointer-events: none; z-index: 95; border-radius: 12px; box-sizing: border-box; display: none;
  transition: left .1s ease, top .1s ease, width .1s ease, height .1s ease; }
.aw-scan-overlay.is-group { border: 4px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(15,168,159,.22), 0 0 16px rgba(15,168,159,.45); }
.aw-scan-overlay.is-item { border: 4px solid #ff7a00;
  box-shadow: 0 0 0 4px rgba(255,122,0,.30), 0 0 18px rgba(255,122,0,.55); }

/* ==========================================================================
   Dwell-frei (Augen-Tippen) — Statusleiste + Erfassungs-Feedback
   ========================================================================== */
/* Dwell-frei-Leiste (3 Zonen): LINKS Korrektur | MITTE Wort+Fertig (zentriert) | RECHTS Neu (isoliert) */
.aw-swbar { display: flex; align-items: stretch; gap: 12px; }
.aw-swbar-zone { flex: 1 1 0; min-width: 0; display: flex; align-items: stretch; gap: 12px; }
.aw-swbar-zone--l { justify-content: flex-start; }
.aw-swbar-zone--r { justify-content: flex-end; }     /* großer Abstand isoliert „Neu" rechts */
.aw-swbar-center { flex: 0 0 auto; display: flex; align-items: stretch; gap: 14px; }
/* Wort-Anzeige: feste Breite -> „Fertig" bleibt ortsfest (Blick-Muskelgedächtnis); rechtsbündig neben Fertig */
.aw-swbar-word { width: clamp(150px, 27vw, 360px); display: flex; align-items: center; justify-content: flex-end;
  text-align: right; font-size: clamp(22px, 3.4vh, 34px); font-weight: 800; color: var(--txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--key); border: 1.5px solid var(--key-br); border-radius: 16px; padding: 0 22px; box-shadow: var(--key-shadow); }
.aw-swbar-word.is-buf   { letter-spacing: .1em; text-transform: lowercase; }
.aw-swbar-word.is-word  { color: var(--accent); }
.aw-swbar-word.is-empty { color: var(--muted); font-weight: 600; font-size: clamp(15px, 2.2vh, 20px); justify-content: center; }
.aw-swbar-btn { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-width: 116px; border-radius: 16px; border: 1.5px solid var(--key-br); background: var(--key); color: var(--txt);
  font-family: inherit; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: var(--key-shadow); padding: 10px 18px; }
.aw-swbar-btn .aw-ic { width: 26px; height: 26px; }
.aw-swbar-undo:hover, .aw-swbar-dbl:hover { border-color: var(--accent); color: var(--accent); }
/* Fertig: größtes Ziel + Akzent, wenn ein Wort bereit ist */
.aw-swbar-go { min-width: 168px; font-size: 19px; }
.aw-swbar-go .aw-ic { width: 30px; height: 30px; }
.aw-swbar-go.is-ready { background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 18px rgba(15,168,159,.34); }
.aw-swbar-go.is-ready .aw-ic { color: var(--accent-ink); }
/* Neu: Warn-Outline (nicht gefüllt), klar abgesetzt -> kein versehentliches Verwerfen neben „Fertig" */
.aw-swbar-new { border-color: rgba(229,72,77,.45); color: #E5484D; background: rgba(229,72,77,.06); }
.aw-swbar-new .aw-ic { width: 24px; height: 24px; color: #E5484D; }
.aw-swbar-new:hover { border-color: #E5484D; background: rgba(229,72,77,.12); }
.aw-swbar-btn.is-dim { opacity: .4; pointer-events: none; }
/* aufblitzender Buchstabe bei Erfassung */
.aw-capflash { position: absolute; transform: translate(-50%,-50%); font-size: 66px; font-weight: 800; color: var(--accent);
  pointer-events: none; z-index: 6; animation: awCapFlash .36s ease-out forwards; }
@keyframes awCapFlash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.6); }
  30% { opacity: .95; transform: translate(-50%,-50%) scale(1.08); }
  100% { opacity: 0; transform: translate(-50%,-64%) scale(1.3); } }
