.hvk-home,
.hvk-contact,
.hvk-search-page {
  --ink: #251b15;
  --muted: #67584b;
  --paper: #fffaf0;
  --wash: #f4ead8;
  --line: rgba(96, 65, 34, .24);
  --red: #8f2d22;
  --red-dark: #641b16;
  --gold: #c79a3f;
  --green: #53663d;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

body {
  background: #fffaf0 !important;
  color: #251b15;
}

body a {
  color: #8f2d22;
}

body a:hover,
body a:focus {
  color: #641b16;
}

body.page.willkommen #content,
body.page.kontakt #content,
body.page.sammlung #content,
body.page.bibliothek #content,
body.page.explorer #content,
body.page.impressum #content,
body.page.datenschutz #content,
body.page.rechte-hinweise #content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.page.willkommen #blocks,
body.page.kontakt #blocks,
body.page.sammlung #blocks,
body.page.bibliothek #blocks,
body.page.explorer #blocks,
body.page.impressum #blocks,
body.page.datenschutz #blocks,
body.page.rechte-hinweise #blocks,
body.page.willkommen .blocks-inner,
body.page.kontakt .blocks-inner,
body.page.sammlung .blocks-inner,
body.page.bibliothek .blocks-inner,
body.page.explorer .blocks-inner,
body.page.impressum .blocks-inner,
body.page.datenschutz .blocks-inner,
body.page.rechte-hinweise .blocks-inner,
body.page.willkommen .block,
body.page.kontakt .block,
body.page.sammlung .block,
body.page.bibliothek .block,
body.page.explorer .block,
body.page.impressum .block,
body.page.datenschutz .block,
body.page.rechte-hinweise .block {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

header,
footer,
.top-bar,
.title-bar {
  font-family: Georgia, "Times New Roman", serif;
}

header {
  background: #fffaf0;
  border-bottom: 4px solid #8f2d22;
  box-shadow: 0 8px 24px rgba(37, 27, 21, .08);
}

header h1,
header h1 a,
nav a,
.top-bar a,
.dropdown.menu a,
.site-title a {
  color: #641b16 !important;
}

.dropdown.menu > li > a:hover,
.dropdown.menu > li.active > a,
#main-nav a:hover {
  background: #f4ead8 !important;
  color: #8f2d22 !important;
}

.site-title-label {
  font-weight: 700;
}

.hvk-home *,
.hvk-contact * {
  box-sizing: border-box;
}

.hvk-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hvk-hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #251b15;
}

.hvk-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hvk-hero-shade {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: end;
  background: linear-gradient(90deg, rgba(37,27,21,.94), rgba(37,27,21,.62) 50%, rgba(37,27,21,.14));
}

.hvk-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
}

.hvk-hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 7vw, 88px);
  color: #fff8ed;
}

.hvk-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hvk-logo {
  width: 66px;
  height: 66px;
  object-fit: contain;
  background: rgba(255,250,240,.92);
  border-radius: 6px;
  padding: 6px;
}

.hvk-kicker {
  color: #f1d28b;
  font-size: .98rem;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.hvk-title {
  max-width: 820px;
  margin: 0;
  color: #fff8ed;
  font-size: clamp(2.4rem, 6.4vw, 5.8rem);
  line-height: .98;
  letter-spacing: 0;
}

.hvk-lead {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: clamp(1.08rem, 2vw, 1.38rem);
  line-height: 1.62;
  color: #f8ead3;
}

.hvk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hvk-button {
  min-height: 52px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 13px 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hvk-primary {
  background: var(--red);
  color: white;
}

.hvk-primary:hover {
  color: white;
  background: var(--red-dark);
}

.hvk-secondary {
  background: var(--paper);
  color: var(--red-dark);
  border-color: var(--line);
}

.hvk-band {
  background: linear-gradient(180deg, #fffaf0, #f4ead8);
  padding: clamp(38px, 6vw, 76px) 0;
}

.hvk-light {
  background: #fff;
}

.hvk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hvk-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.hvk-section-head .hvk-text {
  max-width: 720px;
  margin-bottom: 0;
}

.hvk-gallery-band {
  background: #2b211a;
  color: #fff8ed;
}

.hvk-gallery-band .hvk-section-title {
  color: #fff8ed;
}

.hvk-gallery-band .hvk-text {
  color: #ead9bf;
}

.hvk-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hvk-gallery-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  text-decoration: none;
  color: #fff8ed !important;
  background: #3a2b21;
  border: 1px solid rgba(255, 250, 240, .18);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.hvk-gallery-card:hover {
  color: #fff8ed !important;
  transform: translateY(-2px);
}

.hvk-gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #1e1712;
}

.hvk-gallery-card strong {
  display: block;
  padding: 0 16px 16px;
  line-height: 1.25;
  font-size: 1.05rem;
}

.hvk-gallery-meta {
  display: block;
  padding: 14px 16px 6px;
  color: #d9b86a;
  font-size: .92rem;
}

.hvk-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.hvk-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,250,240,.9);
  padding: 22px;
  min-height: 176px;
}

.hvk-stat-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.hvk-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(143,45,34,.48);
  background: #fffaf0;
  box-shadow: 0 14px 32px rgba(71,39,24,.14);
}

.hvk-card h2,
.hvk-card h3,
.hvk-section-title {
  color: var(--red-dark);
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: 0;
}

.hvk-card p,
.hvk-text {
  color: var(--muted);
  line-height: 1.68;
  font-size: 1.04rem;
}

.hvk-stat {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  color: var(--red-dark);
  font-weight: 700;
  margin-bottom: 8px;
}

.hvk-stat-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: auto;
  padding: 10px 14px;
  border: 1px solid rgba(143,45,34,.34);
  border-radius: 4px;
  background: #fff5df;
  color: var(--red-dark);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.hvk-stat-link:hover,
.hvk-stat-link:focus-visible {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: #fffaf0;
  outline: 3px solid rgba(217,184,106,.78);
  outline-offset: 3px;
}

.hvk-stat-link::after {
  content: ">";
  margin-left: 8px;
  color: var(--gold);
}

.hvk-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.hvk-donation {
  border: 1px solid rgba(143,45,34,.28);
  background: #fffaf0;
  border-radius: 6px;
  padding: 24px;
}

.hvk-meter {
  height: 14px;
  background: #e9dcc6;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 8px;
}

