/* GeschrevenGedichten.nl 4.0.48 — Mobiele UX-verfijning
   Doel: navigatie, titels, leesbaarheid, formulieren, Studio, Atelier en overzichtskaarten.
   Bewaart functies, database, URL's, betaalflows en alle desktop-opmaak.
   Geen global overflow:hidden op body, geen verbergen van inhoudelijke velden.
*/
@media (max-width: 1024px) {
  /* Breek lange woorden en voorkom dat kaarten de beschikbare breedte oprekken. */
  html body #ggw-site :is(.ggw-container,.ggw-archive-primary,.ggw-content-shell,.ggw-page-article,.ggw-entry-content,.ggw-poem-grid,.gg406-card-grid,.gg141-grid,.ggh-atelier-poems,.gg370-studio__workspace,.gg-profile-main,.gg-profile-home) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  html body #ggw-site main :is(.ggw-poem-card,.ggw-card,.gg406-card,.gg141-card,.ggh-atelier-poem,.gg-profile-action-card,.gg-profile-community-card) {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  /* Bewaak het originele gedichtritme: geen kunstmatige regelafbreking in gedichtregels. */
  html body #ggw-site :is(img,video) {max-width:100%;height:auto}
  html body #ggw-site main :is(.ggw-pagination,.gg141-pagination,.ggh-atelier-pagination,.page-numbers) {
    max-width:100%;
  }
  html body #ggw-site main :is(.ggw-pagination,.gg141-pagination,.ggh-atelier-pagination) {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
    justify-content:center;
  }
  html body #ggw-site main :is(.ggw-pagination,.gg141-pagination,.ggh-atelier-pagination) :is(a,span.page-numbers) {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:44px;
    min-height:44px;
    box-sizing:border-box;
  }
  html body #ggw-site :is(.gg406-hub,.gg370-studio,.gg141-archive-page,.ggh-atelier-start) :is(a,button,summary,input,select,textarea):focus-visible,
  html body #vv49-shell-header #vv49-mobile :is(a,summary):focus-visible {
    outline:3px solid #aa6348!important;
    outline-offset:3px;
  }
}

