/* DG KOF XV Hub 1.27.7 — Mobile First Global Stage 5
 * Overflow & fixed-dimension audit.
 * Purpose: remove layout pressure without overriding intentional visual sizing.
 */
.dgkof-hub,.dgkof-directory,.dgkof-profile,.dgkof-account-box,.dgkof-player-area,.dgkof-player-area-shell,
.dgkof-module,.dgkof-card,.dgkof-panel,.dgkof-section,.dgkof-widget,.dgkof-widget-card{min-width:0;box-sizing:border-box;}
.dgkof-hub img,.dgkof-directory img,.dgkof-profile img,.dgkof-account-box img,.dgkof-player-area img,
.dgkof-module img,.dgkof-card img,.dgkof-panel img,.dgkof-section img,.dgkof-widget img{max-inline-size:100%;}
.dgkof-hub iframe,.dgkof-directory iframe,.dgkof-profile iframe,.dgkof-account-box iframe,.dgkof-player-area iframe,
.dgkof-module iframe,.dgkof-card iframe,.dgkof-panel iframe{max-inline-size:100%;}
.dgkof-hub input,.dgkof-hub select,.dgkof-hub textarea,.dgkof-directory input,.dgkof-directory select,.dgkof-directory textarea,
.dgkof-player-area input,.dgkof-player-area select,.dgkof-player-area textarea,.dgkof-module input,.dgkof-module select,.dgkof-module textarea{max-inline-size:100%;box-sizing:border-box;}
.dgkof-hub table,.dgkof-directory table,.dgkof-player-area table,.dgkof-module table{max-inline-size:100%;}
.dgkof-hub pre,.dgkof-directory pre,.dgkof-player-area pre,.dgkof-module pre{max-inline-size:100%;overflow:auto;}

/* Flex/grid children are allowed to shrink instead of transferring their width to the page. */
.dgkof-hub [class*="-row"]>*,.dgkof-directory [class*="-row"]>*,.dgkof-player-area [class*="-row"]>*,
.dgkof-hub [class*="-grid"]>*,.dgkof-directory [class*="-grid"]>*,.dgkof-player-area [class*="-grid"]>*{min-width:0;}

/* Fixed-size controls remain usable, but their parent must be able to shrink. */
.dgkof-hub button,.dgkof-hub .button,.dgkof-directory button,.dgkof-directory .button,
.dgkof-player-area button,.dgkof-player-area .button,.dgkof-module button,.dgkof-module .button{max-inline-size:100%;box-sizing:border-box;}

/* Intentional horizontal canvases: contain the scroll at the component boundary. */
.dgkof-bracket-horizontal,.dgkof-tournament-bracket,.dgkof-bracket-wrap,.dgkof-table-scroll,.dgkof-data-table-wrap{max-inline-size:100%;}
.dgkof-table-scroll,.dgkof-data-table-wrap{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;}

/* Player area: generated settings can create desktop-sized dimensions. */
.dgkof-player-area-shell{min-width:0;max-width:100%;}
.dgkof-player-main{min-width:0;max-width:100%;}

@media (max-width: 900px){
  .dgkof-player-area-shell{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-player-sidebar{min-width:0;max-width:100%;}
  .dgkof-player-main{padding-inline:clamp(14px,4vw,28px)!important;}
  .dgkof-player-welcome{min-width:0;}
  .dgkof-player-content-grid,.dgkof-player-stat-grid,.dgkof-player-tournament-grid{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-admin-ft-card-body{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-admin-ft-section+.dgkof-admin-ft-section{border-left:0;border-top:1px solid currentColor;}
}

@media (max-width: 700px){
  /* Fixed preview/image heights are visual only; allow content to define the card when narrow. */
  .dgkof-character-image-preview{height:clamp(150px,42vw,230px);}
  .dgkof-evidence-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .dgkof-evidence-player-head,.dgkof-evidence-ft-head{flex-direction:column;align-items:stretch;}
  .dgkof-evidence-player-head>*:last-child,.dgkof-evidence-ft-head>*:last-child{align-self:flex-start;}
  .dgkof-image-file{white-space:normal;overflow-wrap:break-word;}
  .dgkof-competition-hero{min-height:clamp(240px,65vw,360px);}
  .dgkof-competition-hero-inner{padding:clamp(28px,8vw,70px) clamp(18px,7vw,7%);}
}

@media (max-width: 600px){
  /* Do not let fixed minimum widths survive into phone layouts. */
  .dgkof-hub [style*="min-width"],.dgkof-directory [style*="min-width"],.dgkof-player-area [style*="min-width"],
  .dgkof-module [style*="min-width"]{min-width:0!important;}
  .dgkof-player-brand strong{white-space:normal;overflow-wrap:break-word;}
  .dgkof-player-location,.dgkof-player-category-identity-label{white-space:normal!important;overflow-wrap:break-word;}
  .dgkof-rating-board li{grid-template-columns:36px minmax(0,1fr)!important;}
  .dgkof-rating-board li>b,.dgkof-rating-board li>span:last-child{grid-column:2;justify-self:start;}
  .dgkof-steam-online-list{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-steam-player-info strong{white-space:normal;overflow-wrap:break-word;}
  .dgkof-ft-status,.dgkof-ft-notification .button-link{white-space:normal;}
  .dgkof-admin-ft-card-head,.dgkof-player-section-heading{flex-wrap:wrap;}
  .dgkof-player-section-heading>*{min-width:0;}
  .dgkof-player-main.dgkof-is-loading:after{top:10px;right:10px;max-width:calc(100% - 20px);}
}

@media (max-width: 430px){
  .dgkof-evidence-gallery{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-competition-participants{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-competition-section-heading h2{font-size:clamp(25px,8vw,36px);}
  .dgkof-player-welcome{flex-direction:column;align-items:stretch;gap:14px;}
  .dgkof-player-stat-grid{grid-template-columns:minmax(0,1fr)!important;}
  .dgkof-player-tournament-cover{height:clamp(120px,38vw,150px);}
}

@media (max-width: 360px){
  .dgkof-player-main{padding-inline:12px!important;}
  .dgkof-player-welcome,.dgkof-player-content-grid article,.dgkof-player-stat-grid>div{padding:14px!important;}
  .dgkof-player-welcome h1{font-size:clamp(22px,7vw,30px);}
}

/* Admin screens receive the same dimension discipline. */
@media (max-width: 782px){
  .dgkof-admin-wrap,.dgkof-settings-wrap,.dgkof-dashboard-main,.dgkof-admin-page{max-width:100%;min-width:0;box-sizing:border-box;}
  .dgkof-admin-wrap table,.dgkof-settings-wrap table,.dgkof-dashboard-main table{display:block;max-width:100%;overflow-x:auto;}
  .dgkof-character-image-grid,.dgkof-evidence-gallery{min-width:0;}
  .dgkof-image-mapping-toolbar{min-width:0;}
  .dgkof-image-mapping-toolbar>*{min-width:0;max-width:100%;}
  .dgkof-toolbar-note{white-space:normal;overflow-wrap:break-word;}
  .kof-admin-module-item,.dgkof-dashboard-main-action{white-space:normal;max-width:100%;}
}

/* Accessibility: no forced motion for users who request reduced motion. */
@media (prefers-reduced-motion: reduce){
  .dgkof-hub *,.dgkof-directory *,.dgkof-player-area *,.dgkof-module *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important;}
}