.hvk-meter span {
  display: block;
  height: 100%;
  width: 18%;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.hvk-note {
  font-size: .96rem;
  color: var(--muted);
}

.hvk-contact-hero {
  background: linear-gradient(135deg, var(--red-dark), #342116);
  color: #fff8ed;
  padding: clamp(46px, 8vw, 92px) 0;
}

.hvk-search-hero {
  background: linear-gradient(135deg, #2b211a, #641b16);
  color: #fff8ed;
  padding: clamp(46px, 8vw, 96px) 0;
}

.hvk-search-hero h1 {
  max-width: 860px;
  margin: 0 0 16px;
  color: #fff8ed;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.hvk-search-hero p {
  max-width: 760px;
  color: #f8ead3;
  font-size: 1.18rem;
  line-height: 1.65;
}

.hvk-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.hvk-search-card {
  display: block;
  min-height: 170px;
  padding: 22px;
  color: var(--ink) !important;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
}

.hvk-search-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 0 14px;
  color: #8f2d22;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .22);
  border-radius: 6px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.hvk-search-icon::before {
  content: "";
  display: block;
  color: currentColor;
  font-size: 1.1rem;
}

.hvk-icon-household .hvk-search-icon::before { content: "⌂"; font-size: 1.45rem; }
.hvk-icon-tool .hvk-search-icon::before { content: "⚒"; font-size: 1.35rem; }
.hvk-icon-photo .hvk-search-icon::before { content: "▣"; font-size: 1.3rem; }
.hvk-icon-document .hvk-search-icon::before { content: "PDF"; font-size: .72rem; letter-spacing: 0; }
.hvk-icon-book .hvk-search-icon::before { content: "B"; font-size: 1.15rem; }
.hvk-icon-school .hvk-search-icon::before { content: "A"; font-size: 1.15rem; }
.hvk-icon-fire .hvk-search-icon::before { content: "F"; font-size: 1.15rem; }
.hvk-icon-brick .hvk-search-icon::before { content: "▤"; font-size: 1.45rem; }
.hvk-icon-furniture .hvk-search-icon::before { content: "M"; font-size: 1.15rem; }
.hvk-icon-textile .hvk-search-icon::before { content: "T"; font-size: 1.15rem; }
.hvk-icon-3d .hvk-search-icon::before { content: "3D"; font-size: .82rem; letter-spacing: 0; }
.hvk-icon-review .hvk-search-icon::before { content: "?"; font-size: 1.25rem; }

.hvk-icon-household .hvk-search-icon,
.hvk-icon-book .hvk-search-icon,
.hvk-icon-furniture .hvk-search-icon {
  color: #7b5b32;
}

.hvk-icon-fire .hvk-search-icon,
.hvk-icon-document .hvk-search-icon {
  color: #8f2d22;
}

.hvk-icon-3d .hvk-search-icon,
.hvk-icon-photo .hvk-search-icon {
  color: #53663d;
}

.hvk-search-card:hover {
  background: #f4ead8;
  color: var(--red-dark) !important;
}

.hvk-search-card strong {
  display: block;
  color: var(--red-dark);
  font-size: 1.22rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hvk-search-card span {
  display: block;
  color: var(--muted);
  line-height: 1.55;
}

.hvk-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hvk-chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--red-dark) !important;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.hvk-chip-row a:hover {
  color: white !important;
  background: var(--red);
}

body.items.browse #content,
body.item.resource.browse #content {
  max-width: 1180px;
}

body.items.browse #content,
body.item.resource.browse #content h2 {
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 28px;
}

body.items.browse #search-container,
body.item.resource.browse #search-container,
body.items.search #search-container {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  background: #fffaf0;
  border-top: 1px solid rgba(96, 65, 34, .16);
  border-bottom: 1px solid rgba(96, 65, 34, .16);
  padding: 14px 0;
}

body.items.browse #search-form,
body.item.resource.browse #search-form,
body.items.search #search-form {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
}

body.items.browse #fulltext-search,
body.item.resource.browse #fulltext-search,
body.items.search #fulltext-search,
body.items.browse .sorting,
body.item.resource.browse .sorting select,
body.item.resource.browse .sorting select,
body.items.search select,
body.items.search input[type="text"] {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
}

body.items.browse #search-submit,
body.item.resource.browse #search-submit,
body.items.search #search-submit,
body.items.browse button,
body.item.resource.browse button,
body.items.search button,
body.items.browse .button,
body.item.resource.browse .button,
body.items.search .button,
body.items.browse .advanced-search,
body.item.resource.browse .advanced-search,
body.items.search input[type="submit"] {
  background: var(--red) !important;
  border: 1px solid var(--red) !important;
  border-radius: 6px !important;
  color: white !important;
  font-weight: 700;
}

body.items.browse #search-submit:hover,
body.item.resource.browse #search-submit:hover,
body.items.search #search-submit:hover,
body.items.browse button:hover,
body.item.resource.browse button:hover,
body.items.search button:hover,
body.items.browse .button:hover,
body.item.resource.browse .button:hover,
body.items.search .button:hover,
body.items.browse .advanced-search:hover,
body.item.resource.browse .advanced-search:hover {
  background: var(--red-dark) !important;
  border-color: var(--red-dark) !important;
  color: white !important;
}

body.items.browse .browse-controls,
body.item.resource.browse .browse-controls {
  background: #f4ead8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 20px;
}

body.items.browse .sorting,
body.item.resource.browse .sorting {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.items.browse .row-count,
body.items.browse .page-count,
body.item.resource.browse .row-count,
body.item.resource.browse .page-count {
  color: var(--muted);
  font-weight: 700;
}

body.items.browse ul.resources.resource-grid,
body.item.resource.browse ul.resources.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
}

body.items.browse ul.resources.resource-grid,
body.item.resource.browse ul.resources.resource-grid > li.resource {
  list-style: none;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  min-height: 150px;
}

body.items.browse .resource-link,
body.item.resource.browse .resource-link {
  color: var(--red-dark) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.25;
}

body.items.browse .description,
body.item.resource.browse .description {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.hvk-contact-hero h1 {
  margin: 0 0 16px;
  color: #fff8ed;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.hvk-contact-hero p {
  max-width: 760px;
  margin: 0;
  color: #f8ead3;
  font-size: 1.18rem;
  line-height: 1.65;
}

.hvk-mail {
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--red-dark);
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .hvk-hero,
  .hvk-hero-shade {
    min-height: 78vh;
  }

  .hvk-hero-img {
    object-position: center;
  }

  .hvk-grid,
  .hvk-two,
  .hvk-gallery,
  .hvk-search-grid,
  body.items.browse ul.resources.resource-grid,
body.item.resource.browse ul.resources.resource-grid {
    grid-template-columns: 1fr;
  }

  .hvk-section-head {
    display: block;
  }

  .hvk-logo {
    width: 56px;
    height: 56px;
  }
}

/* Detail pages, explorer modules and document viewing overrides */
body.item.resource.show #content,
body.media.resource.show #content,
body.faceted-browse-page #content {
  width: min(1320px, calc(100% - 34px));
  max-width: 1320px;
}

body.item.resource.show .resource-title,
body.media.resource.show .resource-title {
  padding: 20px 22px;
  margin-bottom: 24px;
  border-left: 7px solid var(--red);
  background: #fffaf0;
}

body.item.resource.show .resource-title h2,
body.media.resource.show .resource-title h2 {
  max-width: 980px;
  font-size: clamp(1.8rem, 2.6vw, 3rem);
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  letter-spacing: 0;
}

body.item.resource.show .stack > .grid-x.grid-margin-x,
body.item.resource.show .stack > .grid-x,
body.media.resource.show .grid-x.grid-margin-x,
body.media.resource.show .grid-x {
  display: grid !important;
  grid-template-columns: minmax(360px, .92fr) minmax(430px, 1.08fr) !important;
  gap: 30px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  align-items: start;
}

body.item.resource.show .stack,
body.media.resource.show .stack {
  display: block !important;
}

