/* ladi play – Rückmeldungen (portal-feedback): Kopfleisten-Knopf, Pausen-Knopf, Leiste, Formular */
.pfb-kopf-knopf { display: inline-flex; align-items: center; gap: 6px; }
.pfb-kopf-knopf svg { width: 21px; height: 21px; flex: none; }
@media (max-width: 560px) {
  .portal-header .pfb-kopf-knopf { padding-inline: 10px; min-width: 44px; justify-content: center; }
  .portal-header .pfb-kopf-knopf span { display: none; }
}
/* Sehr schmale Handys: Kopfleiste ist voll – dann Fußzeile, Pausenfenster und Leiste nach dem Spiel. */
@media (max-width: 430px) { .portal-header .pfb-kopf-knopf { display: none !important; } }
.pfb-fuss-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: #086bff; font: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pfb-fuss-knopf svg { width: 18px; height: 18px; }

/* Knopf im Pausenfenster (Text in Spans hat dort sonst Pausen-Riesenschrift) */
.pfb-pause-zeile { display: flex; justify-content: center; margin-top: 12px; }
html body .pfb-pause-knopf {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff;
  font: inherit; font-size: 15px; font-weight: 750; letter-spacing: 0; cursor: pointer; touch-action: manipulation;
}
html body .pfb-pause-knopf span { display: inline !important; font-size: 15px !important; font-weight: 750 !important; letter-spacing: 0 !important; line-height: 1.2; }
html body .pfb-pause-knopf svg { width: 20px; height: 20px; flex: none; }
html body .pfb-pause-knopf:hover, html body .pfb-pause-knopf:focus-visible { background: rgba(255,255,255,.22); }
.island-run-pause-actions > .pfb-pause-knopf { grid-column: 1 / -1; }

