/* Shared phone/tablet readability for the bottom-navigation hubs and their subviews. */
@media(max-width:620px),(pointer:coarse){
 #app#app .world-main:is(.view-ships,.view-office,.view-log,.view-career){height:var(--mobile-subview-height)!important;min-height:0!important;overflow:hidden!important}
 #app#app .world-main>.fullscreen-main-view{height:100%!important;min-height:0!important}
 #app#app .fullscreen-main-view__content{height:100%!important;min-height:0!important;margin:0!important;padding:10px!important;box-sizing:border-box}
 #app#app .hub-subview-shell{position:relative!important;inset:auto!important;transform:none!important;display:flex!important;width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;border:1px solid #d5c7a5;border-radius:14px;overflow:hidden!important;background:#fffaf0!important;color:#243e42!important}
 #app#app .hub-subview-art{display:none!important}
 #app#app .hub-subview-content{display:flex!important;flex-direction:column;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;background:#fffaf0!important;color:#243e42!important}
 #app#app .hub-subview-header{position:relative!important;inset:auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'title back';grid-template-rows:auto!important;align-items:center;gap:10px;flex:none;padding:12px!important;margin:0!important;background:#fffaf0!important;color:#243e42!important;border-bottom:1px solid #d5c7a5;box-shadow:0 3px 8px #243e4209;z-index:5}
 #app#app .hub-subview-header>.eyebrow{display:none!important}
 #app#app .hub-subview-header h1{grid-area:title;min-width:0;margin:0!important;font:normal 28px/1.15 Georgia,serif!important;color:#243e42!important;overflow-wrap:anywhere}
 #app#app .hub-subview-header [data-hub-back]{grid-area:back;position:static!important;inset:auto!important;float:none!important;margin:0!important;width:auto!important;min-height:44px!important;max-width:110px;padding:10px!important;font-size:16px!important;line-height:1.2!important;background:#fffef9!important;color:#243e42!important;border:1px solid #d5c7a5;border-radius:10px}
 #app#app .hub-subview-body{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;scroll-padding:12px;padding:14px 12px 24px!important;margin:0!important;color:#243e42!important;background:#fffaf0!important;font-size:18px!important;line-height:1.45!important;box-sizing:border-box}
 #app#app .hub-subview-body :is(p,li,label,dt,dd){font-size:17px!important;line-height:1.4!important;color:#243e42}
 #app#app .hub-subview-body :is(small,.panel-note,.personnel-muted){font-size:15px!important;line-height:1.4!important;color:#526966}
 #app#app .hub-subview-body h2{font-size:25px!important;line-height:1.2!important;margin-block:0 10px;color:#243e42}
 #app#app .hub-subview-body h3{font-size:22px!important;line-height:1.25!important;color:#243e42}
 #app#app .hub-subview-body h4{font-size:20px!important;line-height:1.25!important;color:#243e42}
 #app#app .hub-subview-body .eyebrow{font-size:13px!important;line-height:1.4!important;letter-spacing:.07em;color:#526966}
 #app#app .hub-subview-body :is(button,.button,summary,[role=tab]){min-height:48px!important;min-width:0;font-size:17px!important;line-height:1.3!important;padding:10px!important;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
 #app#app .hub-subview-body :is(input:not([type=checkbox]):not([type=range]),select){min-height:48px!important;max-width:100%;font-size:18px!important;padding:8px;box-sizing:border-box}
 #app#app .hub-subview-body :is(button,input,select,summary):focus-visible{outline:3px solid #19676b;outline-offset:2px}
 #app#app .hub-subview-body :is(.button,button):disabled{opacity:1;background:#e9e5d9!important;color:#556563!important}
 #app#app .hub-subview-body :is(article,.career-rank-card,.career-reputation-card){min-width:0;max-width:100%;box-sizing:border-box}
 #app#app .hub-subview-body :is(.route-card,.convoy-card,.captain-card,.office-directory-card,.office-portfolio-card,.fleet-ops-ship,.fleet-crew-ship,.career-national-card-row,.career-award-entry){background:#fffdf6!important;color:#243e42!important;border:1px solid #d5c7a5;border-radius:12px;padding:14px!important;margin-bottom:14px;box-shadow:none}
 #app#app .mobile-more-details{margin:10px 0;border:1px solid #d7dfd4;border-radius:10px;background:#edf3ef;color:#243e42}
 #app#app .mobile-more-details>summary{font-size:17px!important;font-weight:650;cursor:pointer;list-style-position:inside}
 #app#app .mobile-more-details>:not(summary){padding:10px;margin:0!important}
 #app#app .hub-subview-body :is(.fleet-ops-summary,.mobile-fleet-keyfacts,.route-ops-summary,.convoy-card-metrics,.office-stats,.career-metric-grid){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #app#app .mobile-fleet-keyfacts{margin:8px 0}
 #app#app .mobile-fleet-keyfacts>span{display:flex;flex-direction:column;gap:3px;padding:10px;background:#eaf1ec;border:1px solid #d4dfd5;border-radius:9px;font-size:19px;line-height:1.3}
 #app#app .mobile-fleet-keyfacts :is(b,strong){font-size:23px!important;color:#243e42}
 #app#app .mobile-fleet-keyfacts small{font-size:15px!important}
 #app#app .hub-subview-body :is(.fleet-ops-filters,.hub-log-filters,.office-tabs){display:flex!important;flex-wrap:nowrap!important;gap:6px;overflow-x:auto;max-width:100%;padding:4px 0 8px;scroll-snap-type:x proximity}
 #app#app .hub-subview-body :is(.fleet-ops-filters,.hub-log-filters,.office-tabs)>button{flex:none;min-width:85px;scroll-snap-align:start}
 #app#app .fleet-ops-ship{display:block!important}
 #app#app .fleet-ops-ship-main>h3{margin:9px 0 5px}
 #app#app .fleet-ops-meta{display:grid!important;grid-template-columns:1fr!important;gap:8px;font-size:17px}
 #app#app .fleet-ops-meta>span{white-space:normal}
 #app#app :is(.fleet-ops-actions,.route-card-actions,.convoy-card-actions,.office-directory-actions){display:grid!important;grid-template-columns:1fr!important;gap:8px;width:100%;margin-top:12px}
 #app#app .hub-subview-body :is(.fleet-ops-actions,.route-card-actions,.convoy-card-actions,.office-directory-actions)>button{width:100%!important}
 #app#app :is(.route-card-heading,.convoy-card){display:grid!important;grid-template-columns:72px minmax(0,1fr);gap:10px;align-items:center}
 #app#app .route-card-heading .route-card-art,#app#app .convoy-card>img{width:72px!important;height:72px!important;max-width:72px!important;max-height:72px!important;object-fit:contain!important;grid-column:1;grid-row:1}
 #app#app .convoy-card>:not(img){grid-column:2}
 #app#app .convoy-card>div:last-child{grid-column:1/-1}
 #app#app .route-card-heading>div{min-width:0}
 #app#app .route-card h3,#app#app .convoy-card h3{font-size:24px!important;overflow-wrap:anywhere;margin:4px 0}
 #app#app .route-card-assignment{display:grid;gap:5px}
 #app#app .route-ops-summary :is(b,strong),#app#app .convoy-card-metrics :is(b,strong){font-size:22px!important}
 #app#app .captain-card-top{display:grid!important;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:center}
 #app#app .captain-portrait{width:76px!important;height:94px!important;max-width:76px!important;object-fit:cover;border-radius:9px}
 #app#app .captain-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #app#app .captain-stats>div{min-width:0}
 #app#app .captain-assignment-actions,#app#app .owned-captain-meta{display:grid!important;grid-template-columns:1fr!important;gap:8px}
 #app#app .fleet-crew-ship dl{display:grid;gap:10px}
 #app#app .fleet-crew-ship dl>div{display:grid;gap:3px}
 #app#app .fleet-crew-ship dd{margin:0;font-weight:700;font-size:20px!important}
 #app#app .office-portfolio-card>strong{display:block;font-size:24px;margin:8px 0}
 #app#app .office-portfolio-card ul{list-style:none;padding:0;margin:12px 0}
 #app#app .office-portfolio-card li{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #e4d9bf}
 #app#app .office-portfolio-card .button{width:100%}
 #app#app .hub-log-dialog .log-list{display:grid;gap:14px}
 #app#app .hub-log-dialog .log-list article{padding:14px;border:1px solid #d5c7a5;border-radius:10px;background:#fffdf6}
 #app#app .hub-log-dialog .log-list h3{margin:6px 0 10px}
 #app#app .hub-log-dialog .log-list p{margin:0}
 #app#app .career-rank-art-wrap{display:none!important}
 #app#app .career-rank-card{display:block!important;padding:12px!important}
 #app#app .career-rank-side{display:grid!important;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:12px;width:100%!important}
 #app#app .career-rank-emblem-wrap{width:88px;height:110px;padding:0}
 #app#app .career-rank-emblem{width:88px!important;height:110px!important;object-fit:contain!important;max-height:110px!important}
 #app#app .career-rank-summary{padding:0!important;min-width:0}
 #app#app .career-rank-summary h3{font-size:27px!important;margin:6px 0}
 #app#app .career-rank-score strong{font-size:26px!important}
 #app#app .career-national-award-zone,#app#app .career-national-award-stage{height:140px!important;min-height:0!important;padding:0!important}
 #app#app .career-national-award{width:100%!important;height:140px!important;max-height:140px!important;object-fit:contain!important;transform:none!important}
 #app#app .career-national-title>strong,#app#app .career-national-title>b{font-size:21px!important;line-height:1.3}
 #app#app .career-award-entry{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px}
 #app#app .career-award-entry>img{width:72px!important;height:100px!important;object-fit:contain}
 #app#app .career-award-status{grid-column:1/-1;font-size:14px!important;justify-self:start}
 #app#app .career-award-rank{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;padding:12px}
 #app#app .career-award-rank>img{width:72px!important;height:90px!important;object-fit:contain}
 #app#app .logbook-scene-panel{position:relative!important;inset:auto!important;transform:none!important;display:flex!important;flex-direction:column;max-width:100%!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;padding:16px!important;background:#fffaf0f5!important;color:#243e42!important;border:1px solid #d5c7a5;border-radius:14px;overflow:auto!important;box-sizing:border-box}
 #app#app .logbook-scene-panel>header{flex:none;padding:0 0 10px!important}
 #app#app .logbook-scene-panel>header h1{font:normal 30px/1.2 Georgia,serif!important;margin:0 0 6px;color:#243e42!important}
 #app#app .logbook-scene-panel>header :is(p,.eyebrow),#app#app .logbook-scene-note{display:none!important}
 #app#app .logbook-scene-entries{display:grid!important;grid-template-columns:1fr!important;gap:9px;padding:0!important;flex:none!important;overflow:visible!important}
 #app#app .logbook-scene-entries .hub-hotspot{position:static!important;inset:auto!important;transform:none!important;display:flex!important;align-items:center;gap:14px;width:100%!important;min-width:0!important;max-width:none!important;min-height:66px!important;padding:8px 12px!important;font-size:20px!important;line-height:1.2!important;text-align:left;background:#fffdf6!important;color:#243e42!important;border:1px solid #d5c7a5;border-radius:10px;box-sizing:border-box}
 #app#app .logbook-scene-entries .hub-hotspot-icon{width:46px!important;height:46px!important;flex:0 0 46px!important;background:none!important}
 #app#app .logbook-scene-entries .hub-hotspot-icon img{width:46px!important;height:46px!important;object-fit:contain}
 #app#app .ships-scene-panel .hub-status-bar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:8px!important;margin:0 0 10px!important;position:static!important;max-width:none!important;background:#eaf1ec!important;color:#243e42!important;font-size:14px!important}
 #app#app .ships-scene-panel .hub-status-bar>span{display:flex;flex-direction:column;white-space:normal;gap:2px}
 #app#app .ships-scene-panel .hub-status-bar>span:nth-child(2),#app#app .ships-scene-panel .hub-status-bar>span:nth-child(4){display:none}
 #app#app .ships-scene-panel .hub-status-bar b{font-size:22px;color:#243e42}
}
@media(max-width:620px){
 #app#app .hub-subview-body :is(.office-directory-grid,.office-portfolio-grid,.captain-owned-grid,.captain-offers-grid,.fleet-crew-list,.career-national-card-list,.career-reputation-grid,.career-award-nations){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px}
 #app#app .hub-subview-body .convoy-card{display:block!important}
 #app#app .hub-subview-body .convoy-card>img{float:left;margin:0 12px 8px 0}
 #app#app .hub-subview-body .convoy-card>div:last-child{clear:both}
 #app#app .hub-subview-body .career-rank-requirements{display:grid;grid-template-columns:1fr!important;gap:8px}
}
@media(max-width:620px),(pointer:coarse){
 /* Local city services retain their city-back geometry and illustrations. */
 #app#app .local-service :is(p,li,label,dt,dd){font-size:17px!important;line-height:1.45!important}
 #app#app .local-service :is(small,.panel-note,.personnel-muted){font-size:15px!important;line-height:1.4!important}
 #app#app .local-service :is(h2,h3){font-size:24px!important;line-height:1.25!important}
 #app#app .local-service :is(.button,input,select,summary){min-height:48px!important;font-size:17px!important;line-height:1.3!important;box-sizing:border-box}
 #app#app .local-service :is(.harbor-ship-actions,.harbor-convoy-actions){display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
 #app#app .local-service .tabs{overflow-x:auto;flex-wrap:nowrap}
 #app#app .local-service .tabs button{min-height:48px!important;font-size:17px!important;flex-shrink:0}
 #app#app .local-service :is(.personnel-wage-card strong,.office-stat strong){font-size:23px!important}
 #app#app .hub-subview-body .career-rank-requirements>*{font-size:16px!important;line-height:1.4!important;padding:10px!important}
}