body.item.resource.show .main-with-sidebar.cell,
body.item.resource.show .sidebar.cell,
body.media.resource.show .main-with-sidebar.cell,
body.media.resource.show .sidebar.cell {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.item.resource.show .main-with-sidebar,
body.media.resource.show .main-with-sidebar {
  min-width: 0;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .main-with-sidebar,
body.item.resource.show .stack > .grid-x > .main-with-sidebar {
  display: contents;
}

body.item.resource.show .main-with-sidebar > .media-embeds,
body.item.resource.show .main-with-sidebar > .media-render {
  grid-column: 1;
  grid-row: 1;
}

body.item.resource.show .sidebar,
body.media.resource.show .sidebar {
  min-width: 0;
  position: sticky;
  top: 92px;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
body.item.resource.show .stack > .grid-x > .sidebar {
  grid-column: 2;
  grid-row: 1;
}

body.item.resource.show .media-embeds,
body.item.resource.show .main-with-sidebar:not(:has(.media-render))::before,
body.media.resource.show .media-render.file {
  display: block;
  margin: 0 0 18px;
  padding: 14px;
  background: #2b211a;
  border: 1px solid rgba(255, 250, 240, .18);
  border-radius: 6px;
}

body.item.resource.show .main-with-sidebar:not(:has(.media-render))::before {
  content: "Noch kein Bild oder Dokument hinterlegt";
  min-height: 270px;
  color: #f7ead7;
  font-weight: 700;
  text-align: center;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(43, 33, 26, .9), rgba(43, 33, 26, .9)),
    repeating-linear-gradient(135deg, rgba(247, 234, 215, .18) 0 12px, rgba(247, 234, 215, .05) 12px 24px);
}

body.item.resource.show .media-render.file img,
body.media.resource.show .media-render.file img {
  max-height: 680px;
}

body.item.resource.show .main-with-sidebar > dl,
body.media.resource.show .main-with-sidebar > dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.item.resource.show .main-with-sidebar > dl {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 4px;
}

body.item.resource.show .main-with-sidebar > dl > .property,
body.media.resource.show .main-with-sidebar > dl > .property {
  margin: 0;
  padding: 14px 16px;
  background: #fffdf7;
  border-color: rgba(96, 65, 34, .22);
}

body.item.resource.show .main-with-sidebar > dl > .property:first-child,
body.item.resource.show .main-with-sidebar > dl > .property:has(.value.annotation),
body.media.resource.show .main-with-sidebar > dl > .property:first-child {
  grid-column: 1 / -1;
}

body.item.resource.show .property dt,
body.media.resource.show .property dt {
  margin-bottom: 6px;
  color: #8f1f1b;
  font-size: .88rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .03em;
}

body.item.resource.show .property dd,
body.media.resource.show .property dd {
  font-size: .98rem;
  line-height: 1.5;
}

body.item.resource.show .sidebar > dl,
body.media.resource.show .sidebar > dl {
  display: grid;
  gap: 12px;
}

body.item.resource.show .sidebar .property,
body.media.resource.show .sidebar .property {
  margin: 0;
  background: #fffaf0;
}

body.item.resource.show .media-list {
  border-top: 0;
  padding-top: 0;
}

body.item.resource.show .media-list .resource-link {
  min-height: 84px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(96, 65, 34, .16);
  border-radius: 6px;
}

body.media.resource.show .media-render.file iframe,
body.media.resource.show .media-render.file embed,
body.media.resource.show .media-render.file object,
body.item.resource.show .media-render.file iframe,
body.item.resource.show .media-render.file embed,
body.item.resource.show .media-render.file object {
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: #fff;
  border-radius: 4px;
}

body.item.resource.show .media-render.file model-viewer,
body.media.resource.show .media-render.file model-viewer {
  display: block;
  width: 100% !important;
  min-height: 500px;
  background: #f4ead8 !important;
  border-radius: 4px;
}

body.item.resource.show .media-render.file .model-info,
body.media.resource.show .media-render.file .model-info {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: 12px;
  width: auto;
  padding: 9px 12px;
  color: #fffaf0 !important;
  background: rgba(37, 27, 21, .84);
  border-radius: 4px;
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.35;
}

body.item.resource.show .media-render.file:has(model-viewer),
body.media.resource.show .media-render.file:has(model-viewer) {
  background: #2b211a;
}

body.item.resource.browse li.resource:not(:has(img)) .resource-meta::before {
  content: "Bild folgt";
  display: grid;
  place-items: center;
  height: 190px;
  margin: 0 0 12px;
  color: #8f1f1b;
  font-weight: 700;
  background:
    linear-gradient(rgba(255, 250, 240, .92), rgba(255, 250, 240, .92)),
    repeating-linear-gradient(135deg, rgba(199, 154, 63, .25) 0 11px, rgba(199, 154, 63, .08) 11px 22px);
  border: 1px solid rgba(96, 65, 34, .2);
  border-radius: 6px;
}

body.item.resource.browse .resource-name,
body.items.browse .resource-name,
body.faceted-browse-page .resource-name {
  font-size: 1rem !important;
  line-height: 1.28 !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

button,
.button,
input[type="submit"],
.permalink.button,
.search-toggle.button,
button.browse-toggle,
.button-group .button,
.tablesaw-btn,
.faceted-browse-page .button {
  color: #fff !important;
  background: #8f1f1b !important;
  border: 1px solid #8f1f1b !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
.permalink.button:hover,
.search-toggle.button:hover,
button.browse-toggle:hover,
.button-group .button:hover,
.tablesaw-btn:hover,
.faceted-browse-page .button:hover {
  background: #6f1714 !important;
  border-color: #6f1714 !important;
}

body.faceted-browse-page #content {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

body.faceted-browse-page #content > h2,
body.faceted-browse-page #content > h3,
body.faceted-browse-page #content > .browse-controls,
body.faceted-browse-page #content > .pagination,
body.faceted-browse-page #content > .permalink {
  grid-column: 1 / -1;
}

body.faceted-browse-page .facets-container {
  grid-column: 1;
  position: sticky;
  top: 92px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid rgba(96, 65, 34, .22);
  border-radius: 6px;
}

body.faceted-browse-page .faceted-results,
body.faceted-browse-page table.faceted-results,
body.faceted-browse-page .tablesaw-bar,
body.faceted-browse-page .tablesaw-advance {
  grid-column: 2;
  min-width: 0;
}

body.faceted-browse-page .facet {
  padding: 0 0 14px;
  margin: 0 0 14px;
  border-bottom: 1px solid rgba(96, 65, 34, .16);
}

body.faceted-browse-page .facet h3,
body.faceted-browse-page .facet legend {
  color: #8f1f1b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.25;
}

body.faceted-browse-page .select-list,
body.faceted-browse-page .full-text {
  width: 100%;
}

body.faceted-browse-page table {
  width: 100%;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .18);
  border-radius: 6px;
  overflow: hidden;
}

body.faceted-browse-page tbody tr {
  border-bottom: 1px solid rgba(96, 65, 34, .14);
}

body.faceted-browse-page td,
body.faceted-browse-page th {
  padding: 13px 14px;
}

body.faceted-browse-page .resource-link::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 10px;
  background: #c79a3f;
  border-radius: 2px;
  vertical-align: baseline;
}

.hvk-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hvk-document-card {
  display: block;
  min-height: 180px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .2);
  border-radius: 6px;
}

.hvk-document-card::before {
  content: "PDF";
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 10px;
  color: #fff;
  background: #8f1f1b;
  border-radius: 4px;
  font-weight: 800;
}

.hvk-document-card strong {
  display: block;
  color: #8f1f1b;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hvk-document-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.hvk-legal-page {
  background: #fffaf0;
}

.hvk-legal-page .hvk-search-hero h1 {
  max-width: 960px;
}

.hvk-legal-content {
  max-width: 920px;
  margin: 0 auto;
}

.hvk-legal-content h2 {
  margin: 34px 0 10px;
  color: #641b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.16;
}

