/* Mathe Easy Mode – Suchfeld in der Weltwahl (Befund 126, 24.11.2026). Bausteine aus premium.css (pm-tafel, pm-zweit, pm-chip),
   ein Gold, eigene Zeichen statt Emojis, ruhige Bewegung (Premium-Stilbuch). Logik: weltsuche.js */

/* Knopf „Suchen“ links neben „Los“ */
.ws-knopf { position: relative; min-height: 60px; padding: 0 20px 0 16px; border-radius: 18px; background: rgba(7, 12, 23, .72); border-color: rgba(242, 204, 107, .3);
  color: var(--pm-text); -webkit-tap-highlight-color: transparent; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ws-knopf svg { width: 22px; height: 22px; color: var(--pm-gold-text); flex: none; }
@media (hover: hover) { .ws-knopf:hover { border-color: rgba(242, 204, 107, .6); } }
.ws-knopf:focus-visible { outline: 3px solid var(--pm-gold-hell); outline-offset: 4px; }

/* Schleier und Tafel */
.ws-schleier { position: absolute; inset: 0; z-index: 40; background: rgba(4, 8, 16, .62); opacity: 0; transition: opacity var(--pm-mittel) var(--pm-weich);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.ws-schleier.an { opacity: 1; }
.ws-tafel { position: absolute; z-index: 41; left: 50%; top: max(16px, var(--pm-so, env(safe-area-inset-top, 0px)));
  width: min(620px, calc(100% - 32px)); max-height: calc(100% - 32px - var(--pm-so, env(safe-area-inset-top, 0px)));
  display: flex; flex-direction: column; padding: 14px 14px 16px; box-sizing: border-box; color: var(--pm-text); font-family: var(--pm-schrift);
  opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.985); transition: opacity var(--pm-mittel) var(--pm-weich), transform var(--pm-mittel) var(--pm-weich); }
.ws-tafel.an { opacity: 1; transform: translateX(-50%); }

/* Eingabezeile */
.ws-zeile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 6px 0 16px; border-radius: 18px;
  background: rgba(4, 8, 16, .7); border: 1px solid rgba(242, 204, 107, .35); }
.ws-zeile:focus-within { border-color: rgba(242, 204, 107, .75); box-shadow: 0 0 0 3px rgba(242, 204, 107, .14); }
.ws-lupe { display: inline-grid; place-items: center; color: var(--pm-gold-text); flex: none; }
.ws-lupe svg { width: 24px; height: 24px; }
.ws-feld { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; color: var(--pm-text);
  font: 600 19px var(--pm-schrift); -webkit-appearance: none; appearance: none; }   /* ab 16 px zoomt Safari beim Tippen nicht */
