/* Case papers (witness statements & letters) shown in the lore theater */

.lore-evidence {
  display: none;
  margin: 2.25rem 0 0;
  max-width: 36rem;
  width: 100%;
}
.lore-evidence.is-on {
  display: block;
  opacity: 0;
  transform: translateY(1.1rem);
  filter: blur(8px);
  animation: lore-rise 1s cubic-bezier(.16, 1, .3, 1) forwards;
}
.lore-evidence-kicker {
  margin: 0 0 .85rem;
  color: var(--crimson);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.lore-evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.lore-evidence-open {
  display: grid;
  gap: .15rem;
  width: 100%;
  padding: .75rem .9rem;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(12, 8, 8, .42);
  color: #f3ece4;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.lore-evidence-open:hover,
.lore-evidence-open:focus-visible {
  border-color: var(--crimson);
  background: rgba(20, 10, 10, .55);
  outline: none;
}
.lore-evidence-label {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}
.lore-evidence-meta {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (min-width: 861px) {
  .lore-evidence {
    grid-column: 2;
    max-width: none;
    justify-self: stretch;
  }
}

/* Dialog shell */
dialog.lore-doc-dialog {
  width: min(960px, calc(100vw - 1.25rem));
  max-height: calc(100vh - 1.25rem);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2b2a33;
  overflow: visible;
}
.lore-doc-dialog::backdrop {
  background: rgba(5, 3, 3, .92);
}
.lore-doc-dialog-sheet {
  position: relative;
  max-height: calc(100vh - 1.25rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  scrollbar-width: thin;
  scrollbar-color: #6b5840 transparent;
}
.lore-doc-dialog-sheet::-webkit-scrollbar {
  width: 8px;
}
.lore-doc-dialog-sheet::-webkit-scrollbar-track {
  background: transparent;
}
.lore-doc-dialog-sheet::-webkit-scrollbar-thumb {
  background: #6b5840;
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
.lore-doc-dialog-sheet::-webkit-scrollbar-thumb:hover {
  background: #564532;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.lore-doc-dialog-close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 1px solid #3a1515;
  background: rgba(12, 8, 8, .85);
  color: #f3ece4;
  cursor: pointer;
}
.lore-doc-dialog-close svg {
  width: 16px;
  height: 16px;
}
.lore-doc-dialog-close:hover,
.lore-doc-dialog-close:focus-visible {
  border-color: var(--crimson);
  color: #fff;
  outline: none;
}
.lore-doc-panel[hidden] {
  display: none !important;
}

/* Sheet */
.lore-doc-sheet {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: 3.625rem 4rem 4.5rem;
  background: #ece3cf;
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(150, 120, 70, .13), transparent 55%),
    radial-gradient(ellipse at 88% 92%, rgba(140, 110, 60, .15), transparent 55%),
    radial-gradient(ellipse at 70% 30%, rgba(120, 95, 50, .07), transparent 40%);
  color: #2b2a33;
}
.lore-doc-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent 32.5%, rgba(90, 70, 40, .10) 33%, transparent 33.6%),
    linear-gradient(to bottom, transparent 66.5%, rgba(90, 70, 40, .09) 67%, transparent 67.6%),
    linear-gradient(to right, rgba(120, 95, 55, .16), transparent 4%),
    linear-gradient(to left, rgba(120, 95, 55, .18), transparent 5%),
    linear-gradient(to bottom, rgba(120, 95, 55, .14), transparent 3%),
    linear-gradient(to top, rgba(120, 95, 55, .16), transparent 4%);
}
.lore-doc-sheet > * {
  position: relative;
  z-index: 1;
}

.lore-doc-hdr,
.lore-doc-printed-head {
  text-align: center;
  font-family: "IM Fell English SC", "IM Fell English", serif;
  color: #111008;
  text-transform: uppercase;
}
.lore-doc-hdr .lore-doc-force,
.lore-doc-printed-head .lore-doc-force,
.lore-doc-printed-head .lore-doc-a,
.lore-doc-hdr .lore-doc-div,
.lore-doc-printed-head .lore-doc-div,
.lore-doc-printed-head .lore-doc-b,
.lore-doc-hdr .lore-doc-kind,
.lore-doc-printed-head .lore-doc-kind {
  margin: 0;
  color: #111008;
  text-transform: uppercase;
  font-style: normal;
  font-family: "IM Fell English SC", "IM Fell English", serif;
  line-height: 1.25;
}
.lore-doc-hdr .lore-doc-force,
.lore-doc-printed-head .lore-doc-force,
.lore-doc-printed-head .lore-doc-a {
  font-size: .95rem;
  letter-spacing: .18em;
}
.lore-doc-hdr .lore-doc-div,
.lore-doc-printed-head .lore-doc-div,
.lore-doc-printed-head .lore-doc-b {
  font-size: .78rem;
  letter-spacing: .2em;
  margin-top: .45rem;
}
.lore-doc-hdr .lore-doc-kind,
.lore-doc-printed-head .lore-doc-kind {
  font-size: .72rem;
  letter-spacing: .22em;
  margin-top: 1rem;
}
.lore-doc-rule {
  border-top: 1.4px solid #4a4436;
  margin: 1rem 0 0;
}

.lore-doc-reg {
  position: absolute;
  top: 3.375rem;
  right: 3.75rem;
  z-index: 2;
  border: 1.2px solid #55503f;
  padding: .56rem .94rem;
  font-family: "IM Fell English", serif;
  font-size: .875rem;
  text-align: center;
  line-height: 1.5;
  color: #3d3a30;
}
.lore-doc-reg b {
  display: block;
  font-weight: normal;
  font-family: "Petit Formal Script", cursive;
  font-size: 1.0625rem;
  color: #262b45;
}

.lore-doc-stamp {
  position: absolute;
  top: 8.25rem;
  right: 4.625rem;
  z-index: 2;
  transform: rotate(-8deg);
  border: 2.5px solid rgba(96, 60, 110, .52);
  border-radius: 3px;
  padding: .44rem .81rem;
  text-align: center;
  font-family: "IM Fell English SC", serif;
  color: rgba(96, 60, 110, .56);
  font-size: .8125rem;
  line-height: 1.35;
  letter-spacing: .09em;
}

.lore-doc-fields {
  margin: 1.875rem 0 0;
  font-family: "IM Fell English", serif;
  font-size: 1.03125rem;
}
.lore-doc-f {
  display: flex;
  align-items: baseline;
  margin-bottom: .6875rem;
}
.lore-doc-lbl {
  width: 8rem;
  flex: none;
  color: #423d31;
}
.lore-doc-val {
  flex: 1;
  border-bottom: 1px solid rgba(80, 70, 50, .45);
  font-family: "Petit Formal Script", cursive;
  font-size: 1.21875rem;
  color: #262b45;
  padding: 0 .25rem .125rem;
}

.lore-doc-meta-row {
  display: flex;
  justify-content: space-between;
  margin: 2.125rem 0 2.5rem;
  font-family: "Special Elite", monospace;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #2f2740;
}
.lore-doc-sheet.is-statement .lore-doc-meta-row {
  margin: 1.25rem 0 0;
  justify-content: flex-start;
}

/*
 * Ruled body: lines live ON the text block and share the same line-height,
 * so every baseline sits on a notebook rule (no absolute overlay drift).
 */
.lore-doc-body {
  --lore-doc-lh: 2.125rem;
  position: relative;
  margin: 2.125rem 0 0;
  font-family: "Petit Formal Script", cursive;
  font-size: 1.28125rem;
  line-height: var(--lore-doc-lh);
  color: rgba(38, 43, 69, .82);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--lore-doc-lh) - 1px),
    rgba(90, 110, 140, .30) calc(var(--lore-doc-lh) - 1px),
    rgba(90, 110, 140, .30) var(--lore-doc-lh)
  );
  background-position: 0 0;
  background-attachment: local;
  background-repeat: repeat;
}
.lore-doc-body p {
  margin: 0 0 var(--lore-doc-lh);
  padding: 0;
  text-indent: 2.125rem;
  color: rgba(38, 43, 69, .82);
}
.lore-doc-body p:last-child {
  margin-bottom: 0;
}
.lore-doc-body p.lore-doc-tight {
  margin-bottom: 0;
}
.lore-doc-ul {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.lore-doc-margin-note {
  float: right;
  width: 11.875rem;
  margin: .375rem 0 .75rem 1.375rem;
  font-family: "Petit Formal Script", cursive;
  font-size: .96875rem;
  line-height: 1.5rem;
  color: rgba(38, 43, 69, .78);
  border-left: 1px solid rgba(80, 70, 50, .35);
  padding-left: .75rem;
  text-indent: 0;
}

.lore-doc-sig {
  margin: 2.875rem 0 0;
  font-family: "IM Fell English", serif;
  font-size: 1rem;
  clear: both;
}
.lore-doc-sig .lore-doc-line {
  margin-bottom: 1.25rem;
}
.lore-doc-sig .lore-doc-name {
  font-family: "Mrs Saint Delafield", cursive;
  font-size: 2.5rem;
  color: #1f2340;
  line-height: 1;
  margin-left: .625rem;
}
.lore-doc-sig .lore-doc-plain {
  font-family: "Petit Formal Script", cursive;
  font-size: 1.3125rem;
  color: #262b45;
}
.lore-doc-mark {
  font-family: "IM Fell English", serif;
  font-size: 2.125rem;
  color: #1f2340;
  margin: 0 .875rem;
}
.lore-doc-rank {
  font-family: "IM Fell English", serif;
  font-size: .9375rem;
  color: #5b5443;
}

.lore-doc-foot-note {
  margin: 2.5rem 0 0;
  transform: rotate(-1.3deg);
  font-family: "Petit Formal Script", cursive;
  font-size: 1.1875rem;
  color: #3a2018;
  border-top: 1px solid rgba(90, 60, 40, .3);
  padding-top: .625rem;
}

.lore-doc-letter {
  font-family: "Special Elite", monospace;
  font-size: 1.2rem;
  line-height: 2.15rem;
  color: #2a2238;
  letter-spacing: .01em;
}
.lore-doc-letter p {
  margin: 0 0 1.75rem;
}
.lore-doc-letter .lore-doc-fade {
  color: #3d3550;
}
.lore-doc-sheet.is-letter .lore-doc-sig {
  margin-top: 2.125rem;
}
.lore-doc-sheet.is-letter .lore-doc-sig .lore-doc-name {
  margin-left: 0;
  font-size: 2.75rem;
}
.lore-doc-commissioner {
  margin-top: .75rem;
  font-family: "Special Elite", monospace;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #2f2740;
}

@media (max-width: 720px) {
  .lore-doc-sheet {
    padding: 2.75rem 1.35rem 3rem;
  }
  .lore-doc-reg {
    top: 1.1rem;
    right: 1.1rem;
    font-size: .75rem;
    padding: .4rem .65rem;
  }
  .lore-doc-stamp {
    top: auto;
    bottom: 1.25rem;
    right: 1.25rem;
    font-size: .7rem;
  }
  .lore-doc-hdr .lore-doc-force,
  .lore-doc-printed-head .lore-doc-force,
  .lore-doc-printed-head .lore-doc-a {
    font-size: .88rem;
  }
  .lore-doc-hdr .lore-doc-div,
  .lore-doc-printed-head .lore-doc-div,
  .lore-doc-printed-head .lore-doc-b {
    font-size: .72rem;
  }
  .lore-doc-hdr .lore-doc-kind,
  .lore-doc-printed-head .lore-doc-kind {
    font-size: .68rem;
  }
  .lore-doc-body {
    --lore-doc-lh: 1.875rem;
    font-size: 1.1rem;
  }
  .lore-doc-letter {
    font-size: 1.08rem;
    line-height: 1.95rem;
  }
  .lore-doc-margin-note {
    float: none;
    width: auto;
    margin: 0 0 1rem;
  }
  .lore-doc-lbl {
    width: 5.5rem;
  }
}