.hvk-legal-content h3 {
  margin: 22px 0 8px;
  color: #8f2d22;
  font-size: 1.08rem;
  line-height: 1.25;
}

.hvk-legal-content p,
.hvk-legal-content li {
  color: #3a2b21;
  font-size: 1.02rem;
  line-height: 1.68;
}

.hvk-legal-content ul {
  padding-left: 1.2rem;
}

.hvk-legal-box {
  margin: 22px 0;
  padding: 18px;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .22);
  border-left: 6px solid #c79a3f;
  border-radius: 6px;
}

.hvk-legal-note {
  color: #67584b;
  font-size: .95rem;
}

.site-page-pagination,
.previous-page,
.next-page {
  display: none !important;
}

@media (max-width: 960px) {
  body.item.resource.show .stack > .grid-x.grid-margin-x,
  body.item.resource.show .stack > .grid-x,
  body.media.resource.show .grid-x.grid-margin-x,
  body.media.resource.show .grid-x,
  body.faceted-browse-page #content,
  .hvk-library-grid {
    grid-template-columns: 1fr !important;
  }

  body.item.resource.show .sidebar,
  body.media.resource.show .sidebar,
  body.faceted-browse-page .facets-container {
    position: static;
  }

  body.faceted-browse-page .facets-container,
  body.faceted-browse-page .faceted-results,
  body.faceted-browse-page table.faceted-results,
  body.faceted-browse-page .tablesaw-bar,
  body.faceted-browse-page .tablesaw-advance {
    grid-column: 1;
  }

  body.item.resource.show .main-with-sidebar > .media-embeds,
  body.item.resource.show .main-with-sidebar > .media-render,
  body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
  body.item.resource.show .stack > .grid-x > .sidebar,
  body.item.resource.show .main-with-sidebar > dl {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  body.item.resource.show .main-with-sidebar > dl,
  body.media.resource.show .main-with-sidebar > dl {
    grid-template-columns: 1fr;
  }

  body.item.resource.show .resource-title,
  body.media.resource.show .resource-title {
    padding: 16px;
  }

  body.item.resource.show .resource-title h2,
  body.media.resource.show .resource-title h2 {
    font-size: 1.75rem;
  }
}

/* Final detail-page overrides must stay after the inherited theme rules. */
body.item.resource.show .stack,
body.media.resource.show .stack {
  display: block !important;
  width: 100% !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x,
body.item.resource.show .stack > .grid-x {
  display: grid !important;
  grid-template-columns: minmax(430px, .95fr) minmax(430px, 1.05fr) !important;
  gap: 30px !important;
  width: 100% !important;
  max-width: none !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .main-with-sidebar,
body.item.resource.show .stack > .grid-x > .main-with-sidebar {
  display: contents !important;
}

body.item.resource.show .main-with-sidebar > .media-embeds {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
body.item.resource.show .stack > .grid-x > .sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.item.resource.show .main-with-sidebar > dl {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}

@media (max-width: 960px) {
  body.item.resource.show .stack > .grid-x.grid-margin-x,
  body.item.resource.show .stack > .grid-x {
    grid-template-columns: 1fr !important;
  }

  body.item.resource.show .main-with-sidebar > .media-embeds,
  body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
  body.item.resource.show .stack > .grid-x > .sidebar,
  body.item.resource.show .main-with-sidebar > dl {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.item.resource.show .main-with-sidebar > dl {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.item.resource.show .main-with-sidebar > dl {
    grid-template-columns: 1fr !important;
  }
}

/* Final mobile media workspace hardening. The theme media template has its own
   asset CSS, so these editor rules intentionally override it from the site. */
@media (max-width: 700px) {
  .kayna-media-workspace {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .kayna-media-workspace__rail {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
  }

  .kayna-media-workspace__list {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(132px, 44vw) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 10px !important;
    scrollbar-color: #8f2d22 #f4ead8;
  }

  .kayna-media-workspace__choice {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start !important;
    gap: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
  }

  .kayna-media-workspace__choice-text,
  .kayna-media-workspace__choice-text strong,
  .kayna-media-workspace__choice-text small {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  .kayna-media-workspace__thumb {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
  }

  .kayna-media-workspace__viewer,
  .kayna-media-workspace__slides,
  .kayna-media-workspace__slide,
  .kayna-media-workspace__module {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

/* Public browse/search lists should stay scannable. Free-form descriptions are
   often draft import notes, so they belong on detail pages after review. */
body.item.resource.browse .resource-list .description,
body.items.browse .resource-list .description,
body.items.search .resource-list .description,
body.item.resource.browse .resource-meta > .description,
body.items.browse .resource-meta > .description,
body.items.search .resource-meta > .description {
  display: none !important;
}

/* Visitor hints / Comment module */
body.item.resource.show #comments-container.hvk-comments-container {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 34px 0 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.item.resource.show #comments-container h2 {
  margin: 0 0 8px !important;
  color: var(--ink) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(2rem, 3vw, 3rem) !important;
  line-height: 1.1 !important;
}

body.item.resource.show #comments-container .hvk-comments-intro {
  max-width: 900px;
  margin: 0 0 20px !important;
  color: var(--muted) !important;
}

body.item.resource.show #comments-container details.comments,
body.item.resource.show #comments-container #comment-main-container {
  margin: 0 0 18px !important;
  padding: 18px !important;
  background: #fffaf0 !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--red-dark) !important;
  border-radius: 6px !important;
}

body.item.resource.show #comments-container summary,
body.item.resource.show #comments-container form label,
body.item.resource.show #comments-container .field-meta,
body.item.resource.show #comments-container legend {
  color: var(--red-dark) !important;
  font-weight: 700 !important;
}

body.item.resource.show #comments-container #comments:empty::before,
body.item.resource.show #comments-container #comments {
  color: var(--muted) !important;
}

body.item.resource.show #comments-container #comments {
  position: relative;
}

body.item.resource.show #comments-container #comments:not(:has(.comment)) {
  font-size: 0 !important;
}

body.item.resource.show #comments-container #comments:not(:has(.comment))::before {
  content: "Noch keine Hinweise vorhanden. Seien Sie die erste Person, die etwas ergänzt.";
  display: block;
  font-size: 1rem;
  line-height: 1.55;
}

body.item.resource.show #comments-container textarea,
body.item.resource.show #comments-container input[type="text"],
body.item.resource.show #comments-container input[type="email"] {
  width: 100% !important;
  min-height: 48px;
  color: var(--ink) !important;
  background: #fffdfa !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
}

body.item.resource.show #comments-container textarea {
  min-height: 180px !important;
}

body.item.resource.show #comments-container textarea::placeholder {
  color: transparent !important;
}

body.item.resource.show #comments-container .comment-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 190px;
  min-height: 48px;
  margin-top: 16px !important;
  background: #8f2d24 !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: #fffaf0 !important;
  font-size: 0 !important;
  font-weight: 700 !important;
}

body.item.resource.show #comments-container .comment-submit::after {
  content: "Hinweis einreichen";
  font-size: 1rem;
}

body.item.resource.show #comments-container .comment-submit:hover,
body.item.resource.show #comments-container .comment-submit:focus {
  background: #641b16 !important;
}

/* 3D demo thumbnails and viewer framing */
a.resource-link[href$="/item/5271"],
a.resource-link[href$="/item/5273"],
a.resource-link[href$="/item/5275"],
a.resource-link[href$="/media/5272"],
a.resource-link[href$="/media/5274"],
a.resource-link[href$="/media/5276"] {
  position: relative;
}