.ws-feld::placeholder { color: var(--pm-leise); font-weight: 500; }
.ws-feld::-webkit-search-cancel-button { display: none; }
.ws-zu { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; color: var(--pm-text-2); font-size: 30px; line-height: 1;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ws-zu:active { transform: scale(.94); }
.ws-zu:focus-visible { outline: 3px solid var(--pm-gold-hell); outline-offset: 2px; }

/* Hinweis mit Vorlesen */
.ws-status-zeile { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 8px 4px 4px; }
.ws-status { flex: 1; margin: 0; font-size: 17px; line-height: 1.35; color: var(--pm-text-2); }
.ws-tafel .vorlesen-knopf { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  color: var(--pm-gold-text); border: 1px solid rgba(242, 204, 107, .35); background: rgba(242, 204, 107, .1); cursor: pointer; touch-action: manipulation; }
.ws-tafel .vorlesen-knopf[hidden] { display: none; }
.ws-tafel .vorlesen-knopf svg { width: 22px; height: 22px; }
.ws-tafel .vorlesen-knopf.spricht { background: rgba(242, 204, 107, .3); box-shadow: 0 0 0 4px rgba(242, 204, 107, .14); }

/* Treffer */
.ws-treffer { list-style: none; margin: 0; padding: 2px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; gap: 8px; }
.ws-tafel.leer .ws-treffer { display: none; }
.ws-wahl { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 8px 14px 8px 8px; box-sizing: border-box; text-align: left;
  border-radius: var(--pm-rund-s); border: 1px solid rgba(255, 255, 255, .1); background: rgba(27, 42, 74, .55); color: var(--pm-text);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background var(--pm-kurz), border-color var(--pm-kurz), transform var(--pm-kurz);
  animation: wsRein .26s var(--pm-weich) both; }
.ws-eintrag:nth-child(2) .ws-wahl { animation-delay: .03s; } .ws-eintrag:nth-child(3) .ws-wahl { animation-delay: .06s; }
.ws-eintrag:nth-child(4) .ws-wahl { animation-delay: .09s; } .ws-eintrag:nth-child(n+5) .ws-wahl { animation-delay: .12s; }
@keyframes wsRein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ws-wahl.aktiv, .ws-wahl:focus-visible { border-color: rgba(242, 204, 107, .7); background: rgba(27, 42, 74, .9); outline: 0; }
@media (hover: hover) { .ws-wahl:hover { border-color: rgba(242, 204, 107, .5); } }
.ws-wahl:active { transform: scale(.985); }
.ws-wahl.zu { opacity: .72; }
.ws-wahl.ws-wackeln { animation: wsWackeln .4s ease; }
@keyframes wsWackeln { 25% { transform: translateX(-6px) } 60% { transform: translateX(5px) } 85% { transform: translateX(-2px) } }
.ws-ring { flex: none; width: 52px; height: 52px; border-radius: 50%; box-sizing: border-box; display: inline-grid; place-items: center;
  border: 2px solid rgba(242, 204, 107, .6); background: #0B1222 center / cover no-repeat; }
.ws-nr { font: 400 22px var(--pm-titelschrift); color: var(--pm-gold-text); background: radial-gradient(circle at 50% 35%, #22355C, #0B1222); }
.ws-geplant { color: var(--pm-leise); border-color: rgba(255, 255, 255, .25); }
.ws-geplant svg { width: 22px; height: 22px; }
.ws-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ws-text b { font-size: 18px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ws-text small { font-size: 15px; line-height: 1.3; color: var(--pm-leise); overflow-wrap: anywhere; }
.ws-marke { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--pm-leise); white-space: nowrap; }
.ws-marke svg { width: 18px; height: 18px; }
.ws-marke.da { width: 30px; height: 30px; justify-content: center; border-radius: 50%; background: rgba(242, 204, 107, .16); color: var(--pm-gold-text); }

/* Vorschläge */
.ws-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 4px 0; }
.ws-chips:empty { display: none; }
.ws-chip { min-height: 44px; padding: 0 16px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 650;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform var(--pm-kurz), border-color var(--pm-kurz); }
.ws-chip:active { transform: scale(.96); }
@media (hover: hover) { .ws-chip:hover { border-color: rgba(242, 204, 107, .75); } }
.ws-chip:focus-visible { outline: 3px solid var(--pm-gold-hell); outline-offset: 2px; }

/* Handy hoch: Knopf nur mit Zeichen, damit „Los“ groß bleibt */
@media (max-width: 420px) {
  .ws-knopf { width: 60px; padding: 0; } .ws-knopf svg { width: 26px; height: 26px; } .ws-knopf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ws-tafel { width: calc(100% - 24px); top: max(12px, var(--pm-so, env(safe-area-inset-top, 0px))); padding: 12px 10px 14px; }
  .ws-wahl { gap: 12px; padding-right: 10px; } .ws-ring { width: 46px; height: 46px; } .ws-text b { font-size: 17px; }
}
/* Handy quer: wenig Höhe */
@media (max-height: 500px) {
  .ws-tafel { top: max(8px, var(--pm-so, env(safe-area-inset-top, 0px))); max-height: calc(100% - 16px); padding: 10px 12px 12px; }
  .ws-status-zeile { min-height: 44px; margin: 4px 4px 2px; } .ws-wahl { min-height: 60px; padding-top: 4px; padding-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) { .ws-tafel, .ws-schleier, .ws-wahl { transition: none; animation: none; } }
