/* Evidence Board: styles copied from the current evidence.html. The board now sits inside the site
   layout: body rules moved to .board-app, and the header, board, hint bars are positioned
   inside it instead of fixed to the window. */
    @import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Share+Tech+Mono&family=Oswald:wght@400;700&display=swap');

    .board-app {
      position: relative;
      height: calc(100svh - var(--board-offset, 80px));
      min-height: 460px;
      overflow: hidden;
      background: #111008;
      font-family: 'Share Tech Mono', monospace;
    }

    #header {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 44px;
      background: #0d0a04;
      border-bottom: 2px solid #251508;
      display: flex;
      align-items: center;
      padding: 0 16px;
      z-index: 1000;
      gap: 10px;
    }

    #header h1 {
      font-family: 'Oswald', sans-serif;
      font-size: 15px;
      letter-spacing: 3px;
      color: #cc9944;
      text-transform: uppercase;
    }

    .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #cc2200;
      box-shadow: 0 0 6px #cc2200;
      animation: pulse 2s infinite;
      flex-shrink: 0;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: 0.25
      }
    }

    #zoom-pill {
      margin-left: auto;
      background: #1a1008;
      border: 1px solid #2a1808;
      color: #5a3a18;
      font-size: 10px;
      letter-spacing: 1px;
      padding: 3px 10px;
    }

    #wrap {
      position: absolute;
      top: 44px;
      left: 0;
      right: 0;
      bottom: 0;
      overflow: hidden;
      cursor: grab;
      background-color: #c8955a;
      background-image:
        radial-gradient(ellipse at 25% 25%, rgba(255, 210, 130, .2) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(80, 40, 0, .22) 0%, transparent 55%);
    }

    #wrap::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: radial-gradient(circle, rgba(110, 60, 10, .18) 1px, transparent 1px);
      background-size: 20px 20px;
      pointer-events: none;
      z-index: 0;
    }

    #wrap.grabbing {
      cursor: grabbing;
    }

    #board {
      position: absolute;
      top: 0;
      left: 0;
      width: 4000px;
      height: 3000px;
      transform-origin: 0 0;
      background: none;
    }

    #svg-strings {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 50;
      overflow: visible;
    }

    .card {
      position: absolute;
      z-index: 10;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Pin */
    .pin {
      position: absolute;
      top: -11px;
      left: 50%;
      transform: translateX(-50%);
      width: 18px;
      height: 18px;
      border-radius: 50%;
      z-index: 60;
      pointer-events: none;
    }

    .pin::after {
      content: '';
      position: absolute;
      bottom: -9px;
      left: 50%;
      transform: translateX(-50%);
      width: 3px;
      height: 10px;
      background: linear-gradient(to bottom, #999, #444);
      border-radius: 0 0 2px 2px;
    }

    .pin.red {
      background: radial-gradient(circle at 35% 32%, #ff7055, #9a1100);
      box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
    }

    .pin.yellow {
      background: radial-gradient(circle at 35% 32%, #ffe87a, #aa8800);
      box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
    }

    .pin.blue {
      background: radial-gradient(circle at 35% 32%, #77aaff, #0033aa);
      box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
    }

    .pin.green {
      background: radial-gradient(circle at 35% 32%, #77ddaa, #006633);
      box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
    }

    /* Mini pins for attachments - your exact style, scaled 60% */
    .attach-pin {
      position: static !important;
      /* Inline, not absolute */
      display: inline-block;
      width: 11px;
      height: 11px;
      /* 18px * 0.6 */
      border-radius: 50%;
      margin-right: 3px;
      vertical-align: middle;
      flex-shrink: 0;
    }

    .attach-pin::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 50%;
      transform: translateX(-50%);
      width: 2px;
      height: 6px;
      /* Scaled */
      background: linear-gradient(to bottom, #999, #444);
      border-radius: 0 0 1px 1px;
    }

    .attach-pin.red {
      background: radial-gradient(circle at 35% 32%, #ff7055, #9a1100);
      box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }

    .attach-pin.yellow {
      background: radial-gradient(circle at 35% 32%, #ffe87a, #aa8800);
      box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    }

    .attach-pin.blue {
      background: radial-gradient(circle at 35% 32%, #77aaff, #0033aa);
      box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    }

    .attach-pin.green {
      background: radial-gradient(circle at 35% 32%, #77ddaa, #006633);
      box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    }

    .attach-tag {
      display: inline-flex !important;
      align-items: center;
      gap: 0;
      vertical-align: middle;
    }


    /* Email */
    .email-card {
      width: 310px;
      background: #f7f2e4;
      border: 1px solid #d8c8a8;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, .22), 5px 7px 18px rgba(0, 0, 0, .3);
    }

    .email-head {
      background: #1a1008;
      padding: 8px 12px 7px;
      border-bottom: 2px solid #4a2a08;
    }

    .email-subject {
      font-family: 'Oswald', sans-serif;
      font-size: 12px;
      letter-spacing: 1.5px;
      color: #ffcc77;
      text-transform: uppercase;
    }

    .email-meta {
      font-size: 9px;
      color: #886633;
      margin-top: 3px;
      letter-spacing: .5px;
    }

    .email-body {
      padding: 11px 12px 10px;
      font-family: 'Special Elite', cursive;
      font-size: 11px;
      color: #1a1008;
      line-height: 1.65;
    }

    .email-body .hl {
      background: #ffe066;
      padding: 1px 2px;
    }

    .email-foot {
      background: #ede5cf;
      border-top: 1px solid #d0c0a0;
      padding: 5px 12px;
      display: flex;
      justify-content: space-between;
      font-size: 9px;
      color: #7a6040;
    }

    .attach-tag {
      display: inline-block;
      margin-top: 6px;
      background: #1a1008;
      color: #ffcc77;
      font-size: 9px;
      padding: 2px 7px;
      letter-spacing: 1px;
    }

    .attach-tag.openable {
      cursor: pointer;
      transition: background .15s, color .15s;
    }

    .attach-tag.openable:hover {
      background: #cc2200;
      color: #fff;
    }

    /* Photo */
    .photo-card {
      background: #fff;
      padding: 7px 7px 0;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, .25), 5px 7px 20px rgba(0, 0, 0, .35);
    }

    .photo-img {
      width: 100%;
      /* Changed: fills card */
      /* height: calc(100% - 38px); */
      /* Subtracts padding(7px top)+caption(approx 31px padding+font) */
      background: #555;
      overflow: hidden;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .photo-img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .photo-img.has-img {
      cursor: zoom-in;
    }

    .photo-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      color: rgba(255, 255, 255, .45);
      font-size: 9px;
      letter-spacing: 2px;
      text-transform: uppercase;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #444, #333);
    }

    .photo-caption {
      padding: 7px 4px 8px;
      font-family: 'Special Elite', cursive;
      font-size: 10px;
      color: #333;
      text-align: center;
      background: #fff;
    }

    /* Note */
    .note-card {
      width: 215px;
      min-height: 115px;
      padding: 15px 13px 13px;
      font-family: 'Special Elite', cursive;
      font-size: 11.5px;
      color: #1a1008;
      line-height: 1.7;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, .22), 5px 7px 18px rgba(0, 0, 0, .28);
      position: relative;
    }

    .note-card::before {
      content: '';
      position: absolute;
      left: 30px;
      top: 0;
      bottom: 0;
      width: 1px;
      background: rgba(200, 80, 80, .35);
    }

    .note-card.yellow {
      background: #fffabb;
      border: 1px solid #e0d870;
    }

    .note-card.white {
      background: #f8f4ea;
      border: 1px solid #d8d0b8;
    }

    .note-card.blue {
      background: #ddeeff;
      border: 1px solid #99bbdd;
    }

    .note-card.pink {
      background: #ffe6ee;
      border: 1px solid #dda8b8;
    }

    .note-label {
      font-family: 'Oswald', sans-serif;
      font-size: 9px;
      letter-spacing: 2.5px;
      color: #cc2200;
      text-transform: uppercase;
      display: block;
      margin-bottom: 5px;
    }

    .note-attachments {
      margin-top: 8px;
      border-top: 1px dashed rgba(0, 0, 0, .15);
      padding-top: 7px;
    }

    .note-attach-tag {
      display: inline-block;
      margin: 4px 4px 0 0;
      background: #1a1008;
      color: #ffcc77;
      font-family: 'Share Tech Mono', monospace;
      font-size: 9px;
      padding: 3px 8px;
      letter-spacing: 1px;
      cursor: pointer;
      border: 1px solid #3a2510;
      transition: background .15s, color .15s;
    }

    .note-attach-tag:hover {
      background: #cc2200;
      border-color: #ff4422;
      color: #fff;
    }

    /* Document */
    .doc-card {
      width: 235px;
      background: #f5f0e0;
      border: 1px solid #c8b898;
      box-shadow: 3px 4px 0 rgba(0, 0, 0, .22), 5px 7px 18px rgba(0, 0, 0, .3);
      position: relative;
    }

    .doc-card::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      border-style: solid;
      border-width: 0 26px 26px 0;
      border-color: transparent #e0d8c0 transparent transparent;
    }

    .doc-head {
      background: #aa1100;
      padding: 7px 12px;
      font-family: 'Oswald', sans-serif;
      font-size: 10px;
      letter-spacing: 2px;
      color: #fff;
      text-transform: uppercase;
    }

    .doc-body {
      padding: 11px 12px 10px;
      font-family: 'Special Elite', cursive;
      font-size: 10px;
      color: #1a1008;
      line-height: 1.75;
      white-space: pre-line;
    }

    .doc-body .redact {
      background: #111;
      color: #111;
      padding: 0 2px;
    }

    .doc-stamp {
      position: absolute;
      bottom: 36px;
      right: 10px;
      border: 3px solid rgba(170, 0, 0, .4);
      color: rgba(170, 0, 0, .4);
      font-family: 'Oswald', sans-serif;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 3px;
      padding: 2px 7px;
      transform: rotate(-12deg);
      pointer-events: none;
    }

    .doc-attach-btn {
      display: block;
      margin: 0 12px 10px;
      background: #1a1008;
      color: #ffcc77;
      font-family: 'Share Tech Mono', monospace;
      font-size: 9px;
      padding: 4px 10px;
      letter-spacing: 1px;
      cursor: pointer;
      border: 1px solid #3a2510;
      text-align: center;
      transition: background .15s;
    }

    .doc-attach-btn:hover {
      background: #cc2200;
      border-color: #ff4422;
      color: #fff;
    }

    /* Modal */
    #pdf-lightbox {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.8);
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    #pdf-lightbox.active {
      display: flex;
    }

    .pdf-container {
      position: relative;
      width: 90%;
      height: 90%;
      background: #fff;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .pdf-container iframe {
      width: 100%;
      height: 100%;
    }

    #pdf-close {
      position: absolute;
      top: 10px;
      right: 10px;
      font-size: 2rem;
      color: black;
      cursor: pointer;
      z-index: 10;
      background: rgba(255, 255, 255, 0.8);
      padding: 2px 6px;
      border-radius: 4px;
    }

    /* Letter thumbnails only */
    .media-thumbnail.letter-thumbnail {
      width: 100%;
      height: 180px;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
      background: #f4f4f4;
      border-radius: 8px;
      position: relative;
    }

    .media-thumbnail.letter-thumbnail img {
      position: absolute;
      top: 50%;
      left: 50%;
      /* adjust for visual centering */
      transform: translate(-50%, -50%);
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }

    /* Lightbox */


    #lightbox {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      display: none;
      /* toggle with .open { display: flex; } */
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }

    #lightbox.open {
      display: flex;
    }

    /* #lb-content {
      width: 90vw;
      max-width: 1200px;
      height: 85vh;
      background: #fff;
      position: relative;
      overflow: hidden;
      border-radius: 8px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    } */

    #lb-title {
      padding: 12px 20px;
      background: #f5f5f5;
      border-bottom: 1px solid #ddd;
      font-size: 1.2em;
      text-align: center;
    }

    #lb-close {
      position: absolute;
      top: 0px;
      right: 20px;
      font-size: 2em;
      color: #fff;
      cursor: pointer;
      z-index: 10;
    }

    #lb-close:hover {
      background: #cc2200;
      border-color: #ff4422;
      color: #fff;
    }

#lb-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 40px 10px 16px;
  background: #1a1008;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: #cc9944;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

#lb-content {
  width: 92vw;
  height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    margin-top: 40px;
}

#lb-content img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
 
}

#lb-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  margin-top: 40px;
}

    /* Hint */
    #hint {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: #0d0a04;
      border-top: 1px solid #1a1208;
      padding: 5px 16px;
      font-size: 9px;
      letter-spacing: 1px;
      color: #3a2a10;
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }

    #hint span {
      color: #5a3a18;
    }
  
/* Site layout: the board height matches the site menu, and only the board itself blocks page
   scrolling (touch-action was on body), so a swipe on the title or hint bar still reaches the footer. */
#wrap { touch-action: none; }
@media (max-width: 560px) {
  .board-app { --board-offset: 69px; }
}
