/* Mobile/PWA layout pass. Desktop layout remains untouched. */
.exp-mobile-tools-button,.exp-battle-time-mobile,.exp-replay-badge-mobile{display:none}
@media (max-width: 760px) {
  :root{--mobile-pad:10px}
  html,body{width:100%;max-width:100%;overflow-x:hidden;background:#f3f5f6}
  body{font-size:14px;-webkit-text-size-adjust:100%;padding-bottom:calc(58px + env(safe-area-inset-bottom))}
  button,input,select{font-size:16px!important}

  .exp-shell{width:100%;margin:0;min-width:0}
  .exp-topbar{height:44px;padding:0 12px;position:sticky;top:0;z-index:40;background:#e7ebed}
  .exp-brand{gap:8px}.exp-brand strong{font-size:15px}.exp-brand span{font-size:10px;padding:3px 6px;letter-spacing:.05em}
  .exp-top-actions button{padding:6px 10px;font-size:13px!important}

  .exp-lookup-bar{display:grid;grid-template-columns:1fr;gap:7px;padding:8px var(--mobile-pad)}
  .exp-favorite-control,.exp-search{width:100%;gap:6px}
  .exp-favorite-control label{display:none}
  .exp-favorite-control select{flex:1;min-width:0}.exp-favorite-control button{flex:0 0 auto}
  .exp-search input{width:auto;min-width:0;flex:1}.exp-search button{flex:0 0 auto}
  .exp-lookup-bar select,.exp-lookup-bar input{height:34px;padding:0 9px}
  .exp-lookup-bar button{height:34px;padding:0 11px}
  .exp-suggestions{left:0;right:0;top:39px;width:auto}

  .exp-replay-import{margin:8px 10px 0!important;padding:8px 10px!important;min-height:0!important;gap:8px!important;display:flex!important;align-items:center!important}
  .exp-replay-import>div{min-width:0;display:flex!important;align-items:center!important;gap:7px!important;flex:1}
  .exp-replay-import>div>strong{font-size:13px;white-space:nowrap}.exp-replay-import>div>span{font-size:11px;white-space:nowrap;color:#657078}
  .exp-replay-import small{display:none!important}.exp-replay-import button{padding:6px 8px!important;font-size:12px!important;white-space:nowrap}

  .exp-status{margin:8px 10px 0;padding:10px}.exp-status p{font-size:12px}
  .exp-empty-state{margin:8px 10px 0;padding:24px 12px}.exp-empty-state h1{font-size:20px}

  .exp-profile-head{margin:8px 10px 0;min-height:0;height:76px;align-items:stretch}
  .exp-profile-main{padding:10px 12px;border-left-width:4px;min-width:0;flex:1}
  .exp-name-row{gap:7px}.exp-name-row h1{font-size:24px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:58vw}
  .exp-profile-main p{margin-top:4px;font-size:11px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .exp-profile-main #expPlayerAside{display:none}
  .exp-private-badge{font-size:10px;padding:2px 4px}
  .exp-header-pr{min-width:84px;padding:8px 10px}.exp-header-pr span{font-size:10px}.exp-header-pr strong{font-size:26px}

  .exp-tabs{position:fixed;left:0;right:0;bottom:0;z-index:100;margin:0;border-left:0;border-right:0;border-bottom:0;box-shadow:0 -2px 12px #0002;padding-bottom:env(safe-area-inset-bottom);background:#eef1f3}
  .exp-tabs button{min-height:54px;padding:7px 4px 6px;font-size:13px;font-weight:650;border-right:1px solid #d7dde0}
  .exp-tabs small{display:none}.exp-tabs button.active{box-shadow:inset 0 3px #343d43}

  .exp-tab-searchbar{margin:8px 10px 0;padding:6px;display:block;border-color:#d2dade;background:#eef2f4}
  .exp-tab-searchbar input{width:100%;height:34px;font-size:14px!important}
  .exp-tab-search-count{display:none}

  .exp-pr-banner{margin:8px 10px 0;min-height:48px;padding:7px 10px;border-left-width:5px}
  .exp-pr-banner>div:first-child{gap:5px}.exp-pr-label{font-size:18px}.exp-pr-banner small{display:none}
  .exp-pr-value{gap:4px}.exp-pr-value span{font-size:10px}.exp-pr-value strong{font-size:23px}

  .exp-kpi-strip{margin:0 10px;grid-template-columns:repeat(3,1fr);border-top:0}
  .exp-kpi{min-height:62px;padding:7px 4px;border-bottom:1px solid var(--line)}
  .exp-kpi:nth-child(3n){border-right:0}
  .exp-kpi span{font-size:10px;font-weight:600}.exp-kpi strong,.exp-primary-kpis .exp-kpi strong{font-size:19px;margin-top:3px}.exp-kpi small{display:none}

  .exp-dashboard-grid{display:block;margin:0}.exp-dashboard-grid .exp-panel{margin-top:8px}
  .exp-panel{margin:8px 10px 0}
  .exp-section-head{min-height:39px;padding:7px 10px}.exp-section-head h2,.exp-section-head h3{font-size:15px}.exp-section-head>span{display:none}

  .exp-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:auto}
  .exp-table-wrap table{min-width:0;width:max-content;max-width:none}
  .exp-table-wrap th{position:static;font-size:11px;line-height:1.15;font-weight:650;padding:7px 8px;min-width:70px}
  .exp-table-wrap td{font-size:13px;line-height:1.2;padding:8px 8px;min-width:70px}
  .exp-table-wrap td small{font-size:10px;margin-top:2px}
  .exp-table-wrap strong[class*="pr-"]{font-size:13px!important;font-weight:650}
  .exp-table-wrap th::after{font-size:9px!important;margin-left:2px!important}

  .exp-summary-table{min-width:500px!important}.exp-summary-table th:first-child,.exp-summary-table td:first-child{min-width:118px}.exp-summary-table th:not(:first-child),.exp-summary-table td:not(:first-child){min-width:75px}
  .exp-summary-table th:nth-child(5),.exp-summary-table td:nth-child(5),.exp-summary-table th:nth-child(6),.exp-summary-table td:nth-child(6){display:none}
  .exp-class-table{min-width:430px!important}.exp-class-table th:first-child,.exp-class-table td:first-child{min-width:95px}.exp-class-table th:nth-child(3),.exp-class-table td:nth-child(3),.exp-class-table th:nth-child(6),.exp-class-table td:nth-child(6){display:none}
  .exp-recent-table{min-width:500px!important}.exp-recent-table th:first-child,.exp-recent-table td:first-child{min-width:100px}.exp-recent-table th:nth-child(5),.exp-recent-table td:nth-child(5),.exp-recent-table th:nth-child(6),.exp-recent-table td:nth-child(6){display:none}
  .exp-topship-table{min-width:610px!important}.exp-topship-table th:first-child,.exp-topship-table td:first-child{display:none}.exp-topship-table th:nth-child(7),.exp-topship-table td:nth-child(7),.exp-topship-table th:nth-child(8),.exp-topship-table td:nth-child(8){display:none}

  .exp-ship-cell{min-width:190px;gap:7px}.exp-ship-cell .ship-thumb{width:58px;height:26px}.exp-ship-cell .class-icon{width:32px;height:20px}.exp-ship-cell strong{font-size:13px}.exp-ship-cell small{font-size:10px!important;gap:4px}
  .nation-flag-emoji{font-size:15px;width:18px;height:14px}

  .exp-tier-bars{height:150px;padding:10px 8px 7px;gap:4px}.exp-tier-col{grid-template-rows:18px 1fr 18px}.exp-tier-value{font-size:9px}.exp-tier-col b{font-size:10px}.exp-tier-track i{width:min(16px,70%)}
  .exp-record-grid{grid-template-columns:repeat(2,1fr)}.exp-record-grid .exp-kpi{border-right:1px solid var(--line)}.exp-record-grid .exp-kpi:nth-child(2n){border-right:0}

  .exp-subtabs{margin:8px 10px 0;overflow-x:auto;white-space:nowrap}.exp-subtabs button{min-width:auto;padding:8px 12px;font-size:12px}.exp-period,.exp-single-toolbar{font-size:11px;padding:7px 10px}

  .exp-ships-head{display:block;padding:8px 9px}.exp-ships-head>div:first-child{margin-bottom:7px}.exp-filter-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px}.exp-filter-row input{grid-column:1/-1;width:100%}.exp-filter-row select{min-width:0;width:100%;height:32px;padding:0 5px;font-size:13px!important}
  .exp-ships-wrap{max-height:none}.exp-single-ship-table{min-width:690px!important}
  .exp-single-ship-table th:first-child,.exp-single-ship-table td:first-child,.exp-single-ship-table th:nth-child(8),.exp-single-ship-table td:nth-child(8),.exp-single-ship-table th:nth-child(9),.exp-single-ship-table td:nth-child(9){display:none}
  .exp-single-ship-table th:nth-child(2),.exp-single-ship-table td:nth-child(2){min-width:200px!important;width:200px!important}
  .exp-single-ship-table th:nth-child(n+3),.exp-single-ship-table td:nth-child(n+3){min-width:68px!important;width:auto!important}

  .exp-dialog{inset:0!important;width:100vw!important;height:100dvh!important;max-height:none!important;margin:0!important}
  .exp-dialog::backdrop{background:#0006}.exp-dialog-shell{height:100dvh;max-height:none;border:0;box-shadow:none;padding-bottom:calc(60px + env(safe-area-inset-bottom))}
  .exp-dialog-head{padding:8px 10px;align-items:center}.exp-dialog-head>div:first-child{min-width:0}.exp-dialog-head>div:first-child>small{display:none}.exp-dialog-head h3{font-size:18px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:65vw}.exp-dialog-head p{font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:65vw}.exp-dialog-head button{font-size:24px;padding:4px 7px}
  .exp-dialog-actions{gap:5px}.result-badge{font-size:10px;padding:3px 5px}
  .battle-detail-hero,.battle-detail-grid{grid-template-columns:repeat(2,1fr)}.battle-detail-hero article,.battle-detail-grid article{min-height:58px;padding:8px 10px}.battle-detail-hero article span,.battle-detail-grid article span{font-size:10px}.battle-detail-hero article strong,.battle-detail-grid article strong{font-size:16px;margin-top:3px}.battle-detail-hero article small,.battle-detail-grid article small{font-size:9px}
  .detail-section{margin:8px}.detail-section-title{padding:7px 9px;font-size:12px}.detail-section-title small{display:none}.detail-notes{padding:0 10px 10px;font-size:11px}
  .exp-ship-profile-dialog .battle-detail-hero{grid-template-columns:repeat(2,1fr)}.exp-ship-profile-dialog .battle-detail-hero article strong{font-size:17px}
  .exp-ship-pr-band{min-height:48px;padding:7px 10px;border-left-width:5px;gap:8px}.exp-ship-pr-band>div:first-child strong{font-size:18px}.exp-ship-pr-band>div:first-child span{display:none}.exp-ship-pr-band>div:last-child small{font-size:10px}.exp-ship-pr-band>div:last-child b{font-size:22px}
  .exp-ship-detail-columns{grid-template-columns:1fr}.exp-ship-detail-group h5{font-size:12px;padding:7px 9px}.exp-ship-detail-row{min-height:32px;padding:6px 9px}.exp-ship-detail-row span{font-size:11px}.exp-ship-detail-row strong{font-size:13px}
  .exp-ship-mode-detail-table{min-width:590px!important}.exp-pr-calc-table{min-width:560px!important}

  .exp-replay-section{margin:8px!important}.exp-replay-section-head{min-height:36px!important;padding:7px 9px!important}.exp-replay-section-head h4{font-size:14px!important}.exp-replay-section-head>span{font-size:10px!important;max-width:50%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .exp-replay-kpis{grid-template-columns:repeat(2,1fr)!important}.exp-replay-kpi{min-height:58px!important;padding:8px!important}.exp-replay-kpi strong{font-size:17px!important}
  .exp-replay-teams,.exp-replay-interaction-grid,.exp-replay-breakdown-grid{grid-template-columns:1fr!important}.exp-replay-team.friendly,.exp-replay-team.enemy{grid-column:1!important;order:initial!important}
  .exp-replay-player-row{font-size:11px!important;padding:6px 7px!important;gap:5px!important}.exp-replay-player-row strong{font-size:11px!important}
  .exp-replay-consumable-events{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}.exp-replay-consumable-event{min-width:0!important;padding:6px!important;grid-template-columns:42px 24px minmax(0,1fr)!important;column-gap:5px!important}.exp-replay-consumable-event time{font-size:11px!important}.exp-replay-consumable-event strong{font-size:11px!important}.exp-replay-consumable-event small{font-size:9px!important}.exp-consumable-icon{width:23px!important;height:23px!important}.exp-consumable-icon .exp-ui-icon{width:16px!important;height:16px!important}.exp-replay-consumable-note{display:none!important}
  .exp-replay-ribbons{grid-template-columns:repeat(4,1fr)!important;gap:5px!important}.exp-replay-ribbon{min-width:0!important;padding:6px 3px!important}.exp-replay-ribbon strong{font-size:13px!important}
  .exp-replay-timeline-controls{grid-template-columns:1fr!important;gap:6px!important;padding:7px!important}.exp-replay-timeline-presets,.exp-replay-timeline-series{display:flex!important;overflow-x:auto!important;gap:4px!important}.exp-replay-timeline-controls button,.exp-replay-timeline-controls label{font-size:10px!important;white-space:nowrap}.exp-replay-timeline-ranges{grid-template-columns:1fr!important;gap:4px!important}.exp-replay-chart-wrap{min-height:260px!important;overflow-x:auto!important}.exp-replay-chart-wrap svg{min-width:680px!important}
  .exp-replay-breakdown .exp-replay-bar{grid-template-columns:76px minmax(0,1fr) 94px!important;gap:6px!important;min-height:34px!important}.exp-replay-breakdown .exp-replay-bar>span{font-size:10px!important}.exp-replay-breakdown .exp-replay-bar-value strong{font-size:11px!important}.exp-replay-breakdown .exp-replay-bar-value small{font-size:9px!important}

  /* Reduce low-value helper copy on phone. */
  .exp-replay-result-source,.exp-replay-team-head small,.exp-replay-section-head small,.exp-single-toolbar>span:last-child{display:none!important}
}

@media (max-width: 390px) {
  .exp-brand strong{font-size:14px}.exp-header-pr{min-width:74px}.exp-name-row h1{max-width:55vw}
  .exp-kpi strong,.exp-primary-kpis .exp-kpi strong{font-size:18px}
  .exp-replay-consumable-events{grid-template-columns:1fr!important}
  .exp-replay-ribbons{grid-template-columns:repeat(3,1fr)!important}
}

/* v18.2 mobile pass 2: app shell, dense tables and compact detail pages. */
@media (max-width: 760px) {
  html{scroll-padding-top:calc(48px + env(safe-area-inset-top))}
  html,body{touch-action:pan-x pan-y}
  body{padding-bottom:calc(50px + env(safe-area-inset-bottom));background:#eef1f3}
  .exp-shell{margin:0;min-height:100dvh}

  .exp-topbar{height:calc(42px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0 10px}
  .exp-brand strong{font-size:13px}.exp-brand span{font-size:9px;padding:2px 5px}
  .exp-top-actions{gap:5px}.exp-top-actions button{height:30px;padding:0 8px;font-size:12px!important;font-weight:650}
  .exp-mobile-tools-button{display:inline-flex!important;align-items:center}
  .exp-mobile-tools{display:none;background:#f6f7f8;border-bottom:1px solid var(--line-dark)}
  .mobile-tools-open .exp-mobile-tools{display:block}
  .exp-lookup-bar{padding:7px 8px 0;background:transparent;border:0}
  .exp-replay-import{margin:6px 8px 7px!important}
  .exp-replay-import>div>span{font-size:10px}.exp-replay-import button{height:30px!important}

  #results{scroll-margin-top:calc(43px + env(safe-area-inset-top))}
  .exp-profile-head{margin:6px 8px 0;height:58px;border-color:#b8c1c6;flex-direction:row;align-items:stretch}
  .exp-profile-main{padding:7px 9px;border-left-width:3px}
  .exp-name-row h1{font-size:20px;max-width:62vw}.exp-profile-main p{margin-top:3px;font-size:10px}
  .exp-header-pr{min-width:74px;padding:6px 8px;align-items:flex-end;border-top:0;border-left:1px solid var(--line)}.exp-header-pr span{font-size:9px}.exp-header-pr strong{font-size:21px}

  .exp-tabs{grid-template-columns:repeat(4,minmax(0,1fr));min-height:calc(48px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
  .exp-tabs button{min-height:48px;padding:5px 3px 4px;font-size:12px!important;font-weight:650}
  .exp-tabs button.active{box-shadow:inset 0 2px #343d43}
  .exp-tab-searchbar{margin:6px 8px 0;padding:4px}.exp-tab-searchbar input{height:31px!important;padding:0 8px;font-size:13px!important}

  /* PR is already visible in the player header; do not spend another row on it. */
  .exp-pr-banner{display:none!important}
  .exp-kpi-strip{margin:6px 8px 0;border:1px solid var(--line-dark)}
  .exp-kpi{min-height:52px;padding:5px 3px}.exp-kpi span{font-size:9px}.exp-kpi strong,.exp-primary-kpis .exp-kpi strong{font-size:17px;margin-top:2px}
  .exp-panel,.exp-dashboard-grid .exp-panel{margin:6px 8px 0}.exp-dashboard-grid{margin:0}
  .exp-section-head{min-height:34px;padding:5px 8px}.exp-section-head h2,.exp-section-head h3{font-size:13px;font-weight:650}
  .exp-table-wrap{scrollbar-gutter:auto;overscroll-behavior-inline:contain}
  .exp-table-wrap tbody tr{height:40px}
  .exp-table-wrap th{padding:6px 7px;font-size:10px;font-weight:650;min-width:58px}
  .exp-table-wrap td{padding:6px 7px;font-size:12px;min-width:58px}
  .exp-table-wrap td small{font-size:9px;margin-top:1px}
  .exp-ship-cell{min-width:155px;gap:5px}.exp-ship-cell .ship-thumb{width:46px;height:22px}.exp-ship-cell .class-icon{width:27px;height:18px;font-size:8px}.exp-ship-cell strong{font-size:12px}.exp-ship-cell small{font-size:9px!important}

  .exp-summary-table{min-width:420px!important}.exp-summary-table th:first-child,.exp-summary-table td:first-child{min-width:96px}
  .exp-class-table{min-width:335px!important}.exp-class-table th:first-child,.exp-class-table td:first-child{min-width:80px}
  .exp-recent-table{min-width:420px!important}.exp-recent-table th:first-child,.exp-recent-table td:first-child{min-width:82px}
  .exp-topship-table{min-width:500px!important;table-layout:auto!important}.exp-topship-table th:nth-child(2),.exp-topship-table td:nth-child(2){min-width:155px!important;width:155px!important}
  .exp-topship-table th:nth-child(n+3),.exp-topship-table td:nth-child(n+3){min-width:64px!important;width:auto!important}

  .exp-subtabs{margin:6px 8px 0}.exp-subtabs button{padding:7px 11px;font-size:11px!important;min-width:54px}
  .exp-period{padding:5px 8px;font-size:10px}.exp-single-toolbar{margin:5px 8px 0;padding:5px 7px;font-size:10px;align-items:center}
  .exp-single-toolbar label{display:flex;align-items:center;gap:3px}.exp-single-toolbar input{width:15px;height:15px}

  .exp-battle-table{min-width:540px!important;table-layout:auto!important}.exp-battle-table th:first-child,.exp-battle-table td:first-child{min-width:86px!important}.exp-battle-table th:nth-child(2),.exp-battle-table td:nth-child(2){min-width:135px!important}
  .exp-battle-table th:nth-child(6),.exp-battle-table td:nth-child(6),.exp-battle-table th:nth-child(7),.exp-battle-table td:nth-child(7),.exp-battle-table th:nth-child(8),.exp-battle-table td:nth-child(8){display:none}
  .exp-mode-ship-table{min-width:565px!important;table-layout:auto!important}.exp-mode-ship-table th:nth-child(1),.exp-mode-ship-table td:nth-child(1){width:38px!important;min-width:38px!important}.exp-mode-ship-table th:nth-child(2),.exp-mode-ship-table td:nth-child(2){width:155px!important;min-width:155px!important}.exp-mode-ship-table th:nth-child(7),.exp-mode-ship-table td:nth-child(7),.exp-mode-ship-table th:nth-child(8),.exp-mode-ship-table td:nth-child(8){display:none}
  .exp-window-ship-table{min-width:620px!important;table-layout:auto!important}.exp-window-ship-table th:nth-child(1),.exp-window-ship-table td:nth-child(1){width:38px!important;min-width:38px!important}.exp-window-ship-table th:nth-child(2),.exp-window-ship-table td:nth-child(2){width:155px!important;min-width:155px!important}.exp-window-ship-table th:nth-child(7),.exp-window-ship-table td:nth-child(7),.exp-window-ship-table th:nth-child(8),.exp-window-ship-table td:nth-child(8){display:none}.exp-window-ship-table th:nth-child(9),.exp-window-ship-table td:nth-child(9){min-width:48px!important}
  .exp-window-battles-head{padding:6px 8px}.exp-window-battles-head strong{font-size:11px}.exp-window-battles-head span{font-size:9px}.exp-mini-wrap{padding:0 5px 5px}.exp-mini-battle-table{min-width:420px!important}.exp-mini-battle-table th,.exp-mini-battle-table td{padding:5px 6px!important;font-size:10px!important}.exp-mini-battle-table th:nth-child(6),.exp-mini-battle-table td:nth-child(6),.exp-mini-battle-table th:nth-child(7),.exp-mini-battle-table td:nth-child(7){display:none}

  .exp-ships-head{padding:6px 7px}.exp-filter-row{gap:4px}.exp-filter-row input{height:30px!important;font-size:13px!important}.exp-filter-row select{height:29px;font-size:12px!important}
  .exp-single-ship-table{min-width:565px!important;table-layout:auto!important}.exp-single-ship-table th:nth-child(2),.exp-single-ship-table td:nth-child(2){min-width:155px!important;width:155px!important}.exp-single-ship-table th:nth-child(n+3),.exp-single-ship-table td:nth-child(n+3){min-width:60px!important}.exp-single-ship-table th:nth-child(8),.exp-single-ship-table td:nth-child(8),.exp-single-ship-table th:nth-child(9),.exp-single-ship-table td:nth-child(9),.exp-single-ship-table th:nth-child(10),.exp-single-ship-table td:nth-child(10),.exp-single-ship-table th:nth-child(11),.exp-single-ship-table td:nth-child(11){display:none}
  .exp-efficiency-icon{width:27px;height:27px;font-size:12px}

  .exp-dialog-shell{height:100dvh;padding-bottom:calc(8px + env(safe-area-inset-bottom));overflow:auto}
  .exp-dialog-head{min-height:calc(45px + env(safe-area-inset-top));padding:calc(6px + env(safe-area-inset-top)) 8px 6px}.exp-dialog-head h3{font-size:16px;max-width:68vw}.exp-dialog-head p{font-size:9px;max-width:68vw}.exp-dialog-head button{font-size:22px;padding:2px 5px}
  .battle-detail-hero,.battle-detail-grid,.exp-ship-profile-dialog .battle-detail-hero{grid-template-columns:repeat(3,1fr)}
  .battle-detail-hero article,.battle-detail-grid article{min-height:50px;padding:6px 7px}.battle-detail-hero article span,.battle-detail-grid article span{font-size:9px}.battle-detail-hero article strong,.battle-detail-grid article strong,.exp-ship-profile-dialog .battle-detail-hero article strong{font-size:14px;margin-top:2px}.battle-detail-hero article small,.battle-detail-grid article small{font-size:8px;margin-top:2px}
  .detail-section{margin:5px}.detail-section-title{padding:5px 7px;font-size:11px}.detail-notes{padding:0 7px 7px;font-size:10px}
  .exp-ship-pr-band{min-height:42px;padding:5px 8px}.exp-ship-pr-band>div:first-child strong{font-size:15px}.exp-ship-pr-band>div:last-child b{font-size:18px}
  .exp-ship-detail-group h5{padding:5px 7px;font-size:11px}.exp-ship-detail-row{min-height:28px;padding:4px 7px}.exp-ship-detail-row span{font-size:10px}.exp-ship-detail-row strong{font-size:12px}

  .exp-replay-own-card{min-height:58px;margin:5px 5px 0;padding:6px 8px;gap:8px}.exp-replay-own-card .ship-thumb{width:58px;height:28px}.exp-replay-own-card .class-icon{width:42px;height:24px}.exp-replay-own-card small{font-size:8px;letter-spacing:.04em}.exp-replay-own-card h3{font-size:15px;margin:1px 0}.exp-replay-own-card p{font-size:9px}
  .exp-replay-kpis{grid-template-columns:repeat(4,1fr)!important;margin:0 5px}.exp-replay-kpis>div{min-height:49px;padding:4px 2px}.exp-replay-kpis span{font-size:8px}.exp-replay-kpis strong{margin-top:2px;font-size:14px}
  .exp-replay-section{margin:5px!important}.exp-replay-section-head{min-height:31px!important;padding:5px 7px!important}.exp-replay-section-head h4{font-size:12px!important}.exp-replay-stat-grid{grid-template-columns:repeat(3,1fr)}.exp-replay-stat{min-height:48px;padding:4px}.exp-replay-stat span{font-size:9px}.exp-replay-stat strong{font-size:13px;margin-top:2px}.exp-replay-stat small{font-size:8px;margin-top:1px}
  .exp-replay-teams{padding:5px!important;gap:5px!important}.exp-replay-team-head{height:auto;min-height:34px;padding:4px 7px}.exp-replay-team-head h4{font-size:12px}.exp-replay-team-head p{font-size:8px;margin-top:1px}
  .exp-replay-team-table{min-width:470px!important}.exp-replay-team-table th,.exp-replay-team-table td{padding:5px 6px!important;font-size:10px!important;min-width:52px!important}.exp-replay-team-table th:first-child,.exp-replay-team-table td:first-child{min-width:112px!important}.exp-replay-team-table th:nth-child(2),.exp-replay-team-table td:nth-child(2){min-width:105px!important}.exp-replay-team-table th:nth-child(4),.exp-replay-team-table td:nth-child(4),.exp-replay-team-table th:nth-child(6),.exp-replay-team-table td:nth-child(6){display:none}
  .exp-replay-ribbons{padding:6px!important}.exp-replay-ribbon{min-height:42px!important}.exp-ribbon-icon{width:45px;height:27px;flex-basis:45px}
  .exp-replay-timeline-controls{padding:5px!important}.exp-replay-chart-legend{gap:10px;padding:6px 5px 1px;font-size:9px}.exp-replay-chart-legend strong{font-size:10px}.exp-replay-chart-wrap{min-height:220px!important;padding:0 4px 4px}.exp-replay-chart-wrap svg{min-width:600px!important}
  .exp-replay-bars{padding:6px 7px}.exp-replay-breakdown .exp-replay-bar{grid-template-columns:62px minmax(0,1fr) 80px!important;min-height:29px!important}.exp-replay-footnote{display:none}
  .exp-replay-interaction-table{min-width:545px!important}.exp-replay-interaction-table th,.exp-replay-interaction-table td{padding:5px!important;font-size:9px!important}.exp-replay-interaction-table th:first-child,.exp-replay-interaction-table td:first-child{min-width:135px!important}
}

@media (max-width: 390px) {
  .exp-brand strong{max-width:108px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .exp-name-row h1{max-width:60vw}
  .battle-detail-hero,.battle-detail-grid,.exp-ship-profile-dialog .battle-detail-hero{grid-template-columns:repeat(2,1fr)}
}

/* v18.3: phone tables use a compact field hierarchy instead of desktop overflow. */
@media (max-width: 760px) {
  .exp-ship-meta-type,.exp-ship-meta-nation{display:none!important}
  .exp-ship-meta-text:empty{display:none}
  .exp-battle-time-wide,.exp-replay-badge-wide{display:none!important}
  .exp-battle-time-mobile,.exp-replay-badge-mobile{display:inline!important}
  .exp-battle-source:not(.exp-battle-source-gap){display:none!important}
  .exp-battle-table td:nth-child(2) small{display:none!important}
  .exp-replay-badge{width:16px;height:16px;margin-left:3px;padding:0;justify-content:center;font-size:9px;line-height:14px;letter-spacing:0;vertical-align:0}

  .exp-summary-table,.exp-class-table,.exp-recent-table,.exp-topship-table,
  .exp-battle-table,.exp-mode-ship-table,.exp-window-ship-table,
  .exp-mini-battle-table,.exp-single-ship-table{
    width:100%!important;min-width:0!important;table-layout:fixed!important
  }
  .exp-summary-table th,.exp-summary-table td,.exp-class-table th,.exp-class-table td,
  .exp-recent-table th,.exp-recent-table td,.exp-topship-table th,.exp-topship-table td,
  .exp-battle-table th,.exp-battle-table td,.exp-mode-ship-table th,.exp-mode-ship-table td,
  .exp-window-ship-table th,.exp-window-ship-table td,.exp-mini-battle-table th,.exp-mini-battle-table td,
  .exp-single-ship-table th,.exp-single-ship-table td{
    width:auto!important;min-width:0!important;padding:5px 3px!important;overflow:hidden;text-overflow:ellipsis
  }
  .exp-ship-cell{min-width:0!important;gap:3px!important;overflow:hidden}
  .exp-ship-cell>div{min-width:0;overflow:hidden}
  .exp-ship-cell strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .exp-ship-cell .ship-thumb{width:36px;height:19px}
  .exp-ship-cell .class-icon{width:25px;height:17px}
  .exp-ship-cell small{gap:2px!important;overflow:hidden;white-space:nowrap}
  .nation-flag,.nation-flag-emoji{width:15px;height:11px;font-size:13px;flex:0 0 auto}

  .exp-summary-table th:nth-child(1){width:28%!important}.exp-summary-table th:nth-child(2){width:14%!important}.exp-summary-table th:nth-child(3){width:17%!important}.exp-summary-table th:nth-child(4){width:23%!important}.exp-summary-table th:nth-child(7){width:18%!important}
  .exp-class-table th:nth-child(1){width:25%!important}.exp-class-table th:nth-child(2){width:20%!important}.exp-class-table th:nth-child(4){width:22%!important}.exp-class-table th:nth-child(5){width:33%!important}
  .exp-recent-table th:nth-child(1){width:22%!important}.exp-recent-table th:nth-child(2){width:13%!important}.exp-recent-table th:nth-child(3){width:17%!important}.exp-recent-table th:nth-child(4){width:28%!important}.exp-recent-table th:nth-child(7){width:20%!important}
  .exp-topship-table th:nth-child(2){width:37%!important}.exp-topship-table th:nth-child(3){width:13%!important}.exp-topship-table th:nth-child(4){width:16%!important}.exp-topship-table th:nth-child(5){width:15%!important}.exp-topship-table th:nth-child(6){width:19%!important}

  .exp-battle-table th:nth-child(1){width:19%!important}.exp-battle-table th:nth-child(2){width:23%!important}.exp-battle-table th:nth-child(3){width:9%!important}.exp-battle-table th:nth-child(4){width:10%!important}.exp-battle-table th:nth-child(5){width:17%!important}.exp-battle-table th:nth-child(6){width:8%!important}.exp-battle-table th:nth-child(7){width:14%!important}
  .exp-battle-table th:nth-child(6),.exp-battle-table td:nth-child(6),.exp-battle-table th:nth-child(7),.exp-battle-table td:nth-child(7){display:table-cell!important}
  .exp-battle-table th:nth-child(8),.exp-battle-table td:nth-child(8){display:none!important}
  .exp-battle-table th{font-size:8px!important;white-space:normal;line-height:1.05}
  .exp-battle-table td{font-size:10px!important}
  .exp-battle-table td:nth-child(n+3){text-align:center}
  .exp-battle-time-main{display:block;white-space:nowrap}
  .exp-battle-source-gap{font-size:7px!important;line-height:1.05;white-space:normal}

  .exp-mode-ship-table th:nth-child(1),.exp-mode-ship-table td:nth-child(1){display:none!important}
  .exp-mode-ship-table th:nth-child(2){width:38%!important}.exp-mode-ship-table th:nth-child(3){width:13%!important}.exp-mode-ship-table th:nth-child(4){width:15%!important}.exp-mode-ship-table th:nth-child(5){width:15%!important}.exp-mode-ship-table th:nth-child(6){width:19%!important}
  .exp-window-ship-table th:nth-child(1){width:9%!important}.exp-window-ship-table th:nth-child(2){width:29%!important}.exp-window-ship-table th:nth-child(3){width:10%!important}.exp-window-ship-table th:nth-child(4){width:12%!important}.exp-window-ship-table th:nth-child(5){width:13%!important}.exp-window-ship-table th:nth-child(6){width:17%!important}.exp-window-ship-table th:nth-child(9){width:10%!important}
  .exp-window-ship-table .exp-window-detail-row>td{display:table-cell!important;width:100%!important;padding:0!important;overflow:visible}
  .exp-mini-battle-table th:nth-child(1){width:24%!important}.exp-mini-battle-table th:nth-child(2){width:14%!important}.exp-mini-battle-table th:nth-child(3){width:16%!important}.exp-mini-battle-table th:nth-child(4){width:28%!important}.exp-mini-battle-table th:nth-child(5){width:18%!important}

  .exp-single-ship-table th:nth-child(2){width:36%!important}.exp-single-ship-table th:nth-child(3){width:11%!important}.exp-single-ship-table th:nth-child(4){width:14%!important}.exp-single-ship-table th:nth-child(5){width:11%!important}.exp-single-ship-table th:nth-child(6){width:13%!important}.exp-single-ship-table th:nth-child(7){width:15%!important}

  /* Snapshot and ship detail rows become labelled mobile records. */
  .exp-dialog-table,.exp-ship-mode-detail-table{display:block;width:100%!important;min-width:0!important;white-space:normal}
  .exp-dialog-table thead,.exp-ship-mode-detail-table thead{display:none}
  .exp-dialog-table tbody,.exp-ship-mode-detail-table tbody{display:block}
  .exp-dialog-table tbody tr,.exp-ship-mode-detail-table tbody tr{height:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:5px 6px;border-bottom:1px solid #dce2e5;background:#fff}
  .exp-dialog-table tbody td,.exp-ship-mode-detail-table tbody td{display:block;min-width:0!important;width:auto!important;padding:3px 4px!important;border:0;text-align:left!important;font-size:11px;overflow:hidden;text-overflow:ellipsis}
  .exp-dialog-table tbody td:first-child,.exp-ship-mode-detail-table tbody td:first-child{grid-column:1/-1;padding-bottom:5px!important;font-size:12px;border-bottom:1px solid #edf0f2}
  .exp-dialog-table tbody td:not(:first-child)::before,.exp-ship-mode-detail-table tbody td:not(:first-child)::before{display:block;margin-bottom:1px;color:#7a858c;font-size:8px;line-height:1}
  .exp-dialog-table td:nth-child(2)::before,.exp-ship-mode-detail-table td:nth-child(2)::before{content:'场次'}
  .exp-dialog-table td:nth-child(3)::before{content:'伤害'}.exp-dialog-table td:nth-child(4)::before{content:'击杀'}.exp-dialog-table td:nth-child(5)::before{content:'经验'}.exp-dialog-table td:nth-child(6)::before{content:'侦察'}.exp-dialog-table td:nth-child(7)::before{content:'潜在'}
  .exp-ship-mode-detail-table td:nth-child(3)::before{content:'PR'}.exp-ship-mode-detail-table td:nth-child(4)::before{content:'胜率'}.exp-ship-mode-detail-table td:nth-child(5)::before{content:'均伤'}.exp-ship-mode-detail-table td:nth-child(6)::before{content:'均杀'}.exp-ship-mode-detail-table td:nth-child(7)::before{content:'均经验'}

  .exp-pr-calc-table{width:100%!important;min-width:0!important;table-layout:fixed!important;white-space:normal}
  .exp-pr-calc-table th,.exp-pr-calc-table td{min-width:0!important;width:auto!important;padding:5px 3px!important;font-size:9px!important;line-height:1.15;overflow-wrap:anywhere}
  .exp-pr-calc-table th{font-size:8px!important}.exp-pr-calc-table th:first-child{width:18%!important}.exp-pr-calc-table th:nth-child(2){width:20%!important}.exp-pr-calc-table th:nth-child(3){width:25%!important}.exp-pr-calc-table th:nth-child(4){width:19%!important}.exp-pr-calc-table th:nth-child(5){width:18%!important}
  .exp-pr-total-row td:first-child small{display:none!important}

  /* Replay team and interaction tables become compact two-line records. */
  .exp-replay-team-table,.exp-replay-interaction-table{display:block;width:100%!important;min-width:0!important;white-space:normal}
  .exp-replay-team-table thead,.exp-replay-interaction-table thead{display:none}
  .exp-replay-team-table tbody,.exp-replay-interaction-table tbody{display:block}
  .exp-replay-team-table tbody tr{height:auto;display:grid;grid-template-columns:minmax(0,1fr) 48px 56px;grid-template-rows:auto auto;padding:5px 6px;border-bottom:1px solid #dce2e5}
  .exp-replay-team-table tbody td{display:block!important;min-width:0!important;width:auto!important;padding:2px 3px!important;border:0;font-size:10px!important;text-align:left!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .exp-replay-team-table td:nth-child(1){grid-column:1;grid-row:1}.exp-replay-team-table td:nth-child(2){grid-column:1;grid-row:2;color:#66737b}.exp-replay-team-table td:nth-child(3){grid-column:2;grid-row:1}.exp-replay-team-table td:nth-child(5){grid-column:2;grid-row:2}.exp-replay-team-table td:nth-child(7){grid-column:3;grid-row:1 / 3;align-self:center}
  .exp-replay-team-table td:nth-child(4),.exp-replay-team-table td:nth-child(6){display:none!important}
  .exp-replay-team-table td:nth-child(3)::before,.exp-replay-team-table td:nth-child(5)::before,.exp-replay-team-table td:nth-child(7)::before{display:block;color:#7a858c;font-size:7px;line-height:1}
  .exp-replay-team-table td:nth-child(3)::before{content:'伤害'}.exp-replay-team-table td:nth-child(5)::before{content:'击杀'}.exp-replay-team-table td:nth-child(7)::before{content:'经验'}

  .exp-replay-interaction-table tbody tr{height:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:5px 6px;border-bottom:1px solid #dce2e5}
  .exp-replay-interaction-table tbody td{display:block;min-width:0!important;width:auto!important;padding:3px!important;border:0;text-align:left!important;font-size:10px!important;overflow:hidden;text-overflow:ellipsis}
  .exp-replay-interaction-table tbody td:first-child{grid-column:1/-1;padding-bottom:5px!important;border-bottom:1px solid #edf0f2;font-size:11px!important}
  .exp-replay-interaction-table tbody td:not(:first-child)::before{display:block;color:#7a858c;font-size:7px;line-height:1}
  .exp-replay-interaction-table td:nth-child(2)::before{content:'伤害'}.exp-replay-interaction-table td:nth-child(3)::before{content:'占比'}.exp-replay-interaction-table td:nth-child(4)::before{content:'击中'}.exp-replay-interaction-table td:nth-child(5)::before{content:'火灾'}.exp-replay-interaction-table td:nth-child(6)::before{content:'进水'}.exp-replay-interaction-table td:nth-child(7)::before{content:'核心'}.exp-replay-interaction-table td:nth-child(8)::before{content:'模块'}.exp-replay-interaction-table td:nth-child(9)::before{content:'击沉'}

  .exp-replay-chart-wrap{overflow-x:hidden!important}
  .exp-replay-chart-wrap svg{width:100%!important;min-width:0!important}
}

/* v18.4: keep the three queue-mode rows readable without horizontal scrolling. */
@media (max-width: 760px) {
  .exp-window-queue-kpis{width:100%;overflow:hidden}
  .exp-window-queue-row{grid-template-columns:12% 10% 15% 19% 12% 17% 15%;min-height:48px}
  .exp-window-queue-label,.exp-window-queue-cell{padding:4px 2px;overflow:hidden}
  .exp-window-queue-label{align-items:center;text-align:center}.exp-window-queue-label strong{font-size:11px}.exp-window-queue-label small{margin-top:1px;font-size:7px;letter-spacing:0}
  .exp-window-queue-cell{align-items:center;text-align:center}.exp-window-queue-cell small{font-size:7px;line-height:1.05;white-space:nowrap}.exp-window-queue-cell strong{margin-top:2px;font-size:11px;line-height:1.05}
  .exp-window-queue-cell:nth-child(4) strong,.exp-window-queue-cell:nth-child(6) strong{font-size:10px}
  .exp-window-queue-note{padding:5px 7px;font-size:9px}
}