a.resource-link[href$="/item/5271"] img[src*="default.png"],
a.resource-link[href$="/item/5273"] img[src*="default.png"],
a.resource-link[href$="/item/5275"] img[src*="default.png"],
a.resource-link[href$="/media/5272"] img[src*="default.png"],
a.resource-link[href$="/media/5274"] img[src*="default.png"],
a.resource-link[href$="/media/5276"] img[src*="default.png"] {
  background:
    radial-gradient(circle at 35% 28%, rgba(217, 184, 106, .42), transparent 28%),
    linear-gradient(135deg, #2b211a 0%, #641b16 56%, #8f2d24 100%) !important;
  border: 1px solid rgba(100, 27, 22, .28) !important;
  object-fit: contain !important;
  padding: 0 !important;
  opacity: 1 !important;
}

a.resource-link[href$="/item/5271"] img[src*="default.png"],
a.resource-link[href$="/media/5272"] img[src*="default.png"] {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Crect width='240' height='240' fill='%232b211a'/%3E%3Cpath d='M74 122c0-50 28-82 67-82 31 0 56 25 56 62 0 54-42 98-88 98-22 0-35-12-35-34z' fill='%238f2d24'/%3E%3Cpath d='M94 122c0-36 19-59 45-59 19 0 35 17 35 43 0 38-30 70-62 70-13 0-18-8-18-23z' fill='%23d9b86a'/%3E%3Ccircle cx='134' cy='125' r='23' fill='%23641b16'/%3E%3Ctext x='120' y='222' text-anchor='middle' fill='%23fffaf0' font-family='Arial' font-size='25' font-weight='700'%3E3D%3C/text%3E%3C/svg%3E") !important;
}

a.resource-link[href$="/item/5273"] img[src*="default.png"],
a.resource-link[href$="/media/5274"] img[src*="default.png"] {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Crect width='240' height='240' fill='%232b211a'/%3E%3Cpath d='M96 38h48v31l18 25v81c0 22-17 31-42 31s-42-9-42-31V94l18-25z' fill='%238f2d24'/%3E%3Cpath d='M101 104h38c12 0 20 10 20 23v44c0 18-15 26-36 26s-36-8-36-26v-44c0-13 6-23 14-23z' fill='%23d9b86a'/%3E%3Cpath d='M103 43h34v22h-34z' fill='%23fffaf0' opacity='.9'/%3E%3Ctext x='120' y='222' text-anchor='middle' fill='%23fffaf0' font-family='Arial' font-size='25' font-weight='700'%3E3D%3C/text%3E%3C/svg%3E") !important;
}

a.resource-link[href$="/item/5275"] img[src*="default.png"],
a.resource-link[href$="/media/5276"] img[src*="default.png"] {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Crect width='240' height='240' fill='%232b211a'/%3E%3Cpath d='M80 95h80l-10 88H90z' fill='%238f2d24'/%3E%3Cpath d='M98 111h44v58H98z' fill='%23d9b86a'/%3E%3Cpath d='M83 90c8-22 20-34 37-34s29 12 37 34' fill='none' stroke='%23fffaf0' stroke-width='11' stroke-linecap='round'/%3E%3Cpath d='M102 119h36v42h-36z' fill='%23641b16' opacity='.8'/%3E%3Ctext x='120' y='222' text-anchor='middle' fill='%23fffaf0' font-family='Arial' font-size='25' font-weight='700'%3E3D%3C/text%3E%3C/svg%3E") !important;
}

body.item.resource.show model-viewer,
body.media.resource.show model-viewer {
  display: block !important;
  min-height: 520px !important;
  height: 62vh !important;
  max-height: 720px !important;
  background:
    radial-gradient(circle at 30% 25%, rgba(217, 184, 106, .2), transparent 30%),
    #fffaf0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
}

/* Visitor hints, comments and collecting forms */
body.item.resource.show #comments,
body.item.resource.show .comments,
body.item.resource.show .comment-list,
body.item.resource.show .comment-form,
body.item.resource.show form.comment,
body.collecting #content form,
body.collecting-form #content form,
body.guest #content form,
body.login #content form,
body.register #content form {
  margin: 24px 0;
  padding: 20px;
  background: #fffaf0;
  border: 1px solid rgba(96, 65, 34, .22);
  border-left: 6px solid #641b16;
  border-radius: 6px;
}

body.item.resource.show #comments h2,
body.item.resource.show #comments h3,
body.item.resource.show .comments h2,
body.item.resource.show .comments h3,
body.collecting #content h1,
body.collecting-form #content h1,
body.guest #content h1,
body.login #content h1,
body.register #content h1 {
  color: #641b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: 0;
}

body.item.resource.show .comment,
body.item.resource.show .comment-resource,
body.item.resource.show .comment-single,
body.item.resource.show li.comment {
  margin: 14px 0;
  padding: 16px;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .18);
  border-radius: 6px;
}

body.item.resource.show .comment .owner,
body.item.resource.show .comment .author,
body.item.resource.show .comment .date,
body.item.resource.show .comment time,
body.item.resource.show .comment-meta {
  color: #695443;
  font-size: .92rem;
  font-weight: 700;
}

body.item.resource.show .comment form,
body.item.resource.show form.comment,
body.collecting #content form,
body.collecting-form #content form,
body.guest #content form,
body.login #content form,
body.register #content form {
  max-width: 860px;
}

body.item.resource.show .comment-form label,
body.item.resource.show form.comment label,
body.collecting #content label,
body.collecting-form #content label,
body.guest #content label,
body.login #content label,
body.register #content label {
  display: block;
  margin-bottom: 7px;
  color: #641b16;
  font-weight: 700;
  line-height: 1.25;
}

body.item.resource.show .comment-form input[type="text"],
body.item.resource.show .comment-form input[type="email"],
body.item.resource.show .comment-form input[type="url"],
body.item.resource.show .comment-form textarea,
body.item.resource.show form.comment input[type="text"],
body.item.resource.show form.comment input[type="email"],
body.item.resource.show form.comment input[type="url"],
body.item.resource.show form.comment textarea,
body.collecting #content input[type="text"],
body.collecting #content input[type="email"],
body.collecting #content input[type="url"],
body.collecting #content textarea,
body.collecting #content select,
body.collecting-form #content input[type="text"],
body.collecting-form #content input[type="email"],
body.collecting-form #content input[type="url"],
body.collecting-form #content textarea,
body.collecting-form #content select,
body.guest #content input,
body.login #content input,
body.register #content input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #251b15;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .32);
  border-radius: 6px;
  font: inherit;
}

body.item.resource.show .comment-form textarea,
body.item.resource.show form.comment textarea,
body.collecting #content textarea,
body.collecting-form #content textarea {
  min-height: 150px;
  resize: vertical;
}

body.item.resource.show .comment-form input:focus,
body.item.resource.show .comment-form textarea:focus,
body.item.resource.show form.comment input:focus,
body.item.resource.show form.comment textarea:focus,
body.collecting #content input:focus,
body.collecting #content textarea:focus,
body.collecting #content select:focus,
body.collecting-form #content input:focus,
body.collecting-form #content textarea:focus,
body.collecting-form #content select:focus,
body.guest #content input:focus,
body.login #content input:focus,
body.register #content input:focus {
  outline: 3px solid rgba(217, 184, 106, .72);
  border-color: #641b16;
}

