:root {
  --ichor-seal-size: 54px;
  --ichor-seal-right: max(24px, env(safe-area-inset-right));
  --ichor-seal-bottom: max(24px, env(safe-area-inset-bottom));
}
.consult-seal {
  --seal-ink: #24251f;
  --seal-paper: #f6f0e4;
  --seal-metal: #b9a078;
  position: fixed;
  z-index: 23;
  right: var(--ichor-seal-right);
  bottom: calc(var(--ichor-seal-bottom) + var(--ichor-bottom-dock, 0px));
  width: var(--ichor-seal-size);
  height: var(--ichor-seal-size);
  margin: 0;
  color: var(--seal-paper);
  font-family: var(--ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif);
  line-height: 1.5;
}
.consult-seal, .consult-seal * { box-sizing: border-box; }
.consult-seal__button {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--seal-metal);
  border-radius: 50%;
  background: var(--seal-ink);
  box-shadow: inset 0 0 0 3px var(--seal-ink), inset 0 0 0 4px #837550, 0 2px 10px #1a181632;
  color: #ecddbb;
  place-items: center;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.consult-seal__button::-webkit-details-marker { display: none; }
.consult-seal .consult-seal__button::after { content: none; }
.consult-seal__cross, .consult-seal[open] .consult-seal__mark { display: none; }
.consult-seal[open] .consult-seal__cross { display: block; }
.consult-seal__button:focus-visible { outline: 2px solid #fdf9ee; outline-offset: 2px; box-shadow: 0 0 0 5px #38342c; }
.consult-seal__label, .consult-seal__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .consult-seal:not([open]) .consult-seal__button:is(:hover,:focus-visible) .consult-seal__label {
    right: calc(100% + 9px);
    width: max-content;
    height: auto;
    padding: 5px 9px;
    border: 1px solid #817653;
    border-radius: 2px;
    clip-path: none;
    background: var(--seal-ink);
    color: var(--seal-paper);
    font: 400 12px/1.4 var(--ui, sans-serif);
  }
}
.consult-seal__items {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  width: min(17rem, calc(100vw - var(--ichor-seal-right) - max(12px, env(safe-area-inset-left))));
  max-height: calc(100vh - var(--ichor-seal-size) - var(--ichor-seal-bottom) - 20px);
  max-height: calc(100dvh - var(--ichor-seal-size) - var(--ichor-seal-bottom) - var(--ichor-bottom-dock, 0px) - env(safe-area-inset-top) - 20px);
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 3px 14px;
  border: 1px solid #867a60;
  border-radius: 3px;
  list-style: none;
  background: var(--seal-paper);
  color: var(--seal-ink);
  box-shadow: 0 4px 22px #1a181622;
}
.consult-seal__items li { margin: 0; padding: 0; }
.consult-seal__items li + li { border-top: 1px solid #d8d0bd; }
.consult-seal__items a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 11px;
  padding: 7px 2px;
  color: inherit;
  font: 500 14px/1.45 var(--ui, "Malgun Gothic", sans-serif);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.consult-seal__items a:focus-visible { outline: 2px solid #73603a; outline-offset: -2px; }
.consult-seal__items a:hover { color: #624c2b; }
.consult-seal__channel { width: 22px; height: 22px; flex: none; fill: none; stroke: #6f5b3b; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.consult-seal__out { margin-left: auto; color: #776344; font-size: 13px; }
.consult-seal bdi { display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; }
.consult-seal__langs > [lang] { display: none; }
.consult-seal__langs > [lang="ko"] { display: inline; }
html:is(:lang(en),:lang(ja),:lang(zh),:lang(fr)) .consult-seal__langs > [lang="ko"] { display: none; }
html:lang(en) .consult-seal__langs > [lang="en"],
html:lang(ja) .consult-seal__langs > [lang="ja"],
html:lang(zh) .consult-seal__langs > [lang="zh-Hans"],
html:lang(fr) .consult-seal__langs > [lang="fr"] { display: inline; }
@media (prefers-reduced-motion: no-preference) {
  .consult-seal[open] .consult-seal__items { animation: ichor-seal-in .16s ease-out both; }
  @keyframes ichor-seal-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
/* The old contact container still holds the home colophon and its source credits. */
.ichor-contact-footer { background: #191c18; }
.ichor-contact-footer > .colophon { padding-right: max(6%, calc(var(--ichor-seal-right) + var(--ichor-seal-size) + 12px)); }
.ichor-contact-footer:not(:has(> *)) { margin: 0; padding: 0; border: 0; }
html { scroll-padding-bottom: calc(var(--ichor-seal-size) + var(--ichor-seal-bottom) + var(--ichor-bottom-dock, 0px) + 6px); }
@media (max-width: 900px) {
  :root {
    --ichor-seal-size: 48px;
    --ichor-seal-right: max(12px, env(safe-area-inset-right));
    --ichor-seal-bottom: max(12px, env(safe-area-inset-bottom));
    --ichor-seal-gutter: max(0px, calc(var(--ichor-seal-right) + var(--ichor-seal-size) + 6px - max(16px,5.5vw)));
  }
  .consult-seal__mark { width: 31px; height: 31px; }
  .leaf-ledger-head, .leaf-panel dd, .leaf-info-column dd, .ev-information dd, .group thead th:last-child, .group td, [data-consult-rail] {
    padding-inline-end: var(--ichor-seal-gutter);
  }
  .book-links a:last-child { padding-inline-end: max(8px, var(--ichor-seal-gutter)); }
  .ichor-contact-footer > .colophon { padding-right: max(6%, env(safe-area-inset-right)); padding-bottom: calc(var(--ichor-seal-size) + var(--ichor-seal-bottom) + 12px); }
}
@media (forced-colors: active) {
  .consult-seal__button, .consult-seal__items { border: 2px solid ButtonText; }
  .consult-seal__channel { stroke: LinkText; }
}
@media print { .consult-seal { display: none; } }
