/* Seed mapa: pełny ekran, panel po lewej, mapa po prawej */
body.app { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.app .top { position: relative; padding-bottom: 12px; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 0.9rem; }
.panel-toggle { display: none; }

.layout { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 0 16px 16px; }

.panel {
  width: 320px;
  flex: 0 0 320px;
  border-radius: var(--radius);
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  --glass-fill: linear-gradient(145deg, rgba(30, 22, 28, 0.82), rgba(12, 10, 14, 0.78));
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.group { margin-bottom: 18px; }
.group.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; }
.row .field { min-width: 0; }
.hint { margin-top: 6px; min-height: 1.1em; font-size: 0.76rem; color: var(--faint); word-break: break-all; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; }
.mini-links { font-size: 0.78rem; color: var(--faint); }
.mini-links button { border: 0; background: none; padding: 0; color: var(--red-soft); cursor: pointer; font-size: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.credit { font-size: 0.72rem; color: var(--faint); }

.struct-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.struct-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  line-height: 1.2;
}
.struct-item:hover { background: rgba(255, 255, 255, 0.08); }
.struct-item svg { flex: 0 0 auto; width: 22px; height: 22px; }
.struct-item.off { opacity: 0.38; }
.struct-item.na { display: none; }

.map-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0a0d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow);
  touch-action: none;
}
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; image-rendering: pixelated; }
#map.dragging { cursor: grabbing; }

.loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  --glass-fill: linear-gradient(145deg, rgba(30, 22, 28, 0.85), rgba(12, 10, 14, 0.8));
}
.readout {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  pointer-events: none;
  --glass-fill: linear-gradient(145deg, rgba(30, 22, 28, 0.82), rgba(12, 10, 14, 0.76));
}
#ro-xz { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
#ro-biome { color: var(--muted-strong); }
#ro-biome:not(:empty)::before { content: "·"; margin-right: 10px; color: var(--faint); }

.zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  --glass-fill: linear-gradient(145deg, rgba(30, 22, 28, 0.82), rgba(12, 10, 14, 0.76));
}
.zoom button { width: 40px; height: 40px; border: 0; background: transparent; color: #fff; font-size: 1.2rem; cursor: pointer; }
.zoom button:hover { background: rgba(255, 255, 255, 0.08); }
.zoom button + button { border-top: 1px solid var(--line); }

.pop {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 170px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.86rem;
  transform: translate(-50%, calc(-100% - 18px));
  --glass-fill: linear-gradient(145deg, rgba(36, 26, 32, 0.94), rgba(14, 12, 16, 0.9));
}
.pop .btn { margin-top: 6px; align-self: flex-start; }
.pop .mono { color: var(--muted-strong); }

@media (max-width: 820px) {
  .hide-sm { display: none; }
  .panel-toggle { display: inline-flex; }
  .layout { padding: 0 10px 10px; }
  .panel {
    position: fixed;
    z-index: 40;
    left: 10px;
    top: 74px;
    bottom: 10px;
    width: min(330px, calc(100vw - 20px));
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.4s var(--ease);
  }
  .panel.open { transform: none; }
}
.credit a { color: var(--red-soft); }
.credit + .credit { margin-top: 4px; }
