@media (max-width: 980px) {
  /* Only the shared 50px rotating header, not the rest of the captured header. */
  [data-mirror-header] {
    left: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    /* Flags share this grid row; the logo in the following row protrudes
       upwards by 59px. Reserve both gaps so neither covers the text. */
    margin: 60px 0 70px !important;
  }
  [data-mirror-header] [data-testid="slidesWrapper"],
  [data-mirror-header] [data-testid="slidesWrapper"] > *,
  [data-mirror-header] [data-testid="inline-content"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  [data-mirror-header] [data-testid="mesh-container-content"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 50px;
    min-height: 0 !important;
    padding: 0 12px;
    box-sizing: border-box;
  }
  [data-mirror-header] [data-testid="richTextElement"] {
    position: relative !important;
    left: auto !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow-wrap: anywhere;
  }
  [data-mirror-header] [data-testid="richTextElement"] * {
    font-size: clamp(16px, 4vw, 24px) !important;
    line-height: 1.4 !important;
  }

  /* Stack only the six Dharma carousel slots; preserve headings, original
     slide content, outer page flow, and Wix's transition transforms. */
  [data-mirror-dharma-group] > [data-mirror-dharma-slot] {
    position: relative !important;
    left: 0 !important;
    margin: 0 0 16px !important;
    width: 100vw !important;
    min-width: 0 !important;
    height: 260px !important;
    justify-self: start !important;
  }
  [data-mirror-dharma-slot="0"] { grid-area: 2 / 1 / 3 / 2 !important; }
  [data-mirror-dharma-group] > [data-mirror-dharma-slot="0"] {
    height: 426px !important;
  }
  [data-mirror-dharma-slot="0"] > [data-testid="columns"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 260px 150px;
    gap: 16px;
    width: 100% !important;
    min-width: 0 !important;
  }
  [data-mirror-dharma-slot="0"] .wixui-column-strip__column {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  [data-mirror-dharma-slot="0"] .wixui-column-strip__column:has([data-mirror-dharma]) {
    grid-area: 1 / 1 / 2 / 3;
  }
  [data-mirror-dharma-slot="0"] .wixui-column-strip__column:has(wow-image) {
    height: 150px !important;
  }
  /* These empty columns were just backdrops for the other two slideshows. */
  [data-mirror-dharma-slot="0"] .wixui-column-strip__column:not(:has([data-mirror-dharma], wow-image)) {
    display: none;
  }
  [data-mirror-dharma-slot="0"] .bgImage img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  [data-mirror-dharma-slot="1"] { grid-area: 3 / 1 / 4 / 2 !important; }
  [data-mirror-dharma-slot="2"] { grid-area: 4 / 1 / 5 / 2 !important; }
  [data-mirror-dharma-slot="0"] [data-testid="inline-content"],
  [data-mirror-dharma-slot="0"] [data-testid="mesh-container-content"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  [data-mirror-dharma] {
    left: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    min-width: 0 !important;
    height: 260px !important;
  }
  [data-mirror-dharma] > [data-testid="slidesWrapper"],
  [data-mirror-dharma] > [data-testid="slidesWrapper"] > *,
  [data-mirror-dharma] [data-testid="inline-content"] {
    width: 100% !important;
    min-width: 0 !important;
    height: 260px !important;
  }
  [data-mirror-dharma] [data-testid="mesh-container-content"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 260px;
    min-height: 0 !important;
    padding: 16px 20px 54px;
    box-sizing: border-box;
  }
  [data-mirror-dharma] [data-testid="mesh-container-content"] > * {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    grid-area: auto !important;
    flex-shrink: 0;
    max-width: 100%;
  }
  [data-mirror-dharma] [data-testid="mesh-container-content"] > [data-mesh-id*="wedge"] {
    display: none;
  }
  [data-mirror-dharma] [data-testid="richTextElement"] {
    width: 100% !important;
    height: auto !important;
    overflow-wrap: anywhere;
  }
  [data-mirror-dharma] [data-testid="richTextElement"] * {
    font-size: 20px !important;
    line-height: 1.5 !important;
  }
  [data-mirror-dharma] img {
    max-width: 100%;
    object-fit: contain !important;
  }

  [data-mirror-carousel] > [data-testid="prevButton"],
  [data-mirror-carousel] > [data-testid="nextButton"] {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    margin: 0 !important;
    right: auto !important;
    z-index: 5;
    touch-action: manipulation;
  }
  [data-mirror-carousel] > [data-testid="prevButton"] {
    left: var(--mirror-carousel-left) !important;
  }
  [data-mirror-carousel] > [data-testid="nextButton"] {
    left: var(--mirror-carousel-right) !important;
  }
  [data-mirror-carousel] > nav {
    position: absolute !important;
    left: var(--mirror-carousel-center) !important;
    bottom: 10px !important;
    transform: translateX(-50%);
    margin: 0 !important;
    z-index: 5;
  }
  [data-mirror-carousel] > nav ol {
    gap: 32px;
  }
  [data-mirror-carousel] > nav a::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }

  /* Scope content repairs to the two captured homepage layouts. Keep the
     desktop-sized outer mesh intact so later sections retain their positions.
     Never transform slides: Wix uses those transforms for its animations. */
  #comp-l8t83kih[data-mirror-carousel] > [data-testid="slidesWrapper"],
  #comp-l8w0hd7x[data-mirror-carousel] > [data-testid="slidesWrapper"] {
    left: var(--mirror-carousel-content-left) !important;
    width: var(--mirror-carousel-content-width) !important;
  }
  #comp-l8t83kih[data-mirror-carousel] > [data-testid="slidesWrapper"] > *,
  #comp-l8w0hd7x[data-mirror-carousel] > [data-testid="slidesWrapper"] > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  #comp-l8t83kih[data-mirror-carousel] .bgImage img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  #comp-l8w0hd7x[data-mirror-carousel] [data-testid="inline-content"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  #comp-l8w0hd7x[data-mirror-carousel] [data-testid="mesh-container-content"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    width: 100% !important;
    min-height: 0 !important;
    height: 347px;
    padding: 16px 20px 64px;
  }
  #comp-l8w0hd7x[data-mirror-carousel] [data-testid="mesh-container-content"] > * {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    grid-area: auto !important;
    align-self: auto !important;
    flex-shrink: 0;
    max-width: 100%;
  }
  #comp-l8w0hd7x[data-mirror-carousel] [data-testid="richTextElement"] {
    width: 100% !important;
    height: auto !important;
    overflow-wrap: anywhere;
  }
  #comp-l8w0hd7x[data-mirror-carousel] [data-testid="richTextElement"] * {
    line-height: 1.3 !important;
  }
  /* The captured Thai display font has tall combining marks and descenders. */
  #comp-l8w0hd7x[data-mirror-carousel] #comp-l8tauemq * {
    line-height: 1.9 !important;
  }
  #comp-l8w15puf, #comp-l8w15puf * {
    font-size: clamp(20px, 5vw, 26px) !important;
  }
  #comp-l8tauemq, #comp-l8tauemq * {
    font-size: clamp(26px, 7vw, 32px) !important;
  }
  #comp-l8tavqff, #comp-l8tavqff * {
    font-size: clamp(23px, 6vw, 28px) !important;
  }
  #comp-l8w1aetb, #comp-l8w1aetb * {
    font-size: clamp(14px, 3.5vw, 16px) !important;
  }

  /* Retain both original artworks, with captions below rather than covering
     their lower edges. The original links and localized labels stay intact. */
  #comp-l8w14n5q {
    width: 100% !important;
    height: auto !important;
  }
  #comp-l8w0hd7x[data-mirror-carousel] #comp-l8w14n5q [data-testid="mesh-container-content"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 12px 16px !important;
    height: auto !important;
    padding: 0 !important;
    max-width: 420px;
    margin: auto;
  }
  #comp-l8w14n5q [data-testid="mesh-container-content"] > .wixui-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
  }
  #comp-l8w14n5q .wixui-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  #comp-l8w14n5q [data-semantic-classname="button"] {
    width: 100% !important;
    height: auto !important;
    min-height: 44px;
  }
  #comp-l8w14n5q .wixui-button {
    min-height: 44px;
  }
  #comp-l8w14n5q .wixui-button__label {
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  #comp-l8w14n5q #comp-l8vzyqlv { grid-area: 1 / 1 !important; }
  #comp-l8w14n5q #comp-l8w13ec0 { grid-area: 1 / 2 !important; }
  #comp-l8w14n5q #comp-l8w1478c { grid-area: 2 / 1 !important; }
  #comp-l8w14n5q #comp-l8w13vh4 { grid-area: 2 / 2 !important; }

  #comp-l8w0hd7x[data-mirror-carousel] > [data-testid="prevButton"],
  #comp-l8w0hd7x[data-mirror-carousel] > [data-testid="nextButton"] {
    top: auto !important;
    bottom: 0 !important;
    transform: none;
  }
  #comp-l8w0hd7x[data-mirror-carousel] > nav {
    bottom: 22px !important;
  }
}