/* Leiste nach dem Spiel – unten, klein, kein Pop-up */
.pfb-leiste {
  position: fixed; z-index: 900; left: 50%; bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
  display: flex; align-items: center; gap: 10px; width: min(720px, calc(100vw - 24px)); padding: 8px 8px 8px 14px;
  border: 1px solid #cfe3f3; border-radius: 18px; background: rgba(255,255,255,.98); color: #0c2144;
  box-shadow: 0 14px 34px rgba(4,22,60,.2); opacity: 0; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s ease;
}
.pfb-leiste.pfb-leiste-sichtbar { opacity: 1; transform: translate(-50%, 0); }
.pfb-leiste[hidden] { display: none; }
.pfb-leiste p { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfb-leiste-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: #e8f8ff; color: #086bff; }
.pfb-leiste-icon svg { width: 20px; height: 20px; }
.pfb-leiste .pfb-btn { flex: none; }
@media (max-width: 640px) {
  .pfb-leiste { flex-wrap: wrap; padding: 10px 10px 10px 12px; }
  .pfb-leiste p { flex: 1 1 calc(100% - 100px); white-space: normal; }
  .pfb-leiste .pfb-btn-main { flex: 1 1 auto; }
  .pfb-leiste .pfb-x { order: 2; }
  .pfb-leiste-icon { display: none; }
}
html.reduced-motion .pfb-leiste { transition: none; }
@media (prefers-reduced-motion: reduce) { .pfb-leiste { transition: none; } }

/* Gemeinsame Knöpfe */
.pfb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px;
  border: 1px solid #dbe7f1; border-radius: 12px; background: #fff; color: #0c2144; font: inherit; font-size: 15px; font-weight: 750;
  cursor: pointer; touch-action: manipulation;
}
.pfb-btn svg { width: 20px; height: 20px; flex: none; }
.pfb-btn-main { color: #fff; border-color: #086bff; background: linear-gradient(120deg, #086bff, #008ed9); box-shadow: 0 8px 20px #086bff24; }
.pfb-btn-main:disabled { opacity: .65; cursor: progress; }
.pfb-btn-link { border-color: transparent; background: none; color: #56667d; font-weight: 650; padding-inline: 10px; }
.pfb-x { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: #56667d; cursor: pointer; }
.pfb-x svg { width: 20px; height: 20px; }
.pfb-x:hover, .pfb-btn-link:hover { background: #eef5fb; }

/* Formular-Dialog */
html body dialog.pfb-dialog {
  width: min(560px, calc(100vw - 20px)); max-width: none; max-height: min(92dvh, 860px); margin: auto; padding: 0;
  border: 0; border-radius: 22px; background: #fff; color: #0c2144; box-shadow: 0 30px 80px rgba(4,22,60,.35); overflow: hidden;
  font-family: inherit; font-size: 16px; line-height: 1.45;
}
html body dialog.pfb-dialog[open] { display: flex; flex-direction: column; }
dialog.pfb-dialog::backdrop { background: rgba(3,19,56,.55); }
.pfb-dialog .pfb-form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; margin: 0; }
.pfb-dialog .pfb-form[hidden], .pfb-dialog .pfb-thanks[hidden] { display: none; }
.pfb-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 12px 12px 18px; border-bottom: 1px solid #e3edf6; background: linear-gradient(120deg, #f0f8ff, #fff); }
.pfb-head-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #086bff, #00c9f0); }
.pfb-head-icon svg { width: 24px; height: 24px; }
.pfb-head > div { flex: 1 1 auto; min-width: 0; }
.pfb-head h2 { margin: 2px 0 2px; font-size: 21px; letter-spacing: -.01em; color: #07184d; }
.pfb-head p { margin: 0; color: #56667d; font-size: 14px; }
.pfb-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 14px 18px 8px; display: grid; gap: 14px; }
.pfb-field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pfb-field > span, .pfb-field legend, .pfb-label { font-weight: 750; font-size: 15px; color: #07184d; padding: 0; }
.pfb-field small, .pfb-label small { font-weight: 600; color: #56667d; font-size: 13px; }
.pfb-dialog select, .pfb-dialog textarea, .pfb-dialog input[type="text"] {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #c9dbea; border-radius: 12px; background: #fff; color: #0c2144;
  font: inherit; font-size: 16px; /* 16 px: kein Auto-Zoom auf dem iPad */
}
.pfb-dialog textarea { min-height: 112px; resize: vertical; }
.pfb-dialog select:focus, .pfb-dialog textarea:focus, .pfb-dialog input[type="text"]:focus { outline: 3px solid #00c9f055; border-color: #086bff; }
.pfb-count { justify-self: end; }
.pfb-moods { display: flex; gap: 8px; flex-wrap: wrap; }
.pfb-mood { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 2px solid #dbe7f1; border-radius: 16px; background: #fff; cursor: pointer; touch-action: manipulation; }
.pfb-mood svg { width: 38px; height: 38px; transition: transform .15s ease; }
.pfb-mood[aria-pressed="true"] { border-color: #086bff; background: #e8f8ff; box-shadow: 0 0 0 3px #086bff22; }
.pfb-mood[aria-pressed="true"] svg { transform: scale(1.1); }
.pfb-mood[aria-pressed="false"]:has(~ .pfb-mood[aria-pressed="true"]) svg, .pfb-mood[aria-pressed="true"] ~ .pfb-mood svg { opacity: .55; }

.pfb-voice { padding: 12px; border: 1px dashed #c9dbea; border-radius: 14px; background: #f7fbff; }
.pfb-voice audio { width: 100%; height: 44px; }
.pfb-voice-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #3d4e66; font-size: 14px; }
.pfb-voice-hint svg { width: 20px; height: 20px; flex: none; color: #086bff; margin-top: 1px; }
.pfb-voice-warn { margin-top: 8px; color: #a8452f; }
.pfb-rec { justify-self: start; }
.pfb-rec svg { color: #f06d5e; }
.pfb-rec-row { display: flex; align-items: center; gap: 8px; }
.pfb-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #f06d5e; animation: pfb-puls 1.1s ease-in-out infinite; }
.pfb-rec-time { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; }
.pfb-rec-max { color: #56667d; font-size: 14px; }
.pfb-stop { margin-left: auto; color: #fff; border-color: #e0533f; background: #f06d5e; }
.pfb-rec-bar { height: 6px; border-radius: 99px; background: #e3edf6; overflow: hidden; }
.pfb-rec-bar i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #00c9f0, #086bff); }
.pfb-rec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@keyframes pfb-puls { 50% { opacity: .35; } }
html.reduced-motion .pfb-rec-dot { animation: none; }
@media (prefers-reduced-motion: reduce) { .pfb-rec-dot { animation: none; } }

.pfb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pfb-privacy { padding: 12px; border-radius: 14px; background: #f2f6fa; font-size: 13px; color: #3d4e66; }
.pfb-privacy p { margin: 0 0 8px; }
.pfb-consent { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 700; color: #0c2144; cursor: pointer; }
.pfb-consent input { width: 24px; height: 24px; margin: 0; accent-color: #086bff; flex: none; }
.pfb-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff0ed; color: #a8452f; font-weight: 650; font-size: 14px; }
.pfb-error[hidden] { display: none; }
.pfb-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid #e3edf6; background: #fff; }
.pfb-foot .pfb-btn-main { min-width: 140px; }
.pfb-thanks { display: grid; justify-items: center; gap: 10px; padding: 34px 22px 26px; text-align: center; }
.pfb-thanks svg { width: 64px; height: 64px; }
.pfb-thanks h2 { margin: 6px 0 0; font-size: 22px; color: #07184d; }
.pfb-thanks p { margin: 0 0 8px; color: #56667d; }
@media (max-width: 480px) {
  html body dialog.pfb-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); border-radius: 18px; }
  .pfb-head { padding: 12px 8px 10px 14px; }
  .pfb-head h2 { font-size: 19px; }
  .pfb-body { padding: 12px 14px 6px; }
  .pfb-mood { width: 52px; height: 52px; }
  .pfb-foot { padding-inline: 14px; }
  .pfb-foot .pfb-btn { flex: 1 1 0; }
}
@media (max-height: 500px) {
  html body dialog.pfb-dialog { max-height: calc(100dvh - 10px); }
  .pfb-head p { display: none; }
  .pfb-head { padding-block: 8px; }
}
html.high-contrast .pfb-dialog, html.high-contrast .pfb-leiste { border: 2px solid #07184d; }