body.item.resource.show .comment-form button,
body.item.resource.show form.comment button,
body.item.resource.show .comment-form input[type="submit"],
body.item.resource.show form.comment input[type="submit"],
body.collecting #content button,
body.collecting #content input[type="submit"],
body.collecting-form #content button,
body.collecting-form #content input[type="submit"],
body.guest #content button,
body.guest #content input[type="submit"],
body.login #content button,
body.login #content input[type="submit"],
body.register #content button,
body.register #content input[type="submit"],
.hvk-hint-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  color: #fffaf0 !important;
  background: #641b16;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
}

body.item.resource.show .comment-form button:hover,
body.item.resource.show form.comment button:hover,
body.collecting #content button:hover,
body.collecting-form #content button:hover,
body.guest #content button:hover,
body.login #content button:hover,
body.register #content button:hover,
.hvk-hint-button:hover {
  background: #8f1f1b;
}

.hvk-object-hint {
  margin: 18px 0 24px;
  padding: 16px;
  background: #f4ead8;
  border: 1px solid rgba(96, 65, 34, .22);
  border-radius: 6px;
}

.hvk-object-hint p {
  margin: 0 0 12px;
  color: #695443;
  line-height: 1.45;
}

@media (max-width: 680px) {
  body.item.resource.show #comments,
  body.item.resource.show .comments,
  body.item.resource.show .comment-list,
  body.item.resource.show .comment-form,
  body.item.resource.show form.comment,
  body.collecting #content form,
  body.collecting-form #content form,
  body.guest #content form,
  body.login #content form,
  body.register #content form {
    padding: 16px;
  }

  .hvk-hint-button,
  body.item.resource.show .comment-form button,
  body.item.resource.show form.comment button,
  body.collecting #content button,
  body.collecting-form #content button,
  body.guest #content button,
  body.login #content button,
  body.register #content button {
    width: 100%;
  }
}

/* Multi-media item pages: show one focused medium and a compact preview gallery. */
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(68px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 14px !important;
  background: #2b211a;
  border: 1px solid rgba(255, 250, 240, .18);
  border-radius: 6px;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2))::before {
  content: "Mediengalerie";
  grid-column: 1 / -1;
  color: #fffaf0;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file {
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child {
  grid-column: 1 / -1;
  padding: 10px !important;
  background: #1d1712 !important;
  border: 1px solid rgba(255, 250, 240, .16) !important;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child img,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child iframe,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child embed,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child object {
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) a {
  display: grid !important;
  place-items: center;
  height: 92px;
  min-height: 92px;
  overflow: hidden;
  color: #fffaf0 !important;
  background: #1d1712;
  border: 2px solid rgba(255, 250, 240, .24) !important;
  border-radius: 4px;
  text-decoration: none;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) img {
  width: 100%;
  height: 92px;
  max-height: none;
  object-fit: cover;
  opacity: .84;
  transition: opacity .15s ease, transform .15s ease;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) iframe,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) embed,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) object,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) model-viewer {
  width: 100%;
  min-height: 92px;
  height: 92px;
  pointer-events: none;
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) a:hover img,
body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) a:focus-visible img {
  opacity: 1;
  transform: scale(1.03);
}

body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) a:focus-visible {
  outline: 3px solid #c79a3f;
  outline-offset: 2px;
}

@media (max-width: 680px) {
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) {
    grid-template-columns: repeat(4, minmax(54px, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child {
    padding: 8px !important;
  }

  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child img,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child iframe,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child embed,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:first-child object {
    max-height: 56vh;
  }

  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) a,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) img,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) iframe,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) embed,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) object,
  body.item.resource.show .media-embeds:has(.media-render.file:nth-child(2)) .media-render.file:not(:first-child) model-viewer {
    height: 72px;
    min-height: 72px;
  }
}

/* Ship audit fixes: browse cards, metadata hierarchy and accessibility. */
body.items.browse ul.resources.resource-grid,
body.item.resource.browse ul.resources.resource-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)) !important;
  gap: 18px !important;
  width: 100% !important;
}

body.items.browse ul.resources.resource-grid > li.resource,
body.item.resource.browse ul.resources.resource-grid > li.resource {
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 14px !important;
  background: #fffdf7 !important;
  border: 1px solid rgba(96, 65, 34, .22) !important;
  border-radius: 6px !important;
  overflow: visible !important;
}

body.items.browse .resource-meta,
body.item.resource.browse .resource-meta,
body.items.browse .resource-link,
body.item.resource.browse .resource-link {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.items.browse .resource-link img,
body.item.resource.browse .resource-link img,
body.item.resource.browse li.resource:not(:has(img)) .resource-meta::before {
  width: 100% !important;
  height: 178px !important;
  min-height: 178px !important;
}

body.items.browse .resource-name,
body.item.resource.browse .resource-name {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  color: #641b16 !important;
  font-size: 1.06rem !important;
  line-height: 1.28 !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body.items.browse .description,
body.item.resource.browse .description {
  margin-top: 9px !important;
  max-height: none !important;
  color: #67584b !important;
  font-size: .94rem !important;
  line-height: 1.45 !important;
  -webkit-line-clamp: 4 !important;
}

body.item.resource.show .main-with-sidebar > dl > .property:first-child {
  display: none !important;
}

body.item.resource.show .main-with-sidebar > dl > .property:nth-child(4),
body.item.resource.show .main-with-sidebar > dl > .property:nth-child(6),
body.item.resource.show .main-with-sidebar > dl > .property:nth-child(7),
body.item.resource.show .main-with-sidebar > dl > .property:nth-child(10) {
  order: -9;
  background: #fffaf0 !important;
  border-color: rgba(143, 45, 34, .28) !important;
  box-shadow: 0 10px 24px rgba(37, 27, 21, .06);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.hvk-explorer-card:focus-visible {
  outline: 3px solid #c79a3f !important;
  outline-offset: 3px !important;
}

header a,
nav a,
.hvk-button,
.hvk-chip-row a,
button,
.button,
input[type="submit"] {
  min-height: 40px;
}

.hvk-live-explorer {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.hvk-explorer-sidebar {
  position: sticky;
  top: 92px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid rgba(96, 65, 34, .22);
  border-radius: 6px;
}

.hvk-explorer-sidebar label {
  display: block;
  margin: 0 0 6px;
  color: #641b16;
  font-weight: 800;
}

.hvk-explorer-sidebar input,
.hvk-explorer-sidebar select {
  width: 100%;
  min-height: 44px;
  margin: 0 0 14px;
  border: 1px solid rgba(96, 65, 34, .24);
  border-radius: 6px;
  background: #fffdf7;
}

.hvk-explorer-results {
  min-width: 0;
}

.hvk-live-explorer > .hvk-explorer-sidebar {
  grid-column: 1;
}

.hvk-live-explorer > .hvk-explorer-status,
.hvk-live-explorer > .hvk-explorer-grid,
.hvk-live-explorer > .hvk-explorer-results {
  grid-column: 2;
}

.hvk-explorer-status {
  margin: 0 0 14px;
  color: #67584b;
  font-weight: 700;
}

.hvk-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.hvk-explorer-card {
  display: flex;
  min-width: 0;
  min-height: 355px;
  flex-direction: column;
  color: #251b15 !important;
  text-decoration: none;
  background: #fffdf7;
  border: 1px solid rgba(96, 65, 34, .22);
  border-radius: 6px;
  overflow: hidden;
}

.hvk-explorer-thumb {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  color: #8f2d22;
  font-weight: 800;
  background:
    linear-gradient(rgba(255, 250, 240, .92), rgba(255, 250, 240, .92)),
    repeating-linear-gradient(135deg, rgba(199, 154, 63, .25) 0 11px, rgba(199, 154, 63, .08) 11px 22px);
}

.hvk-explorer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hvk-explorer-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px 14px;
}

.hvk-explorer-inv {
  color: #7b5b32;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hvk-explorer-title {
  color: #641b16;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hvk-explorer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.hvk-explorer-meta span {
  padding: 5px 7px;
  color: #67584b;
  background: #fffaf0;
  border: 1px solid rgba(96, 65, 34, .16);
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hvk-live-explorer {
    grid-template-columns: 1fr;
  }

  .hvk-explorer-sidebar {
    position: static;
  }

  .hvk-live-explorer > .hvk-explorer-sidebar,
  .hvk-live-explorer > .hvk-explorer-status,
  .hvk-live-explorer > .hvk-explorer-grid,
  .hvk-live-explorer > .hvk-explorer-results {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  body.items.browse ul.resources.resource-grid,
  body.item.resource.browse ul.resources.resource-grid,
  .hvk-explorer-grid {
    grid-template-columns: 1fr !important;
  }
}


body.item.resource.browse #search-container.closed {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
}

body.item.resource.browse ul.resources.resource-grid {
  display: grid !important;
}

body.item.resource.browse ul.resources.resource-grid > li.resource {
  background: #fffaf0 !important;
}

.menu-toggle,
.search-toggle.button,
button.browse-toggle,
.button-group .button {
  background: #8f2d22 !important;
  background-color: #8f2d22 !important;
  background-image: none !important;
  border-color: #8f2d22 !important;
  color: #fff !important;
}

.menu-toggle:hover,
.search-toggle.button:hover,
button.browse-toggle:hover,
.button-group .button:hover {
  background: #641b16 !important;
  background-color: #641b16 !important;
  background-image: none !important;
  border-color: #641b16 !important;
}

body.item.resource.browse .browse-controls button,
body.item.resource.browse .browse-controls .button,
body.item.resource.browse .browse-controls .advanced-search,
body.item.resource.browse #search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  background: #8f2d22 !important;
  background-color: #8f2d22 !important;
  background-image: none !important;
  border: 1px solid #8f2d22 !important;
  border-radius: 6px !important;
  color: #fff !important;
  text-decoration: none;
}

body.item.resource.browse .browse-controls button:hover,
body.item.resource.browse .browse-controls .button:hover,
body.item.resource.browse .browse-controls .advanced-search:hover,
body.item.resource.browse #search-submit:hover {
  background: #641b16 !important;
  background-color: #641b16 !important;
  border-color: #641b16 !important;
  color: #fff !important;
}

header button,
header .button,
input[type="submit"],
button[type="submit"] {
  background: #8f2d22 !important;
  background-color: #8f2d22 !important;
  background-image: none !important;
  border-color: #8f2d22 !important;
  color: #fff !important;
}

header button:hover,
header .button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
  background: #641b16 !important;
  background-color: #641b16 !important;
  border-color: #641b16 !important;
  color: #fff !important;
}

