/* Entscheidungsschicht (entscheiden.js). Nutzt die Tokens der Seite, mit Rückfall, falls eine Vorschau sie nicht hat.
   Gold hat auf der Seite die Rolle „Handlung, offen“, deshalb sind offene Punkte gold und entschiedene anthrazit. */
[data-ent-weg] { display: none !important; }
.ent-schicht { position: absolute; inset: 0 auto auto 0; width: 0; height: 0; z-index: 15; }
.ent-aus .ent-schicht { display: none; }

.ent-punkt { position: absolute; top: 0; left: 0; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--gold, #FCCB0C); color: var(--anthrazit, #2B2B2A); font: 700 .875rem/1 var(--font-text, system-ui); font-variant-numeric: tabular-nums; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 3px var(--papier, #fff); transition-property: scale, background-color, color; transition-duration: .16s; }
.ent-punkt::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.ent-punkt:active { scale: .9; }
.ent-punkt svg, .ent-nr svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ent-punkt.ent-fertig { background: var(--anthrazit, #2B2B2A); color: var(--gold, #FCCB0C); }
.ent-punkt.ent-aktiv { box-shadow: 0 0 0 3px var(--papier, #fff), 0 0 0 5px var(--anthrazit, #2B2B2A); }
.ent-punkt:focus-visible { outline: 2px solid var(--anthrazit, #2B2B2A); outline-offset: 3px; }
@media (hover: hover) {
  .ent-punkt::after { content: attr(data-titel); position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%; width: max-content; max-width: 17rem; padding: .4rem .65rem; border-radius: 6px; background: var(--anthrazit, #2B2B2A); color: var(--hell, #F4F2EE); font: 500 var(--text-sm, .9rem)/1.35 var(--font-text, system-ui); text-align: left; pointer-events: none; opacity: 0; transition: opacity .15s; }
  .ent-punkt:hover::after, .ent-punkt:focus-visible::after { opacity: 1; }
  .ent-punkt:not(.ent-fertig):hover { background: color-mix(in oklab, var(--gold, #FCCB0C) 88%, #000); }
}
@media (prefers-reduced-motion: no-preference) {
  .ent-punkt:not(.ent-fertig) { animation: ent-puls 2.2s ease-out .8s 2; }
  @keyframes ent-puls {
    0% { box-shadow: 0 0 0 3px var(--papier, #fff), 0 0 0 3px color-mix(in oklab, var(--gold, #FCCB0C) 70%, transparent); }
    70%, 100% { box-shadow: 0 0 0 3px var(--papier, #fff), 0 0 0 16px transparent; }
  }
}
.ent-ziel { outline: 2px solid var(--gold, #FCCB0C); outline-offset: 8px; border-radius: 4px; }
.ent-aus .ent-ziel { outline: 0; }

/* Leiste unten links: Fortschritt, nächste Frage, Punkte aus */
.ent-leiste { position: fixed; left: 16px; bottom: calc(var(--ent-unten, 0px) + 16px); z-index: 40; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--r-pille, 999px); background: var(--anthrazit, #2B2B2A); color: var(--hell, #F4F2EE); font: 600 var(--text-sm, .9rem)/1 var(--font-text, system-ui); }
.ent-leiste button { display: inline-flex; align-items: center; gap: .6rem; min-height: 40px; padding: 0 .9rem; border: 0; border-radius: var(--r-pille, 999px); background: transparent; color: inherit; font: inherit; cursor: pointer; transition-property: background-color, scale; transition-duration: .16s; }
.ent-leiste button:hover { background: rgb(255 255 255 / .09); }
.ent-leiste button:active { scale: .96; }
.ent-leiste button:focus-visible { outline: 2px solid var(--gold, #FCCB0C); outline-offset: 1px; }
.ent-leiste .ent-knopf-gold { background: var(--gold, #FCCB0C); color: var(--anthrazit, #2B2B2A); }
.ent-leiste .ent-knopf-gold:hover { background: color-mix(in oklab, var(--gold, #FCCB0C) 88%, #000); }
.ent-stand { font-variant-numeric: tabular-nums; }
.ent-balken { display: inline-flex; gap: 2px; }
.ent-balken i { width: 7px; height: 12px; border-radius: 2px; background: var(--linie-dunkel, #45443F); }
.ent-balken i.voll { background: var(--gold, #FCCB0C); }
.ent-auge { padding: 0 !important; width: 40px; justify-content: center; }
.ent-auge svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ent-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Karte: am Computer rechts unten, am Handy als Blatt von unten */
.ent-karte { position: fixed; right: 16px; bottom: calc(var(--ent-unten, 0px) + 16px); z-index: 45; width: min(410px, calc(100vw - 32px)); max-height: min(80vh, 760px); overflow: auto; overscroll-behavior: contain; padding: 1rem 1.25rem 1.25rem; border: 1px solid var(--rahmen, #807C74); border-radius: var(--r-flaeche, 12px); background: var(--papier, #FAF9F6); color: var(--anthrazit, #2B2B2A); font: 400 var(--text-ui, 1rem)/1.5 var(--font-text, system-ui); box-shadow: 0 10px 30px -12px rgb(43 43 42 / .28); }
.ent-karte[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .ent-karte { opacity: 0; translate: 0 10px; transition-property: opacity, translate; transition-duration: .22s; transition-timing-function: cubic-bezier(.2, .7, .2, 1); }
  .ent-karte.ent-offen { opacity: 1; translate: 0 0; }
}
.ent-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -.25rem -.5rem .25rem 0; }
.ent-marke { font: 500 var(--text-meta, .8125rem)/1.2 var(--font-mono, ui-monospace, monospace); letter-spacing: .04em; text-transform: uppercase; color: var(--grau, #57554F); }
.ent-marke-knopf { min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.ent-marke-knopf:hover { color: var(--anthrazit, #2B2B2A); text-decoration: underline; text-underline-offset: .25em; }
.ent-marke-knopf:focus-visible { outline: 2px solid var(--anthrazit, #2B2B2A); outline-offset: 2px; }
.ent-zu { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--anthrazit, #2B2B2A); cursor: pointer; }
.ent-zu:hover { background: var(--stein, #EEEBE5); }
.ent-zu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ent-karte h2 { margin: 0 0 .4rem; font: var(--kopf-gewicht, 700) clamp(1.25rem, 1.15rem + .3vw, 1.4rem)/1.25 var(--font-kopf, Georgia, serif); letter-spacing: var(--kopf-laufweite, 0); text-wrap: balance; }
.ent-karte h2:focus { outline: 0; }
.ent-kontext { margin: 0; color: var(--grau, #57554F); font-size: var(--text-sm, .9rem); text-wrap: pretty; }
.ent-gruss { margin: .75rem 0 0; font: 600 var(--text-ui, 1rem)/1 var(--font-kopf, Georgia, serif); }

.ent-optionen { display: grid; gap: .5rem; margin: 1rem 0 .5rem; }
.ent-option { display: grid; gap: .3rem; width: 100%; min-height: 48px; padding: .75rem .9rem; border: 1.5px solid var(--linie, #DAD6CE); border-radius: var(--r-klein, 10px); background: var(--papier, #FAF9F6); color: var(--anthrazit, #2B2B2A); font: inherit; text-align: left; cursor: pointer; transition-property: border-color, background-color, scale; transition-duration: .16s; }
.ent-option:hover { border-color: var(--rahmen, #807C74); }
.ent-option:active { scale: .985; }
.ent-option[aria-pressed="true"] { border-color: var(--anthrazit, #2B2B2A); background: var(--stein, #EEEBE5); }
.ent-option:focus-visible, .ent-knopf:focus-visible, .ent-knopf-haupt:focus-visible, .ent-knopf-gold:focus-visible, .ent-zu:focus-visible, .ent-liste button:focus-visible, .ent-textknopf:focus-visible, .ent-notiz summary:focus-visible { outline: 2px solid var(--anthrazit, #2B2B2A); outline-offset: 2px; }
.ent-option-kopf { display: flex; align-items: center; gap: .6rem; }
.ent-option-kopf strong { font-weight: 600; margin-right: auto; }
.ent-tipp { flex: none; padding: .15rem .5rem; border-radius: var(--r-pille, 999px); background: var(--gold, #FCCB0C); font: 600 var(--text-meta, .8125rem)/1.3 var(--font-text, system-ui); font-style: normal; white-space: nowrap; }
.ent-kreis { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rahmen, #807C74); color: transparent; }
.ent-kreis svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
[aria-pressed="true"] .ent-kreis { background: var(--anthrazit, #2B2B2A); box-shadow: none; color: var(--hell, #F4F2EE); }
.ent-option-text { color: var(--grau, #57554F); font-size: var(--text-sm, .9rem); line-height: 1.45; text-wrap: pretty; }
.ent-feld, .ent-notiz textarea, .ent-sonst textarea { width: 100%; box-sizing: border-box; padding: .65rem .8rem; border: 1.5px solid var(--rahmen, #807C74); border-radius: var(--r-klein, 10px); background: #fff; color: var(--anthrazit, #2B2B2A); font: 400 var(--text-ui, 1rem)/1.45 var(--font-text, system-ui); resize: vertical; }
.ent-feld:focus, .ent-notiz textarea:focus, .ent-sonst textarea:focus { outline: 2px solid var(--anthrazit, #2B2B2A); outline-offset: 0; border-color: transparent; }
.ent-notiz summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--grau, #57554F); font-size: var(--text-sm, .9rem); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; list-style: none; }
.ent-notiz summary::-webkit-details-marker { display: none; }

.ent-fuss { display: flex; justify-content: space-between; gap: .5rem; margin-top: .75rem; }
.ent-knopf, .ent-knopf-haupt, .ent-knopf-gold { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.1rem; border-radius: var(--r-pille, 999px); font: 600 var(--text-ui, 1rem)/1 var(--font-text, system-ui); text-decoration: none; cursor: pointer; transition-property: background-color, border-color, scale; transition-duration: .16s; }
.ent-knopf { border: 1.5px solid var(--rahmen, #807C74); background: transparent; color: var(--anthrazit, #2B2B2A); }
.ent-knopf:hover { border-color: var(--anthrazit, #2B2B2A); }
.ent-knopf:disabled { opacity: .4; cursor: default; }
.ent-knopf-haupt { border: 0; background: var(--anthrazit, #2B2B2A); color: var(--hell, #F4F2EE); }
.ent-knopf-haupt:hover { background: #000; }
.ent-knopf-gold { border: 0; background: var(--gold, #FCCB0C); color: var(--anthrazit, #2B2B2A); }
.ent-knopf-gold:hover { background: color-mix(in oklab, var(--gold, #FCCB0C) 88%, #000); }
.ent-knopf:active, .ent-knopf-haupt:active, .ent-knopf-gold:active { scale: .96; }

.ent-liste { list-style: none; margin: .75rem 0 1rem; padding: 0; }
.ent-liste button { display: flex; align-items: flex-start; gap: .75rem; width: 100%; padding: .6rem 0; border: 0; border-bottom: 1px solid var(--linie, #DAD6CE); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ent-liste button:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.ent-liste strong { display: block; font-weight: 600; font-size: var(--text-sm, .9rem); line-height: 1.35; }
.ent-liste small { display: block; margin-top: .15rem; color: var(--grau, #57554F); font-size: var(--text-sm, .9rem); line-height: 1.35; }
.ent-nr { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; border-radius: 50%; background: var(--gold, #FCCB0C); font: 700 var(--text-meta, .8125rem)/1 var(--font-text, system-ui); }
.ent-nr.ent-fertig { background: var(--anthrazit, #2B2B2A); color: var(--gold, #FCCB0C); }
.ent-nr svg { width: 13px; height: 13px; }
.ent-sonst { display: grid; gap: .4rem; font-weight: 600; font-size: var(--text-sm, .9rem); }
.ent-fuss-senden { flex-wrap: wrap; }
.ent-klein { margin: .9rem 0 0; color: var(--grau, #57554F); font-size: var(--text-meta, .8125rem); line-height: 1.45; }
.ent-textknopf { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

@media (max-width: 700px) {
  .ent-karte { left: 0; right: 0; bottom: 0; width: auto; max-height: 64vh; border-width: 1px 0 0; border-radius: 16px 16px 0 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  .ent-leiste { left: 12px; bottom: calc(var(--ent-unten, 0px) + 12px); }
  .ent-punkt::after { display: none; }
}
@media print { .ent-schicht, .ent-leiste, .ent-karte { display: none !important; } .ent-ziel { outline: 0; } }
