#truckSectionViewer {
  max-width:none; max-height:none; margin:auto; padding:0; overflow:visible;
  border:0; background:transparent;
}
#truckSectionViewer::backdrop { background:rgba(5,12,20,.72); }
body:has(>#truckSectionViewer[open]) { overflow:hidden; }
#truckSectionViewer .part-card { overflow:hidden; }
#truckSectionViewer .truck-viewer-content {
  max-height:calc(100dvh - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow:auto; overscroll-behavior:contain; padding:2px;
}
#truckSectionViewer.no-section-media .truck-viewer-content { padding-top:44px; }
#truckSectionClose { min-width:44px; min-height:44px; }
#truckSectionViewer .truck-viewer-stage { touch-action:pan-y pinch-zoom; cursor:default; user-select:none; contain:paint; isolation:isolate; }
#truckSectionViewer .truck-viewer-stage.can-enlarge { cursor:zoom-in; }
#truckSectionViewer .truck-viewer-loading { position:absolute; inset:0; z-index:1; display:grid; place-items:center; color:#fff; font:600 16px/1.4 system-ui; pointer-events:none; }
#truckSectionViewer .truck-viewer-loading[hidden] { display:none; }
#truckSectionViewer .truck-viewer-stage > :is(img,video) {
  position:absolute; inset:0; width:100%; height:100%; object-position:center center!important;
}
#truckSectionViewer .truck-viewer-stage > img { z-index:1; object-fit:cover!important; }
#truckSectionViewer .truck-viewer-stage > video { z-index:2; background:#051832; transform:translateZ(0); pointer-events:none; }
#truckSectionViewer .truck-viewer-stage > video,
#truckSectionViewer.media-expanded .truck-viewer-stage > img { object-fit:contain!important; }
#truckSectionViewer .truck-viewer-open-video {
  position:absolute; z-index:3; inset:0; width:100%; height:100%; margin:0; padding:0;
  display:grid; place-items:center; border:0; border-radius:0; background:transparent;
  color:#fff; cursor:pointer; touch-action:pan-y pinch-zoom; -webkit-tap-highlight-color:transparent;
}
#truckSectionViewer .truck-viewer-play-indicator { display:grid; place-items:center; width:64px; height:64px; padding-left:3px; border:2px solid #b7eeff; border-radius:50%; background:#082c55e8; color:#fff; font:900 29px/1 system-ui; box-shadow:0 2px 12px #00162d66; pointer-events:none; }
#truckSectionViewer .truck-viewer-open-video.is-playing .truck-viewer-play-indicator { opacity:0; }
#truckSectionViewer .truck-viewer-open-video:focus-visible { outline:3px solid #b7eeff; outline-offset:-5px; }
#truckSectionViewer.media-expanded .part-card { width:min(1100px,96vw); max-height:none; }
#truckSectionViewer.media-expanded .truck-viewer-content > .part-card-body { display:none; }
#truckSectionViewer.media-expanded .truck-viewer-content { overflow:hidden; max-height:calc(100svh - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
#truckSectionViewer.media-expanded .truck-viewer-gallery {
  display:flex; flex-direction:column; height:calc(100svh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
#truckSectionViewer.media-expanded .truck-viewer-gallery .truck-viewer-stage {
  flex:1 1 0; min-height:0; max-height:none; aspect-ratio:auto;
}
#truckSectionViewer.media-expanded .truck-viewer-gallery > :not(.truck-viewer-stage) { flex:none; }
#truckSectionViewer .part-photo-toolbar {
  position:absolute; inset:auto 8px 8px; z-index:2;
  display:flex; align-items:flex-end; gap:6px; pointer-events:none;
}
#truckSectionViewer .part-swipe-hint {
  min-width:0; padding:4px 6px; font-size:clamp(10px,2vw,13px); line-height:1.2;
}
#truckSectionViewer .part-photo-toolbar .photo-count {
  position:static; flex:none; margin-left:auto; font-size:clamp(10px,2vw,13px);
}
#truckSectionViewer :is(.truck-viewer-nav,.truck-viewer-playback) button {
  min-width:44px; min-height:44px; padding:4px 8px; border:1px solid #81cbea;
  border-radius:6px; background:var(--manco-glass-blue,linear-gradient(#126ec0,#062b5b)) center/cover; color:#fff; font:inherit; font-weight:800; cursor:pointer; box-shadow:inset 0 1px #b8edff80;
}
#truckSectionViewer button:focus-visible { outline:3px solid #0a75a7; outline-offset:2px; }
.truck-viewer-nav { display:flex; justify-content:center; align-items:center; margin-top:8px; }
.truck-viewer-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:min(100%,360px); align-items:stretch; gap:6px; min-width:0; }
.truck-viewer-tabs:has([data-photos][hidden]),.truck-viewer-tabs:has([data-videos][hidden]) { grid-template-columns:minmax(0,1fr); width:min(100%,180px); }
#truckSectionViewer .truck-viewer-tabs:has([hidden]) :is([data-photos],[data-videos]) { grid-column:1; }
#truckSectionViewer .truck-viewer-tabs :is([data-photos],[data-videos]) {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  min-width:0; width:100%; min-height:44px; padding:5px 7px; border:2px solid #7cd9f5; box-sizing:border-box;
  background:linear-gradient(160deg,#279bd0,#13669a); color:#f3fcff; box-shadow:inset 0 1px #b2f1ffb3;
  font:800 15px/1.1 var(--manco-font-display,inherit);
}
#truckSectionViewer .truck-viewer-tabs [data-photos] { grid-column:1; grid-row:1; }
#truckSectionViewer .truck-viewer-tabs [data-videos] { grid-column:2; grid-row:1; }
#truckSectionViewer .truck-viewer-tabs :is([data-photos],[data-videos]) svg {
  width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8;
}
#truckSectionViewer .truck-viewer-tabs [aria-pressed="true"] {
  background:var(--manco-glass-gold,linear-gradient(#fff49e,#ffc32b)) center/cover;
  color:#072551; border-color:#ffe47c; box-shadow:inset 0 1px #fff9d2,inset 0 -3px #805414,0 0 0 1px #e7b93f80;
}
#truckSectionViewer .truck-viewer-tabs :is([data-photos],[data-videos])::after { content:"✓"; visibility:hidden; flex:none; width:1em; font:900 12px/1 system-ui; }
#truckSectionViewer .truck-viewer-tabs [aria-pressed="true"]::after { visibility:visible; }
.truck-viewer-playback { display:grid; grid-template-columns:52px minmax(0,1fr) 44px; align-items:center; gap:10px; margin-top:10px; }
/* Expanded media keeps one toolbar position when its transport is inactive. */
.manco-facelift #truckSectionViewer.media-expanded .truck-viewer-playback[hidden] { display:none!important; }

/* Playback uses a round transport control, distinct from rectangular media modes. */
#truckSectionViewer .truck-viewer-playback [data-play] {
  position:relative; display:grid; place-items:center; width:52px; height:52px;
  min-width:52px; min-height:52px; padding:0; border:2px solid #91e6ff; border-radius:50%;
  background:radial-gradient(circle at 30% 20%,#176ba0,#082c55 72%); color:#fff;
  box-shadow:inset 0 1px #dcfaff66,0 2px 5px #00142d45;
}
#truckSectionViewer .truck-viewer-playback [data-play] svg { width:24px; height:24px; fill:currentColor; }
#truckSectionViewer .truck-viewer-playback [data-play] span {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
#truckSectionViewer .truck-viewer-playback [data-play]:active { box-shadow:inset 0 2px 5px #011b3d; }
#truckSectionViewer .truck-viewer-playback [data-play]:focus-visible { outline:3px solid #e3fbff; outline-offset:3px; }
.truck-viewer-seek { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; align-items:center; gap:0; font-size:12px; color:#fff; }
#truckSectionViewer .truck-viewer-playback [data-mute] { display:grid; place-items:center; min-width:44px; width:44px; height:44px; padding:10px; background:#d9f2ff12; border-color:#8bbcd2; box-shadow:none; }
#truckSectionViewer .truck-viewer-playback [data-mute] svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.truck-viewer-seek [data-time] { min-width:0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.truck-viewer-seek [data-time]::before { content:attr(data-time); }
.truck-viewer-seek input { box-sizing:border-box; width:100%; min-width:0; min-height:28px; margin:0; }
#truckSectionViewer :is(.truck-viewer-caption,[data-media-error]) { margin:5px 0 0; color:#fff; text-align:center; font-size:13px; }
.manco-facelift #truckSectionViewer .part-card-body .part-card-actions { display:grid; grid-template-columns:minmax(0,1fr); }
/* The second close control stays with the section, within thumb reach. */
#truckSectionViewer .truck-viewer-details-head {
  position:sticky; top:-2px; z-index:4; display:grid; grid-column:1 / -1;
  grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:12px;
  margin:-2px 0 0; padding:6px 0 8px;
  background:linear-gradient(120deg,#fff,#e8f8ff);
}
#truckSectionViewer .truck-viewer-details-head #truckSectionViewerTitle { grid-column:1; grid-row:1; min-width:0; margin:0; padding-right:0; }
#truckSectionViewer .truck-viewer-details-close {
  display:grid; place-items:center; grid-column:2; grid-row:1; width:44px; height:44px; min-width:44px; min-height:44px;
  margin:0; padding:0; border:1px solid #86dfff; border-radius:8px;
  background:var(--manco-glass-blue,linear-gradient(#126ec0,#062b5b)) center/cover;
  color:#fff; box-shadow:inset 0 1px #c6f6ff; font:900 32px/1 system-ui; cursor:pointer;
}


/* Shared media actions use the same native controls on both surfaces. */
#lightbox .manco-media-share,
#truckSectionViewer .truck-viewer-share-action .manco-media-share {
  display:inline-flex; align-items:center; justify-content:center; gap:5px;
  flex:none; min-width:44px; min-height:44px; padding:5px 8px;
  border:1px solid #81cbea; border-radius:8px;
  background:#e7f6ff; color:#092d56; font:800 13px/1.15 system-ui,sans-serif;
  cursor:pointer;
}
/* File controls follow the existing Share style without moving the mode row. */
#truckSectionViewer .truck-viewer-file-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:6px; margin-top:8px; }
#truckSectionViewer .truck-viewer-file-actions[hidden] { display:none; }
#truckSectionViewer .truck-viewer-file-actions .manco-media-share,
.manco-media-feedback .manco-media-share {
  display:inline-flex; align-items:center; justify-content:center; min-height:44px; box-sizing:border-box;
  padding:5px 8px; border:1px solid #7ce3ee; border-radius:8px;
  background:#0b597d24; color:#d9faff; box-shadow:none; text-decoration:none;
  font:800 13px/1.15 system-ui,sans-serif; cursor:pointer;
}
#truckSectionViewer [data-file-status],.manco-media-feedback p { margin:5px 0; color:#fff; font:13px/1.3 system-ui,sans-serif; }
.manco-media-feedback { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.manco-media-feedback p { flex:1 0 100%; }
.manco-media-feedback input { flex:1 1 180px; min-width:0; width:100%; min-height:44px; box-sizing:border-box; font:13px/1.3 system-ui,sans-serif; }
#lightbox .manco-media-share[hidden],
#truckSectionViewer .manco-media-share[hidden] { display:none; }
.manco-media-share svg { width:17px; height:17px; flex:none; }
#lightbox .manco-media-share:focus-visible { outline:3px solid #fff; outline-offset:2px; }
/* Mode tabs are centered across the viewer; file actions form one aligned row. */
#truckSectionViewer .truck-viewer-share-action { grid-column:3; display:flex; min-width:0; }
#truckSectionViewer .truck-viewer-share-action[hidden] { display:none; }
#truckSectionViewer .truck-viewer-file-actions .manco-media-share { width:100%; min-width:0; margin:0; font-size:14px; text-align:center; }
#truckSectionViewer .truck-viewer-share-action .manco-media-share { background:#0b597d24; color:#d9faff; border-color:#7ce3ee; box-shadow:none; }
@media (max-width:520px) {
 #truckSectionViewer .truck-viewer-tabs :is([data-photos],[data-videos]) { font-size:14px; gap:4px; padding:5px; }
 #truckSectionViewer .truck-viewer-tabs :is([data-photos],[data-videos]) svg { display:none; }
 #truckSectionViewer .truck-viewer-file-actions .manco-media-share { padding:5px 3px; }
 .truck-viewer-playback { gap:8px; }
}