body.item.resource.browse .browse-control-mobile {
  display: none;
}

body.item.resource.browse .browse-controls.top,
body.item.resource.browse .browse-controls.bottom,
body.item.resource.browse.item-set .browse-controls {
  display: flex !important;
}

body.item.resource.browse .browse-controls .omeka-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.item.resource.browse .page-input-top,
body.item.resource.browse .page-input-bottom {
  width: 70px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

body.item.resource.browse ul.resources.resource-grid > li.resource {
  overflow: hidden;
}

body.item.resource.browse .resource-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.item.resource.browse .description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 4.7em;
}

body.item.resource.browse .resource-link img {
  width: 100%;
  height: 190px;
  max-width: none;
  object-fit: cover;
  margin: 0 0 12px;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
}

/* Usability audit 2026-07-12: search, mobile overflow and color consistency. */
.hvk-simple-search {
  width: min(680px, 100%);
  margin-top: 22px;
}

.hvk-simple-search label {
  display: block;
  margin: 0 0 7px;
  color: inherit;
  font-weight: 800;
}

.hvk-simple-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.hvk-simple-search input[type="search"],
.hvk-simple-search input[type="text"] {
  min-width: 0;
  min-height: 50px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid rgba(96, 65, 34, .28);
  border-radius: 6px;
  background: #fffdf7;
  color: #251b15;
  font: inherit;
}

.hvk-simple-search button {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: #8f2d25;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.hvk-simple-search button:hover,
.hvk-simple-search button:focus {
  background: #641b16;
}

.hvk-home-search {
  color: #fff8ed;
}

.hvk-search-note {
  display: block;
  width: min(100%, 720px);
  margin: 1.05rem 0 .7rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 6px;
  background: rgba(29, 23, 18, .32);
  color: #fff7ea;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hvk-search-note strong {
  color: #fff;
  font-weight: 800;
}

.hvk-home-search.hvk-search-note {
  margin-top: 1rem;
}

.hvk-example-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hvk-example-searches a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 248, 237, .35);
  border-radius: 999px;
  background: rgba(255, 250, 240, .12);
  color: #fff8ed;
  font-weight: 800;
  text-decoration: none;
}

.hvk-search-card,
.hvk-card,
.hvk-document-card,
.hvk-explorer-card,
.hvk-stat-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hvk-search-card strong,
.hvk-card h2,
.hvk-card h3,
.hvk-document-card strong,
.hvk-explorer-title,
.resource-name,
.resource-link,
.media.resource .resource-title,
.item.resource .resource-title {
  overflow-wrap: anywhere;
  word-break: normal;
}

body,
body a,
.pagination a,
.advanced-search,
.sorting button,
.sorting select,
button,
input[type="submit"],
.button {
  accent-color: #8f2d25;
}

body a {
  color: #7b241d;
}

body a:hover,
body a:focus {
  color: #4a130f;
}

button,
input[type="submit"],
.button,
a.button {
  border-radius: 6px !important;
}

body.item.resource.browse form,
body.items.browse form,
body.search form {
  max-width: 100%;
}

body.item.resource.browse input,
body.item.resource.browse select,
body.items.browse input,
body.items.browse select,
body.search input,
body.search select {
  max-width: 100%;
  border-color: rgba(96, 65, 34, .28);
}

body.item.resource.browse .advanced-search,
body.items.browse .advanced-search {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #7b241d;
  font-weight: 800;
}

