/* V5: an opt-in, approximately 30% shorter version of the approved V4 hero.
   The V4 styles, navigation, search controls, card styles and artwork are inherited.
   Only header geometry and the search/hero transition are adjusted here. */
body[data-design-edition="v5"] header.site-header{
  height:256px;
  min-height:256px;
  padding-top:21px;
  padding-bottom:15px;
}
body[data-design-edition="v5"] header.site-header .header-top{
  height:150px;
  min-height:150px;
}
body[data-design-edition="v5"] header.site-header .header-top>div:first-child{
  padding-top:6px;
}
/* One compact line keeps the original motto readable above the desktop nav. */
body[data-design-edition="v5"] header.site-header .header-top>div:first-child::after{
  content:"Werke entdecken. Lernen. Spielen. Teilen.";
  white-space:normal;
  margin-top:13px;
  padding-top:9px;
  font-size:12px;
  line-height:1.25;
  letter-spacing:.12em;
}
body[data-design-edition="v5"] header.site-header .nav{
  margin-top:15px;
}
/* Shrink the illustration proportionally; do not crop or stretch the bell. */
body[data-design-edition="v5"] header.site-header::after{
  width:min(530px,55vw);
  right:max(2%,calc((100vw - 1160px)/2));
  bottom:4px;
}
/* Keep logged-in content at the same vertical start as the first-login panel. */
@media(min-width:701px){
  body[data-design-edition="v5"] .search-panel{
    margin-top:16px;
  }
}
@media(min-width:701px) and (max-width:980px){
  body[data-design-edition="v5"] header.site-header::after{
    right:0;
  }
}
@media(max-width:700px){
  body[data-design-edition="v5"] header.site-header{
    height:189px;
    min-height:189px;
    padding-top:14px;
    padding-bottom:9px;
  }
  body[data-design-edition="v5"] header.site-header .header-top{
    height:145px;
    min-height:145px;
  }
  body[data-design-edition="v5"] header.site-header .header-top>div:first-child{
    padding-top:8px;
  }
  /* Keep the familiar three-line mobile motto, but tighten its spacing. */
  body[data-design-edition="v5"] header.site-header .header-top>div:first-child::after{
    content:"Werke entdecken.\a Lernen. Spielen.\a Teilen.";
    white-space:pre;
    margin-top:11px;
    padding-top:8px;
    font-size:10px;
    line-height:1.35;
    letter-spacing:.13em;
  }
  body[data-design-edition="v5"] header.site-header::after{
    width:min(100%,390px);
    right:0;
    bottom:4px;
  }
  /* Match the relaxed first-login spacing so more of the trumpet remains visible. */
  body[data-design-edition="v5"] .search-panel{
    margin-top:2px;
  }
}

/* V5 contrast polish: V4 uses soft navy/lilac text and antialiased system fonts.
   The glass surfaces have transparency; the text itself does not. Keep the
   approved font family, sizes, weights (including 300-weight titles),
   geometry and semantic review-status colors unchanged. */
