.mobile-match-meta,.mobile-match-edit,.mobile-menu-backdrop { display: none; }
.sidebar-bottom-actions button[hidden],#installPwaStart[hidden],#installPwa[hidden] { display: none!important; }
#pwaAreaChoices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0; padding: 16px; border: 1px solid var(--line); }
#pwaAreaChoices label { display: flex; align-items: center; gap: 10px; font-weight: 400; }
#pwaAreaChoices input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
#mobileConnectionStatus { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; margin: 0; padding: 10px 14px; background: #fff0ce; color: #713b09; border-top: 1px solid #d9b85b; font-size: 14px; }
#mobileConnectionStatus[hidden] { display: none; }
@media screen and (max-width:900px) {
  body.admin-page { min-width: 0; }
  .admin-page *, .live-overlay * { box-sizing: border-box; }
  .admin-page .app-shell,.admin-page .full-shell,.admin-page .admin-editor-layout,.admin-page .admin-editor-main,.admin-page .workspace,.admin-page .panel,.admin-page .admin-tab-view { min-width: 0; max-width: 100%; }
  .editor-open .admin-editor-main,.admin-sidebar:not(.collapsed)~.admin-editor-main,.admin-sidebar.collapsed~.admin-editor-main { margin-left: 0!important; padding: 62px 10px 20px; }
  .editor-open.start-open .admin-home-header,.editor-open.start-open .admin-start-view { margin-left: 0; padding-left: 12px; padding-right: 12px; }
  .editor-open.start-open .admin-home-header { padding-top: 66px; }
  .admin-page .admin-sidebar { z-index: 101; width: min(280px,88%); height: 100dvh; }
  .admin-page .admin-sidebar.collapsed { width: 52px; height: 52px; background: var(--bg); border-radius: 0 0 6px 0; }
  .admin-sidebar.collapsed .sidebar-bottom-actions,.admin-sidebar.collapsed .sidebar-global-settings { display: none; }
  .mobile-menu-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(0,0,0,.4); }
  .admin-page .panel { padding: 14px 10px; }
  .admin-page .page-save-control { position: fixed; top: 6px; right: 10px; z-index: 90; }
  .admin-page .page-save-control button { width: 44px; min-height: 44px; height: 44px; }
  .admin-page input:not([type=checkbox]):not([type=radio]):not([type=color]),.admin-page select,.admin-page textarea,.live-dialog select { min-width: 0; max-width: 100%; font-size: 16px; }
  .admin-page button,.admin-page a,.admin-page label { overflow-wrap: anywhere; }
  .admin-page .primary-button,.admin-page .secondary-button,.admin-page .secondary-link { max-width: 100%; min-width: 0; white-space: normal; }
  .admin-page fieldset { min-width: 0; max-width: 100%; }
  .admin-page .field-grid,.admin-page .division-grid,.admin-page .theme-grid,.admin-page .pause-grid,.admin-page .info-editor-grid,.admin-page .user-grid,.admin-page .sponsor-input-grid,.admin-page .carousel-selection-grid,.admin-page .playoff-grid,.admin-page .presentation-qr-grid { grid-template-columns: minmax(0,1fr); }
  .admin-page .field-grid>*,.admin-page .section-title>*,.admin-page .button-row>*,.admin-page .team-logo-card>*,.admin-page .print-option-row>* { min-width: 0; max-width: 100%; }
  .admin-page .section-title,.admin-page .button-row,.admin-page .compact-time-editor,.admin-page .info-text-toolbar,.admin-page .radio-row { flex-wrap: wrap; }
  .admin-page .section-title { gap: 10px; }
  .admin-page .section-title h2 { font-size: 20px; }
  .admin-page .section-title p { font-size: 14px; }
  .admin-page .team-inputs,.admin-page .teams-with-logos,.admin-page .team-logos,.admin-page .team-logo-grid { grid-template-columns: minmax(0,1fr); }
  .admin-page .team-logo-card { width: 100%; }
  .admin-page .presentation-logo-control { grid-template-columns: minmax(0,1fr) auto auto; }
  .admin-page .presentation-logo-control>div:first-child { grid-column: 1/-1; }
  .admin-page .category-buttons,.admin-page .team-category-buttons { flex-wrap: wrap; }
  .admin-page .category-buttons button { min-width: 0; flex: 1 1 90px; }
  .admin-page .team-name,.admin-page .referee-match-label { min-width: 0; overflow-wrap: anywhere; }
  .admin-page .correction-standings-table { width: 100%; min-width: 0; table-layout: fixed; }
  .admin-page .correction-standings-table th,.admin-page .correction-standings-table td { padding: 7px 2px; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
  .admin-page .correction-standings-table th:nth-child(2) { width: 29%; }
  .admin-page .correction-standings-table .club-logo { width: 18px; height: 22px; flex-basis: 18px; }
  .admin-page .print-option-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .admin-page .design-workspace { grid-template-columns: minmax(0,1fr); }
  .admin-page .design-template-bar>label:first-child { flex-basis: 100%; }
  .admin-page .design-template-bar>label { min-width: 0; max-width: 100%; }
  #pwaAreaChoices { grid-template-columns: minmax(0,1fr); padding: 10px; }
  #adminViewResults .results-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
  #adminViewResults .results-filters label { min-width: 0; font-size: 12px; gap: 3px; }
  #adminViewResults .results-filters label:first-child { grid-column: 1/-1; }
  #adminViewResults .results-filters select { width: 100%; min-height: 38px; padding: 6px; font-size: 14px; }
  #adminViewResults .schedule-panel>.section-title { display: grid; grid-template-columns: minmax(0,1fr) 132px; align-items: center; margin-bottom: 8px; text-align: left; }
  #adminViewResults .schedule-lock-control { width: 132px; margin: 0; padding: 8px; gap: 6px; }
  #adminViewResults .schedule-lock-control h3 { font-size: 12px; min-height: 30px; display: flex; align-items: center; justify-content: center; }
  #adminViewResults #scheduleSubtitle { margin: 3px 0 0; }
  #adminViewResults #scheduleLockButton { width: 44px; height: 44px; flex: 0 0 44px; min-width: 44px; min-height: 44px; margin: 0; }
  #adminViewResults #scheduleLockButton svg { width: 28px; height: 28px; }
  #adminViewResults .schedule-conflicts { margin: 12px 0; padding: 10px 0; }
  #adminViewResults .conflict-controls { gap: 8px; margin-bottom: 8px; }
  #adminViewResults .conflict-controls label { display: flex; align-items: center; flex: 1; gap: 8px; font-size: 12px; }
  #adminViewResults .conflict-controls input { width: 58px; height: 36px; padding: 5px; }
  #adminViewResults #checkScheduleConflicts { padding: 7px 9px; min-height: 36px; font-size: 12px; }
  #adminViewResults #conflictSummary,#adminViewResults #conflictNote { font-size: 12px; }
  #adminSchedule { overflow: visible; }
  #adminSchedule .match-table,#adminSchedule .match-table tbody { display: block; min-width: 0; width: 100%; }
  #adminSchedule .match-table thead { display: none; }
  #adminSchedule .match-table tr.draggable-match { display: grid; grid-template-columns: minmax(0,1fr) 86px minmax(0,1fr); gap: 6px 8px; padding: 9px; margin-bottom: 8px; border: 1px solid var(--line,#d8e1e8); border-radius: 6px; min-width: 0; }
  #adminSchedule .match-table tr.draggable-match[hidden] { display: none; }
  #adminSchedule .draggable-match.match-row-open { background: #fffbe9; }
  #adminSchedule .draggable-match.match-row-done { background: #f1faf4; }
  #adminSchedule .draggable-match.time-conflict-row { background: #fff1f0; border-color: #dc8f88; }
  #adminSchedule .draggable-match>td { padding: 0; min-width: 0; width: auto; border: 0; align-self: center; background: transparent!important; box-shadow: none; }
  #adminSchedule .draggable-match>td:nth-child(2),#adminSchedule .draggable-match>td:nth-child(3),#adminSchedule .draggable-match>td:nth-child(4),#adminSchedule .draggable-match>td:nth-child(6) { display: none; }
  #adminSchedule .draggable-match>td:nth-child(5) { grid-row: 2; grid-column: 1; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
  #adminSchedule .draggable-match>td:nth-child(7) { grid-row: 2; grid-column: 3; text-align: right; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
  #adminSchedule .draggable-match .mobile-match-meta { display: flex; grid-row: 1; grid-column: 1/-1; justify-content: space-between; gap: 10px; font-size: 11px; line-height: 1.4; color: #52616c; }
  .mobile-match-title { min-width: 0; }
  .mobile-match-place { min-width: 0; text-align: right; }
  #adminSchedule .draggable-match .score-cell { grid-row: 2; grid-column: 2; }
  #adminSchedule .draggable-match .score-inputs { display: grid; grid-template-columns: 35px 8px 35px; gap: 3px; width: 84px; align-items: center; }
  #adminSchedule .draggable-match .score-inputs input { width: 35px; min-width: 0; height: 36px; padding: 3px; text-align: center; margin: 0; -moz-appearance: textfield; }
  #adminSchedule .score-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  #adminSchedule .draggable-match .save-row { grid-row: 3; grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 8px; }
  #adminSchedule .draggable-match .save-row button { min-width: 44px; min-height: 36px; padding: 7px 12px; margin: 0; font-size: 14px; }
  #adminSchedule .draggable-match .save-row .mobile-match-edit { display: inline-grid; place-items: center; order: -1; margin-right: auto; font-size: 22px; padding: 0 10px; }
  #adminSchedule .draggable-match .date-cell,#adminSchedule .draggable-match .time-cell,#adminSchedule .draggable-match .court-cell,#adminSchedule .draggable-match .drag-cell { display: none; }
  #adminSchedule .draggable-match.mobile-expanded .date-cell { display: block; grid-row: 4; grid-column: 1/3; }
  #adminSchedule .draggable-match.mobile-expanded .time-cell { display: block; grid-row: 4; grid-column: 3; }
  #adminSchedule .draggable-match.mobile-expanded .court-cell { display: block; grid-row: 5; grid-column: 1/3; }
  #adminSchedule .draggable-match.mobile-expanded .drag-cell { display: block; grid-row: 5; grid-column: 3; }
  #adminSchedule .draggable-match .date-cell::before { content: 'Datum'; }
  #adminSchedule .draggable-match .time-cell::before { content: 'Uhrzeit'; }
  #adminSchedule .draggable-match .court-cell::before { content: 'Spielfeld'; }
  #adminSchedule .draggable-match .date-cell::before,#adminSchedule .draggable-match .time-cell::before,#adminSchedule .draggable-match .court-cell::before { display: block; font-size: 11px; color: #52616c; margin: 4px 0; }
  #adminSchedule .draggable-match .date-input,#adminSchedule .draggable-match .time-input,#adminSchedule .draggable-match .court-input { display: block; width: 100%; min-width: 0; min-height: 36px; padding: 5px; }
  #adminSchedule .row-move-controls { display: flex; gap: 8px; justify-content: flex-end; }
  #adminSchedule .row-move-controls button { min-width: 36px; min-height: 36px; }
  #adminSchedule tr:not(.draggable-match) { display: block; margin: 8px 0; }
  #adminSchedule tr:not(.draggable-match)>td { display: block; width: 100%; min-width: 0; }
  .live-overlay { padding: 0; align-items: start; overflow-y: auto; background: #fff; }
  .live-dialog { width: 100%; max-width: 100%; min-height: 100dvh; max-height: none; overflow: visible; padding: max(12px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom)); border-radius: 0; box-shadow: none; }
  .live-head { margin-bottom: 12px; }
  .live-head h2 { font-size: 16px; }
  .live-head button { min-width: 44px; min-height: 44px; }
  .live-teams { gap: 12px; }
  .live-team h3 { font-size: 15px; margin-bottom: 6px; line-height: 1.3; }
  .live-score-with-logo { gap: 8px; min-height: 68px; }
  .live-team-logo { width: 38px; height: 50px; }
  .live-score { font-size: 52px; margin: 4px 0; }
  .live-score-controls { gap: 10px; }
  .live-score-controls button { width: 60px; height: 48px; min-height: 48px; font-size: 28px; }
  .live-clock-wrap { margin: 14px 0 10px; }
  .live-clock { font-size: 52px; line-height: 1; }
  .live-period { margin: 0 0 4px; font-size: 14px; }
  .live-timer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .live-timer-actions [data-live-command=next] { grid-column: 1/-1; }
  .live-timer-actions button { min-height: 44px; min-width: 0; padding: 9px; }
  .live-time-corrections { width: 100%; margin: 10px 0; }
  .live-time-corrections button { min-height: 40px; padding: 8px 4px; font-size: 14px; }
  .live-footer { margin-top: 14px; gap: 10px; }
  .live-footer>* { min-width: 0; max-width: 100%; }
  .live-footer button { min-height: 44px; }
  .live-reset-actions { margin-top: 12px; }
  .live-reset-actions button { min-height: 40px; }
  .live-message { margin: 8px 0 0; min-height: 20px; }
}

