/* Section Mode screens. */
#section-leave {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 193, 74, 0.9);
  border-radius: 16px;
  background: rgba(28, 18, 8, 0.92);
  color: #ffe7bf;
  cursor: pointer;
  pointer-events: auto;
}

#section-leave i {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
}

#section-leave span {
  font: 700 11px "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#section-leave[hidden] { display: none; }
#section-veil {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.62)),
    radial-gradient(ellipse at center, transparent 34%, rgba(2, 3, 8, 0.2) 58%, rgba(1, 2, 6, 0.78) 100%);
  -webkit-mask-image: url("../backdrop/frame-hole.png?v=1");
  mask-image: url("../backdrop/frame-hole.png?v=1");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

#section-veil[hidden] { display: none; }

#section-board {
  position: fixed;
  z-index: 33;
  left: calc(8px + var(--frame-x) + env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  width: min(280px, calc(100vw - 84px - var(--frame-x) - env(safe-area-inset-left)));
  padding: 10px 10px 8px;
  border: 1px solid rgba(231, 238, 246, 0.18);
  border-radius: 10px;
  background: rgba(10, 14, 28, 0.72);
  color: #e7eef6;
  font: 12px/1.35 "IBM Plex Mono", ui-monospace, monospace;
  pointer-events: auto;
  overflow: hidden;
}

#section-board[hidden] { display: none; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(231, 238, 246, 0.62);
  font-size: 10px;
}

#section-exit {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 193, 74, 0.7);
  border-radius: 14px;
  background: rgba(20, 14, 8, 0.88);
  color: #ffe7bf;
  font: 700 11px "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

#section-name {
  margin: 4px 0 0;
  font: 600 18px/1.2 Sora, sans-serif;
  color: #fff;
}

#section-reading,
#section-meta,
.section-hint {
  margin: 4px 0 0;
  color: rgba(231, 238, 246, 0.78);
}

.section-hint {
  padding-top: 6px;
  color: rgba(231, 238, 246, 0.5);
  font-size: 10px;
}

.section-ships {
  margin: 8px 0 2px;
  color: rgba(231, 238, 246, 0.62);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#section-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  overflow: auto;
  min-height: 0;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(231, 238, 246, 0.16);
  border-radius: 8px;
  background: rgba(10, 14, 28, 0.42);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.section-row.on {
  border-color: rgba(198, 245, 106, 0.75);
  color: #f3ffe4;
}

.section-kind {
  flex: 0 0 auto;
  min-width: 52px;
  color: rgba(231, 238, 246, 0.55);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-body {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-row:has(.section-outpost) {
  flex-wrap: wrap;
  row-gap: 2px;
}

.section-outpost {
  flex: 1 0 100%;
  padding-left: 60px;
  overflow: hidden;
  color: var(--outpost, #c6f56a);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-outpost.ruins {
  color: rgba(231, 238, 246, 0.5);
  font-style: italic;
}

#section-charted {
  margin: 4px 0 0;
  color: #9fd8ff;
  font-size: 12px;
}

.section-tag {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 8, 15, 0.72);
  color: #d5deea;
  font: 600 11px "IBM Plex Mono", ui-monospace, monospace;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.section-tag.on,
.section-tag-star.on {
  color: #e9ffb0;
}

.section-tag-star {
  font-size: 13px;
  color: #fff;
}

#section-board,
.section-head,
#section-name,
#section-reading,
#section-meta,
.section-hint {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

@media (max-width: 520px) {
  #section-board {
    width: min(240px, calc(100vw - 72px - env(safe-area-inset-left)));
    font-size: 11px;
  }

  #section-name { font-size: 16px; }
}