@media (max-width: 767px) {
  html {scroll-padding-top:20px}
  html body #ggw-site {--gg-edge-gap:16px;--gg-section-gap:34px;--gg-card-gap:14px}
  /* Warm, rustig en gelijkmatig: maximaal 1280px blijft desktopnorm. */
  html body #ggw-site main#main-content :is(.ggw-container,.gg406-wrap,.gg370-studio__container,.ggh-atelier-start > section,.gg141-archive) {
    box-sizing:border-box;
    min-width:0;
  }
  html body #ggw-site main.gg406-hub > .gg406-wrap,
  html body #ggw-site main.gg370-studio > .gg370-studio__container {
    width:calc(100% - 24px)!important;
    max-width:1280px!important;
    margin-inline:auto!important;
  }

  /* Mobiele hoofdnavigatie: bestaande uitklappaneel behouden, ruimere lees- en klikregels. */
  html body #vv49-shell-header #vv49-mobile {
    box-sizing:border-box!important;
    max-height:min(78dvh,730px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
  html body #vv49-shell-header #vv49-mobile#vv49-mobile .gg28-mobile-group>summary,
  html body #vv49-shell-header #vv49-mobile#vv49-mobile .gg28-mobile-links a,
  html body #vv49-shell-header #vv49-mobile#vv49-mobile :is(.gg281-mobile-feature,.gg406-mobile-overview,.vv49-mobile-home,.gg331-mobile-action,.vv49-mobile-end) {
    min-height:48px!important;
    font-size:14px!important;
    line-height:1.45!important;
    overflow-wrap:break-word;
    box-sizing:border-box!important;
  }
  html body #vv49-shell-header #vv49-mobile#vv49-mobile .gg28-mobile-links {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:5px!important;
  }
  html body #vv49-shell-header #vv49-mobile .gg28-mobile-row h2 {font-size:11px!important;line-height:1.5!important}

  /* Zes startpagina's van de menuroutes: inhoud meteen zichtbaar zonder extra decor. */
  html body .gg406-hub .gg406-breadcrumbs {min-height:34px!important;padding:3px 0!important}
  html body .gg406-hub .gg406-hero {
    min-height:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    padding:22px 19px!important;
    margin-bottom:16px!important;
  }
  html body .gg406-hub .gg406-hero h1 {
    font-size:clamp(31px,8.4vw,39px)!important;
    line-height:1.08!important;
    margin-bottom:9px!important;
    overflow-wrap:break-word;
  }
  html body .gg406-hub .gg406-hero-lead {font-size:19px!important;line-height:1.35!important;margin-bottom:10px!important}
  html body .gg406-hub .gg406-hero-description {font-size:14px!important;line-height:1.65!important;margin-bottom:15px!important}
  html body .gg406-hub .gg406-hero-aside {display:none!important} /* decoratieve quote, geen navigatie of inhoud */
  html body .gg406-hub .gg406-main-cta {min-height:48px!important;width:100%!important;justify-content:space-between!important;padding:12px 16px!important}
  html body .gg406-hub .gg406-section-nav {gap:8px!important;padding:12px!important;margin-bottom:21px!important}
  html body .gg406-hub .gg406-section-nav a {min-height:44px!important;font-size:12px!important}
  html body .gg406-hub .gg406-sections {gap:25px!important}
  html body .gg406-hub .gg406-section-heading {display:block!important;margin-bottom:12px!important}
  html body .gg406-hub .gg406-section-heading h2 {font-size:30px!important;line-height:1.1!important}
  html body .gg406-hub .gg406-section-count {display:none!important}
  html body .gg406-hub .gg406-card-grid {grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  html body .gg406-hub .gg406-card {
    min-height:0!important;
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr) 20px!important;
    align-items:center!important;
    gap:12px!important;
    padding:15px!important;
    border-radius:14px!important;
  }
  html body .gg406-hub .gg406-card:before {height:100%!important;opacity:.35!important;border-radius:inherit!important}
  html body .gg406-hub .gg406-card-icon {width:40px!important;height:40px!important;margin:0!important}
  html body .gg406-hub .gg406-card-content {margin:0!important;padding:0!important;gap:3px!important;position:relative!important}
  html body .gg406-hub .gg406-card-content strong {font-size:15px!important;line-height:1.4!important}
  html body .gg406-hub .gg406-card-content>span {font-size:12px!important;line-height:1.55!important}
  html body .gg406-hub .gg406-card-arrow {position:relative!important;right:auto!important;bottom:auto!important;font-size:17px!important}
  html body .gg406-hub .gg406-closing {flex-direction:column!important;align-items:stretch!important;gap:14px!important;padding:20px!important;margin-top:24px!important}
  html body .gg406-hub .gg406-closing h2 {font-size:28px!important}

  /* Gedichtenoverzichten + pagina's: minder leegte, cards leesbaar, niet vernauwen. */
  html body #ggw-site main :is(.ggw-poem-grid,.ggw-six-grid,.gg-category-two-columns,.gg445-tag-grid,.ggw-blog-grid) {
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  html body #ggw-site main :is(.ggw-poem-card,.ggw-card,.ggw-blog-card) {box-sizing:border-box!important;width:100%!important;max-width:100%!important}
  html body #ggw-site main :is(.ggw-pagination,.gg141-pagination,.ggh-atelier-pagination) a {
    min-height:44px!important;
    border-radius:10px;
  }
  html body #ggw-site main :is(.gg445-tag-heading,.gg141-archive>header,.ggh-atelier-intro) h1 {
    font-size:clamp(30px,8vw,39px)!important;
    line-height:1.1!important;
    overflow-wrap:break-word;
  }

  /* Studio: focus op schrijfgebied; bediening mag horizontaal scrollen zonder afbreken. */
  html body main.gg370-studio {padding-bottom:40px!important}
  html body .gg370-studio .gg370-studio__opening {margin-bottom:13px!important}
  html body .gg370-studio .gg370-studio__opening h1 {font-size:clamp(31px,8.6vw,40px)!important;line-height:1.1!important}
  html body .gg370-studio .gg370-studio__steps {
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    scroll-padding-inline:5px;
    gap:8px!important;
    padding:5px 0 12px!important;
    max-width:100%!important;
  }
  html body .gg370-studio .gg370-studio__step {
    flex:0 0 auto!important;
    min-height:45px!important;
    min-width:max-content!important;
    scroll-snap-align:start;
    display:inline-flex!important;
    align-items:center!important;
    padding:10px 13px!important;
    box-sizing:border-box!important;
  }
  html body .gg370-studio .gg370-studio__workspace {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:18px!important;
  }
  html body .gg370-studio :is(.gg370-studio__editor,.gg370-studio__preview,.gg370-studio__paper) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  html body .gg370-studio .gg370-studio__preview {margin-top:8px!important}
  html body .gg370-studio .gg370-studio__tail {padding:14px 17px!important}

  /* Atelier (start / voorbeelden / paginering) op één duidelijk leesvlak. */
  html body .ggh-atelier-start .ggh-atelier-intro {margin-bottom:18px!important}
  html body .ggh-atelier-start .ggh-atelier-search {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  html body .ggh-atelier-start .ggh-atelier-search form {min-width:0!important;width:100%!important}
  html body .ggh-atelier-start .ggh-atelier-search form>div {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important;
  }
  html body .ggh-atelier-start .ggh-atelier-search input {min-width:0!important;width:100%!important;max-width:100%!important}
  html body .ggh-atelier-start .ggh-atelier-search button {min-height:48px!important;width:100%!important}
  html body .ggh-atelier-start .ggh-atelier-poems {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
  html body .ggh-atelier-start .ggh-atelier-poem {min-width:0!important;max-width:100%!important}
  html body .ggh-atelier-start .ggh-atelier-poem a {min-height:46px!important;display:inline-flex;align-items:center}


  /* Het interactieve Download Atelier heeft 5 echte stappen.
     Horizontale stapnavigatie neemt minder kostbare schermhoogte in. */
  html body.gg119-downloadatelier.gg200-atelier #gg114-page {
    width:calc(100% - 24px)!important;
    max-width:1280px!important;
    margin:12px auto 36px!important;
    box-sizing:border-box!important;
  }
  html body.gg200-atelier #gg116-studio-root .gg200-progress {
    display:flex!important;
    flex-wrap:nowrap!important;
    grid-template-columns:none!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x proximity;
    gap:8px!important;
    padding:3px 2px 12px!important;
    margin-bottom:12px!important;
  }
  html body.gg200-atelier #gg116-studio-root .gg200-progress-step,
  html body.gg200-atelier #gg116-studio-root .gg200-progress-step:last-child {
    flex:0 0 154px!important;
    grid-column:auto!important;
    min-width:154px!important;
    max-width:170px!important;
    min-height:59px!important;
    border-radius:12px!important;
    padding:9px 10px!important;
    scroll-snap-align:start;
  }
  html body.gg200-atelier #gg116-studio-root .gg200-step-title strong {font-size:12px!important;line-height:1.35!important}
  html body.gg200-atelier #gg116-studio-root .gg103-layout {
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    min-width:0!important;
  }
  html body.gg200-atelier #gg116-studio-root .gg103-layout > :is(.gg103-side,.gg103-main) {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    position:static!important;
    padding:13px!important;
  }
  html body.gg200-atelier #gg116-studio-root .gg200-step-panel[hidden] {display:none!important}
  html body.gg200-atelier #gg116-studio-root :is(.gg200-prev,.gg200-next) {min-height:48px!important}
  html body.gg200-atelier #gg116-studio-root :is(input[type='text'],input[type='search'],textarea,select) {font-size:16px!important;max-width:100%!important}

  /* Prentengalerij: formaat behouden, acties op elke telefoon bruikbaar. */
  html body .gg141-archive-page .gg141-archive {width:calc(100% - 24px)!important;max-width:1280px!important;margin-inline:auto!important}
  html body .gg141-archive-page .gg141-grid {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:15px!important}
  html body .gg141-archive-page .gg141-card {min-width:0!important;overflow:hidden!important}
  html body .gg141-archive-page .gg141-card-image img {display:block;width:100%!important;height:auto!important;aspect-ratio:4/5;object-fit:cover}
  html body .gg141-archive-page .gg141-actions {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important}
  html body .gg141-archive-page .gg141-actions a {min-height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:10px!important;box-sizing:border-box!important}

  /* Profiel en community: geen geplette kolommen; leesbare select-velden. */
  html body .vv-profile-shell.ggw-account-v16 .gg-profile-layout,
  html body .vv-profile-shell.ggw-account-v16 .gg-profile-main {width:100%!important;max-width:100%!important;min-width:0!important}
  html body .vv-profile-shell.ggw-account-v16 :is(.gg-profile-action-grid,.gg-profile-community-grid,.gg-profile-performance-grid,.gg-profile-subscription-grid,.gg-profile-poem-card-grid,.gg-profile-buddies-grid) {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html body .vv-profile-shell.ggw-account-v16 .gg-profile-mobile-menu :is(summary,a) {min-height:45px!important}
  html body .vv-profile-shell.ggw-account-v16 :is(.gg-profile-final-actions,.gg-profile-summary-actions) a {min-height:45px!important}

  /* Oude formulieren / zoekbalken: voorkomt automatische iPhone-zoom. */
  html body #ggw-site main :is(input[type='text'],input[type='search'],input[type='email'],input[type='tel'],input[type='password'],input[type='number'],input[type='url'],textarea,select) {
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
    font-size:16px!important;
  }
  html body #ggw-site main :is(.ggwh,.gg-syn-shell,.ggwb-page-content,.ggw-form-panel,.ggw-system-page__content) :is(button[type='submit'],input[type='submit']) {
    min-height:46px;
  }
  /* Lange schijfhulpsuggesties niet laten overstromen. */
  html body #ggw-site main :is(.ggwh,.gg-syn-shell,.ggwb-page-content) :is(.ggwh-card,.ggwh-result,.ggwb-card) {min-width:0;max-width:100%;overflow-wrap:anywhere}

  /* Mobiele dialogen: zichtbaar boven het toetsenbord, zonder achterliggende inhoud te versmallen. */
  html body :is(.gg-publish-modal__dialog,.vers-modal-content,.ggss-dialog,[role='dialog'].ggw-modal,[role='dialog'].ggw-login-modal) {
    box-sizing:border-box!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100dvh - 28px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }
}

@media (max-width: 380px) {
  html body #vv49-shell-header #vv49-mobile .gg28-mobile-group>summary,
  html body #vv49-shell-header #vv49-mobile .gg28-mobile-links a {font-size:13.5px!important}
  html body .gg406-hub .gg406-hero {padding:19px 15px!important}
  html body .gg406-hub .gg406-card {grid-template-columns:36px minmax(0,1fr) 16px!important;gap:9px!important;padding:12px!important}
  html body .gg406-hub .gg406-card-icon {width:36px!important;height:36px!important}
  html body .gg141-archive-page .gg141-actions {grid-template-columns:minmax(0,1fr)!important}
  html body #vv49-shell-footer .vv49-foot-grid {grid-template-columns:minmax(0,1fr)!important}
  html body #vv49-shell-footer .vv49-foot-grid>div:first-child {grid-column:auto!important}
}
@media (prefers-reduced-motion: reduce) {
  html body .gg406-hub .gg406-card,
  html body .gg370-studio .gg370-studio__steps {scroll-behavior:auto!important;transition:none!important}
}
