/* Dartclub Zwenkau – geräteübergreifende mobile Darstellung, Oktober 2026 */
html{max-width:100%;-webkit-text-size-adjust:100%}
body{max-width:100%;overflow-x:clip}
img,video,iframe,svg{max-width:100%;height:auto}
pre,code{overflow-wrap:anywhere}
main,section,article,.wrap,.panel,form,fieldset{min-width:0}
input,select,textarea,button{font-size:16px;box-sizing:border-box}
input:not([type=checkbox]):not([type=radio]),select,textarea{min-width:0;max-width:100%}
.long-text,td,th,p,h1,h2,h3,.home-card,.panel{overflow-wrap:anywhere}
@media(max-width:900px){
 .wrap{width:100%;max-width:100%;padding-left:clamp(12px,3vw,20px);padding-right:clamp(12px,3vw,20px)}
 .welcome,.home-grid,.content-layout,.sidebar,.quicklinks,.archive-links,.dart-feature-grid,.home-guestbook-list{grid-template-columns:minmax(0,1fr)!important}
 .welcome-art,.welcome>div,.home-grid>*,.content-layout>*,.sidebar>*,.quicklinks>*{min-width:0}
 .photos,.home-gallery .photos{max-width:100%}
 .topline .wrap{flex-wrap:wrap;gap:4px}
 .cup-grid{grid-template-columns:minmax(0,1fr)!important}
 .cup-wrap{max-width:100%;padding:18px 12px 45px}
 .cup-hero{padding:20px 16px}
 .cup-nav{gap:7px}
 .cup-nav a{flex:1 1 auto;text-align:center}
}
@media(max-width:650px){
 body>header{max-width:100%}
 main{max-width:100%!important;min-width:0!important}
 .wrap{padding-left:12px;padding-right:12px}
 .home-card,.home-gallery,.home-guestbook{padding:16px!important}
 .welcome>div:first-child{padding:20px!important}
 .welcome h1{font-size:clamp(27px,8vw,38px)!important}
 .home-grid,.archive-day-list{gap:12px}
 .archive-day summary,.day-group summary{flex-wrap:wrap;white-space:normal}
 .archive-player-pair,.compact-match{flex-wrap:wrap}
 .compact-match>*{min-width:0}
 .mainnav .navlinks{min-width:0;max-width:100%;flex-wrap:wrap}
 .mainnav .navlinks>a,.mainnav .nav-dropdown{max-width:100%}
 .nav-dropdown-menu{max-width:100%;min-width:0}
 .rank-table-wrap,.stats-table-wrap{overflow:visible!important;max-width:100%}
 .rank-table,.dc-responsive-table{width:100%!important;min-width:0!important;max-width:100%;border-collapse:separate!important;border-spacing:0 10px!important}
 .dc-responsive-table thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
 .dc-responsive-table tbody,.dc-responsive-table tr,.dc-responsive-table td,.dc-responsive-table th[scope=row]{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important}
 .dc-responsive-table tbody tr{border:1px solid #dce5eb!important;border-radius:12px!important;background:#fff!important;overflow:hidden;margin:0 0 12px!important;padding:9px 12px!important;box-shadow:0 2px 9px #173b500c}
 .dc-responsive-table td,.dc-responsive-table th[scope=row]{display:flex!important;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:8px;border:0!important;border-bottom:1px solid #edf1f4!important;padding:10px 2px!important;text-align:right!important;white-space:normal!important;overflow-wrap:anywhere}
 .dc-responsive-table td:last-child{border-bottom:0!important}
 .dc-responsive-table td::before,.dc-responsive-table th[scope=row]::before{content:attr(data-label);font-weight:700;color:#415d70;text-align:left;flex:0 1 44%;max-width:44%}
 .dc-responsive-table td>*{max-width:100%}
 .dc-responsive-table td .rank-player{flex:1;justify-content:flex-end}
 .dc-responsive-table td:has(.rank-player){align-items:center}
}
/* Verwaltung: Eingaben und Aktionsschaltflächen bequem bedienen */
@media(max-width:760px){
 body>header{padding:14px 12px!important;gap:12px!important}
 body>header nav{width:100%;display:flex;flex-wrap:wrap;gap:8px!important}
 body>header nav a,body>header nav button{min-height:42px;display:inline-flex;align-items:center}
 main{width:100%!important;max-width:100%!important;margin:12px auto!important;padding:0 12px 35px!important}
 .panel,section.panel{padding:16px 12px!important;max-width:100%!important}
 form{max-width:100%;min-width:0}
 form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),form select,form textarea{max-width:100%!important}
 form input[type=datetime-local],form input[type=date]{width:100%!important;min-width:0!important}
 .bulk-grid,.season-stats{grid-template-columns:minmax(0,1fr)!important}
 .day-date-form,.match form,.match,.row,.actions{flex-wrap:wrap;max-width:100%}
 .day-date-form label{min-width:0!important;flex-basis:100%}
 .match form select{max-width:100%!important}
 .dc-field-help{max-width:100%;margin-left:3px}
 .dc-help-text{max-width:min(340px,calc(100vw - 85px))}
 .dc-help-intro{padding:11px 12px}
 .dc-responsive-table td,.dc-responsive-table th{white-space:normal!important}
}
@media(max-width:420px){
 .home-gallery .photos figure{flex-basis:88%!important}
 .home-guestbook-entry{padding:12px!important}
 .welcome-actions{flex-direction:column;align-items:stretch}
 .welcome-actions a{text-align:center}
 .archive-player img,.archive-player .avatar-fallback{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important}
}

/* Startseite: harte Begrenzung der Layoutbreite auf mobilen Geräten. */
@media (max-width:900px){
 html,body{width:100%;max-width:100%;overflow-x:clip!important}
 body:has(.home-grid) .wrap,body:has(.home-grid) main,body:has(.home-grid) main>.wrap,body:has(.home-grid) .topline,body:has(.home-grid) .site-header,body:has(.home-grid) .mainnav,body:has(.home-grid) footer{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 body:has(.home-grid) .welcome,body:has(.home-grid) .home-grid,body:has(.home-grid) .home-card,body:has(.home-grid) .home-gallery,body:has(.home-grid) .home-guestbook{width:100%;max-width:100%;min-width:0}
 body:has(.home-grid) .welcome{grid-template-columns:minmax(0,1fr)!important}
 body:has(.home-grid) .welcome-art-content{max-width:100%;min-width:0;text-align:center;padding:10px}
 body:has(.home-grid) .welcome-art-content strong{font-size:clamp(30px,9vw,52px)!important;overflow-wrap:anywhere}
 body:has(.home-grid) .welcome-art-content .art-caption{overflow-wrap:anywhere;letter-spacing:1px}
 body:has(.home-grid) .home-gallery .gallery-stage{width:100%;max-width:100%;min-width:0;overflow:hidden}
 body:has(.home-grid) .home-gallery .photos{width:100%;max-width:100%;min-width:0}
 body:has(.home-grid) .home-gallery .photos figure{min-width:0}
 body:has(.home-grid) .home-guestbook-list{grid-template-columns:minmax(0,1fr)!important}
 body:has(.home-grid) .footer-inner,body:has(.home-grid) .footer-inner>div{flex-wrap:wrap;min-width:0}
 body:has(.home-grid) .compact-links,body:has(.home-grid) .compact-match{min-width:0;flex-wrap:wrap}
 body:has(.home-grid) .navlinks,body:has(.home-grid) .nav-dropdown,body:has(.home-grid) .nav-dropdown-menu{max-width:100%;min-width:0}
 body:has(.home-grid) img{max-width:100%;height:auto}
}

/* iPhone/Safari: Startseite muss im sichtbaren Viewport bleiben. */
@media (max-width:900px) {
 html { width:100%; max-width:100%; overflow-x:hidden!important; }
 body { width:100%; max-width:100%; margin:0!important; overflow-x:hidden!important; }
 body:has(.home-grid) > .topline,
 body:has(.home-grid) > .site-header,
 body:has(.home-grid) > .mainnav,
 body:has(.home-grid) > main,
 body:has(.home-grid) > footer { width:100%!important; max-width:100%!important; min-width:0!important; margin-left:0!important; margin-right:0!important; }
 body:has(.home-grid) main { padding:0!important; }
 body:has(.home-grid) .wrap { width:100%!important; max-width:100%!important; min-width:0!important; margin-left:auto!important; margin-right:auto!important; padding-left:12px!important; padding-right:12px!important; }
 body:has(.home-grid) .welcome { display:grid!important; grid-template-columns:minmax(0,1fr)!important; min-width:0!important; margin-left:0!important; margin-right:0!important; }
 body:has(.home-grid) .welcome > div { width:100%; max-width:100%; min-width:0; }
 body:has(.home-grid) .welcome h1 { max-width:100%; overflow-wrap:break-word; word-break:normal; }
 body:has(.home-grid) .welcome-actions { width:100%; min-width:0; }
 body:has(.home-grid) .welcome-actions a { min-width:0; max-width:100%; }
 body:has(.home-grid) .home-grid { display:grid!important; grid-template-columns:minmax(0,1fr)!important; }
 body:has(.home-grid) .zwenkau-banner,body:has(.home-grid) .zwenkau-banner img { display:block; width:100%!important; max-width:100%!important; height:auto!important; }
 body:has(.home-grid) .zwenkau-menu { width:100%; max-width:100%; }
 body:has(.home-grid) .home-gallery .photos { overflow-x:auto; max-width:100%; }
}


/* Dartclub Zwenkau – mobile Feinschliff Oktober 2026 (öffentlicher Bereich) */
@media (max-width: 900px) {
  *,*::before,*::after{box-sizing:border-box}
  .wrap,.gal-wrap,.cup-wrap,.schedule-panel,.rank-table-wrap,.stats-table-wrap{min-width:0;max-width:100%}
  .schedule-stats{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:10px}
  .archive-day,.day-group,.schedule-panel,.home-card,.rank-head,.gal-hero{max-width:100%;min-width:0}
  .match-row,.archive-game,.compact-match,.archive-player-pair{min-width:0;max-width:100%}
  .gal-wrap img,.archive-player img,.player-card img{object-fit:cover}
  .gallery-grid,.gal-grid,.player-grid,.players-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
  .back-to-top{right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:44px;height:44px}
}
@media (max-width:650px) {
  .schedule-hero,.gal-hero,.rank-head{padding:18px 14px}
  .archive-day summary,.day-group summary{padding:13px 12px;gap:7px;line-height:1.4}
  .archive-day .match-list,.match-list{min-width:0}
  .match-row,.archive-game{gap:10px;overflow-wrap:anywhere}
  .archive-player-pair{gap:8px}
  .archive-player{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .schedule-status{max-width:100%;white-space:normal;text-align:center}
  .gal-top{flex-wrap:wrap;gap:12px}
  .gal-top>*{min-width:0}
  .gal-back{max-width:100%;white-space:normal}
  .cup-nav a,.welcome-actions a,.gal-back{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .rank-table-wrap,.stats-table-wrap{max-width:100%}
  .dc-responsive-table td::before,.dc-responsive-table th[scope=row]::before{min-width:0}
  .dc-responsive-table td{gap:6px}
  .dc-responsive-table td:empty::before{display:none}
  input,select,textarea{font-size:16px}
}
@media (prefers-reduced-motion:reduce) {
  html{scroll-behavior:auto!important}
}
