.west-wing-css3d {
  box-sizing: border-box;
  font-family: Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.west-wing-foyer-guide {
  width: 1120px;
  padding: 32px 38px 36px;
  color: #294043;
  border: 2px solid rgba(190, 146, 52, .82);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 252, 227, .98), transparent 52%),
    radial-gradient(circle at 8% 100%, rgba(105, 190, 189, .24), transparent 48%),
    linear-gradient(145deg, rgba(246, 251, 244, .97), rgba(204, 228, 224, .96));
  box-shadow:
    0 0 62px rgba(91, 184, 177, .48),
    0 0 24px rgba(217, 185, 110, .28),
    inset 0 0 42px rgba(255, 255, 255, .62);
}

.west-wing-foyer-guide .kicker,
.wilfried-text-panel .kicker,
.library-count-sign .kicker {
  color: #d9b96e;
  font: 800 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.west-wing-foyer-guide .kicker {
  color: #8a651b;
}

.west-wing-foyer-guide .paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.west-wing-foyer-guide .path {
  min-height: 142px;
  padding: 21px 23px;
  border: 1px solid rgba(145, 107, 31, .42);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(237, 244, 234, .52));
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, .48),
    0 7px 22px rgba(45, 77, 75, .12);
}

.west-wing-foyer-guide h2 {
  margin: 0 0 12px;
  color: #735318;
  font-size: 27px;
  line-height: 1.14;
}

.west-wing-foyer-guide p {
  margin: 0;
  color: #3e575a;
  font: 18px/1.48 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.west-wing-foyer-guide .foyer-usage-path {
  position: relative;
  border-color: rgba(171, 120, 23, .92);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 246, 188, .86), transparent 70%),
    linear-gradient(145deg, rgba(255, 252, 229, .94), rgba(232, 207, 142, .78));
  box-shadow:
    0 0 26px rgba(217, 185, 110, .62),
    inset 0 0 24px rgba(255, 255, 255, .58);
  cursor: pointer;
  outline: none;
}

.west-wing-foyer-guide .foyer-usage-path:hover,
.west-wing-foyer-guide .foyer-usage-path:focus-visible {
  border-color: #8f6518;
  box-shadow:
    0 0 34px rgba(217, 185, 110, .88),
    inset 0 0 28px rgba(255, 255, 255, .72);
  transform: translateY(-3px);
}

.foyer-usage-open {
  display: inline-block;
  margin-top: 14px;
  padding-bottom: 3px;
  color: #765316;
  border-bottom: 2px solid rgba(118, 83, 22, .58);
  font: 800 14px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .35px;
}

.wilfried-photo-panel {
  width: 320px;
  margin: 0;
  padding: 12px;
  color: #30291f;
  border: 1px solid rgba(65, 54, 38, .34);
  border-radius: 4px;
  background: #d8cfbd;
}

.wilfried-photo-panel img {
  display: block;
  width: 100%;
  height: 406px;
  object-fit: cover;
  object-position: center;
  border: 0;
  border-radius: 2px;
  background: #aaa292;
}

.wilfried-photo-panel .photo-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 406px;
  color: #554b3d;
  background: #bdb4a4;
  font-size: 58px;
}

.wilfried-photo-panel figcaption {
  padding: 10px 2px 2px;
  color: #40372b;
  font: 600 18px/1.25 Georgia, serif;
  text-align: center;
}

.wilfried-text-panel {
  width: 470px;
  min-height: 300px;
  padding: 28px 31px;
  color: #3d3529;
  border: 1px solid rgba(89, 69, 37, .33);
  border-radius: 8px;
  background: rgba(235, 226, 207, .97);
}

.wilfried-text-panel h2 {
  margin: 12px 0 16px;
  color: #3d2d16;
  font-size: 38px;
  line-height: 1.08;
}

