.clue-reader {
  border-color: #495a76;
  background: #1e293a;
}
.reader-heading,
.reader-heading h2,
.reader-actions {
  display: flex;
  align-items: center;
}
.reader-heading {
  justify-content: space-between;
  min-height: 24px;
}
.reader-heading h2 {
  margin: 0;
  gap: 8px;
  color: #edf2ff;
  font-size: 17px;
  letter-spacing: -0.35px;
}
.reader-heading i {
  color: #94caff;
}
#closeClue {
  font-size: 20px;
  line-height: 1;
  min-width: 30px;
  min-height: 30px;
  color: #c3d5eb;
}
.reader-copy {
  margin: 11px 0;
}
.reader-copy h3 {
  margin: 0 0 4px;
  color: #a8d0ff;
  font: 650 13px/1.35 var(--mono);
}
.reader-copy p {
  margin: 0;
  color: #d3deed;
  font-size: 13px;
  line-height: 1.5;
}
.reader-actions {
  flex-wrap: wrap;
  gap: 6px;
}
.reader-actions button {
  padding: 6px 10px;
  border: 1px solid #6f88a9;
  color: #e7f2ff;
  background: #2e3e54;
  font-size: 13px;
}
.reader-actions #openAround {
  background: #acd9f2;
  color: #122b3b;
  font-weight: 700;
}
.reader-actions button:disabled {
  opacity: 0.55;
}
#board button[data-reading] {
  z-index: 1;
  outline: 2px solid var(--reader-color, #bedfff);
  outline-offset: -2px;
}
#board button[data-reading="source"] {
  outline-width: 3px;
  --reader-color: #c9e6ff;
  background: #344a62;
}
#board button[data-reading="identified"],
#board button[data-reading="mine"] {
  --reader-mark: "!";
  --reader-color: #ff9baf;
}
#board button[data-reading="safe"] {
  --reader-mark: "✓";
  --reader-color: #97f4da;
}
#board button[data-reading="possible"] {
  --reader-mark: "?";
  --reader-color: #ffe2a0;
  outline-style: dashed;
}
#board button[data-reading="flag"] {
  --reader-color: #ffc4db;
  outline-style: dashed;
}
#board button[data-reading]::after {
  content: var(--reader-mark, none);
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 12px;
  padding: 1px;
  color: #102130;
  background: var(--reader-color);
  border-radius: 2px;
  font: 800 10px/1.05 var(--mono);
  text-align: center;
  pointer-events: none;
}
@media (max-width: 740px), (pointer: coarse) {
  .reader-actions button,
  #closeClue {
    min-height: 44px;
  }
  #board button[data-reading]::after {
    min-width: 8px;
    top: 1px;
    right: 1px;
    font-size: 8px;
    padding: 0;
  }
}
.reader-key {
  display: none;
  gap: 9px;
  margin: 0 0 10px;
  padding: 0;
  color: #d0dbec;
  font: 600 11px/1.4 var(--mono);
  list-style: none;
}
.clue-reader[data-inspected="true"] .reader-key {
  display: flex;
  flex-wrap: wrap;
}
.reader-key li {
  white-space: nowrap;
}
.reader-key b {
  color: #ffe2a0;
}
.reader-key li:first-child b {
  color: #97f4da;
}
.reader-key li:last-child b {
  color: #ff9baf;
}
@media (max-width: 740px) {
  .cabinet > .clue-reader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 6px;
    margin: 7px 0 0;
    padding: 1px 8px;
    border-radius: 6px;
  }
  .clue-reader .reader-heading h2 {
    font-size: 13px;
    line-height: 1.3;
    gap: 5px;
    font-weight: 700;
  }
  .reader-heading h2 i svg {
    width: 14px;
    height: 14px;
  }
  .clue-reader .reader-heading {
    grid-row: 1;
    grid-column: 1;
    justify-content: start;
  }
  #closeClue {
    min-height: 38px;
  }
  .reader-copy,
  .reader-key,
  #openAround {
    grid-column: 1/-1;
  }
  .reader-copy {
    grid-row: 2;
    margin: 0 0 5px;
  }
  .reader-copy h3 {
    font-size: 12px;
  }
  .reader-copy p {
    font-size: 12px;
  }
  .reader-key {
    grid-row: 3;
    margin: 0 0 7px;
  }
  #openAround {
    grid-row: 4;
    margin-bottom: 5px;
    justify-self: start;
  }
  .reader-actions {
    display: contents;
  }
  .reader-actions button {
    font-size: 12px;
    min-height: 42px;
  }
  #clueHint {
    grid-row: 1;
    grid-column: 2;
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .clue-reader:not([data-inspected="true"]) .reader-copy {
    display: none;
  }
}
