/* Desktop sections share the type, controls and colours of the existing site. */
#detail .crumb { margin-block: 14px 10px; }
#detail .page-heading { margin-bottom: 16px; }
#detail .page-heading p { margin-top: 5px; }
.footer { margin-top: 16px; }
.footer-row { padding-block: 10px; }

@media (min-width: 701px) {
  body:has(> #detail:not([hidden]) > .real-case-savings) {
    display: flex;
    flex-direction: column;
    min-block-size: 100dvh;
  }

  #detail:not([hidden]):has(> .real-case-savings),
  #detail > .real-case-savings {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }

  #detail:has(> .real-case-savings) > .crumb { margin-block-end: 0; }
  #detail > .real-case-savings > .real-cases-grid { flex: 1 0 auto; }

  #detail > .real-case-savings .vacuum-pack-orbit {
    inset-block: 0;
    inset-inline-end: 5%;
    margin-block: auto;
    width: 92%;
    height: min(87%, 380px);
    place-items: center;
  }

  #detail > .real-case-savings .vacuum-pack-shadow {
    bottom: max(4%, calc(50% - 160px));
    height: min(11%, 42px);
  }
}

@media (min-width: 1100px) and (min-height: 740px) {
  #detail .real-case-savings-story { padding: clamp(24px, 3vh, 38px) clamp(28px, 2.7vw, 42px); }
  #detail .real-case-savings-story h2 { margin-block-end: 12px; font-size: clamp(34px, 4.6vh, 44px); }
  #detail .real-case-savings-story p { font-size: clamp(17px, 2.15vh, 21px); }
  #detail .real-case-savings-test { margin-block-start: 16px; padding-block-start: 14px; }
  #detail .real-case-savings-test summary, #detail .real-case-savings-test h3 { font-size: clamp(18px, 2.3vh, 23px); }
  #detail .real-case-savings-story .real-cases-telegram { margin-block-start: 16px; }
}

@media (min-width: 701px) and (prefers-reduced-motion: reduce) {
  #detail > .real-case-savings .vacuum-pack-shadow {
    bottom: max(17%, calc(50% - 76px));
  }
}

@media (min-width: 701px) and (max-height: 800px) {
  #detail .real-case-savings-story { padding: 16px clamp(20px, 2vw, 28px); }
  #detail .real-case-savings-story h2 { font-size: clamp(25px, 2.45vw, 33px); margin-block-end: 8px; }
  #detail .real-case-savings-test { margin-block-start: 10px; padding-block-start: 9px; }
  #detail .real-case-savings-story .real-cases-telegram { margin-block-start: 12px; }
}

@media (min-width: 1000px) and (max-height: 739px),
       (min-width: 1000px) and (max-width: 1200px) and (max-height: 800px) {
  #detail .real-case-savings-test h3 { margin-block-start: 8px; }
  #detail .real-case-savings-story p { line-height: 1.32; }
}

