/* css/viewer.css — область карты: canvas, подсказка, пустое состояние.
   Тон светлой темы сайта: канвас чуть темнее панелей, панель подсказки белая. */

#main {
  grid-area: main;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas);
}
canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
#tip {
  position: absolute;
  z-index: 4;
  display: none;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 10px 24px rgba(21, 32, 40, .14);
  color: var(--ink-700);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
}
.empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}
.emptyCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  padding: 32px 32px 22px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  pointer-events: auto;
}
.emptyIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: var(--hl);
  color: var(--accent);
}
.emptyIcon svg { width: 24px; height: 24px; }
.emptyCard h2 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: var(--text); }
.emptyCard p { max-width: 330px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.emptyActions { display: flex; gap: 8px; margin-top: 10px; }
.emptyActions button { height: 38px; padding: 0 18px; font-size: 13px; border-radius: 10px; }
.emptyCard .link { margin-top: 6px; font-size: 12px; }

dialog#helpDlg {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  padding: 18px 20px;
  width: min(560px, 92vw);
  max-height: 90vh;
  overflow: auto;
}
dialog#helpDlg::backdrop { background: rgba(15, 26, 32, .42); backdrop-filter: blur(2px); }
.helpBody { display: grid; gap: 12px; margin-top: 10px; text-align: left; }
.helpBody p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-700); }
.helpBody strong { color: var(--text); font-weight: 700; }
.helpBody code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--panel-soft);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1px 5px;
}
