/* Use the packet's own content edge, shared with its heading. */
@media (min-width: 1025px) {
  body .portfolio-packet .packet-gallery.skn-asymmetric {
    display: block !important;
    position: relative !important;
    width: calc(100% - clamp(100px, 10vw, 220px)) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    padding: 0 !important;
    columns: auto !important;
    column-gap: clamp(16px, 1.5vw, 26px) !important;
    transform: none !important;
  }
  body .portfolio-packet .packet-gallery.skn-asymmetric .skn-gallery-axis {
    position: absolute;
    top: 0;
    width: 1px;
    background: var(--muted);
    opacity: .4;
    pointer-events: none;
  }
  body .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork:nth-child(n) {
    display: block !important;
    z-index: 1;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: auto !important;
    transform: none !important;
    grid-area: auto !important;
  }
  body .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
/* Touch gallery flow matches mobile through the tablet breakpoint. */
@media (max-width: 1024px) {
  body .portfolio-packet .packet-gallery.skn-asymmetric {
    display: block !important;
    position: relative !important;
    columns: 2 !important;
    column-gap: 20px !important;
    width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
  }
  body .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork:nth-child(n) {
    display: inline-block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    break-inside: avoid !important;
    vertical-align: top;
    transform: none !important;
    aspect-ratio: auto !important;
  }
  body .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}
/* Oil painting retains its compact CSS layout on narrow desktop and touch.
Wide desktop uses the common gallery layout and shared preview bounds. */
@media (max-width: 1024px) {
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric {
    --oil-thumb-height: min(50svh, 24vw);
    --oil-thumb-width: 22vw;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    gap: clamp(20px, 2vw, 32px) !important;
    columns: auto !important;
    height: auto !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork:nth-child(n) {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    display: block !important;
    justify-self: center !important;
    width: fit-content !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    grid-area: auto !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork img {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, var(--oil-thumb-width)) !important;
    max-height: var(--oil-thumb-height) !important;
    object-fit: contain !important;
  }
}
@media (max-width: 1024px) {
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric {
    --oil-thumb-height: 45svh;
    --oil-thumb-width: 100%;
    gap: 20px !important;
  }
}
@media (max-width: 700px) {
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric {
    column-gap: 20px !important;
    row-gap: 20px !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork:nth-child(n) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    background: transparent !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet .packet-gallery.skn-asymmetric .packet-artwork img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    margin-inline: auto !important;
  }
}

/* The live site's saved Additional CSS contains ID-specific rules for the
   feelings packet. Match that scope to remove its legacy 280px preview cap
   on wide desktop while retaining the narrow desktop and touch layouts. */
@media (min-width: 1600px) {
  body .portfolio-page.skn-oil-gallery .portfolio-packet:has(#packet-386) .packet-gallery.skn-asymmetric {
    display: block !important;
    position: relative !important;
    width: calc(100% - clamp(100px, 10vw, 220px)) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    columns: auto !important;
    column-gap: clamp(16px, 1.5vw, 26px) !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet:has(#packet-386) .packet-gallery.skn-asymmetric .packet-artwork:nth-child(n) {
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  body .portfolio-page.skn-oil-gallery .portfolio-packet:has(#packet-386) .packet-gallery.skn-asymmetric .packet-artwork img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Statische Galerieachsen: 24 px Überstand über und unter der Bildgruppe. */
@media (min-width: 1025px) {
  body .portfolio-packet .packet-gallery.skn-asymmetric .skn-gallery-axis {
    top: -24px;
  }
}

/* Redaktionelles Desktoplayout: Fokus links, waagerechte Achse hinter den Werken. */
@media (min-width:1025px) {
  html body .portfolio-page .portfolio-packet .packet-gallery.skn-asymmetric.skn-focus-gallery {
    width:100% !important; margin-inline:0 !important; display:block !important;
    columns:auto !important; overflow:visible;
  }
  .skn-focus-gallery .skn-gallery-focus-axis {
    position:absolute; left:-24px; right:-24px; height:1px;
    background:var(--muted); opacity:.4; pointer-events:none;
  }
  .skn-focus-gallery .packet-artwork { background:transparent !important; }
}
