.game-layout {
  grid-template-columns: minmax(300px, 340px) minmax(560px, 1fr) minmax(260px, 310px);
}
.info-panel { grid-column: 1; grid-row: 1; }
.story-column { grid-column: 2; grid-row: 1; }
.history-panel { grid-column: 3; grid-row: 1; }

.game-layout.history-collapsed { grid-template-columns: minmax(300px, 340px) minmax(560px, 1fr) 54px; }
.game-layout.info-collapsed { grid-template-columns: 54px minmax(560px, 1fr) minmax(260px, 310px); }
.game-layout.history-collapsed.info-collapsed { grid-template-columns: 54px minmax(560px, 1fr) 54px; }

.history-body { display: flex; flex-direction: column; overflow: hidden; }
.exploration-radar {
  flex: 0 0 auto;
  border: 1px solid #354139;
  border-radius: 10px;
  background: #0c120e;
  overflow: hidden;
  margin-bottom: 9px;
}
.radar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 7px; border-bottom: 1px solid #29332d; }
.radar-head > div { min-width: 0; }
.radar-head .panel-kicker { display: block; font-size: 10px; }
.radar-head strong { display: block; margin-top: 1px; font-size: 14px; color: #d9e2dc; }
.radar-head > span { color: #89978f; font-size: 11px; white-space: nowrap; }
.radar-frame {
  position: relative;
  height: 225px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(68, 92, 75, .18), transparent 58%),
    linear-gradient(rgba(77, 98, 84, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 98, 84, .04) 1px, transparent 1px),
    #09100b;
  background-size: auto, 22px 22px, 22px 22px, auto;
}
.radar-svg { width: 100%; height: 100%; display: block; }
.radar-grid circle,
.radar-grid line { fill: none; stroke: rgba(99, 126, 107, .12); stroke-width: 2; vector-effect: non-scaling-stroke; }
.radar-lines line { stroke: #425248; stroke-width: 3.5; opacity: .72; vector-effect: non-scaling-stroke; }
.radar-lines line.active { stroke: #9eb5a5; stroke-width: 5; opacity: 1; }
.radar-node .node-dot { vector-effect: non-scaling-stroke; stroke-width: 3; }
.radar-node.known .node-dot { fill: #0a100c; stroke: #637269; stroke-dasharray: 4 3; }
.radar-node.visited .node-dot { fill: #506056; stroke: #91a097; }
.radar-node.current .node-dot { fill: #b8c9bd; stroke: #eff6f1; }
.radar-node text {
  fill: #c0cbc4;
  font-size: 34px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #09100b;
  stroke-width: 8px;
  stroke-linejoin: round;
  pointer-events: none;
}
.radar-node.current text { fill: #f1f6f2; font-size: 38px; }
.radar-node .pulse-ring { fill: none; stroke: rgba(190, 219, 199, .46); stroke-width: 4; vector-effect: non-scaling-stroke; }
.radar-legend { display: flex; gap: 10px; padding: 7px 9px 8px; color: #89978f; font-size: 11px; border-top: 1px solid #202922; }
.radar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.radar-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; border: 1px solid #65746b; }
.radar-legend i.current { background: #d4dfd8; }
.radar-legend i.visited { background: #536259; }
.radar-legend i.known { background: transparent; border-style: dashed; }

.history-body .log-actions { flex: 0 0 auto; margin-bottom: 5px; }
#history-log { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding-right: 4px; margin-top: 5px; }

@media (max-width: 1120px) {
  .game-layout,
  .game-layout.history-collapsed,
  .game-layout.info-collapsed,
  .game-layout.history-collapsed.info-collapsed { grid-template-columns: 320px minmax(0, 1fr); }
  .info-panel { grid-column: 1; grid-row: 1; }
  .story-column { grid-column: 2; grid-row: 1; }
  .history-panel { grid-column: 1 / -1; grid-row: 2; order: 3; }
  .radar-frame { height: 250px; }
}

@media (max-width: 760px) {
  .game-layout,
  .game-layout.history-collapsed,
  .game-layout.info-collapsed,
  .game-layout.history-collapsed.info-collapsed { display: flex; flex-direction: column; }
  .info-panel { order: 1; }
  .story-column { order: 2; }
  .history-panel { order: 3; }
  .radar-frame { height: 270px; }
}
