/* go.css - палитра «Идём туда». Цвета только из переменных темы (как rings.css/attention.css). */

.go-ov {
  position: fixed; inset: 0; z-index: 1200; display: none;
  background: rgba(0, 0, 0, .55); padding: 6vh var(--space-4);
  align-items: flex-start; justify-content: center;
}
.go-ov.on { display: flex; }
.go-pal {
  width: min(880px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--panel); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-2); overflow: hidden;
  animation: go-in var(--motion-fast) var(--ease-out);
}
@keyframes go-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

.go-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.go-ttl { font-weight: 600; font-size: var(--fz-sm); white-space: nowrap; }
.go-inp {
  flex: 1; min-width: 0; font: inherit; font-size: var(--fz-base); padding: var(--space-2) var(--space-3);
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius);
  outline: none; transition: border-color var(--motion);
}
.go-inp:focus { border-color: var(--accent); }
.go-tests { font-size: var(--fz-xs); color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.go-x { font: inherit; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); width: 30px; height: 30px; cursor: pointer; }
.go-x:hover { color: var(--ink); border-color: var(--accent); }
.go-hint { padding: var(--space-2) var(--space-4) 0; font-size: var(--fz-xs); color: var(--muted); line-height: 1.5; }

.go-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: 2px; }
.go-empty { margin: var(--space-2) 0; font-size: var(--fz-xs); color: var(--muted); }
.go-err { color: #d98c8c; }

/* строка мира: код · имя · источник · сколько заходов · когда */
.go-w {
  display: grid; grid-template-columns: 78px minmax(0, 1.4fr) minmax(0, 1fr) auto 84px;
  align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3);
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: background var(--motion), border-color var(--motion);
}
.go-w:hover { background: var(--panel-2); }
.go-w:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.go-w.open { background: var(--panel-2); border-color: var(--border); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.go-w.here { box-shadow: inset 3px 0 0 var(--accent); }
.go-code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: var(--fz-xs); color: var(--accent); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go-name { font-size: var(--fz-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go-src { font-size: var(--fz-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go-n { font-size: var(--fz-xs); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.go-when { font-size: var(--fz-xs); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.go-here { font-style: normal; font-size: var(--fz-xs); color: var(--accent); margin-left: var(--space-2); font-weight: 400; }

.go-body { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: var(--space-3); margin-bottom: var(--space-2); background: var(--panel-2); }
.go-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.go-blurb { flex-basis: 100%; margin: 0 0 var(--space-1); font-size: var(--fz-xs); color: var(--muted); line-height: 1.5; }
.go-btn {
  font: inherit; font-size: var(--fz-xs); cursor: pointer; padding: var(--space-2) var(--space-3);
  background: transparent; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--motion), background var(--motion);
}
.go-btn:hover { border-color: var(--accent); }
.go-btn:active { transform: translateY(1px); }
.go-btn.go-go { border-color: var(--accent); color: var(--accent); }
.go-btn.go-go:hover { background: var(--accent); color: var(--accent-ink); }

.go-cycles { display: flex; flex-direction: column; gap: var(--space-2); }
.go-c {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 84px; grid-template-areas: "code title when" "sum sum sum" "btn btn btn";
  gap: var(--space-1) var(--space-3); align-items: baseline;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
}
.go-c.here { border-color: var(--accent); }
.go-c .go-code { grid-area: code; }
.go-ct { grid-area: title; font-size: var(--fz-sm); }
.go-ct i { font-style: normal; font-size: var(--fz-xs); color: var(--muted); margin-left: var(--space-1); }
.go-c .go-when { grid-area: when; }
.go-sum { grid-area: sum; margin: 0; font-size: var(--fz-xs); color: var(--muted); line-height: 1.5; }
.go-c .go-btn { grid-area: btn; justify-self: start; margin-top: var(--space-1); }

.go-foot { padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border); font-size: var(--fz-xs); min-height: 34px; color: var(--muted); }
.go-foot:empty { display: none; }

/* 23.09 «К кому» - визит к лицу (go.js: режим «люди») */
.go-mode { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.go-mode-b { font: inherit; font-size: var(--fz-xs); padding: var(--space-1) var(--space-3); background: transparent; color: var(--muted); border: 0; cursor: pointer; white-space: nowrap; }
.go-mode-b.on { background: var(--accent); color: var(--accent-ink); }
.go-vis-p { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.go-vis-bio { grid-column: 1 / -1; font-size: var(--fz-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go-vis { display: flex; flex-direction: column; gap: var(--space-3); }
.go-vis-h { display: flex; align-items: center; gap: var(--space-3); }
.go-vis-f { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--fz-xs); }
.go-vis-f > span:first-child { color: var(--muted); }
.go-vis-f label { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.go-vis-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (max-width: 640px) {
  .go-head { flex-wrap: wrap; }
  .go-inp { flex-basis: 100%; }
}
.go-wait { color: var(--accent); }
.go-wait::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: go-spin .8s linear infinite; vertical-align: -1px; }
@keyframes go-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .go-ov { padding: 2vh var(--space-2); }
  .go-w { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .go-src, .go-w .go-when { display: none; }
  .go-c { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "code title" "sum sum" "btn btn"; }
  .go-c .go-when { display: none; }
}
