 :root {
  --black: #111;
  --white: #fff;
  --page: #f7f7f5;
  --line: #d8d8d4;
  --soft: #efefec;
  --text: #222;
  --muted: #666;
  --link: #245a8d;
  --person-bg: #dff1de;
  --location-bg: #fff1b8;
  --date-bg: #f6dddd;
  --note-bg: #f1dff0;
  --radius: 7px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--text); background: var(--page); line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { background: var(--black); color: var(--white); font-family: Arial, Helvetica, sans-serif; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 0.7rem 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.brand a { color: var(--white); font-weight: 700; letter-spacing: 0.01em; }
.mainnav { display: flex; gap: 1.1rem; font-size: 0.95rem; flex-wrap: wrap; align-items: center; }
.mainnav a, .nav-button { color: var(--white); }
.nav-button { background: transparent; border: 0; padding: 0; font: inherit; cursor: pointer; }
.page-wrap { max-width: 1240px; margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.title-card, .navrow, .toolbar, .panel, .citation { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.title-card { padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.title-card h1 { margin: 0 0 0.25rem; font-size: 1.45rem; font-weight: 600; }
.title-meta { font-family: Arial, Helvetica, sans-serif; font-size: 0.98rem; color: var(--muted); }
.navrow { padding: 0.75rem 1rem 0.85rem; margin-bottom: 1rem; font-family: Arial, Helvetica, sans-serif; font-size: 0.95rem; }
.navrow-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; }
.navrow .right { text-align: right; }
.page-select-label { color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }
.page-select { border: 1px solid var(--line); background: var(--soft); border-radius: 4px; padding: 0.25rem 1.7rem 0.25rem 0.45rem; color: var(--text); }
.volume-position { margin-top: 0.75rem; display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: center; }
.volume-position-label { color: var(--muted); font-size: 0.82rem; }
.volume-track { position: relative; height: 0.42rem; background: #e2e2dd; border: 0; border-radius: 999px; display: block; width: 100%; cursor: pointer; padding: 0; }
.volume-progress { position: absolute; left: 0; top: 0; height: 100%; background: #3a3a3a; border-radius: 999px; }
.volume-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 0.78rem; height: 0.78rem; border-radius: 50%; background: var(--black); border: 2px solid var(--white); box-shadow: 0 0 0 1px #999; }
.toolbar { padding: 0.75rem 1rem; margin-bottom: 1.2rem; font-family: Arial, Helvetica, sans-serif; display: grid; grid-template-columns: 1fr auto auto; gap: 1.2rem; align-items: center; }
.toolbar strong { font-size: 0.95rem; }
.toolbar label { margin-right: 0.55rem; white-space: nowrap; font-size: 0.92rem; }
.toolbar-latin { text-align: center; }
.view-switch { text-align: right; }
.view-switch button, .action-button { border: 1px solid var(--line); background: var(--soft); border-radius: 4px; padding: 0.35rem 0.7rem; font-size: 0.9rem; cursor: pointer; }
.view-switch button.active { background: var(--black); color: var(--white); border-color: var(--black); }
.edition-grid { display: grid; grid-template-columns: minmax(170px, 230px) minmax(360px, 1fr) minmax(280px, 420px); gap: 1.1rem; align-items: start; }
.panel { overflow: hidden; }
.panel h2 { font-family: Arial, Helvetica, sans-serif; font-size: 1rem; margin: 0; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--soft); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: var(--soft); }
.panel-heading h2 { border-bottom: 0; background: transparent; }
.panel-actions { padding-right: 0.6rem; display: flex; gap: 0.4rem; }
.action-button { font-size: 0.82rem; padding: 0.28rem 0.55rem; }
.margin-col, .text-col, .scan-col { padding: 0.9rem; }
.marginal-row { min-height: 1.9rem; margin-bottom: 0.18rem; color: #333; font-size: 0.96rem; }
.marginal-row.has-note { padding-left: 0.65rem; border-left: 3px solid #cfcfca; }
.transcription-line { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.7rem; padding: 0.2rem 0; }
.ln { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: 0.78rem; text-align: right; padding-top: 0.12rem; }
.person, .location, .date, .footnotetext, .glossar, .translation { border-bottom: 1px dotted #777; cursor: help; }
.person { background: var(--person-bg); }
.location { background: var(--location-bg); }
.date { background: var(--date-bg); }
.footnotetext { background: var(--note-bg); }
.glossar { background: #f3f0dc; }
.translation { font-style: italic; }
.translation-cont { border-bottom-color: transparent; }
body.hide-persons .person, body.hide-locations .location, body.hide-dates .date, body.hide-notes .footnotetext, body.hide-highlights .person, body.hide-highlights .location, body.hide-highlights .date, body.hide-highlights .footnotetext, body.hide-highlights .glossar { background: transparent; border-bottom-color: transparent; }
body.show-translations .translation:not(.translation-cont)::after { content: attr(title); display: block; margin: 0.15rem 0 0.45rem; padding-left: 0.75rem; color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: 0.82rem; font-style: normal; }
.gap { display: inline-block; min-width: 1.6em; }
.gap[title] { border-bottom: 1px dotted #aaa; }
.scan-image { max-width: 100%; display: block; border: 1px solid #bbb; background: #ddd; cursor: zoom-in; }
.scan-zoom-wrap { position: relative; }
.scan-zoom-pane { display: none; }
.drift-zoom-pane { z-index: 20; }
.source { font-family: Arial, Helvetica, sans-serif; color: var(--muted); font-size: 0.82rem; margin: 0.65rem 0 0; }
.below-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.2rem; }
.entity-list { padding: 0.9rem 1rem 1rem; font-family: Arial, Helvetica, sans-serif; font-size: 0.92rem; }
.entity-list h3 { margin: 0.7rem 0 0.25rem; font-size: 0.92rem; }
.entity-list h3:first-child { margin-top: 0; }
.entity-list p { margin: 0; }
.notes { padding: 0.9rem 1rem 1rem; }
.notes ol { margin: 0.2rem 0 0; padding-left: 1.35rem; }
.notes li { margin: 0 0 0.45rem; padding-left: 0.2rem; }
.notes li p { display: inline; margin: 0; }
.notes sup { vertical-align: baseline; font-size: inherit; font-weight: 600; margin-right: 0.25rem; }
.citation { margin-top: 1.2rem; padding: 0.9rem 1rem; font-family: Arial, Helvetica, sans-serif; font-size: 0.88rem; color: var(--muted); }
.citation p { margin: 0.2rem 0; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); max-width: 520px; width: 100%; padding: 1rem 1.2rem; box-shadow: 0 12px 32px rgba(0,0,0,0.22); }
.calendar-modal { max-width: 390px; }
.modal h2 { margin-top: 0; font-size: 1.2rem; }
.modal-close { position: absolute; top: 0.5rem; right: 0.7rem; border: 0; background: transparent; font-size: 1.7rem; cursor: pointer; }
.modal-hint { color: var(--muted); font-size: 0.9rem; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; font-family: Arial, Helvetica, sans-serif; }
.calendar-head button { border: 1px solid var(--line); background: var(--soft); border-radius: 4px; padding: 0.25rem 0.5rem; cursor: pointer; }
.calendar-table { width: 100%; border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; font-size: 0.9rem; }
.calendar-table th, .calendar-table td { width: 14.28%; text-align: center; padding: 0.25rem; }
.calendar-table th { color: var(--muted); font-weight: 600; }
.calendar-day { border: 1px solid transparent; min-height: 2rem; border-radius: 4px; display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; color: #aaa; }
.calendar-day.has-entry { color: var(--text); background: var(--soft); border-color: var(--line); cursor: pointer; }
.calendar-day.has-entry:hover, .calendar-day.current { background: var(--black); color: var(--white); text-decoration: none; }
body.view-text .scan-panel { display: none; }
body.view-text .edition-grid { grid-template-columns: minmax(170px, 230px) minmax(520px, 1fr); }
body.view-scan .marginalia-panel, body.view-scan .transcription-panel, body.view-scan .below-grid { display: none; }
body.view-scan .edition-grid { grid-template-columns: minmax(300px, 700px); justify-content: center; }
.index-panel { padding: 1rem; }
.index-content table { width: 100%; border-collapse: collapse; font-family: Arial, Helvetica, sans-serif; font-size: 0.92rem; }
.index-content th, .index-content td { border-bottom: 1px solid var(--line); padding: 0.45rem; vertical-align: top; text-align: left; }
.index-content h4, .index-content h5 { margin: 1rem 0 0.4rem; }
.index-content .person-main-note, .index-content .resource-list { margin-top: 0.28rem; color: var(--muted); font-size: 0.88rem; }
.index-content .resource-list a { white-space: nowrap; }
.index-content .toc-table { max-width: 820px; }
.muted { color: var(--muted); }
titel { display: inline; font-weight: 600; }
rand, pag { color: var(--muted); }
body.hide-notes .notes-panel { display: none; }
@media (max-width: 980px) { .edition-grid, .below-grid { grid-template-columns: 1fr; } .navrow-line, .toolbar { grid-template-columns: 1fr; } .navrow .right, .toolbar-latin, .view-switch { text-align: left; } .volume-position { grid-template-columns: 1fr; } }

.topbar { font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; }
.topbar-inner { padding-top: 0.62rem; padding-bottom: 0.62rem; }
.brand a { font-weight: 600; }
.title-card h1 { font-size: 1.55rem; }
.toolbar { grid-template-columns: 1fr 1fr 1fr; }
.toolbar-highlight { text-align: left; }
.toolbar-latin { text-align: center; }
.view-switch { text-align: right; }
.volume-position { grid-template-columns: auto 1fr; }
.volume-slider-wrap { position: relative; display: flex; align-items: center; gap: 0.75rem; }
.volume-slider { width: 100%; accent-color: var(--black); cursor: pointer; }
.volume-slider-value { min-width: 3.2rem; padding: 0.15rem 0.35rem; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); font-size: 0.82rem; color: var(--text); text-align: center; }
.marginal-row { min-height: 1.72rem; margin-bottom: 0.12rem; line-height: 1.38; }
body.hide-notes .notes-panel { display: block; }
.notes-list { margin: 0.2rem 0 0; }
.note-item { margin: 0 0 0.45rem; }
.note-item sup { vertical-align: baseline; font-size: inherit; font-weight: 600; margin-right: 0.3rem; }
.note-item .note-text { display: inline; }
.alpha-nav { font-family: Arial, Helvetica, sans-serif; margin: 0 0 1rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); display: flex; flex-wrap: wrap; gap: 0.45rem; }
.alpha-nav a, .alpha-nav span { min-width: 1.4rem; text-align: center; }
.alpha-nav span { color: #aaa; }
.letter-row td { background: var(--soft); font-weight: 700; color: var(--muted); padding-top: 0.65rem; }
.index-content .person-desc { margin-top: 0.18rem; color: var(--muted); font-size: 0.9rem; }
.index-content table th:nth-child(n+4), .index-content table td:nth-child(n+4) { white-space: nowrap; }
@media (max-width: 980px) { .toolbar { grid-template-columns: 1fr; } .toolbar-latin, .view-switch { text-align: left; } }

.page-select { min-width: 7.8rem; }
.volume-slider-value { min-width: 5.2rem; }
.toolbar { grid-template-columns: minmax(520px, 1.7fr) minmax(220px, 0.9fr) minmax(270px, 1fr); gap: 1rem; }
.toolbar-highlight { white-space: nowrap; }
.toolbar-latin { text-align: center; }
.view-switch { text-align: right; }
.translation-cont { border-bottom-color: #777; }
body.show-translations .translation::after { content: none; }
body.show-translations .translation.translation-last::after { content: attr(data-trans); display: block; margin: 0.15rem 0 0.45rem; padding-left: 0.75rem; color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: 0.82rem; font-style: normal; }
.custom-tooltip { position: fixed; z-index: 1000; max-width: min(420px, calc(100vw - 2rem)); background: #333; color: #fff; padding: 0.55rem 0.7rem; border-radius: 5px; font-family: Arial, Helvetica, sans-serif; font-size: 0.92rem; line-height: 1.35; box-shadow: 0 7px 24px rgba(0,0,0,0.25); pointer-events: none; }
.transcription-line.title-line .ln { visibility: hidden; }
titel { font-weight: 600; }
.footnote_idx, .footnote_idx a { vertical-align: super; font-size: 0.78em; line-height: 0; }
.status-legend { font-family: Arial, Helvetica, sans-serif; margin: 0 0 1rem; padding: 0.55rem 0.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); color: var(--muted); }
.status-dots { display: inline-flex; gap: 0.18rem; vertical-align: -0.08rem; white-space: nowrap; }
.status-dot { width: 0.62rem; height: 0.62rem; border-radius: 50%; border: 1px solid #777; display: inline-block; background: transparent; }
.status-dot.filled { background: #444; }
.bib-heading td, .bib-subheading td { border-bottom: 0; }
.bib-heading h4 { margin-top: 1.1rem; }
.bib-subheading h5 { margin-top: 0.45rem; color: var(--muted); }
@media (max-width: 1180px) { .toolbar { grid-template-columns: 1fr; } .toolbar-latin, .view-switch { text-align: left; } .toolbar-highlight { white-space: normal; } }

/* Parser 3.5 Feinschliff */
.location .footnote_idx, .location .footnote_idx a { background: var(--note-bg); border-bottom-color: #b96b9c; }
.transcription-line.empty-line { min-height: 1.45rem; }
.transcription-line.empty-line .line-text { min-height: 1.2rem; }
.scan-image { cursor: default; }
.scan-zoom-pane, .drift-zoom-pane { display: none !important; }
.source img { vertical-align: middle; margin-left: 0.25rem; }
.outlink-symbol { font-size: 0.82em; color: var(--muted); }
.index-content table td { vertical-align: top; }
.index-content td.pages-cell { max-width: 18rem; line-height: 1.55; }
.index-content .status-col { width: 1.7rem; min-width: 1.7rem; }
.index-content .status-dots { opacity: 0.62; transform: scale(0.86); transform-origin: center; }

/* Parser 3.6 Feinschliff */
.scan-actions { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.scan-open-button { font-size: 0.82rem; padding: 0.25rem 0.5rem; }
.scan-viewer-modal { width: min(96vw, 1180px); max-width: 1180px; }
.scan-viewer-controls { display: flex; align-items: center; gap: 0.45rem; margin: 0.6rem 0 0.7rem; font-family: Arial, Helvetica, sans-serif; }
.scan-viewer-controls button { border: 1px solid var(--line); background: var(--soft); border-radius: 4px; padding: 0.28rem 0.55rem; cursor: pointer; }
.scan-viewer-frame { width: 100%; height: min(76vh, 860px); overflow: hidden; border: 1px solid var(--line); background: #222; cursor: grab; touch-action: none; position: relative; }
.scan-viewer-frame.dragging { cursor: grabbing; }
.scan-viewer-image { display: block; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.index-content table.person-index th:nth-child(3), .index-content table.person-index td:nth-child(3) { width: 15%; max-width: 12rem; }
.index-content table.person-index th:nth-child(6), .index-content table.person-index td:nth-child(6) { width: 24%; min-width: 13rem; }
.index-content table.location-index th:first-child, .index-content table.location-index td:first-child { width: 46%; min-width: 20rem; }
.index-content table.location-index th.pages-cell, .index-content table.location-index td.pages-cell { width: 28%; min-width: 14rem; }
.location-desc { margin-top: 0.2rem; color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.index-content table.bib-index th.pages-cell, .index-content table.bib-index td.pages-cell { width: 28%; min-width: 14rem; }
@media (max-width: 1160px) {
  body:not(.view-scan) .edition-grid { grid-template-columns: minmax(165px, 225px) minmax(0, 1fr); }
  body:not(.view-scan) .scan-panel { display: none; }
}
@media (max-width: 760px) {
  body:not(.view-scan) .edition-grid { grid-template-columns: minmax(0, 1fr); }
  body:not(.view-scan) .marginalia-panel { display: none; }
  .transcription-line { grid-template-columns: 1.8rem 1fr; gap: 0.45rem; }
}

/* Parser 3.7 Mobile Ansicht */
.mobile-view-switch, .mobile-marginalia-panel { display: none; }
.mobile-view-switch { margin: 0.9rem 0 1rem; gap: 0.45rem; font-family: Arial, Helvetica, sans-serif; }
.mobile-view-switch button { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 0.35rem 0.75rem; cursor: pointer; font-size: 0.9rem; }
.mobile-view-switch button.is-active { background: var(--black); color: var(--white); border-color: var(--black); }
.mobile-marginalia-panel { margin-bottom: 1rem; }
.mobile-marginalia-list { padding: 0.85rem 1rem 1rem; }
.mobile-marginalium { border-bottom: 1px solid var(--line); padding: 0.55rem 0; }
.mobile-marginalium:last-child { border-bottom: 0; }
.mobile-marginalium-ref { font-family: Arial, Helvetica, sans-serif; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.2rem; }
.mobile-marginalium-text { font-size: 0.98rem; line-height: 1.45; }
@media (max-width: 760px) {
  .mobile-view-switch { display: flex; }
  body.mobile-view-text .mobile-marginalia-panel { display: none; }
  body.mobile-view-marginalia .mobile-marginalia-panel { display: block; }
  body.mobile-view-marginalia .edition-grid .transcription-panel { display: none; }
  body.mobile-view-marginalia .edition-grid { display: block; }
  body.mobile-view-marginalia .scan-panel { display: none; }
}

.location-map-toolbar { display: flex; gap: 0.35rem; align-items: center; padding: 0.35rem 1rem 0.6rem; }
.location-map-toolbar button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 0.25rem 0.55rem; cursor: pointer; font-size: 0.9rem; }
.location-map-toolbar button:hover { background: #f1f1ef; }
.location-map { cursor: grab; user-select: none; touch-action: none; }
.location-map.is-dragging { cursor: grabbing; }
.location-map .map-bg { fill: #f7f7f4; }
.location-map .map-border { fill: none; stroke: #c8c8c3; stroke-width: 0.9; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; vector-effect: non-scaling-stroke; }
.location-map .map-border.is-swiss { stroke: #8f8f8a; stroke-dasharray: 3 3; stroke-width: 1.25; opacity: 0.95; }
.location-map .map-lake { fill: #ffffff; stroke: #d8d8d2; stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.location-map .map-river { fill: none; stroke: #deded9; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: 0.95; vector-effect: non-scaling-stroke; }
.location-map .map-point { fill: rgba(74, 150, 165, 0.65); stroke: #111; stroke-width: 0.9; cursor: pointer; vector-effect: non-scaling-stroke; }
.location-map .map-point:hover, .location-map .map-point:focus { fill: rgba(74, 150, 165, 0.9); stroke-width: 1.5; }
.location-map .map-status { position: absolute; left: 1rem; bottom: 0.75rem; font-size: 0.82rem; color: var(--muted); background: rgba(255,255,255,0.82); padding: 0.2rem 0.35rem; border-radius: 4px; }

.location-map-toolbar { flex-wrap: wrap; }
.location-map-toolbar .map-size-control { margin-left: 0.75rem; display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.9rem; }
.location-map-toolbar .map-size-control input { width: 9rem; }
.location-map .map-land { fill: #f1f1ee; stroke: #d3d3cd; stroke-width: 0.45; opacity: 0.85; vector-effect: non-scaling-stroke; }
.location-map .map-border { fill: none; stroke: #b9b9b2; stroke-width: 0.7; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; vector-effect: non-scaling-stroke; }
.location-map .map-border.is-swiss { stroke: #77776f; stroke-dasharray: 3 3; stroke-width: 1.35; opacity: 0.98; }
.location-map .map-lake { fill: #fff; stroke: #cacac3; stroke-width: 0.9; vector-effect: non-scaling-stroke; }
.location-map .map-river { fill: none; stroke: #d1d1ca; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; opacity: 0.95; vector-effect: non-scaling-stroke; }

.location-map-toolbar .map-size-control input { width: 11rem; }
.location-map .map-point { cursor: pointer; }
.location-map .map-point:hover, .location-map .map-point:focus { stroke-width: 2.2; }
.location-index span.target-flash + strong, .location-index .target-flash + strong { background: #fff4a8; transition: background 1.2s ease; }

.location-map-toolbar .map-size-control input { width: 12rem; }
.location-map .map-status.is-ok { color: var(--muted); }

.location-map .map-border { fill: none; stroke: #bebeb8; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; vector-effect: non-scaling-stroke; }
.location-map .map-border.is-swiss { stroke: #74746d; stroke-dasharray: 3 3; stroke-width: 1.35; opacity: 0.98; }
.location-map .map-lake { fill: #fff; stroke: #c8c8c0; stroke-width: 0.8; opacity: 0.96; vector-effect: non-scaling-stroke; }
.location-map .map-river { fill: none; stroke: #cecec7; stroke-width: 1.05; stroke-linecap: round; stroke-linejoin: round; opacity: 0.92; vector-effect: non-scaling-stroke; }
.location-map .map-point.is-highlighted { fill: rgba(210, 107, 43, 0.95); stroke: #111; stroke-width: 2.6; }
.location-map-jump { margin-left: 0.35rem; border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 1.25rem; height: 1.25rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.78rem; color: #555; vertical-align: 0.08rem; }
.location-map-jump:hover, .location-map-jump:focus { background: #f2f2ef; color: #111; }

/* 3.17: etwas kartografischere Farbgebung */
.location-map .map-lake {
  fill: rgba(191, 222, 234, 0.58);
  stroke: rgba(128, 176, 195, 0.70);
  stroke-width: 0.75;
  opacity: 0.98;
}
.location-map .map-river {
  fill: none;
  stroke: rgba(89, 142, 164, 0.82);
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}
.location-map .map-point {
  fill: rgba(166, 73, 106, 0.72);
  stroke: rgba(58, 28, 43, 0.95);
  stroke-width: 0.9;
}
.location-map .map-point:hover,
.location-map .map-point:focus {
  fill: rgba(196, 83, 119, 0.92);
  stroke: #25121c;
  stroke-width: 1.7;
}
.location-map .map-point.is-highlighted {
  fill: rgba(236, 160, 43, 0.98);
  stroke: #241006;
  stroke-width: 2.8;
}

.location-map-stats {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.location-map-stats strong {
  color: var(--text);
  font-weight: 650;
}
.location-map .map-point.is-highlighted {
  fill: rgba(255, 181, 31, 1) !important;
  stroke: #000 !important;
  stroke-width: 4.2 !important;
  filter: drop-shadow(0 0 7px rgba(255, 181, 31, 0.95));
}
@keyframes dietrichMapPulse318 {
  from { opacity: 0.72; }
  to { opacity: 1; }
}
.location-map .map-point.is-highlighted {
  animation: dietrichMapPulse318 0.55s ease-in-out 0s 7 alternate;
}

/* 3.19: Registertabellen robuster umbrechen */
.index-content table.person-index,
.index-content table.location-index,
.index-content table.bib-index {
  width: 100%;
  table-layout: fixed;
}
.index-content table.person-index th,
.index-content table.person-index td,
.index-content table.location-index th,
.index-content table.location-index td,
.index-content table.bib-index th,
.index-content table.bib-index td {
  min-width: 0 !important;
  max-width: none !important;
  overflow-wrap: anywhere;
  word-break: normal;
}
.index-content td.pages-cell,
.index-content th.pages-cell,
.index-content table.person-index th:nth-child(6),
.index-content table.person-index td:nth-child(6),
.index-content table.location-index th.pages-cell,
.index-content table.location-index td.pages-cell,
.index-content table.bib-index th.pages-cell,
.index-content table.bib-index td.pages-cell {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  width: 26% !important;
  min-width: 0 !important;
}
.index-content td.pages-cell a {
  display: inline-block;
  margin: 0 0.18rem 0.22rem 0;
}
.index-content table.location-index th:first-child,
.index-content table.location-index td:first-child {
  width: 38% !important;
  min-width: 0 !important;
}
.index-content table.person-index th:first-child,
.index-content table.person-index td:first-child {
  width: 23% !important;
}
.location-map .map-point.is-highlighted {
  fill: rgba(255, 187, 0, 1) !important;
  stroke: #000 !important;
  stroke-width: 5 !important;
  filter: drop-shadow(0 0 10px rgba(255, 187, 0, 1));
}

/* 3.20: Kartenhinweis unter der Karte und Tabellen im Text robuster */
.location-map-source {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.index-map-head p {
  margin-bottom: 0.25rem;
}
.location-map-stats {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 0.15rem;
}
.location-map-stats strong {
  font-size: 1.08em;
}

/* Tabellen in der Transkription: ursprüngliche Prozentlogik respektieren,
   aber in der schmaleren Hauptspalte sauberer umbrechen. */
.line-text {
  min-width: 0;
}
.table-in-text {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.96em;
  line-height: 1.35;
}
.table-in-text td {
  min-width: 0;
  vertical-align: top;
  padding: 0 0.45rem 0 0;
  overflow-wrap: normal;
  word-break: normal;
}
.table-in-text td:last-child {
  padding-right: 0;
  white-space: nowrap;
}
.table-in-text td:nth-last-child(2):not(:first-child) {
  white-space: nowrap;
}
.table-in-text.is-condensed {
  font-size: 0.9em;
}
.table-in-text.is-very-condensed {
  font-size: 0.84em;
  letter-spacing: -0.01em;
}
.table-in-text.is-overwide {
  table-layout: auto;
}
.table-in-text.is-overwide td:last-child {
  white-space: normal;
}
@media (max-width: 980px) {
  .table-in-text {
    font-size: 0.92em;
  }
  .table-in-text td {
    padding-right: 0.3rem;
  }
}

/* 3.21: Feinschliff Karte, Personenstatus und Registertabellen */
.location-map-source {
  margin: 0.85rem 0.95rem 0.95rem;
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  background: rgba(248,248,246,0.72);
  border-radius: 6px;
}
.location-map-source a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.map-size-control { min-width: 13rem; }
.index-content .person-index { table-layout: fixed; }
.index-content .person-index .status-col,
.index-content .person-index th.status-col {
  width: 3.1rem;
  min-width: 3.1rem;
  max-width: 3.1rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
.index-content .person-index .status-dots {
  display: inline-flex;
  width: 2.05rem;
  justify-content: center;
  gap: 0.12rem;
  vertical-align: middle;
  transform: none;
}
.index-content .person-index td:nth-child(3),
.index-content .person-index th:nth-child(3) {
  padding-left: 0.75rem;
}

/* 3.22: bibliografische Nachweise als dezente Chips; Registerspalten semantisch geschärft */
.bib-chip {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.08rem 0.42rem 0.1rem;
  border: 1px solid #d8d2c7;
  border-radius: 999px;
  background: #f7f4ee;
  color: #6d6254 !important;
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: baseline;
}
.bib-chip:hover,
.bib-chip:focus {
  background: #efe8da;
  color: #3f362b !important;
  border-color: #c7bba8;
}
.notes-panel .bib-chip { margin-left: 0.5rem; }
.location-index .bib-chip { margin-left: 0; }
.index-content table.location-index td:nth-child(2),
.index-content table.location-index td:nth-child(3),
.index-content table.location-index td:nth-child(4) {
  font-size: 0.92rem;
  line-height: 1.45;
}

/* 3.23: dezentere Nachweis-Chips und Provider-Links */
.bib-chip {
  display: inline-block;
  margin-left: 0.42rem;
  padding: 0.08rem 0.42rem 0.1rem;
  border: 1px solid rgba(35,35,35,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.58);
  color: var(--muted) !important;
  font-size: 0.76rem;
  line-height: 1.35;
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: baseline;
}
.bib-chip:hover,
.bib-chip:focus {
  background: rgba(255,255,255,0.95);
  color: var(--text) !important;
  border-color: rgba(35,35,35,0.28);
}
.notes-panel .bib-chip { margin-left: 0.48rem; }
.location-index .bib-chip { margin-left: 0.42rem; }
.outlink-symbol {
  font-size: 0.78em;
  margin-left: 0.12rem;
  opacity: 0.72;
  text-decoration: none;
}
.index-content table.location-index th:first-child,
.index-content table.location-index td:first-child { width: 47% !important; }
.index-content table.location-index th:nth-child(2),
.index-content table.location-index td:nth-child(2) { width: 15% !important; }
.index-content table.location-index th:nth-child(3),
.index-content table.location-index td:nth-child(3) { width: 12% !important; }
.index-content table.location-index th.pages-cell,
.index-content table.location-index td.pages-cell { width: 26% !important; }
.index-content table.location-index td:nth-child(2) a,
.index-content table.location-index td:nth-child(3) a,
.index-content .resource-list a,
.index-content table.person-index td:nth-child(5) a {
  white-space: nowrap;
}

/* 3.29: konsolidierte Karte */
.location-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.location-map-toolbar button,
.map-extreme-button {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.location-map-toolbar button:hover,
.location-map-toolbar button:focus,
.map-extreme-button:hover,
.map-extreme-button:focus,
.map-extreme-button.is-bound {
  border-color: rgba(70, 80, 88, 0.45);
  background: #f4f6f6;
  color: #111;
}
.map-extreme-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.15rem;
}
.map-extreme-label { color: var(--muted); font-size: 0.86rem; margin-right: 0.08rem; }
.map-size-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 11rem;
  margin-left: auto;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
}
.map-size-control input { width: 7.5rem; }
.location-map,
.location-map .map-bg,
.location-map .map-frame {
  background: #eef6f8;
  fill: #eef6f8;
}
.location-map .map-border {
  fill: rgba(245, 244, 239, 0.88);
  stroke: #b9b7ae;
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  vector-effect: non-scaling-stroke;
}
.location-map .map-border.is-swiss {
  stroke: #6e6b63;
  stroke-dasharray: 3 3;
  stroke-width: 1.35;
  opacity: 1;
}
.location-map .map-lake {
  fill: #dceff5;
  stroke: #b9d2dc;
  stroke-width: 0.8;
  opacity: 0.96;
  vector-effect: non-scaling-stroke;
}
.location-map .map-river {
  fill: none;
  stroke: #abcbd6;
  stroke-width: 1.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.86;
  vector-effect: non-scaling-stroke;
}
.location-map .map-point {
  fill: rgba(119, 53, 86, 0.62);
  stroke: rgba(62, 31, 46, 0.92);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}
.location-map .map-point:hover,
.location-map .map-point:focus {
  fill: rgba(119, 53, 86, 0.88);
  stroke-width: 1.25;
}
.location-map .map-point.is-highlighted {
  fill: rgba(255, 181, 31, 1) !important;
  stroke: #000 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 6px rgba(255, 181, 31, 0.9));
}
@media (max-width: 760px) {
  .map-extreme-controls { width: 100%; margin-left: 0; }
  .map-size-control { width: 100%; margin-left: 0; }
}