/* The saved Pro Gallery uses its desktop expand layout even on phones.
   Stack its existing caption below the native slider; keep Wix's fade states,
   buttons, image identities and navigation handlers. */
@media (max-width: 600px) {
  #fullscreen-view .pro-gallery-desktop-expand {
    display: flex !important;
    flex-direction: column;
    padding: 84px 0 16px;
    box-sizing: border-box;
    height: 100%;
  }
  #fullscreen-view .pro-gallery-slider {
    position: relative !important;
    width: 100% !important;
    height: calc(100% - 120px) !important;
    flex: 1;
    min-height: 0;
  }
  #fullscreen-view .pro-gallery-fullscreen-slider-wrapper,
  #fullscreen-view .pro-gallery,
  #fullscreen-view [data-key="pro-gallery-inner-container"],
  #fullscreen-view .pro-gallery-parent-container {
    width: 100% !important;
    height: 100% !important;
  }
  #fullscreen-view [id="pro-gallery-container-pro-gallery-fullscreen-wrapper"] {
    width: calc(100% - 88px) !important;
    left: 44px !important;
  }
  #fullscreen-view .gallery-horizontal-scroll,
  #fullscreen-view .gallery-horizontal-scroll-inner,
  #fullscreen-view [data-hook="item-container"],
  #fullscreen-view [data-hook="item-wrapper"],
  #fullscreen-view [data-hook="item-container"] > div:not([data-hook="item-action"]),
  #fullscreen-view [data-hook="image-item"] {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }
  #fullscreen-view [data-hook="group-view"] {
    --group-left: 0px !important;
    --group-width: 100% !important;
  }
  #fullscreen-view [data-hook="gallery-item-image-img"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }
  #fullscreen-view [data-hook="nav-arrow-next"] { right: -44px !important; }
  #fullscreen-view [data-hook="nav-arrow-back"] { left: -44px !important; }
  #fullscreen-view [data-hook="nav-arrow-next"],
  #fullscreen-view [data-hook="nav-arrow-back"] {
    width: 44px !important;
    height: 50px !important;
  }
  #fullscreen-view .fullscreen-side-bar {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 16px !important;
    box-sizing: border-box;
    flex: none;
  }
  #fullscreen-view .fullscreen-side-bar-info-container {
    width: 100% !important;
    padding: 0 !important;
  }
  #fullscreen-view .fullscreen-side-bar-title h1 {
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}