body.item.resource.browse .sorting,
body.items.browse .sorting {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

body.item.resource.browse .sorting select,
body.items.browse .sorting select,
body.item.resource.browse .sorting button,
body.items.browse .sorting button {
  min-height: 42px;
}

body.item.resource.browse .sorting button,
body.items.browse .sorting button,
body.search button,
body.search input[type="submit"] {
  border: 0;
  background: #8f2d25;
  color: #fff;
  font-weight: 800;
}

body.item.resource.browse .pagination,
body.items.browse .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.item.resource.browse .pagination input,
body.items.browse .pagination input {
  width: 4.5rem;
  min-height: 38px;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .hvk-wrap,
  body.item.resource.show #content,
  body.media.resource.show #content,
  body.item-set.resource.show #content,
  body.item.resource.browse.item-set #content,
  body.items.search #content {
    width: min(100% - 24px, 1180px) !important;
  }

  .hvk-title {
    font-size: clamp(2.1rem, 12vw, 3.3rem);
    line-height: 1.03;
  }

  .hvk-lead {
    font-size: 1rem;
  }

  .hvk-simple-search-row {
    grid-template-columns: 1fr;
  }

  .hvk-simple-search button {
    width: 100%;
  }

  .hvk-search-note {
    width: 100%;
    padding: .75rem .85rem;
  }

  .hvk-actions,
  .hvk-chip-row,
  .hvk-example-searches {
    align-items: stretch;
  }

  .hvk-actions .hvk-button,
  .hvk-chip-row a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hvk-search-grid,
  .hvk-grid,
  .hvk-gallery,
  .hvk-library-grid,
  .hvk-explorer-grid {
    grid-template-columns: 1fr !important;
  }

  .hvk-section-head,
  .hvk-two,
  .hvk-live-explorer {
    display: block !important;
  }

  .hvk-section-head .hvk-button {
    margin-top: 14px;
  }

  .hvk-search-card {
    min-height: 0;
  }

  body.item.resource.browse ul.resources.resource-grid,
  body.items.browse ul.resources.resource-grid {
    grid-template-columns: 1fr !important;
  }

  body.item.resource.browse .sorting,
  body.items.browse .sorting {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.item.resource.browse .sorting select,
  body.items.browse .sorting select,
  body.item.resource.browse .sorting button,
  body.items.browse .sorting button {
    width: 100%;
  }
}

body.item.resource.browse .resource-meta {
  width: auto !important;
  margin: 0 !important;
}

body.item.resource.browse .advanced-search::after {
  content: " / Details filtern";
}

body.item.resource.browse #content::before {
  content: "Tipp: Für einen kuratierten Einstieg nach Art der Dinge, Sammlungsbereich, Bildbestand und Sortierung die Seite „Sammlung durchsuchen“ nutzen.";
  display: block;
  margin: 24px 0 14px;
  padding: 14px 16px;
  color: #67584b;
  background: #fffaf0;
  border-left: 5px solid #c79a3f;
  border-radius: 6px;
}

body.item.resource.show #content,
body.media.resource.show #content,
body.item-set.resource.show #content,
body.item.resource.browse.item-set #content,
body.items.search #content {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 0 58px;
}

body.item.resource.show .resource-title,
body.media.resource.show .resource-title,
body.item-set.resource.show .resource-title {
  display: block;
  margin: 8px 0 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fffaf0, #f4ead8);
  border: 1px solid var(--line);
  border-radius: 6px;
}

body.item.resource.show .resource-title h2,
body.media.resource.show .resource-title h2,
body.item-set.resource.show .resource-title h2 {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.06;
}

body.item.resource.show .resource-title .label,
body.media.resource.show .resource-title .label,
body.item-set.resource.show h3 {
  display: inline-flex;
  margin: 0;
  padding: 7px 10px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-size: .95rem;
  line-height: 1;
}

body.item.resource.show .stack,
body.item.resource.show .grid-x,
body.media.resource.show .grid-x,
body.item-set.resource.show .grid-x {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 28px;
  padding: 0 !important;
}

body.item.resource.show .main-with-sidebar,
body.media.resource.show .main-with-sidebar,
body.item-set.resource.show .main-with-sidebar,
body.item.resource.show .sidebar,
body.media.resource.show .sidebar,
body.item-set.resource.show .sidebar {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

body.item.resource.show .media-embeds,
body.media.resource.show .media-render.file {
  margin-bottom: 22px;
  padding: 14px;
  background: #2b211a;
  border-radius: 6px;
}

body.item.resource.show .media-render.file a,
body.media.resource.show .media-render.file a {
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.item.resource.show .media-render.file img,
body.media.resource.show .media-render.file img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #1d1712;
  border-radius: 4px;
}

body.item.resource.show dl,
body.media.resource.show dl,
body.item-set.resource.show dl {
  margin: 0 0 18px;
  padding: 0;
}

body.item.resource.show .property,
body.media.resource.show .property,
body.item-set.resource.show .property {
  margin: 0 0 12px;
  padding: 16px 18px;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

body.item.resource.show .property dt,
body.media.resource.show .property dt,
body.item-set.resource.show .property dt {
  float: none;
  width: auto;
  margin: 0 0 8px;
  color: var(--red-dark);
  font-weight: 700;
  font-size: .95rem;
}

body.item.resource.show .property dd,
body.media.resource.show .property dd,
body.item-set.resource.show .property dd {
  clear: none;
  margin: 0;
  color: var(--ink);
  line-height: 1.58;
}

body.item.resource.show .property a,
body.media.resource.show .property a,
body.item-set.resource.show .property a {
  color: var(--red-dark) !important;
  font-weight: 700;
}

body.item.resource.show .media-list {
  margin-top: 22px;
  padding-top: 10px;
  border-top: 4px solid #c79a3f;
}

body.item.resource.show .media-list dt::after {
  content: " / Bilder, Scans, PDF, Audio, Video oder 3D";
  color: var(--muted);
  font-weight: 400;
}

body.item.resource.show .media-list .resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

body.item.resource.show .media-list img {
  width: 86px !important;
  height: 86px !important;
  object-fit: cover;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 6px;
  box-shadow: none !important;
}

body.items.search #advanced-search {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
}

body.items.search .field {
  border-bottom: 1px solid rgba(96, 65, 34, .18);
  padding-bottom: 16px;
}

body.items.search label,
body.items.search .label {
  color: var(--red-dark);
  font-weight: 700;
}

body.items.search select,
body.items.search input[type="text"] {
  margin-bottom: 8px;
}

@media (max-width: 820px) {
  body.item.resource.show .stack,
  body.item.resource.show .grid-x,
  body.media.resource.show .grid-x,
  body.item-set.resource.show .grid-x {
    grid-template-columns: 1fr;
  }

  body.item.resource.browse .browse-controls {
    display: block !important;
  }

  body.item.resource.browse .sorting {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.item.resource.show #content,
  body.media.resource.show #content,
  body.item-set.resource.show #content,
  body.item.resource.browse.item-set #content,
  body.items.search #content {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }
}

/* Final detail-page overrides must stay after the inherited theme rules. */
body.item.resource.show .stack,
body.media.resource.show .stack {
  display: block !important;
  width: 100% !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x,
body.item.resource.show .stack > .grid-x {
  display: grid !important;
  grid-template-columns: minmax(430px, .95fr) minmax(430px, 1.05fr) !important;
  gap: 30px !important;
  width: 100% !important;
  max-width: none !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .main-with-sidebar,
body.item.resource.show .stack > .grid-x > .main-with-sidebar {
  display: contents !important;
}

body.item.resource.show .main-with-sidebar > .media-embeds {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
body.item.resource.show .stack > .grid-x > .sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.item.resource.show .main-with-sidebar > dl {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}

@media (max-width: 960px) {
  body.item.resource.show .stack > .grid-x.grid-margin-x,
  body.item.resource.show .stack > .grid-x {
    grid-template-columns: 1fr !important;
  }

  body.item.resource.show .main-with-sidebar > .media-embeds,
  body.item.resource.show .stack > .grid-x.grid-margin-x > .sidebar,
  body.item.resource.show .stack > .grid-x > .sidebar,
  body.item.resource.show .main-with-sidebar > dl {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.item.resource.show .main-with-sidebar > dl {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.item.resource.show .main-with-sidebar > dl {
    grid-template-columns: 1fr !important;
  }
}
