/* Result detail grouping — additive only.
   Keeps the existing typography, colours, card appearance and controls.
   Only groups information and places up to three existing info tiles per row. */

body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-section{
  grid-column:1/-1;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-section>h4{
  margin:13px 0 7px;
  padding:0;
  color:inherit;
  font:inherit;
  font-size:11px;
  font-weight:800;
  letter-spacing:.055em;
  line-height:1.2;
  text-transform:uppercase;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-section:first-child>h4{
  margin-top:0;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  min-width:0;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-section .detail-item{
  width:100%;
  min-width:0;
  margin:0;
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-section .jumu-stats-detail{
  grid-column:auto;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-research{
  width:100%;
  margin-top:0;
}
@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
}
@media(max-width:390px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:minmax(0,1fr);
  }
}


/* WORK overview: same existing tiles, now under the section heading and max. three per row. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-work{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-work>h4{
  margin:0 0 7px;
  padding:0;
  color:inherit;
  font:inherit;
  font-size:11px;
  font-weight:800;
  letter-spacing:.055em;
  line-height:1.2;
  text-transform:uppercase;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.meta,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.chips{
  display:contents;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-separator{
  display:none!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration{
  grid-column:auto!important;
  order:initial!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .review-badge,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-jumu{
  grid-column:1/-1;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-work{
  margin-top:7px;
}
@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
}
@media(max-width:390px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid{
    grid-template-columns:minmax(0,1fr);
  }
}


/* Dense packing: every information tile occupies the next free slot.
   Keep the established visual styling; only layout and overflow-safe text sizing change. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-flow:row dense;
  align-items:stretch;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item{
  grid-column:auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  order:initial!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item>div{
  overflow-wrap:anywhere;
  word-break:normal;
}
@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item{
    font-size:clamp(10px,2.75vw,12px)!important;
    padding-left:clamp(5px,1.8vw,9px)!important;
    padding-right:clamp(5px,1.8vw,9px)!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item strong{
    font-size:clamp(7.5px,2.25vw,10px)!important;
    letter-spacing:clamp(.015em,.12vw,.055em)!important;
  }
}
@media(max-width:330px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}


/* Responsive auto-packing: prefer four tiles, then adapt to the available card width.
   All Werk facts now share one grid, so incomplete rows are filled by the next fact. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr))!important;
  grid-auto-flow:row dense!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:4px;
  box-sizing:border-box;
  min-width:0;
  min-height:58px;
  margin:0;
  padding:9px 11px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  box-shadow:none;
  color:#312b38!important;
  font-size:13px;
  font-weight:650;
  line-height:1.25;
  overflow-wrap:anywhere;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item strong{
  display:block;
  margin:0;
  color:#746a7b!important;
  font-size:10px;
  font-weight:800;
  line-height:1.15;
  letter-spacing:.055em;
  text-transform:uppercase;
}
@media(min-width:760px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
@media(max-width:759px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(auto-fit,minmax(min(118px,100%),1fr))!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item{
    font-size:clamp(10px,2.75vw,12px)!important;
    padding-left:clamp(5px,1.8vw,9px)!important;
    padding-right:clamp(5px,1.8vw,9px)!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item strong{
    font-size:clamp(7.5px,2.25vw,10px)!important;
    letter-spacing:clamp(.015em,.12vw,.055em)!important;
  }
}
@media(max-width:390px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(auto-fit,minmax(min(105px,100%),1fr))!important;
  }
}


/* Stable comparison layout: same tile slots for every work.
   Prefer four columns; missing values stay visible as placeholders instead of shifting later fields. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
  grid-auto-flow:row!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .detail-item:has(>div:only-child){
  min-width:0;
}


/* Compact closed cards: show only the four primary WORK facts
   (Epoche, Besetzung, Schwierigkeit, Dauer). */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result:has(.result-details-toggle[aria-expanded="false"]) .result-overview-grid > .detail-item{
  display:none!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result:has(.result-details-toggle[aria-expanded="false"]) .result-toggle-row{
  margin-top:6px!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result:has(.result-details-toggle[aria-expanded="true"]) .result-overview-grid > .detail-item{
  display:block!important;
}


/* MOBILE GRID TEST 2:
   4 columns on wider phones, 3 columns on narrower phones.
   Applies consistently to the compact WORK row and expanded detail grids. */
@media (min-width:400px) and (max-width:759px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:5px!important;
  }
}
@media (min-width:331px) and (max-width:399px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
}
@media (max-width:759px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item{
    min-width:0!important;
    padding:7px 5px!important;
    font-size:11px!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item strong{
    font-size:9px!important;
  }
}


/* Hinweise may use the full row: the text is prose, not a compact fact tile. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-notes .detail-item{
  grid-column:1 / -1!important;
}


/* Responsive tile headings: keep labels on one line and shrink gently on narrow tiles. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item strong{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  font-size:clamp(8.5px,2.15vw,10px)!important;
  line-height:1.05!important;
}
@media(min-width:760px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label,
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item strong{
    font-size:10px!important;
  }
}


/* Sammlung / Band is long-form content: full row like Hinweise. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.collection-detail{
  grid-column:1 / -1!important;
}



/* Primary WORK tiles: shared flat surface; keep only alignment rules. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  gap:3px!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  opacity:1!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label{
  margin:0!important;
  padding:0!important;
  transform:none!important;
  position:static!important;
  align-self:stretch!important;
}


/* Tile headings: wrap only at normal word boundaries.
   Long labels may use a second line, but individual words must never be split. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble::before,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .v5-chip-label,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item strong{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  max-width:100%!important;
}


/* Jugend musiziert: fixed 2-column tile layout for comparison test. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu .result-detail-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}


/* Jugend musiziert: consistent tile order on all screen sizes.
   Epoche → Häufigkeit → Altersgruppen → Schwierigkeit. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu .result-detail-grid>.detail-item:nth-child(1){
  order:1!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu .result-detail-grid>.detail-item:nth-child(2){
  order:3!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu .result-detail-grid>.detail-item:nth-child(3){
  order:2!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu .result-detail-grid>.detail-item:nth-child(4){
  order:4!important;
}


/* Closed WORK row fade — fresh single implementation.
   The compact closed state contains only the first WORK row, so fade the grid itself.
   Top 75% stays fully visible; lower 25% fades smoothly to transparent. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result:has(.result-details-toggle[aria-expanded="false"]) .result-overview-grid{
  -webkit-mask-image:linear-gradient(
    to bottom,
    #000 0%,
    #000 0%,
    #000 35%,
    transparent 95%,
    transparent 100%
  )!important;
  mask-image:linear-gradient(
    to bottom,
    #000 0%,
    #000 0%,
    #000 35%,
    transparent 95%,
    transparent 100%
  )!important;
  -webkit-mask-size:100% 100%!important;
  mask-size:100% 100%!important;
  -webkit-mask-repeat:no-repeat!important;
  mask-repeat:no-repeat!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result:has(.result-details-toggle[aria-expanded="true"]) .result-overview-grid{
  -webkit-mask-image:none!important;
  mask-image:none!important;
}

/* 2026-10-03 result-section spacing + line accent:
   one consistent vertical rhythm for Werk, Jugend musiziert, Hinweise
   and Werk Recherche. No section background layer; only a quiet vector line. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content{
  margin-top:0!important;
  margin-left:-20px!important;
  margin-right:-20px!important;
  padding-left:20px!important;
  padding-right:20px!important;
  max-width:none!important;
  width:auto!important;
  box-sizing:border-box;
  gap:0!important;
}

body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block{
  position:relative;
  grid-column:1 / -1;
  margin:0;
  padding:16px 0 10px;
  border:0;
  background:transparent;
}

/* Keep the first "Werk" section spacing, but pull every following section
   upward so the transition between categories uses less empty vertical space. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block + .result-section-block{
  padding-top:2px;
}

/* The first expanded section (Jugend musiziert) lives inside a separate
   disclosure container, so it is not an adjacent sibling of "Werk".
   Give it the same top rhythm as the later section transitions. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content>.result-section-block:first-child{
  padding-top:2px;
  margin-top:0;
}

/* Responsive section guide, v3:
   one single SVG path owns the complete line from left edge to right edge.
   JS only measures the real title width and container width; the curve itself
   keeps fixed pixel geometry, so it does not distort across viewport sizes. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block>h4{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  max-width:100%;
  margin:0 0 17px!important;
  padding:0;
}

body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-title-text{
  position:relative;
  z-index:1;
  display:inline-block;
}

body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-title-guide-svg{
  position:absolute;
  z-index:0;
  top:-9px;
  left:0;
  width:100%;
  height:32px;
  overflow:visible;
  pointer-events:none;
}

body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-title-guide-path{
  fill:none;
  stroke:rgba(71,125,163,.26);
  stroke-width:1.2;
  filter:drop-shadow(0 -0.5px 0 rgba(255,255,255,.58)) drop-shadow(0 0.7px 0.8px rgba(255,255,255,.28));
  stroke-linecap:butt;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

/* Remove the legacy box around the four research providers.
   The provider buttons themselves remain unchanged. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research>.work-research{
  width:100%;
  box-sizing:border-box;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}

@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content{
    margin-left:-13px!important;
    margin-right:-13px!important;
    padding-left:13px!important;
    padding-right:13px!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block{
    padding-top:16px;
    padding-bottom:9px;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block + .result-section-block{
    padding-top:2px;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content>.result-section-block:first-child{
    padding-top:2px;
    margin-top:0;
  }
}

/* Noten finden belongs to the same flat research layer.
   Keep the disclosure behavior, but remove its surrounding card chrome. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-purchase{
  width:100%;
  box-sizing:border-box;
  margin:8px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-purchase>.work-research{
  margin:6px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-research-privacy{
  margin-top:8px!important;
}



/* Desktop result rail: final loaded stylesheet owns the shared 75% alignment
   for the result header and cards, so older card rules cannot pull count/sort
   back to the full-width panel edges. */
@media(min-width:901px){
  body[data-design-edition="v5"][data-design-variant="v4"] .results-panel #count{
    width:calc(75% - 170px)!important;
    margin:0 0 11px 12.5%!important;
    padding:0!important;
  }
  body[data-design-edition="v5"][data-design-variant="v4"] .results-panel .v4-sort{
    right:12.5%!important;
    width:170px!important;
  }
}


/* Final flat information tiles: no card chrome anywhere in the result details.
   Keep layout, padding and typography, but remove every remaining visual tile edge. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content .detail-item,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details .detail-item{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}


/* Canonical information rhythm.
   This is the single final owner of row height, inner spacing and grid gaps
   for Werk, Jugend musiziert and Hinweise. It intentionally overrides the
   older card/compact/alignment layers loaded before this stylesheet. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result{
  --result-info-row-min-height:58px;
  --result-info-row-pad-y:9px;
  --result-info-row-pad-x:11px;
  --result-info-grid-gap:7px;
  --result-section-bottom:10px;
  --result-section-next-top:2px;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid{
  gap:var(--result-info-grid-gap)!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-epoch,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .meta-ensemble,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-difficulty,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid .chip-duration,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-grid>.detail-item,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-grid>.detail-item{
  box-sizing:border-box!important;
  min-height:var(--result-info-row-min-height)!important;
  padding:var(--result-info-row-pad-y) var(--result-info-row-pad-x)!important;
  margin:0!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block{
  padding-bottom:var(--result-section-bottom)!important;
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-section-block + .result-section-block,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content>.result-section-block:first-child{
  padding-top:var(--result-section-next-top)!important;
  margin-top:0!important;
}
@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result{
    --result-info-row-min-height:56px;
    --result-info-row-pad-y:8px;
    --result-info-row-pad-x:9px;
    --result-info-grid-gap:6px;
    --result-section-bottom:9px;
    --result-section-next-top:2px;
  }
}


/* Responsive inner content inset.
   Section headings/guides stay full width; only the information beneath them
   is pulled inward. The inset scales with viewport width and becomes gentler
   on phones. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result{
  --result-section-content-inset:clamp(14px,2.4vw,30px);
}
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-overview-work>.result-overview-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-jumu>.result-detail-grid,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-notes>.result-detail-grid{
  box-sizing:border-box;
  padding-left:var(--result-section-content-inset)!important;
  padding-right:var(--result-section-content-inset)!important;
}

/* Research controls need to align with the visible content edge of the old
   information tiles. Those rows have their own horizontal padding in addition
   to the section inset, so using only the section inset leaves the buttons
   visibly ~one tile-padding too far out on both sides. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research>.work-research,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research>.work-purchase{
  box-sizing:border-box;
  padding-left:calc(var(--result-section-content-inset) + var(--result-info-row-pad-x))!important;
  padding-right:calc(var(--result-section-content-inset) + var(--result-info-row-pad-x))!important;
}
@media(max-width:700px){
  body[data-design-edition="v5"][data-design-variant="v4"] #results>.result{
    --result-section-content-inset:clamp(6px,2.2vw,10px);
  }
}


/* Keep all Werk-Recherche controls inside the same responsive content rail. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-research-links,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-purchase,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-detail-research .work-purchase>.work-research{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* Center the edit action beneath the research area. */
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details-content>.row-actions,
body[data-design-edition="v5"][data-design-variant="v4"] #results>.result .result-details>.row-actions{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
}