/* Corrections: one compact row of numeric inputs, notes underneath. */
@media screen and (max-width:900px){
 .admin-page #adminViewCorrections .adjustment-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:0}
 .admin-page #adminViewCorrections .adjustment-row>strong{grid-column:1/-1;min-width:0;overflow-wrap:break-word}
 .admin-page #adminViewCorrections .adjustment-row>label{min-width:0;font-size:12px;overflow-wrap:normal}
 .admin-page #adminViewCorrections .adjustment-row>label:last-child{grid-column:1/-1}
 .admin-page #adminViewCorrections .adjustment-row input{width:100%;min-width:0;padding:7px 5px}
 .admin-page #adminViewCorrections .correction-standings-preview{grid-template-columns:minmax(0,1fr)}
 .admin-page #adminViewCorrections .correction-standings-block{min-width:0;overflow:hidden}
 .admin-page #adminViewCorrections .correction-standings-table{width:100%;min-width:0;table-layout:fixed}
 .admin-page #adminViewCorrections .correction-standings-table th,.admin-page #adminViewCorrections .correction-standings-table td{padding:7px 2px;font-size:clamp(9px,2.8vw,11px);white-space:nowrap;overflow-wrap:normal}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(1),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(1){width:5%}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(2),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(2){width:31%;white-space:normal}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(n+3):nth-child(-n+6),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(n+3):nth-child(-n+6){width:6%}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(7),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(7){width:14%}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(8),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(8){width:12%}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(9),.admin-page #adminViewCorrections .correction-standings-table td:nth-child(9){width:14%}
 .admin-page #adminViewCorrections .correction-standings-table th:nth-child(2){white-space:nowrap}
 .admin-page #adminViewCorrections .admin-standings-team{min-width:0;white-space:normal;overflow-wrap:break-word;word-break:normal}
 .admin-page #adminViewCorrections .admin-standings-team strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .admin-page #adminViewCorrections .admin-standings-team small{font-size:inherit;white-space:normal;overflow-wrap:break-word}
}
@media screen and (max-width:360px){.admin-page #adminViewCorrections .adjustment-row>label{font-size:11px}}