body[data-design-edition="v5"]{
  --text:#18151f;
  --muted:#4e4858;
  color:var(--text);
  -webkit-font-smoothing:auto;
}
body[data-design-edition="v5"] header.site-header h1::before,
body[data-design-edition="v5"] #results>.result h3 .piece-title{
  color:#15121c;
}
body[data-design-edition="v5"] header.site-header small,
body[data-design-edition="v5"] header.site-header .header-top>div:first-child::after{
  color:#332b40;
}
body[data-design-edition="v5"] header.site-header .navbtn{
  color:#292131;
}
body[data-design-edition="v5"] header.site-header .navbtn.active{
  color:#482656;
}
body[data-design-edition="v5"] #results>.result h3 .composer,
body[data-design-edition="v5"] .detail-item strong,
body[data-design-edition="v5"] .detail-score,
body[data-design-edition="v5"] .programme-card,
body[data-design-edition="v5"] .programme-piece{
  color:#24202e;
}
body[data-design-edition="v5"] #results>.result h3 .composer-life,
body[data-design-edition="v5"] #results>.result .meta,
body[data-design-edition="v5"] .programme-note,
body[data-design-edition="v5"] .programme-card small,
body[data-design-edition="v5"] .programme-info small{
  color:#4d4658;
}
body[data-design-edition="v5"] #results>.result .chip:not(.review-badge),
body[data-design-edition="v5"] .v4-filter-chip:not([aria-pressed="true"]),
body[data-design-edition="v5"] .v4-sort select,
body[data-design-edition="v5"] .search-panel label,
body[data-design-edition="v5"] .detail-item,
body[data-design-edition="v5"] .result-details-content,
body[data-design-edition="v5"] .v4-tab:not([aria-current="page"]){
  color:#383141!important;
}
body[data-design-edition="v5"] .results-panel #count,
body[data-design-edition="v5"] .results-panel #count::before,
body[data-design-edition="v5"] #q{
  color:#211b2a;
}
body[data-design-edition="v5"] #q::placeholder{
  color:#595165;
  opacity:1;
}

/* V5 overview: the same quiet, border-separated information rows used by the
   expanded details. The original markup still renders unchanged in V1–V4. */
body[data-design-edition="v5"] #results>.result .meta{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:0;
  margin:7px 0 0;
  font-size:13px;
  line-height:1.3;
}
body[data-design-edition="v5"] #results>.result .meta-separator{display:none}
body[data-design-edition="v5"] #results>.result .chips{
  display:flex;
  flex-direction:column;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:0;
  margin:0;
  min-width:0;
}
body[data-design-edition="v5"] #results>.result .meta-epoch,
body[data-design-edition="v5"] #results>.result .meta-ensemble,
body[data-design-edition="v5"] #results>.result .chips>.chip-difficulty,
body[data-design-edition="v5"] #results>.result .chips>.chip-duration{
  display:grid;
  grid-template-columns:minmax(112px,0.36fr) minmax(0,1fr);
  align-items:baseline;
  column-gap:10px;
  row-gap:1px;
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:5px 2px;
  border:0;
  border-bottom:1px solid #eeeaf2;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#383141!important;
  font-size:13px;
  font-weight:400;
  line-height:1.3;
  overflow-wrap:anywhere;
}
body[data-design-edition="v5"] #results>.result .meta-epoch::before,
body[data-design-edition="v5"] #results>.result .meta-ensemble::before,
body[data-design-edition="v5"] #results>.result .v5-chip-label{
  color:#514a5c;
  font-size:11px;
  font-weight:600;
  line-height:1.3;
}
body[data-design-edition="v5"] #results>.result .meta-epoch::before{content:"Epoche"}
body[data-design-edition="v5"] #results>.result .meta-ensemble::before{content:"Besetzung"}
body[data-design-edition="v5"] #results>.result .v5-chip-value{
  min-width:0;
  overflow-wrap:anywhere;
}
/* A real review status remains a badge; it is not another metadata row. */
body[data-design-edition="v5"] #results>.result .chips>.review-badge{
  order:3;
  align-self:flex-start;
  margin:8px 0 0;
}
@media(max-width:700px){
  body[data-design-edition="v5"] #results>.result .meta-epoch,
  body[data-design-edition="v5"] #results>.result .meta-ensemble,
  body[data-design-edition="v5"] #results>.result .chips>.chip-difficulty,
  body[data-design-edition="v5"] #results>.result .chips>.chip-duration{
    grid-template-columns:minmax(0,1fr);
    padding:5px 2px;
    font-size:13px;
  }
}

/* The details control is an unobtrusive text link after the four rows, not a
   pill/button. Keep the real native button and its existing click handler. */
