.game:has(#evidenceDesk.open) #guide { visibility: hidden; }
#guide .hm-actions .evidence-launch { background: #71432b; color: #fffbf1; }

.room.evidence-desk.open {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
  background: #f4e3c3 repeating-linear-gradient(90deg, transparent 0 64px, #ead5b0 64px 66px);
  color: #352e27;
}
.evidence-desk .rm-top { justify-content: space-between; gap: 8px; }
.evidence-desk #ev-title {
  flex: 0 1 auto;
  margin: 0;
  padding: 3px 12px 4px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fffaf0;
  font: 700 clamp(24px, 4.3vw, 32px)/1 Caveat, cursive;
}
.evidence-desk .rm-top button {
  display: inline-grid;
  align-content: center;
  min-height: 44px;
  text-align: center;
}
.evidence-desk .rm-scene { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.evidence-desk .rm-main {
  max-width: 1010px;
  justify-self: center;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  height: 100%;
  align-content: stretch;
}
.evidence-desk .ev-say {
  display: block;
  text-align: left;
  font: 500 15px/1.35 DM, sans-serif;
}
.ev-say strong { display: block; margin-bottom: 3px; }
.ev-explain { margin: 0; }
.evidence-desk .ev-board {
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  align-content: start;
}
.ev-desk {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: 17px;
  align-items: start;
  text-align: left;
}
.ev-notes { position: sticky; top: 0; display: grid; gap: 12px; padding: 8px 3px; }
.ev-sticky {
  display: grid;
  place-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 59px;
  padding: 8px 6px;
  border: 1.5px solid #3a363355;
  border-radius: 3px;
  background: var(--paper);
  text-align: center;
  color: #3a3633;
  transform: rotate(var(--tilt));
  box-shadow: 2px 4px 0 #3a363322;
  cursor: pointer;
}
.ev-sticky strong { font: 700 23px/1.05 Caveat, cursive; }
.ev-sticky small { color: #5d534c; font: 650 13px/1.1 DM, sans-serif; }
.ev-sticky:hover { transform: rotate(0); }
.ev-sticky[aria-pressed="true"] { transform: rotate(0); border: 2px solid #3a3633; box-shadow: 3px 5px 0 #3a363333; }
.ev-page {
  min-width: 0;
  padding: 12px 18px 15px 38px;
  border: 2px solid #3a3633;
  border-radius: 7px;
  background: #fffdf6;
  background-image: linear-gradient(90deg, transparent 24px, #efaeae 24px 26px, transparent 26px),
    repeating-linear-gradient(transparent 0 29px, #deeaf2 29px 30px);
  box-shadow: 0 4px 0 #3a363322;
}
#ev-note-title { margin: 0 0 6px; font: 700 clamp(25px, 4vw, 33px)/1.08 Caveat, cursive; }
.ev-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ev-compare section {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ded4be;
  border-radius: 8px;
  background: #fffcf1e8;
}
.ev-field { margin: 0; color: #635344; font: 700 12px/1.25 DM, sans-serif; }
.ev-line { margin: 4px 0 0; color: #302a25; font: 500 17px/1.4 DM, sans-serif; overflow-wrap: anywhere; }
.ev-line mark {
  padding: 0 1px;
  background: linear-gradient(transparent 37%, #ffe066 37% 90%, transparent 90%);
  color: inherit;
}
.ev-draft.removed mark {
  text-decoration: line-through;
  text-decoration-color: #ab3939;
  text-decoration-thickness: 2px;
}
.ev-compare .ev-checked { border-color: #cdd7dc; background: #fcfdffe8; }
.ev-checked .ev-line, .ev-ink-note {
  margin: 4px 0 0;
  color: #244f86;
  font: 700 23px/1.15 Caveat, cursive;
}
.ev-checked mark { background: linear-gradient(transparent 49%, #c5e4aa 49% 93%, transparent 93%); }
.ev-ink-note { color: #933b32; }
.ev-original {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(166px, .55fr);
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1.5px dashed #b8a989;
  align-items: start;
}
.ev-original h3 { grid-column: 1 / -1; margin: 0; font: 700 16px/1.25 DM, sans-serif; }
.ev-card {
  grid-column: 1;
  margin: 0;
  padding: 6px 9px;
  border-left: 2px solid #a17748;
  background: #fff3da;
}
.ev-card p { margin: 0; font: 600 15px/1.35 DM, sans-serif; }
.ev-card cite { color: #65564e; font: 650 13px/1.4 DM, sans-serif; }
.ev-reading { grid-column: 1; margin: 0; color: #403934; font: 500 15px/1.45 DM, sans-serif; }
.ev-photo {
  position: relative;
  grid-column: 2;
  grid-row: 2 / span 2;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 6px 4px;
  border: 1.5px solid #3a363355;
  border-radius: 3px;
  background: #fff;
  color: #403934;
  box-shadow: 2px 4px 0 #3a363322;
  text-align: center;
  transform: rotate(1deg);
  cursor: zoom-in;
}
.ev-photo::before {
  position: absolute;
  top: -7px;
  left: calc(50% - 22px);
  width: 44px;
  height: 13px;
  background: #e5bf57aa;
  transform: rotate(-4deg);
  content: '';
}
.ev-photo img { display: block; width: 100%; height: auto; }
.ev-photo span { display: block; margin-top: 4px; font: 700 14px/1.25 DM, sans-serif; }
.ev-links, .ev-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-links { grid-column: 1 / -1; }
.ev-link { display: inline-grid; align-content: center; min-height: 44px; font-size: 13px; text-align: center; }
.ev-credit { margin-top: 10px; color: #5c5045; font: 500 13px/1.35 DM, sans-serif; text-align: left; }
.ev-credit .ev-link { min-height: 36px; }
.evidence-desk :focus-visible { outline: 2px solid #18719e; outline-offset: 2px; }
.ev-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.ev-zoom {
  width: min(960px, calc(100% - 24px));
  max-height: 88dvh;
  padding: 12px;
  border: 2px solid #3a3633;
  border-radius: 14px;
  background: #fffaf0;
  color: #352e27;
  overflow: auto;
  box-shadow: 0 6px 18px #0004;
}
.ev-zoom::backdrop { background: #26201ccd; }
.ev-zoom-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ev-zoom-top h2 { margin: 0; font: 700 clamp(21px, 4vw, 30px)/1.12 Caveat, cursive; }
.ev-zoom-top button { min-height: 44px; white-space: nowrap; }
.ev-zoom-note { display: none; color: #5c5045; font: 600 13px/1.35 DM, sans-serif; }
.ev-zoom-image {
  max-height: 56dvh;
  margin-bottom: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  border: 1px solid #d6cbb4;
  background: #fff;
}
.ev-zoom-image img { display: block; width: 100%; min-width: 640px; height: auto; }

@media (max-width: 760px) {
  .ev-desk { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ev-notes { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding-top: 3px; }
  .ev-sticky strong { font-size: clamp(18px, 4vw, 21px); }
  .ev-sticky small { font-size: 12px; }
  .ev-page {
    padding: 10px 10px 12px 24px;
    background-image: linear-gradient(90deg, transparent 14px, #efaeae 14px 16px, transparent 16px),
      repeating-linear-gradient(transparent 0 29px, #deeaf2 29px 30px);
  }
  .ev-original { grid-template-columns: minmax(0, 1fr); }
  .ev-photo { grid-column: 1; grid-row: auto; width: min(240px, 98%); justify-self: center; }
}
@media (max-width: 470px) {
  .ev-compare { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  #ev-note-title { margin-bottom: 4px; }
  .ev-sticky small { font-size: 11px; }
  .ev-photo { margin-top: 4px; }
}
@media (max-width: 690px) {
  .ev-zoom-note { display: block; margin: 0 0 7px; }
}
@media (max-height: 400px) {
  .room.evidence-desk.open { gap: 4px; padding-block: 5px; }
  .evidence-desk .rm-main { gap: 5px; }
  .evidence-desk .ev-say { font-size: 13px; }
}
