/* Shared mobile layout. Wide data stays inside its own scroll region. */
.mobile-navigation-toggle { display:none; }
.mobile-navigation-content { display:contents; }
body:has(.raid-loot-dialog[open]) { overflow:hidden; }
.loot-delete-panel { padding:20px 0; color:#c9d7eb; }
.loot-delete-panel h3 { margin-top:0; color:#e7c8bf; }
.loot-delete-panel p { line-height:1.6; }
.loot-delete-panel .profile-form-actions { display:flex; gap:12px; flex-wrap:wrap; }
@media(max-width:1360px){
  .naxx-schematic-layout,.naxx-sapphiron .naxx-schematic-layout,.naxx-kelthuzad .naxx-schematic-layout { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:900px){
  html { min-width:0; }
  .app-shell { display:block; padding:10px; }
  .app-sidebar { position:static; max-height:none; overflow:visible; display:flex; align-items:center; flex-wrap:wrap; gap:0 12px; padding:12px; margin-bottom:12px; }
  .app-sidebar .brand { flex:1; min-width:0; margin:0; padding:0; border:0; }
  .mobile-navigation-toggle { display:inline-flex; align-items:center; justify-content:center; gap:14px; min-height:44px; padding:8px 14px; border:1px solid #566783; border-radius:6px; background:#202d40; color:#e7d3ad; font:600 13px 'DM Sans',sans-serif; }
  .mobile-navigation-content { display:none; width:100%; }
  .app-sidebar.is-open .mobile-navigation-content { display:block; margin-top:18px; }
  .app-sidebar .raid-context { max-width:none; padding:0 0 12px; margin-bottom:12px; }
  .app-sidebar .raid-picker select { min-height:44px; font-size:16px; }
  .app-sidebar .main-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .raid-assignment-navigation { grid-column:1/-1; }
  .app-sidebar .wing-list { display:flex; flex-wrap:wrap; }
  .app-sidebar .wing-button { width:auto; min-height:44px; }
  .app-sidebar .main-nav .nav-link,.app-sidebar .admin-tab { min-height:44px; font-size:12px; }
  .app-sidebar .admin-sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .app-sidebar .admin-sidebar[hidden] { display:none; }
  .app-sidebar .admin-sidebar .section-label { display:block; grid-column:1/-1; padding:0 8px 8px; }
  .sidebar-access { display:flex; flex-wrap:wrap; gap:6px; }.sidebar-access button { flex:1; }
  .topbar:has(.header-history-button) { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:0 0 12px; min-height:0; }
  .topbar:has(.header-history-button) .top-actions { display:flex; flex-wrap:nowrap; flex:1 1 230px; width:auto; margin-left:auto; justify-content:flex-end; gap:8px; }
  .topbar .header-history-button,.discord-button,#gameVersionButton { min-height:44px; }
  .topbar .account-control { flex:1; min-width:0; }
  .topbar #discordButton { width:100%; max-width:220px; min-width:0; padding:8px 10px; overflow:hidden; justify-content:flex-start; font-size:12px; }
  .topbar #discordButton .header-discord-avatar { width:24px; height:24px; flex-basis:24px; }.topbar #discordButton>span { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .discord-button>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .game-version-choice { flex-shrink:0; }
  .topbar #gameVersionButton { width:122px; min-width:122px; padding:7px 9px; justify-content:space-between; }.topbar #gameVersionButton .game-logo { width:80px; max-width:80px; height:28px; object-fit:contain; }
  .page-intro { padding-top:20px; padding-bottom:16px; }.page-intro h1 { font-size:27px; }
  .content-panel,.raid-layout>.content-panel { min-width:0; padding:16px 12px; }
  .hero { min-height:100px; padding:18px; gap:16px; flex-wrap:wrap; }.hero h1 { font-size:27px; }.raid-softres-links { flex-wrap:wrap; gap:8px; }
  .table-toolbar,.panel-head,.raid-planner-heading { flex-wrap:wrap; gap:14px; }.roster-toolbar-right,.roster-toolbar-right .search-wrap { width:100%; }.search-wrap { max-width:100%; min-width:0; }
  .archive-history-card>header { align-items:flex-start; }.archive-history-card h2 { overflow-wrap:anywhere; font-size:24px; }.archive-history-card .history-card-actions { flex-wrap:wrap; }
  .history-report-row { flex-direction:column; align-items:stretch; gap:20px; }.history-report-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 12px; width:100%; }.history-report-link { min-height:44px; }
  .history-report-row>.history-card-actions { justify-content:flex-end; }.history-link-fields { grid-template-columns:1fr; }.history-link-fields input,.archive-picker select { min-height:44px; font-size:16px; }.archive-picker label { width:100%; min-width:0; }.archive-picker select { width:100%; min-width:0; max-width:100%; text-overflow:ellipsis; }.raid-history-badge { margin:10px 0 0 10px; }
  .profile-form-fields,.raid-event-fields { grid-template-columns:minmax(0,1fr); }.profile-form-actions,.raid-event-actions,.raid-card-actions,.roster-heading-actions { flex-wrap:wrap; gap:8px; }
  .profile-link-edit,.history-edit-links { min-width:44px; min-height:44px; }
  .profile-character { flex-wrap:wrap; gap:14px; }.profile-character-actions { margin-left:auto; }.profile-character-links { flex-wrap:wrap; gap:8px; }
  .profile-layout { display:block; }.profile-account { margin-bottom:16px; }
  .aq-main-board.aq-compact-main { grid-template-columns:minmax(0,1fr); }.aq-main-board .aq-tank-order { width:100%; max-width:320px; }.healing-class-columns { grid-template-columns:minmax(0,1fr); padding:0 10px; }
  .healing-class-column,.healing-class-column:nth-child(2) { grid-row:auto; border-right:0; border-bottom:1px solid #354258; padding:14px 0; }.healing-class-column:last-child { border-bottom:0; }
  .healing-plan-row,.healing-column-labels { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }.healing-plan-row.has-group,.healing-column-labels.has-group { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px; }.healing-plan-row { min-height:44px; }
  .support-attrib-board { grid-template-columns:minmax(0,1fr); }.support-attrib-board .attrib-line { min-height:44px; }.main-attrib-panel { overflow:hidden; }
  .raid-management-card { flex-direction:column; align-items:stretch; gap:16px; }.raid-event-form { padding:16px; }
  .activity-heading { flex-direction:column; }.activity-stats { gap:8px; }.activity-stats>div { padding:12px; display:block; }.activity-stats strong { display:block; font-size:21px; }.activity-stats span { font-size:11px; }
  .activity-table { min-width:760px; }.activity-filters .search-wrap { min-width:0; flex-basis:100%; }.activity-status { margin-left:0; }
  .linked-account-table th:last-child { width:115px; }.linked-account-table :is(th,td) { padding:10px 6px; }.linked-account-name { gap:6px; }.linked-account-name img { width:26px; height:26px; }.linked-account-table select { min-height:44px; }
  .guild-character-dialog,.profile-link-dialog,.manual-roster-dialog,.activity-undo-dialog { max-width:calc(100vw - 20px); max-height:calc(100dvh - 20px); overflow:auto; }
  .cthun-plan { max-width:100%; overflow-x:auto; }.cthun-layout.with-side-groups { min-width:580px; }
  .assignment-page-title,.personal-page-title { flex-wrap:wrap; gap:12px; }
  .naxx-board { gap:10px; }
  .naxx-room { padding:12px 8px; }
  .naxx-map-stage { min-width:640px; }
  .naxx-map-pan-hint { display:block; }
  .naxx-map-position { width:32px; height:32px; font-size:13px; }
  .naxx-position-columns.sapphi-columns { grid-template-columns:minmax(0,1fr); }
  .naxx-row-target { max-width:180px; }
  .naxx-player select,.naxx-player .raid-player-select .player-select-toggle { min-height:44px; }
  .naxx-row-mode button { min-height:36px; padding:6px; }
  .naxx-priority-controls button { min-width:38px; min-height:44px; }
  .raid-loot-dialog { width:100%; height:100dvh; max-width:100%; max-height:100dvh; margin:0; padding:16px; padding-bottom:max(16px,env(safe-area-inset-bottom)); border:0; border-radius:0; }
  .raid-loot-dialog::backdrop { backdrop-filter:none; }
  .loot-dialog-heading { flex-direction:column; gap:14px; }.loot-dialog-heading>div:first-child { min-width:0; width:100%; }.loot-dialog-heading h2 { font-size:25px; }.loot-dialog-heading p { overflow-wrap:anywhere; }
  .loot-dialog-actions { width:100%; max-width:none; justify-content:flex-start; gap:8px; }.loot-dialog-actions button { flex:1 1 auto; min-height:44px; padding:8px; font-size:11px; }
  .raid-loot-dialog #lootContent { flex:1; }.loot-demo-note { margin:14px 0; }.loot-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 14px; padding:12px; }.loot-summary strong { font-size:19px; }
  .loot-toolbar { margin:14px 0 10px; gap:10px; }.loot-toolbar label:first-child { min-width:0; flex-basis:100%; }.loot-toolbar input { font-size:16px; min-height:44px; }.loot-toolbar p { width:auto; margin-left:auto; }.loot-filter-hint { line-height:1.5; margin-bottom:10px; }
  .loot-table-scroll { flex:1; min-height:0; max-height:none; }.loot-table { table-layout:fixed; font-size:11px; }.loot-table th:first-child { width:46%; }.loot-table th:nth-child(2) { width:32%; }.loot-table th:nth-child(3) { width:22%; }
  .loot-table th>button { min-height:44px; padding:10px 5px; letter-spacing:0; font-size:10px; }.loot-table th>button span { margin-left:3px; }.loot-table td { padding:9px 6px; overflow-wrap:anywhere; }
  .loot-item { align-items:flex-start; gap:7px; }.loot-item>span { min-width:0; overflow-wrap:anywhere; }.loot-item img,.loot-item-placeholder { width:26px; height:26px; flex-basis:26px; }
  .loot-character { min-width:0; max-width:100%; padding:5px; gap:4px; }.loot-character b { white-space:normal; overflow-wrap:anywhere; font-size:10px; }.loot-character img { width:15px; height:15px; flex-basis:15px; }.loot-kind { white-space:normal; font-size:10px; text-align:center; padding:4px; }
  .loot-column-popover { width:min(280px,calc(100vw - 24px)); }.loot-column-popover select { font-size:16px; min-height:44px; }.loot-column-popover button { min-height:40px; }
  #lootImportPanel { flex:1; padding-right:0; }.loot-csv-label textarea { font-size:16px; min-height:150px; max-height:30dvh; }.loot-file-label input { font-size:13px; }#lootImportPanel>.profile-form-actions { bottom:0; padding-bottom:8px; }#lootImportPanel>.profile-form-actions button { flex:1 1 120px; min-height:44px; }
  .loot-delete-panel { min-height:0; overflow:auto; }.loot-delete-panel button { min-height:44px; }
  .loot-row-actions { flex-direction:column; gap:8px; align-items:flex-start; }.loot-remove { width:44px; min-height:44px; flex-basis:auto; }
  .loot-add-fields { grid-template-columns:minmax(0,1fr); gap:16px; }.loot-add-fields :is(input,select) { min-height:44px; font-size:16px; }.loot-add-form { flex:1; }.loot-add-form .profile-form-actions button { min-height:44px; flex:1; }
}
@media(max-width:600px){
  .naxx-position-columns.sapphi-columns { grid-template-columns:minmax(0,1fr); }
  .naxx-sapphi-legend { gap:16px; }
  .naxx-placement-table td { padding:4px; }
  .naxx-placement-table .naxx-number-col { width:26px; }
  .naxx-melee-cross { gap:6px; }
  .naxx-melee-cross .naxx-card>h4 { flex-wrap:wrap; }
  .naxx-melee-cross .raid-player-badge .category-icon { display:none; }
  .naxx-melee-boss>img { width:60px; height:60px; }
  .naxx-attrib-row { padding:10px; gap:8px; }
  .naxx-row-target,.naxx-row-target .attrib-player { max-width:145px; }
  .raid-naxxramas .aq-main-board .category-icon { display:inline-flex; width:15px; height:15px; flex:0 0 15px; }
  .raid-naxxramas .aq-main-board .category-icon img { width:15px; height:15px; }
}