.wilfried-text-panel p {
  margin: 0 0 20px;
  font: 18px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wilfried-photo-panel,
.wilfried-text-panel,
.library-topic-sign,
.library-person-card {
  pointer-events: auto;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.wilfried-photo-panel:hover,
.wilfried-photo-panel:focus-visible,
.wilfried-text-panel:hover,
.wilfried-text-panel:focus-visible,
.library-topic-sign:hover,
.library-topic-sign:focus-visible,
.library-person-card:hover,
.library-person-card:focus-visible {
  outline: 3px solid rgba(243, 207, 114, .92);
  outline-offset: 4px;
  filter: brightness(1.08);
  box-shadow: 0 0 32px rgba(235, 190, 69, .55);
}

.library-topic-sign {
  width: 280px;
  min-height: 80px;
  padding: 12px 14px;
  color: #f0e8d8;
  border: 2px solid rgba(217, 185, 110, .84);
  border-radius: 12px;
  background: rgba(9, 13, 26, .94);
  box-shadow: 0 0 24px rgba(217, 185, 110, .16);
  text-align: left;
}

.library-topic-sign .number {
  display: block;
  margin-bottom: 5px;
  color: #d9b96e;
  font: 800 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 1.4px;
}

.library-topic-sign .title {
  display: block;
  font-size: 18px;
  line-height: 1.12;
}

.library-person-card {
  width: 198px;
  min-height: 68px;
  padding: 9px 11px;
  color: #f0eadd;
  border: 1px solid var(--tradition-color, #d9b96e);
  border-radius: 9px;
  background: rgba(8, 12, 25, .92);
  box-shadow: 0 0 18px color-mix(in srgb, var(--tradition-color, #d9b96e) 28%, transparent);
  text-align: left;
}

.library-person-card strong {
  display: block;
  color: #f3d17c;
  font-size: 16px;
  line-height: 1.06;
}

.library-person-card span {
  display: block;
  margin-top: 5px;
  color: #bfc5d0;
  font: 10px/1.18 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-count-sign {
  width: 370px;
  padding: 25px 27px;
  color: #eee6d5;
  border-left: 3px solid #d9b96e;
  background: rgba(7, 9, 18, .92);
}

.library-count-sign strong {
  display: block;
  margin-top: 10px;
  color: #f0d180;
  font-size: 27px;
  line-height: 1.24;
}

.west-wing-reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(3, 8, 14, .88);
  backdrop-filter: blur(10px);
}

.west-wing-reader-overlay.show { display: flex; }

.west-wing-reader {
  width: min(820px, 100%);
  max-height: min(840px, 100%);
  overflow: auto;
  box-sizing: border-box;
  padding: 34px 42px 42px;
  color: #3b3226;
  border: 1px solid rgba(239, 205, 122, .88);
  border-radius: 10px;
  background: linear-gradient(145deg, #f1e9d9, #d9cdb8);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .74), inset 0 0 0 8px rgba(255, 255, 255, .18);
  font-family: Georgia, "Times New Roman", serif;
  user-select: text;
  -webkit-user-select: text;
}

.west-wing-reader header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.west-wing-reader .kicker {
  color: #8c6928;
  font: 800 11px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.west-wing-reader-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(111, 76, 24, .68);
  border-radius: 50%;
  color: #271b0a;
  background: linear-gradient(#f2d986, #cda64b);
  font: 800 26px/1 sans-serif;
  cursor: pointer;
}

.west-wing-reader h2 {
  margin: 18px 0 25px;
  color: #8f6825;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.west-wing-reader-body {
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.62;
}

.west-wing-reader-body h3 {
  margin: 30px 0 12px;
  color: #79571e;
  font-size: 1.15em;
}

.west-wing-reader-body p { margin: 0 0 18px; }
.west-wing-reader-body ul { margin: 10px 0 0; padding-left: 1.25em; }
.west-wing-reader-body li { margin: 0 0 10px; }

@media (max-width: 700px) {
  .west-wing-reader-overlay { padding: 12px; }
  .west-wing-reader { padding: 25px 23px 32px; }
}

/* Bibliothek: siebzehn begehbare Kammern bei freiem Mittelgang. Alle
   HTML-Flächen der Seitenbereiche besitzen eine echte Vorderseite; die
   Laufzeit schaltet nur die zum Besucherstand gehörenden Ziele sichtbar. */
.library-person-card,
.library-card-backing,
.library-threshold-board,
.library-threshold-wayfinder,
.library-greek-links {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.library-card-backing {
  box-sizing: border-box;
  border: 4px solid color-mix(in srgb, var(--field-color) 78%, #d9b96e);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--field-color) 22%, transparent), transparent 62%),
    rgba(5, 7, 13, .96);
  box-shadow:
    inset 0 0 46px color-mix(in srgb, var(--field-color) 24%, transparent),
    0 0 34px color-mix(in srgb, var(--field-color) 28%, transparent);
  pointer-events: none;
}

.library-person-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 200px;
  height: 200px;
  min-height: 0;
  padding: 12px 13px 11px;
  overflow: hidden;
  contain: layout paint;
  isolation: isolate;
  clip-path: inset(0 round 11px);
  color: #f5ead8;
  border: 3px solid var(--field-color);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--field-color) 30%, transparent), transparent 58%),
    rgba(7, 10, 18, .97);
  box-shadow: 0 0 28px color-mix(in srgb, var(--field-color) 40%, transparent);
  cursor: pointer;
  pointer-events: auto;
  text-align: center;
}

.library-person-card > * {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.library-person-card strong {
  display: block;
  padding-top: 3px;
  color: #f4d990;
  font: 700 29px/1.12 Georgia, serif;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.library-person-card--long-name strong {
  font-size: 23px;
}

.library-person-card--very-long-name strong {
  font-size: 19px;
}

.library-person-card span {
  display: block;
  margin-top: 10px;
  color: #c9c5bc;
  font: 600 17px/1.16 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  hyphens: auto;
}

.library-person-card--long-tradition span {
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.12;
}

.library-person-card--very-long-tradition span {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.08;
}

.library-person-card--compact {
  padding: 9px 11px 8px;
}

.library-person-card--compact strong {
  padding-top: 0;
  font-size: 24px;
  line-height: 1.06;
}

.library-person-card--compact span {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.08;
}

.library-person-card--compact small {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.08;
}

.library-person-card--very-compact {
  padding: 7px 9px 6px;
}

.library-person-card--very-compact strong {
  font-size: 21px;
  line-height: 1.02;
}

.library-person-card--very-compact span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.04;
}

.library-person-card--very-compact small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.04;
}

.library-person-card small {
  display: block;
  margin-top: 9px;
  color: #aba69d;
  font: 600 17px/1.16 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-threshold-board {
  width: 900px;
  min-height: 300px;
  padding: 43px 48px;
  color: #efe5d2;
  border: 4px solid #d9b96e;
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 0%, rgba(217, 185, 110, .24), transparent 55%),
    rgba(7, 9, 18, .97);
  box-shadow: inset 0 0 32px rgba(217, 185, 110, .24);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
}

.library-threshold-board span {
  display: block;
  color: #c7bdab;
  font: 500 24px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-threshold-board strong {
  display: block;
  margin-top: 26px;
  color: #f1d180;
  font: 700 54px/1.08 Georgia, serif;
}

.library-register-board {
  border-color: #b99248;
}

.library-threshold-wayfinder {
  box-sizing: border-box;
  width: 430px;
  min-height: 132px;
  padding: 25px 28px;
  color: #ffe4a0;
  border: 4px solid #dbad54;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 18%, rgba(242, 181, 78, .36), transparent 48%),
    rgba(48, 28, 21, .96);
  box-shadow: inset 0 0 32px rgba(235, 161, 64, .38);
  font: 700 34px/1.12 Georgia, serif;
  text-align: center;
}

.library-greek-links {
  width: 880px;
  padding: 28px 30px 32px;
  color: #f0d68e;
  border: 3px solid #c6a15c;
  background: rgba(12, 10, 17, .96);
  box-shadow: inset 0 0 30px rgba(217, 185, 110, .22);
  text-align: left;
}

.library-greek-links header {
  padding: 0 4px 20px;
  border-bottom: 1px solid rgba(218, 183, 102, .44);
}

.library-greek-links header strong,
.library-greek-links header span {
  display: block;
}

.library-greek-links header strong {
  font: 700 34px/1.1 Georgia, serif;
}

.library-greek-links header span {
  margin-top: 9px;
  color: #cbbf9f;
  font: 650 17px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-greek-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.library-greek-boards button {
  min-height: 178px;
  padding: 18px 16px;
  color: #f2e8d2;
  border: 2px solid #d4ad58;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 181, 88, .25), transparent 68%),
    rgba(27, 21, 24, .98);
  box-shadow: 0 0 22px rgba(217, 185, 110, .27);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
}

.library-greek-boards b,
.library-greek-boards span {
  display: block;
}

.library-greek-boards b {
  color: #f2d47f;
  font: 700 24px/1.12 Georgia, serif;
}

.library-greek-boards span {
  margin-top: 12px;
  color: #c9c0ae;
  font: 600 16px/1.36 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-greek-boards em {
  display: block;
  margin-top: 15px;
  color: #f2d47f;
  font: 800 15px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-style: normal;
  letter-spacing: .45px;
}

.library-greek-boards button:hover,
.library-greek-boards button:focus-visible,
.library-greek-boards button.is-selected {
  color: #fff4cc;
  outline: 4px solid #fff2bd;
  outline-offset: 4px;
  filter: brightness(1.18);
  box-shadow: 0 0 34px rgba(242, 210, 121, .66);
}

.library-beacon-hint {
  position: fixed;
  z-index: 10020;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 18px;
  box-sizing: border-box;
  width: min(760px, calc(100vw - 28px));
  min-height: 64px;
  padding: 12px 14px 12px 22px;
  color: #f5ead2;
  border: 2px solid #d9b96e;
  border-radius: 13px;
  background: rgba(12, 13, 21, .96);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .58), 0 0 28px rgba(217, 185, 110, .4);
  font: 700 19px/1.32 Georgia, serif;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity .24s ease, transform .24s ease;
}

.library-beacon-hint[hidden] { display: none; }

.library-beacon-hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.library-beacon-hint-text { flex: 1 1 auto; }

.library-beacon-hint button {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: #2b200d;
  border: 2px solid #ffe39a;
  border-radius: 50%;
  background: linear-gradient(#f2d986, #b98d35);
  font: 800 26px/1 sans-serif;
  cursor: pointer;
}

.library-beacon-hint button:hover,
.library-beacon-hint button:focus-visible {
  outline: 4px solid #fff2bd;
  outline-offset: 3px;
  box-shadow: 0 0 24px rgba(242, 210, 121, .82);
}

@media (prefers-reduced-motion: reduce) {
  .library-beacon-hint { transition: none; }
}

.library-person-card:hover,
.library-person-card:focus-visible,
.library-threshold-board:hover,
.library-threshold-board:focus-visible {
  outline: 5px solid #f4d984;
  outline-offset: 7px;
  filter: brightness(1.12);
  box-shadow: 0 0 44px rgba(239, 199, 93, .68);
}

.west-wing-reader-navigation {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(116, 80, 28, .35);
}

.west-wing-reader-navigation button,
.library-register-control button,
.library-overview-list button {
  border: 1px solid rgba(111, 76, 24, .68);
  border-radius: 7px;
  color: #2d210f;
  background: linear-gradient(#f2d986, #cda64b);
  font: 800 15px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.west-wing-reader-navigation button {
  min-height: 48px;
  padding: 10px 18px;
}

.library-overview-list {
  display: grid;
  gap: 8px;
}

.library-overview-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 13px;
  color: #3b2d18;
  background: rgba(246, 232, 196, .74);
  text-align: left;
}

.library-overview-list b { font-size: 20px; }
.library-overview-list small { text-align: right; }

.library-register-control {
  display: grid;
  gap: 14px;
}

.library-register-control label {
  color: #6f511f;
  font-weight: 700;
}

.library-register-control select {
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  color: #302415;
  border: 1px solid #8d6b32;
  border-radius: 6px;
  background: #fffaf0;
  font: 18px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.library-register-control button {
  justify-self: start;
  min-height: 50px;
  padding: 10px 18px;
}

.library-register-control button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .55;
}

.west-wing-reader button:focus-visible,
.west-wing-reader select:focus-visible {
  outline: 3px solid #4b7fa3;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .west-wing-reader-navigation { flex-direction: column; }
  .west-wing-reader-navigation button { width: 100%; }
}
