/* Phone & tablet fixes for the German course pages (deutsch-en, deutsch).
   Loaded after assets/responsive.css; only active below 1100px.
   Note: the runtime rewrites inline colours to rgb(...), so colour matches use that form.
   EN section ids: #levels #demo #teachers; DE: #niveaus #probestunde #lehrkraefte. */

/* --- Hero ---------------------------------------------------------------- */
html.mzw-fluid .sc-host > div > section:first-of-type { padding-top: 112px !important; padding-bottom: 64px !important; }
html.mzw-fluid .sc-host > div > section:first-of-type > .orb { width: 300px !important; height: 300px !important; }
/* stronger veil over the video so the text stays readable on narrow screens */
html.mzw-fluid .zk-herovid-veil { background: radial-gradient(ellipse 95% 70% at 50% 45%, rgba(251,250,248,.66), rgba(251,250,248,.42) 70%, rgba(251,250,248,.14)), linear-gradient(to bottom, rgba(251,250,248,0) 75%, #fbfaf8) !important; }
html.mzw-fluid .zk-tag { left: 50% !important; bottom: auto !important; top: 16px; transform: translateX(-50%) !important; }
html.mzw-fluid .sc-host > div > section:first-of-type > div[style*="gap: 16px"] { flex-wrap: wrap; justify-content: center; gap: 10px !important; margin-top: 28px !important; }
html.mzw-fluid .sc-host > div > section:first-of-type > div[style*="gap: 16px"] > a { white-space: nowrap; padding: 13px 20px !important; font-size: 16px !important; }
html.mzw-fluid .sc-host > div > section:first-of-type > div.glass[style*="border-radius: 980px"] {
  border-radius: 24px !important; padding: 12px 16px 12px 12px !important; font-size: 15px !important; text-align: left; max-width: 560px;
}
html.mzw-fluid .sc-host > div > section:first-of-type > div.glass > span:first-child { flex-shrink: 0; }

/* --- Levels -------------------------------------------------------------- */
html.mzw-fluid :is(#levels, #niveaus) { padding-top: 64px !important; padding-bottom: 0 !important; gap: 32px !important; z-index: 2; } /* chart tooltips may overlap the games panel */
html.mzw-fluid :is(#levels, #niveaus) > div[style*="justify-content: space-between"] { padding: 0 !important; gap: 16px !important; }
html.mzw-fluid :is(#levels, #niveaus) > .orb { width: 280px !important; height: 280px !important; }
html.mzw-fluid :is(#levels, #niveaus) > .orb:nth-child(2) { left: 50% !important; }
html.mzw-fluid :is(#levels, #niveaus) > .orb:nth-child(3) { right: 0 !important; }
/* flip cards: tall enough for the back face; tap focuses the card (tabindex) and flips it */
html.mzw-fluid .flip { height: 400px; -webkit-tap-highlight-color: transparent; }
html.mzw-fluid .flip .face { padding: 26px !important; }
html.mzw-fluid .flip .face [style*="font-size: 56px"] { font-size: 48px !important; }

/* duration chart */
html.mzw-fluid :is(#levels, #niveaus) > div.glass { padding: 28px 20px !important; }
html.mzw-fluid :is(#levels, #niveaus) > div.glass > div:first-child { flex-direction: column !important; align-items: flex-start !important; gap: 8px; }
html.mzw-fluid :is(#levels, #niveaus) > div.glass > div:first-child > div:first-child { flex-wrap: wrap; row-gap: 8px !important; }
html.mzw-fluid .zk-chart { padding-top: 26px !important; gap: 12px !important; }
html.mzw-fluid .zk-row { gap: 10px !important; }
html.mzw-fluid .zk-row .zk-lv { width: 26px; flex-shrink: 0; }
html.mzw-fluid .zk-hrs { width: 86px; flex-shrink: 0; font-size: 13px !important; text-align: right; }
/* course markers near the right end: keep the label inside the card */
html.mzw-fluid .zk-mark[style*="left: 7"] span,
html.mzw-fluid .zk-mark[style*="left: 8"] span,
html.mzw-fluid .zk-mark[style*="left: 9"] span { left: auto; right: -8px; transform: none; }
html.mzw-fluid .zk-tip { left: 0 !important; right: 0 !important; background: rgba(255,255,255,.94) !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* --- Games --------------------------------------------------------------- */
html.mzw-fluid #games { margin-top: 72px !important; padding-top: 56px !important; padding-bottom: 20px !important; border-radius: 32px !important; }
html.mzw-fluid #games > .orb { width: 300px !important; height: 300px !important; }
html.mzw-fluid #games > .orb:nth-child(3) { left: 30% !important; }
html.mzw-fluid #games > div[style*="justify-content: space-between"] { gap: 16px !important; }
html.mzw-fluid #games > div[style*="margin-top: 56px"] { margin-top: 32px !important; }
html.mzw-fluid #games .glass-dark { padding: 22px 18px !important; border-radius: 26px !important; }
html.mzw-fluid #games .glass-dark > div[style*="justify-content: space-between"]:first-child { flex-wrap: wrap; gap: 8px; }
/* answer buttons stay side by side (der / die / das, three verbs) */
html.mzw-fluid #games .glass-dark > div[style*="grid-template-columns: repeat(3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
html.mzw-fluid #games .zk-vbtn { font-size: 16px !important; padding: 0 4px; min-width: 0; overflow-wrap: anywhere; }
html.mzw-fluid #games .zk-art, html.mzw-fluid #games .zk-vbtn { touch-action: manipulation; }
html.mzw-fluid #games .glass-dark > div[style*="min-height: 40px"] { flex-wrap: wrap; gap: 10px; }
html.mzw-fluid #games .glass-dark > div[style*="min-height: 40px"] > button { height: 44px !important; }
html.mzw-fluid #games .glass-dark > div[style*="position: relative"] { margin-top: 40px; }
html.mzw-fluid #games .zk-adler { top: -64px; right: 4px; }
html.mzw-fluid #games .zk-adler svg { width: 80px; height: 80px; }
html.mzw-fluid #games .zk-say { padding: 12px 14px !important; }
/* readable text on the light games panel (the inline dark-theme colours don't get
   caught by the page's own overrides because the runtime rewrites them to rgb()) */
html.mzw-fluid #games [style*="color: rgb(255, 255, 255)"]:not([style*="background: rgb("]):not([style*="background: #"]),
html.mzw-fluid #games [style*="color: rgb(245, 245, 247)"] { color: #1d1d1f !important; }
html.mzw-fluid #games [style*="color: rgb(210, 210, 215)"] { color: #3a3a3c !important; }
html.mzw-fluid #games [style*="color: rgb(161, 161, 166)"] { color: #48484d !important; }
html.mzw-fluid #games [style*="color: rgb(255, 206, 0)"] { color: #6b4e00 !important; }
html.mzw-fluid #games [style*="background: rgba(255, 255, 255, 0.1)"] { background: rgba(0,0,0,.06) !important; }
html.mzw-fluid #games [style*="rgba(255, 255, 255, 0.25)"] { border-color: rgba(0,0,0,.18) !important; }
html.mzw-fluid #games .zk-act { padding: 22px !important; }

/* --- Demo class form ----------------------------------------------------- */
html.mzw-fluid :is(#demo, #probestunde) { margin-top: 72px !important; padding-top: 56px !important; padding-bottom: 20px !important; gap: 36px !important; border-radius: 32px !important; }
html.mzw-fluid :is(#demo, #probestunde) > .orb { width: 300px !important; height: 300px !important; }
html.mzw-fluid :is(#demo, #probestunde) > .orb:first-child { left: auto !important; right: -80px !important; top: auto !important; bottom: 200px !important; }
html.mzw-fluid :is(#demo, #probestunde) > .gd { padding: 24px 18px !important; min-height: 0 !important; border-radius: 28px !important; margin: 0 -4px; }
html.mzw-fluid :is(#demo, #probestunde) input, html.mzw-fluid :is(#demo, #probestunde) select { width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px !important; }
html.mzw-fluid :is(#demo, #probestunde) button { touch-action: manipulation; }
@media (min-width: 641px) {
  html.mzw-fluid :is(#demo, #probestunde) > .gd div[style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* --- Teachers ------------------------------------------------------------ */
html.mzw-fluid :is(#teachers, #lehrkraefte) { padding-top: 72px !important; gap: 32px !important; }
html.mzw-fluid :is(#teachers, #lehrkraefte) > div[style*="justify-content: space-between"] { gap: 16px !important; }
html.mzw-fluid :is(#teachers, #lehrkraefte) > .orb { width: 280px !important; height: 280px !important; }
html.mzw-fluid :is(#teachers, #lehrkraefte) > .orb:nth-child(2) { right: 0 !important; }
html.mzw-fluid :is(#teachers, #lehrkraefte) .zk-teach { padding: 24px !important; }

/* --- Closing CTA --------------------------------------------------------- */
html.mzw-fluid .sc-host > div > section:last-of-type { margin-top: 72px !important; padding-top: 48px !important; padding-bottom: 48px !important; border-radius: 32px !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > .orb { width: 240px !important; height: 240px !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > .orb:nth-child(1) { left: -40px !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > .orb:nth-child(2) { left: 30% !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > .orb:nth-child(3) { right: -40px !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > div[style*="gap: 16px"] { flex-wrap: wrap; justify-content: center; gap: 10px !important; }
html.mzw-fluid .sc-host > div > section:last-of-type > div[style*="gap: 16px"] > a { white-space: nowrap; padding: 13px 20px !important; font-size: 16px !important; }

/* --- Footer -------------------------------------------------------------- */
html.mzw-fluid .sc-host footer { margin-top: 56px !important; }
html.mzw-fluid .sc-host footer .zk-flogo img { height: 52px !important; }

/* ==========================================================================
   All screen sizes: the games panel is light, but some of its text was
   designed white/pale for a dark panel. The page's own overrides look for
   hex colours (#d2d2d7 …) while the page runtime writes rgb(...), so they
   never matched — these are the same overrides in the rgb form.
   ========================================================================== */
#games div[style*="color: rgb(255, 255, 255)"],
#games span[style*="color: rgb(255, 255, 255)"],
#games [style*="color: rgb(245, 245, 247)"] { color: #1d1d1f !important; }
#games [style*="color: rgb(161, 161, 166)"] { color: #48484d !important; }
#games [style*="color: rgb(210, 210, 215)"] { color: #3a3a3c !important; }
#games [style*="color: rgb(255, 206, 0)"] { color: #6b4e00 !important; }
#games [style*="background: rgba(255, 255, 255, 0.1)"] { background: rgba(0,0,0,.06) !important; }
#games [style*="rgba(255, 255, 255, 0.25)"] { border-color: rgba(0,0,0,.18) !important; }
#games [style*="border-radius: 14px; background: rgb(255, 255, 255)"] { background: #1d1d1f !important; }
#games [style*="border-radius: 14px; background: rgb(255, 255, 255)"] svg { stroke: #ffffff; }
