/* ladi play – portalweiter Fortschritt (portal-fortschritt.js) */
:root {
  --pf-navy: var(--brand-navy, #07184d);
  --pf-blue: var(--brand-blue, #086bff);
  --pf-cyan: var(--brand-cyan, #00c9f0);
  --pf-mint: var(--brand-mint, #16d9a6);
  --pf-ink: var(--ink, #0c2144);
  --pf-muted: var(--muted, #56667d);
  --pf-line: var(--line, #dbe7f1);
  --pf-soft: #f2f9ff;
  --pf-paper: #fff;
  --pf-gold: #e0a100;
}
.pf-icon, .pf-mini { width: 1em; height: 1em; flex: none; }
.pf-mini { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.pf-medal { width: 100%; height: 100%; display: block; }
.pf-bar { display: block; height: 8px; border-radius: 99px; background: #e3edf6; overflow: hidden; }
.pf-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pf-blue), var(--pf-cyan)); }
.pf-btn, .pf-btn-quiet {
  min-height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 800; font-size: 15px; cursor: pointer;
  border: 1px solid var(--pf-blue); color: #fff; background: linear-gradient(120deg, var(--pf-blue), #008ed9);
}
.pf-btn-quiet { color: var(--pf-navy); background: #fff; border-color: var(--pf-line); }
.pf-btn:focus-visible, .pf-btn-quiet:focus-visible, .pf-heute button:focus-visible, .pf-dialog button:focus-visible, .pf-toast-x:focus-visible { outline: 3px solid var(--pf-cyan); outline-offset: 2px; }

/* ---------- Startseite: Kachel ---------- */
.pf-heute {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .9fr); gap: 12px;
  margin: 0 0 22px; color: var(--pf-ink);
}
.pf-heute > * {
  display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 86px; padding: 14px 16px; text-align: left;
  border: 1px solid var(--pf-line); border-radius: 20px; background: linear-gradient(135deg, #fff, var(--pf-soft));
  box-shadow: 0 10px 26px rgba(8, 40, 90, .06); color: inherit; font: inherit;
}
.pf-heute button { cursor: pointer; }
.pf-heute button:hover { border-color: #a9d3f5; }
.pf-heute small { display: flex; align-items: center; color: var(--pf-blue); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pf-heute strong { display: block; font-size: 18px; line-height: 1.2; color: var(--pf-navy); overflow-wrap: anywhere; }
.pf-heute span, .pf-heute em { color: var(--pf-muted); font-size: 13px; line-height: 1.35; }
.pf-heute em { display: flex; align-items: center; font-style: normal; font-weight: 700; color: #138c72; margin-top: 2px; }
.pf-heute-copy { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pf-heute-daily img { width: 58px; height: 58px; flex: none; border-radius: 16px; object-fit: cover; background: #e8f4fd; }
.pf-go {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 14px;
  color: #fff; background: linear-gradient(120deg, var(--pf-blue), #008ed9); font-weight: 800; font-size: 15px;
}
.pf-heute-daily.pf-done { background: linear-gradient(135deg, #fff, #effbf6); border-color: #b6e8d6; }
.pf-heute-daily.pf-done .pf-go { color: var(--pf-navy); background: #fff; border: 1px solid var(--pf-line); }
.pf-heute-week { flex-direction: column; align-items: stretch !important; justify-content: center; gap: 6px !important; }
.pf-heute-week strong { font-size: 15px; }
.pf-heute-week.pf-done .pf-bar i { background: linear-gradient(90deg, #13a37d, var(--pf-mint)); }
.pf-rank { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.pf-rank > svg { position: absolute; inset: 0; }
.pf-rank > svg g { opacity: .22; }
.pf-rank b { position: relative; color: #fff; font-size: 21px; font-weight: 950; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pf-rank-big { width: 76px; height: 76px; }
.pf-rank-big b { font-size: 28px; }
.pf-header-button { display: inline-flex; align-items: center; min-height: 44px; }
.pf-header-button .pf-mini { width: 18px; height: 18px; }

/* ---------- Einstellungen im Bereich „Darstellung“ ---------- */
.pf-settings { flex: 1 1 100% !important; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--pf-line); }
.pf-settings h3 { margin: 0; font-size: 17px; color: var(--pf-navy); }
.pf-settings label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.pf-settings small { color: var(--pf-muted); }
.pf-settings input[type="checkbox"] { width: 22px; height: 22px; }
.pf-settings select { min-height: 44px; padding: 0 10px; border: 1px solid var(--pf-line); border-radius: 12px; background: #fff; color: var(--pf-ink); }
.pf-settings-actions, .pf-confirm > div { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-settings-actions button, .pf-confirm button { min-height: 44px; }
.pf-danger { color: #b42318 !important; }
.pf-danger-solid { border-color: #c92a2a; background: linear-gradient(120deg, #d9480f, #c92a2a); }
.pf-confirm { padding: 14px 16px; border: 1px solid #f5c2b8; border-radius: 16px; background: #fff7f5; }
.pf-confirm p { margin: 0 0 10px; color: var(--pf-ink); }
.pf-settings-note { margin: 0; min-height: 1em; color: #138c72; font-weight: 700; }

/* ---------- Album ---------- */
.pf-dialog {
  width: min(980px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0 0 26px; overflow: auto;
  border: 0; border-radius: 28px; color: var(--pf-ink); background: #fff; box-shadow: 0 35px 90px rgba(4, 22, 60, .35);
  overscroll-behavior: contain;
}
.pf-dialog::backdrop { background: rgba(6, 22, 58, .55); }
.pf-album-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px clamp(16px, 3vw, 30px); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--pf-line);
}
.pf-album-head .eyebrow { margin: 0; color: var(--pf-blue); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.pf-album-head h2 { margin: 2px 0 0; font-size: clamp(24px, 3.4vw, 32px); color: var(--pf-navy); }
.pf-album-close { width: 48px; height: 48px; flex: none; border: 1px solid var(--pf-line); border-radius: 50%; background: #fff; color: var(--pf-navy); font-size: 28px; line-height: 1; cursor: pointer; }
.pf-album-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; padding: 18px clamp(16px, 3vw, 30px) 0; }
.pf-album-rank { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--pf-line); border-radius: 20px; background: linear-gradient(135deg, #fff, var(--pf-soft)); }
.pf-album-rank > div { display: grid; gap: 6px; flex: 1; min-width: 0; }
.pf-album-rank small { color: var(--pf-blue); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.pf-album-rank strong { font-size: 22px; color: var(--pf-navy); }
.pf-album-rank span:last-child { color: var(--pf-muted); font-size: 13px; }
.pf-album-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-album-stats li { display: grid; align-content: center; gap: 2px; padding: 12px; border: 1px solid var(--pf-line); border-radius: 18px; background: #fff; text-align: center; }
.pf-album-stats b { font-size: 22px; color: var(--pf-navy); }
.pf-album-stats span { font-size: 12px; color: var(--pf-muted); }
.pf-album-tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px clamp(16px, 3vw, 30px) 0; }
.pf-task { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px; border: 1px solid var(--pf-line); border-radius: 18px; background: #fff; color: inherit; font: inherit; text-align: left; }
button.pf-task { cursor: pointer; }
.pf-task > svg { width: 34px; height: 34px; flex: none; color: var(--pf-blue); }
.pf-task > span { display: grid; gap: 4px; min-width: 0; flex: 1; }
.pf-task small { color: var(--pf-blue); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.pf-task strong { color: var(--pf-navy); font-size: 15px; }
.pf-task span span { color: var(--pf-muted); font-size: 13px; }
.pf-task.pf-done { border-color: #b6e8d6; background: #f3fcf8; }
.pf-task.pf-done > svg { color: #13a37d; }
.pf-album-note { margin: 10px clamp(16px, 3vw, 30px) 0; color: var(--pf-muted); font-size: 13px; }
.pf-tabs { display: flex; gap: 8px; margin: 18px clamp(16px, 3vw, 30px) 0; padding: 4px; border-radius: 16px; background: #eef5fb; width: max-content; max-width: 100%; }
.pf-tabs button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--pf-navy); font-weight: 800; cursor: pointer; }
.pf-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 2px 8px rgba(8, 40, 90, .1); color: var(--pf-blue); }
.pf-tab-panel { padding: 14px clamp(16px, 3vw, 30px) 0; }
.pf-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.pf-badge { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 10px; border: 1px solid var(--pf-line); border-radius: 18px; text-align: center; background: #fbfdff; }
.pf-badge .pf-medal { width: 64px; height: 64px; margin-bottom: 4px; }
.pf-badge strong { font-size: 14px; color: var(--pf-navy); }
.pf-badge span { font-size: 12px; line-height: 1.35; color: var(--pf-muted); }
.pf-badge em { font-size: 11px; font-style: normal; color: #93a3b5; }
.pf-badge.pf-got { background: #fff; box-shadow: 0 8px 20px rgba(8, 40, 90, .06); }
.pf-badge.pf-got em { color: #138c72; font-weight: 700; }
.pf-badge:not(.pf-got) strong { color: #6b7b8d; }
.pf-album-group h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 14px 0 10px; font-size: 17px; color: var(--pf-navy); }
.pf-album-group h3 small { color: var(--pf-muted); font-weight: 600; font-size: 13px; }
.pf-album-group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pf-album-game { display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 44px; padding: 10px 8px; border: 1px dashed #c9d8e6; border-radius: 16px; background: #f7fafc; color: inherit; font: inherit; cursor: pointer; text-align: center; }
.pf-album-game img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; filter: grayscale(1) opacity(.45); }
.pf-album-game strong { font-size: 13px; color: #6b7b8d; overflow-wrap: anywhere; }
.pf-album-game span { font-size: 11px; color: #93a3b5; }
.pf-album-symbol { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--pf-blue), var(--pf-cyan)); }
.pf-album-symbol svg { width: 36px; height: 36px; }
.pf-album-game.pf-seen { border-style: solid; border-color: var(--pf-line); background: #fff; }
.pf-album-game.pf-seen img { filter: none; }
.pf-album-game.pf-seen strong { color: var(--pf-navy); }
.pf-album-game.pf-seen span { color: var(--pf-muted); }
.pf-stars { color: var(--pf-gold); letter-spacing: 1px; font-weight: 700; }

/* ---------- Ebene im Spiel (Hinweise, Einführung) ----------
   Die ID schlägt die sehr starken Layout-Regeln für direkte Kinder der Spieldialoge. */
#pf-layer {
  position: fixed !important; inset: 0 !important; z-index: 2147483000 !important; display: block !important;
  width: auto !important; min-width: 0 !important; max-width: none !important; height: auto !important; min-height: 0 !important; max-height: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  overflow: visible !important; grid-row: auto !important; grid-column: auto !important; transform: none !important; pointer-events: none !important;
  align-self: stretch !important; justify-self: stretch !important; float: none !important; inset-inline: 0 !important; inset-block: 0 !important; opacity: 1 !important; visibility: visible !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--pf-ink);
}
#pf-layer > .pf-toasts {
  position: absolute; z-index: 2; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%);
  display: grid; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none;
}
#pf-layer.pf-over-album > .pf-toasts { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); }
#pf-layer.pf-in-game > .pf-toasts { top: max(70px, calc(env(safe-area-inset-top) + 62px)); }
#pf-layer.pf-fs > .pf-toasts { top: max(8px, env(safe-area-inset-top)); width: min(540px, calc(100vw - 472px)); }
@media (max-width: 1000px) { #pf-layer.pf-fs > .pf-toasts { top: max(60px, calc(env(safe-area-inset-top) + 52px)); width: min(540px, calc(100vw - 20px)); } }
.pf-toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px 10px 12px; pointer-events: none;
  border: 1px solid #cfe3f3; border-radius: 18px; background: rgba(255, 255, 255, .97); box-shadow: 0 14px 34px rgba(4, 22, 60, .22);
  opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease;
}
.pf-toast.pf-on { opacity: 1; transform: none; }
.pf-toast button { pointer-events: auto; }
.pf-toast:not(:has(.pf-toast-x)) { padding-right: 14px; }
html.reduced-motion .pf-toast { transition: none; }
@media (prefers-reduced-motion: reduce) { .pf-toast { transition: none; } }
.pf-toast-symbol { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--pf-blue); background: #eaf5ff; }
.pf-toast-symbol .pf-icon { width: 26px; height: 26px; }
.pf-toast-badge .pf-toast-symbol, .pf-toast-level .pf-toast-symbol { background: none; }
.pf-toast-pause .pf-toast-symbol { color: #2b8a3e; background: #ebfbee; }
.pf-toast-record .pf-toast-symbol { color: #c92a2a; background: #fff0f0; }
.pf-toast-task .pf-toast-symbol { color: #e67700; background: #fff6e0; }
.pf-toast-copy { display: grid; gap: 3px; min-width: 0; flex: 1; padding-top: 2px; }
.pf-toast-copy strong { font-size: 15px; line-height: 1.25; color: var(--pf-navy); }
.pf-toast-copy > span { font-size: 13px; line-height: 1.35; color: var(--pf-muted); }
.pf-toast-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pf-toast-actions .pf-btn, .pf-toast-actions .pf-btn-quiet { min-height: 44px; padding: 0 14px; font-size: 14px; }
.pf-toast-x { width: 44px; height: 44px; flex: none; margin: -6px -2px -6px 0; border: 0; border-radius: 50%; background: transparent; color: #6b7b8d; font-size: 24px; line-height: 1; cursor: pointer; }
#pf-layer.pf-fs .pf-toast { padding: 6px 6px 6px 8px; gap: 8px; border-radius: 14px; }
#pf-layer.pf-fs .pf-toast-symbol { width: 30px; height: 30px; }
#pf-layer.pf-fs .pf-toast-symbol .pf-icon { width: 20px; height: 20px; }
#pf-layer.pf-fs .pf-toast-copy strong { font-size: 13px; }
#pf-layer.pf-fs .pf-toast-actions { margin-top: 2px; }

.pf-intro { position: absolute; inset: 0; place-self: stretch; pointer-events: none; }
.pf-intro-card {
  position: absolute; left: 50%; top: max(64px, calc(env(safe-area-inset-top) + 56px)); transform: translateX(-50%);
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; width: min(500px, calc(100vw - 24px));
  padding: 14px 16px 12px; border: 1px solid #cfe3f3; border-radius: 22px; background: #fff; box-shadow: 0 18px 46px rgba(4, 22, 60, .28);
  text-align: left; pointer-events: auto;
}
#pf-layer.pf-fs .pf-intro-card { top: max(8px, env(safe-area-inset-top)); }
@media (max-width: 1000px) { #pf-layer.pf-fs .pf-intro-card { top: max(60px, calc(env(safe-area-inset-top) + 52px)); } }
.pf-intro-card small { grid-column: 1 / -1; color: var(--pf-blue); font-size: 11px; font-weight: 900; letter-spacing: .1em; padding-right: 40px; overflow-wrap: anywhere; }
.pf-intro-symbol { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--pf-blue), var(--pf-cyan)); box-shadow: 0 8px 18px rgba(8, 107, 255, .25); }
.pf-intro-icon { width: 38px; height: 38px; }
.pf-intro-card p { margin: 0; font-size: 16px; line-height: 1.4; color: var(--pf-navy); font-weight: 600; }
.pf-intro-dots { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: center; }
.pf-intro-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d3e2ef; }
.pf-intro-dots i.on { width: 22px; border-radius: 99px; background: var(--pf-blue); }
.pf-intro-actions { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.pf-intro-actions button { flex: 0 1 150px; }
.pf-intro-count { position: absolute; top: 16px; right: 18px; color: #93a3b5; font-size: 12px; font-weight: 700; }
.pf-help-intro {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0 14px;
  border: 1px solid var(--pf-line); border-radius: 14px; background: #f2f9ff; color: var(--pf-navy); font-weight: 800; cursor: pointer;
}
.pf-help-intro svg { width: 22px; height: 22px; color: var(--pf-blue); }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 980px) {
  .pf-heute { grid-template-columns: 1fr 1fr; }
  .pf-heute-daily { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .pf-album-top, .pf-album-tasks { grid-template-columns: 1fr; }
  .pf-album-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .pf-heute { grid-template-columns: 1fr; gap: 10px; }
  .pf-heute > * { min-height: 72px; padding: 12px; }
  .pf-heute strong { font-size: 16px; }
  .pf-heute-daily img { width: 48px; height: 48px; }
  .pf-go { padding: 0 12px; }
  .pf-rank { width: 48px; height: 48px; }
  .pf-dialog { width: 100%; max-height: 100dvh; border-radius: 0; }
  .pf-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-album-group ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-album-game img { width: 52px; height: 52px; }
  .pf-intro-card p { font-size: 15px; }
  .pf-intro-symbol { width: 48px; height: 48px; }
  #pf-layer.pf-fs > .pf-toasts { width: calc(100vw - 20px); top: max(60px, calc(env(safe-area-inset-top) + 52px)); }
}
.high-contrast .pf-heute > *, .high-contrast .pf-toast, .high-contrast .pf-badge, .high-contrast .pf-task { border-color: #8eabc0; }
.large-text .pf-heute strong { font-size: 20px; }
.large-text .pf-toast-copy strong { font-size: 17px; }
.large-text .pf-intro-card p { font-size: 18px; }
/* Vollbild: Hinweis einzeilig, damit er möglichst wenig von der Spielfläche bedeckt */
#pf-layer.pf-fs .pf-toast { align-items: center; }
#pf-layer.pf-fs .pf-toast-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-top: 0; }
#pf-layer.pf-fs .pf-toast-actions { margin: 0; gap: 6px; }
#pf-layer.pf-fs .pf-toast-actions .pf-btn, #pf-layer.pf-fs .pf-toast-actions .pf-btn-quiet { padding: 0 10px; font-size: 13px; }
#pf-layer.pf-fs .pf-toast-x { margin: 0; }
@media (max-height: 520px) {
  .pf-intro-card, #pf-layer.pf-fs .pf-intro-card { top: max(60px, calc(env(safe-area-inset-top) + 52px)); grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px 10px; gap: 4px 10px; width: min(640px, calc(100vw - 24px)); }
  .pf-intro-card small, .pf-intro-dots, .pf-intro-count { display: none; }
  .pf-intro-symbol { width: 40px; height: 40px; border-radius: 12px; }
  .pf-intro-icon { width: 26px; height: 26px; }
  .pf-intro-card p { font-size: 14px; }
  .pf-intro-actions { grid-column: auto; flex-wrap: nowrap; }
  .pf-intro-actions button { flex: none; padding: 0 12px; font-size: 14px; }
}

/* 2.47 Abnahme: Album-Knopf auch auf dem Handy – kompakt als Symbol, Kopfzeile bleibt einzeilig */
@media (max-width: 560px) {
  .portal-header { align-items: center; gap: 12px; }
  .brand-product strong { white-space: nowrap; }
  .header-actions { flex-direction: row; align-items: center; gap: 6px; }
  .header-actions .quiet-button { min-height: 44px; }
  .pf-header-button { justify-content: center; width: 44px; min-width: 44px; padding: 0 !important; }
  .pf-header-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pf-header-button .pf-mini { width: 22px; height: 22px; margin: 0; }
}
@media (max-width: 380px) {
  .portal-header { gap: 10px; padding-inline: 12px; }
  .brand-logo { width: 104px; }
  .header-actions .quiet-button { padding-inline: 11px; }
}