body[data-design-edition="v5"] #results>.result .result-toggle-row{
  margin:3px 0 0;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle{
  display:inline-flex!important;
  align-items:center;
  justify-content:flex-start;
  width:auto!important;
  height:auto!important;
  min-height:28px;
  margin:0!important;
  padding:3px 0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#614274!important;
  font-size:0!important;
  font-weight:600;
  line-height:1.4;
  text-align:left;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle::after{
  content:"Weitere Angaben anzeigen  ⌄";
  font-size:12px;
}
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle[aria-expanded="true"]::after{
  content:"Weitere Angaben ausblenden  ⌃";
}
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle:hover::after{
  text-decoration:underline;
  text-underline-offset:3px;
}
/* Native <details> is the brief fallback before the bookmark module mounts. */
body[data-design-edition="v5"] #results>.result .result-details summary{
  padding:3px 0;
  color:#614274;
  font-weight:600;
}
body[data-design-edition="v5"] #results>.result .result-details summary::before{
  content:"Weitere Angaben anzeigen  ⌄";
  font-size:12px;
}
body[data-design-edition="v5"] #results>.result .result-details[open] summary::before{
  content:"Weitere Angaben ausblenden  ⌃";
}
/* Difficulty is already visible above: do not repeat it in the expanded V5 view. */
body[data-design-edition="v5"] #results>.result .result-details-content .difficulty-detail,
body[data-design-edition="v5"] #results>.result .result-details .difficulty-detail{
  display:none!important;
}

/* V5 search-only: the favorites module converts native <details> into a
   sibling .result-details-content. Style the real visible container, as well
   as native <details> before conversion; V4 and other views remain unchanged. */
body[data-design-edition="v5"] #results>.result .result-details-content{
  margin-top:7px;
  padding-top:7px;
  font-size:13px;
  line-height:1.3;
}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-grid,
body[data-design-edition="v5"] #results>.result .result-details .detail-grid{
  gap:0 12px;
  margin-bottom:5px;
}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-item,
body[data-design-edition="v5"] #results>.result .result-details .detail-item{
  display:grid;
  grid-template-columns:minmax(112px,0.36fr) minmax(0,1fr);
  align-items:baseline;
  column-gap:10px;
  row-gap:1px;
  margin:0;
  padding:5px 2px;
  border:0;
  border-bottom:1px solid #eeeaf2;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  font-size:13px;
  font-weight:400;
  line-height:1.3;
  min-width:0;
}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-item strong,
body[data-design-edition="v5"] #results>.result .result-details .detail-item strong{
  display:block;
  margin:0;
  color:#514a5c;
  font-size:11px;
  font-weight:600;
  line-height:1.3;
}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-item>div,
body[data-design-edition="v5"] #results>.result .result-details .detail-item>div{
  min-width:0;
  overflow-wrap:anywhere;
}
body[data-design-edition="v5"] #results>.result .result-details-content .detail-score,
body[data-design-edition="v5"] #results>.result .result-details .detail-score{
  padding:5px 2px;
  border:0;
  border-bottom:1px solid #eeeaf2;
  border-radius:0;
  background:transparent;
  font-size:13px;
  line-height:1.3;
}
body[data-design-edition="v5"] #results>.result .result-details-content .teacher-rating,
body[data-design-edition="v5"] #results>.result .result-details .teacher-rating{
  font-size:13px;
}
@media(max-width:700px){
  body[data-design-edition="v5"] #results>.result .result-details-content .detail-item,
  body[data-design-edition="v5"] #results>.result .result-details .detail-item{
    grid-template-columns:minmax(0,1fr);
    padding:5px 2px;
    font-size:13px;
  }
  body[data-design-edition="v5"] #results>.result .result-details-content .detail-item strong,
  body[data-design-edition="v5"] #results>.result .result-details .detail-item strong{
    font-size:11px;
  }
}


/* Slightly larger disclosure label for result cards. */
body[data-design-edition="v5"] #results>.result .result-toggle-row .result-details-toggle::after{
  font-size:14px!important;
}