@media(max-width:620px),(pointer:coarse){
 #app#app .local-service .yard-fleet-choice{min-height:96px!important;height:auto!important}
 #app#app .local-service .yard-fleet-choice>span:not(.ship-illustration){grid-template-rows:auto auto auto!important;gap:4px!important}
 #app#app .local-service .yard-fleet-choice b{font-size:18px!important;line-height:1.3!important;white-space:normal!important}
 #app#app .local-service .yard-fleet-choice small{display:block!important;white-space:normal!important;overflow:visible!important;-webkit-line-clamp:unset!important}
}
@media(max-width:620px),(pointer:coarse){
 /* Keep the existing scene image above the plain city background. */
 #app#app>.world-main.location-scene-view:has(>.local-service:is(.local-service-office,.local-service-governor))>.location-background-art{z-index:1!important}
}
/* Explicit convoy repair controls must survive the older compact single-ship rules. */
#app#app .local-service.local-service-yard .yard-v2 .yard-repair.yard-convoy-repair{display:block!important;padding:12px!important;margin-top:10px!important;border:1px solid #ddcfaa;border-radius:10px;background:#fffaf0}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>:is(h3,p,small,details){display:block!important}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>.yard-repair-summary{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>.yard-repair-summary>span{display:flex;flex-direction:column;gap:4px;padding:8px;background:#f2ecd9;font-size:15px;border-radius:6px}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>.yard-repair-summary>span:last-child{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>.yard-repair-summary b{font-size:21px;color:#243e42}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>[data-yard-confirm-repair]{display:flex!important;align-items:center;justify-content:center;gap:12px;width:100%;min-height:60px!important;font-size:18px!important;line-height:1.3!important;padding:10px!important;background:#1b6266!important;color:#fffaf0!important}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>[data-yard-confirm-repair]>img{width:42px;height:42px;object-fit:contain}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>small{margin:10px 0;font-size:15px!important;line-height:1.4!important}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>details{margin-top:12px;border-top:1px solid #ddcfaa}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>details>summary{min-height:48px;padding:10px 0;font-size:17px;font-weight:700;cursor:pointer}
.yard-repair-dialog:has([data-action="repair-convoy"]){font-size:18px;line-height:1.4}
.yard-repair-dialog [data-action="repair-convoy"]{display:block;width:100%;min-height:56px;padding:12px;font-size:18px;background:#1b6266;color:#fffaf0;border:1px solid #bca577;border-radius:8px}
.yard-repair-dialog:has([data-action="repair-convoy"]) .yard-repair-dialog-close{width:44px;height:44px;min-height:44px}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>[data-yard-confirm-repair]>span{color:inherit!important}
#app#app .local-service.local-service-yard .yard-v2 .yard-convoy-repair>[data-yard-confirm-repair]:disabled{background:#e4dfd0!important;color:#526966!important;opacity:1}
