.atlas-shell {
  width: calc(100% - clamp(16px, 2vw, 48px));
  padding-bottom: 28px;
  color: #d3cfbb;
}
.atlas-heading h1 {
  margin: 0;
  padding: 22px 0 18px;
  color: var(--gold);
  font: 700 clamp(25px, 2.7vw, 40px)/1.3 SimSun, serif;
  letter-spacing: 2px;
}
.atlas-panel {
  padding: clamp(12px, 1.6vw, 24px);
  background-color: #28312a;
}
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar .push { margin-left: auto; }
.toolbar button, .toolbar select, #info button {
  border: 1px solid #887849;
  padding: 6px 12px;
  color: #e2c58c;
  background: #22291e;
  font: inherit;
  cursor: pointer;
}
.toolbar button:hover, .toolbar select:hover, #info button:hover {
  background: #3e3825;
  border-color: #dfc480;
}
#title { color: #e2c58c; }
#pinControl { cursor: pointer; }
#pins { accent-color: #c6ab70; }
#canvas {
  position: relative;
  overflow: auto;
  max-height: 70vh;
  min-height: 130px;
  border: 1px solid #71694d;
  background: #141e18;
  scrollbar-color: #91835b #18221a;
}
#paper { position: relative; margin: auto; min-width: 1px; }
#tiles, #markers { position: absolute; inset: 0; pointer-events: none; }
#tiles { overflow: hidden; }
#tiles img { position: absolute; display: block; }
#markers button { position: absolute; padding: 0; pointer-events: auto; }
.hot { background: transparent; border: 0; border-radius: 4px; }
.hot:hover { background: #e1c58929; outline: 2px solid #e5c972; }
.pin {
  transform: translate(-50%, -50%);
  width: 15px;
  height: 15px;
  border: 2px solid #241b12;
  border-radius: 50%;
  background: #dba74a;
  box-shadow: 0 0 0 1px #fff8;
}
.pin.in { background: #80cfe1; }
.pin.side { border-radius: 2px; }
.pin.spell { background: #d898dd; transform: translate(-50%, -50%) rotate(45deg); border-radius: 1px; }
.pin:hover { background: #fff; }
.legend { margin-top: 12px; font-size: 14px; line-height: 1.7; }
#info:not(:empty), .empty {
  margin-top: 10px;
  padding: 10px 14px;
  background: #31382d;
  border-left: 3px solid #ae9965;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
#info strong { color: #e2c58c; }
@media (max-width: 760px) {
  .atlas-shell { width: calc(100% - 12px); padding-inline: 6px; }
  .atlas-panel { padding: 10px; }
  .atlas-shell .guide-top { gap: 12px; }
  .atlas-heading h1 { padding: 14px 6px; }
  .toolbar { gap: 6px; }
  .toolbar .push { margin-left: 0; }
  #canvas { max-height: 65vh; }
}

/* Let the canvas use the space left by the header, controls and route details. */
@media (min-width: 761px) and (min-height: 560px) {
  .atlas-shell {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 16px);
    margin-block: 8px;
    padding-bottom: 12px;
  }
  .atlas-shell main, .atlas-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .atlas-shell .guide-top, .atlas-heading, .toolbar, .legend, #info {
    flex: none;
  }
  #canvas { max-height: none; }
}

@media (any-pointer: fine) {
  #paper { cursor: grab; user-select: none; }
  #canvas.panning, #canvas.panning * { cursor: grabbing; }
}