.service-media, .service-layout > aside { min-width: 0; }
.inline-action, .feature-list button {
  border: 0; background: transparent; color: #214b72; font: 800 15px/1.3 Nunito,sans-serif; cursor: pointer;
}
.inline-action { padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.service-info { margin-top: 5px; }
.cargo-receipt-trigger { margin-top: 5px; min-height: 32px; justify-self: start; text-align: left; }
.service-inputs {
  display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr);
  grid-template-rows: auto auto; grid-auto-flow: column; gap: 6px 12px; align-items: start;
}
.service-inputs label { align-self: end; }
.service-inputs label:nth-of-type(2) { margin: 0; }
.service-inputs input, .service-inputs textarea { height: 52px; }
.service-inputs input::placeholder { color: transparent; }
#quote-operations { min-height: 44px; height: auto; max-height: 9rem; field-sizing: content; }
@supports not (field-sizing: content) {
  #quote-operations:placeholder-shown { height: 44px; }
  #quote-operations:not(:placeholder-shown) { height: calc(4lh + 22px); }
}
.gallery:not(.gallery-demo) .thumb span { min-width: 0; overflow-wrap: anywhere; }
@container (max-width: 640px) {
  .gallery:not(.gallery-demo) .thumb { flex-direction: column; align-items: stretch; gap: 5px; }
  .gallery:not(.gallery-demo) .thumb img { width: 100%; height: 39px; }
  .gallery:not(.gallery-demo) .thumb span { padding-inline: 2px; }
}
.gallery:not(.gallery-demo) { container-type: inline-size; }
.service-layout .quote-panel { padding: clamp(18px,1.65vw,24px); }
.quote-panel .cargo-transit strong { color: #214b72; }
.quote-panel .cargo-transit p + p { margin-top: 3px; }
.service-layout[data-service=inspection] > .quote-panel { padding-block: 17px; }
[data-service=inspection] .quote-fields, [data-service=inspection] .quote-fields .button { margin-top: 0; }
.service-layout .preview-photo { min-height: clamp(225px,40dvh,355px); }
.gallery-demo .preview-photo { min-height: clamp(250px,45dvh,410px); }
.gallery-demo .preview-photo::after { display: none; }
.gallery-demo figcaption { inset: auto 12px 12px auto; }
.gallery-demo .photo-controls button { background: #193551; color: white; }
.page-heading .gallery-caption { max-width: none; }
.gallery-demo .thumbs {
  position: relative; display: flex; overflow-x: auto; gap: 7px; padding: 2px 2px 4px; scrollbar-width: thin;
}
.gallery-demo .thumb { flex: 0 0 clamp(142px,12vw,182px); }
.gallery-demo .thumb:focus-visible { outline-offset: -3px; }
.feature-list { display: grid; margin-block: 9px 15px; }
.feature-list button {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  text-align: left; padding: 10px 5px; border-bottom: 1px solid #dbe6f0;
}
.feature-list button[aria-pressed=true], .feature-list button:hover { color: #123c68; background: #eaf3fb; }
.feature-list svg { flex: none; width: 16px; height: 16px; }
#sheet .service-notes { padding: 0; border: 0; margin-top: 13px; }
#sheet .service-notes li { margin-left: 18px; }
#sheet[data-kind=requests] { width: min(620px,calc(100% - 40px)); }
.request-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; margin-top: 14px; }
.request-menu a { padding: 12px 0; border-bottom: 1px solid #dbe6f0; justify-content: space-between; }

.personal-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 20px; align-items: start; }
.personal-story img { aspect-ratio: auto; height: clamp(135px,28dvh,245px); }
.personal-tabs { flex-wrap: wrap; margin-bottom: 9px; }
.personal-layout > .quote-panel { padding: 18px 22px; }
.personal-form .quote-fields, .personal-form .button { margin-top: 0; }
@media (min-width:651px) {
  .personal-form .service-inputs { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
  [data-service=inspection] .service-inputs { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
}
.process-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.process-tools .work-tabs, .process-tools .section-action { margin: 0; }
.work-stages .quote-panel { padding: clamp(12px,1.25vw,20px); }
.work-scene { height: clamp(80px,19dvh,180px); aspect-ratio: auto; }
.stage-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 5px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.stage-toggle svg { flex: none; width: 18px; height: 18px; color: #385a77; }
.stage-toggle[aria-expanded=true] svg { transform: rotate(180deg); }
.work-stages .quote-panel:has([aria-expanded=true]) { border-color: #7596b3; background: #edf4fa; }
.stage-toggle:hover { color: #214b72; }
.stage-detail:not([hidden]) {
  display: grid; grid-template-columns: minmax(0,.85fr) repeat(2,minmax(0,1fr)); gap: 16px;
  margin-top: 10px; padding: 12px 18px; border-left: 3px solid #8ca9c3; background: #ebf2f8;
}
.stage-detail h3 { font-size: 16px; }
.stage-detail p { font-size: 14px; }
.reviews-panel {
  display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: clamp(25px,5vw,80px);
  align-items: center; max-width: none; border: 0; padding: 0; background: transparent;
}
.review-open { height: clamp(300px,calc(100dvh - 205px),630px); }
.review-controls { justify-content: flex-start; margin-top: 20px; }
#sheet[data-kind=review] { width: min(700px,calc(100vw - 48px)); max-height: 92dvh; padding: 0; overflow: hidden; }
#sheet[data-kind=service] { padding: 0; overflow: hidden; }
#sheet[data-kind=service] #sheet-body { padding: 14px 24px 24px; }
#sheet:is([data-kind=review],[data-kind=service],[data-kind=cargo-receipt])[open] { display: flex; flex-direction: column; }
#sheet:is([data-kind=review],[data-kind=service],[data-kind=cargo-receipt]) .sheet-head { flex: none; padding: 12px 18px; border-bottom: 1px solid #dbe6f0; }
#sheet:is([data-kind=review],[data-kind=service],[data-kind=cargo-receipt]) #sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#sheet[data-kind=cargo-receipt] {
  --receipt-gutter: clamp(18px,3vw,30px);
  width: min(720px,calc(100vw - 36px)); max-height: calc(100dvh - 48px);
  padding: 0; overflow: hidden;
}
#sheet[data-kind=cargo-receipt] .sheet-head { align-items: start; padding: 19px var(--receipt-gutter); gap: 18px; }
#sheet[data-kind=cargo-receipt] .sheet-head h2 { margin: 0; font-size: clamp(21px,3vw,27px); line-height: 1.18; }
#sheet[data-kind=cargo-receipt] .sheet-head button { flex: none; }
#sheet[data-kind=cargo-receipt] #sheet-body { padding: 18px var(--receipt-gutter) 12px; }
#sheet[data-kind=cargo-receipt] .cargo-receipt-body { padding: 0; font-size: 15.5px; }
#sheet[data-kind=cargo-receipt] .cargo-receipt-body ol { padding: 12px 16px 12px 36px; border-radius: 10px; background: #edf4fb; }
#sheet[data-kind=cargo-receipt] .cargo-receipt-body h3 { margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) {
  #sheet[data-kind=cargo-receipt][open] { animation: cargo-receipt-window-in 180ms ease-out both; }
}
@keyframes cargo-receipt-window-in {
  from { opacity: 0; transform: translateY(8px); }
}
.zoom-review { width: 100%; display: block; padding: 12px; border: 0; background: #f3f6f9; cursor: zoom-in; }
.zoom-review .review-enlarged { width: 100%; height: min(72dvh,700px); margin: 0; object-fit: contain; }
.zoom-review[aria-pressed=true] { cursor: zoom-out; }
.zoom-review[aria-pressed=true] img { height: auto; }
@media (min-width:851px) and (max-height:800px) {
  .result-intro { min-height: 155px; }
  .result-hero { min-height: 0; height: clamp(150px,25dvh,210px); }
  .result-copy { padding: 14px 20px; }
  .result-body { padding: 12px 18px 15px; }
  .choice { min-height: 74px; }
  .team-member { min-height: 158px; }
}
@media (max-width:850px) {
  .personal-layout, .reviews-panel { grid-template-columns: minmax(0,1fr); }
  .reviews-panel { gap: 12px; }
  .review-open { height: min(46dvh,380px); }
}
@media (max-width:650px) {
  .process-tools { display: flex; flex-wrap: wrap; }
  .stage-detail:not([hidden]), .request-menu { grid-template-columns: 1fr; }
  .service-inputs { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; grid-auto-flow: row; }
}
/* Height of the desktop host. The contents of mobile sheets are served independently. */
#delivery-dialog { height: min(748px,calc(100dvh - 52px)); }
/* The full caption is shown on the selected screen; all nine previews share a single row. */
.gallery-demo .thumb { flex: 1 0 62px; min-height: 46px; padding: 3px; position: relative; }
.gallery-demo .thumb img { width: 100%; height: 38px; }
.gallery-demo .thumb span {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
@media (min-width:851px) and (max-height:690px) {
  #detail .crumb { margin-block: 10px 5px; }
  #detail:has(.service-layout,.guide-grid) .crumb { margin-block: 8px 3px; }
  #detail:has(.service-layout,.guide-grid) + .footer { margin-top: 6px; }
  .service-layout > .quote-panel:has(.quote-fields) { padding-block: 13px; }
  .service-layout #service-quote { margin-top: 8px; gap: 6px; }
  .service-layout #service-quote .button { margin-top: 0; }
  .service-layout[data-service=inspection] #service-quote { margin-top: 0; }
  :lang(uz) .service-layout[data-service=fulfillment-cn] > .quote-panel { padding-block: 10px; }
  :lang(uz) .service-layout[data-service=fulfillment-cn] #service-quote { margin-top: 5px; gap: 5px; }
  #detail .page-heading { margin-bottom: 12px; }
  .gallery-demo .preview-photo { min-height: clamp(210px,39dvh,265px); }
  .work-stages .work-scene { height: 14dvh; }
}
/* Crop each stage from its original 2:1 sprite cell without stretching the people. */
.work-scene { position: relative; overflow: hidden; background-image: none; }
.work-scene::before {
  content: ""; position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%);
  aspect-ratio: 2 / 1; min-height: 100%; background: url("../assets/guide-process-51.webp") no-repeat;
  background-size: 300% 300%; background-position: inherit;
}
