/* Power Capital — Corporate Network: styles copied from the current power-capital.html. The board now sits inside the site
   layout: body rules moved to .board-app, and the header, board, hint, legend 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: 8500px;
      height: 8500px;
      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 {
      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);
    }

     /* 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;
    }

    /* Email card */
    .email-card {
      width: 260px;
      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: 7px 11px 6px;
      border-bottom: 2px solid #4a2a08;
    }

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

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

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

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

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

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

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

    /* Note */
    .note-images {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-image-wrapper {
  position: relative;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.note-image-thumb {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s;
}

.note-image-wrapper:hover .note-image-thumb {
  transform: scale(1.03);
}

.note-image-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 6px 10px;
  font-size: 0.85em;
  text-align: center;
}

.note-other-attachments {
  margin-top: 12px;
}

.note-attachment-line {
  margin-bottom: 6px;
}

.note-attach-tag {
  cursor: pointer;
  color: #0066cc;
}

.note-link-tag {
  color: #0066cc;
  text-decoration: none;
}

.note-link-tag:hover {
  text-decoration: underline;
}

    .note-card {
      width: 210px;
      min-height: 75px;
      padding: 14px 12px 12px;
      font-family: 'Special Elite', cursive;
      font-size: 10.5px;
      color: #1a1008;
      line-height: 1.6;
      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: 28px;
      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: 8px;
      letter-spacing: 2px;
      color: #cc2200;
      text-transform: uppercase;
      display: block;
      margin-bottom: 4px;
    }

    /* Doc */
    .doc-card {
      width: 245px;
      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: 9px;
      letter-spacing: 2px;
      color: #fff;
      text-transform: uppercase;
    }

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

    .doc-stamp {
      position: absolute;
      bottom: 10px;
      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;
    }

    /* Lightbox */
    #lightbox {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 9000;
      background: rgba(0, 0, 0, .92);
      align-items: center;
      justify-content: center;
    }

    #lightbox.open {
      display: flex;
    }

    #lb-close {
      position: fixed;
      top: 14px;
      right: 18px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: #1a1008;
      border: 1px solid #5a3a18;
      color: #cc9944;
      font-size: 20px;
      line-height: 36px;
      text-align: center;
      cursor: pointer;
      z-index: 9010;
      transition: background .15s;
    }

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

    #lb-title {
      position: fixed;
      top: 16px;
      left: 50%;
      transform: translateX(-50%);
      font-family: 'Oswald', sans-serif;
      font-size: 13px;
      letter-spacing: 3px;
      color: #cc9944;
      text-transform: uppercase;
      pointer-events: none;
      white-space: nowrap;
      z-index: 9005;
    }

    #lb-content {
      width: 92vw;
      height: 88vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: 8px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    }

    #lb-content img {
      flex: 1;
      min-height: 0;
      width: 100%;
      object-fit: contain;
    }

    #lb-content iframe {
      flex: 1;
      min-height: 0;
      width: 100%;
      border: none;
      margin-top: 20px;
    }

    /* Legend */
    #legend {
      position: absolute;
      bottom: 30px;
      left: 16px;
      background: #0d0a04cc;
      border: 1px solid #2a1808;
      padding: 10px 14px;
      z-index: 1000;
      font-size: 9px;
      letter-spacing: 1px;
      color: #fff;
    }

    #legend div {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 5px;
    }

    #legend div:last-child {
      margin-bottom: 0;
    }

    .leg {
      width: 28px;
      height: 2px;
      display: inline-block;
    }

    #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; }
}

/* Phones: the hint bar wraps onto several lines, so lift the legend clear of it */
@media (max-width: 560px) {
  #legend { bottom: 64px; }
}
