:root {
  --bg: #08090c;
  --bg-2: #10131a;
  --panel: #141820;
  --card: #181c24;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f1ea;
  --muted: #9a9488;
  --accent: #e8b86d;
  --accent-2: #c9843a;
  --studio: #2a2d36;
  --glow: rgba(232, 184, 109, 0.22);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Manrope, system-ui, sans-serif;
  overflow-x: clip;
  color-scheme: dark;
}
body.is-booting { overflow: hidden; }
body.is-cloaked { overflow: hidden; }
body:not(.in-catalog):not(.in-maps) { overflow: hidden; }

.cloak {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  color-scheme: dark;
  padding: 0;
}
html.is-open .cloak,
body:not(.is-cloaked) .cloak { display: none !important; }
body.is-cloaked .boot,
body.is-cloaked .home,
body.is-cloaked .app-shell,
body.is-cloaked .maps-shell,
body.is-cloaked .transit { visibility: hidden !important; pointer-events: none; }
.cloak-page { text-align: center; padding: 0 24px; }
.cloak-page h1 {
  margin: 0;
  font: 400 clamp(28px, 5.2vw, 44px)/1.15 Georgia, "Times New Roman", Times, serif;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-shadow: none;
}
.cloak-foot {
  margin: 14px 0 0;
  font: 400 13px/1.4 Georgia, "Times New Roman", Times, serif;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0.88;
}
.cloak-hit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  cursor: default;
}
.cloak-hit::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(232, 184, 109, 0.35); }

/* —— Boot —— */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 18px;
  background:
    radial-gradient(800px 400px at 50% 30%, rgba(232, 184, 109, 0.12), transparent 60%),
    #07080b;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-mark {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 8vw, 64px);
  letter-spacing: -0.05em;
  text-align: center;
  animation: brandPulse 1.8s var(--ease-out) infinite alternate;
}
.boot-bar {
  width: min(280px, 60vw);
  height: 2px;
  margin: 0 auto;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.boot-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.35s var(--ease-soft);
  box-shadow: 0 0 16px rgba(232, 184, 109, 0.5);
}
.boot-text {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@keyframes brandPulse {
  from { opacity: 0.7; letter-spacing: -0.04em; }
  to { opacity: 1; letter-spacing: -0.06em; }
}

/* —— Home / parallax —— */
.home {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.55s var(--ease-out), visibility 0.55s, transform 0.7s var(--ease-out);
}
.home.is-away {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
}
.parallax {
  position: absolute;
  inset: -8%;
  pointer-events: none;
}
.plx {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.12s linear;
}
.plx-sky {
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(90, 110, 150, 0.35), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(201, 132, 58, 0.22), transparent 50%),
    linear-gradient(165deg, #0c1018 0%, #151018 45%, #0a0b0f 100%);
}
.plx-glow {
  background:
    radial-gradient(500px 280px at 50% 70%, rgba(232, 184, 109, 0.18), transparent 70%);
  mix-blend-mode: screen;
}
.plx-photo {
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out), transform 0.12s linear;
}
.plx-photo.has-img { opacity: 1; }
.plx-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.08) brightness(0.72);
  transform: scale(1.12);
}
.plx-photo-a {
  mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
  opacity: 0;
}
.plx-photo-a.has-img { opacity: 0.55; }
.plx-photo-b {
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 40% 100%);
  opacity: 0;
}
.plx-photo-b.has-img { opacity: 0.7; }
.plx-mesh {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 70%);
  opacity: 0.5;
}
.plx-fog {
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.55) 70%, #08090c 100%),
    radial-gradient(900px 300px at 50% 100%, rgba(20, 18, 14, 0.8), transparent 70%);
}
.plx-vignette {
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.55) 100%);
}
.plx-grain {
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.home-static {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 48px));
  text-align: center;
  padding: 40px 0 56px;
  animation: homeIn 1s var(--ease-out) 0.15s both;
}
@keyframes homeIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.home-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.home-brand {
  margin: 0;
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800;
  font-size: clamp(64px, 14vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.home-lead {
  margin: 22px auto 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.home-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 40px 0 0;
}
.home-menu-hub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.home-card-lg { min-height: 148px; }
.home-menu-hub .home-card[data-go="guide"] { grid-column: 1 / -1; min-height: 112px; }
.home-card.is-soon {
  cursor: default;
  opacity: 0.48;
  filter: grayscale(0.25);
  pointer-events: none;
}
.home-card.is-soon:hover {
  transform: none;
  border-color: rgba(255,255,255,0.1);
  box-shadow: none;
}
.home-card.is-soon .home-card-go { color: var(--muted); }
.home-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 22px 18px 18px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  background: rgba(12, 12, 14, 0.42);
  backdrop-filter: blur(18px);
  color: var(--text);
  overflow: hidden;
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.45s var(--ease-out);
}
.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,184,109,0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.home-card:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 184, 109, 0.45);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35);
}
.home-card:hover::before { opacity: 1; }
.home-card:active { transform: translateY(-2px) scale(0.99); }
.home-card-label {
  position: relative;
  font-family: Syne, Manrope, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.home-card-count {
  position: relative;
  color: var(--muted);
  font-size: 13px;
}
.home-card-go {
  position: relative;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.home-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.home-link {
  background: transparent;
  border: 1px solid rgba(232, 184, 109, 0.35);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 650;
  letter-spacing: 0.04em;
  transition: transform 0.3s var(--ease-spring), background 0.3s ease, box-shadow 0.3s ease;
}
.home-link:hover {
  transform: translateY(-2px);
  background: rgba(232, 184, 109, 0.12);
  box-shadow: 0 12px 28px rgba(232, 184, 109, 0.18);
}
.home-card.is-wait { opacity: 0.55; pointer-events: none; }
.home-card:disabled { cursor: wait; }

.transit {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: #08090c;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: opacity 0.2s ease, transform 0.55s var(--ease-out);
}
.transit.is-on {
  pointer-events: auto;
  opacity: 1;
  transform: scaleY(1);
  transform-origin: top;
}
.transit.is-out {
  transform-origin: bottom;
  transform: scaleY(0);
  opacity: 1;
}

/* —— App shell —— */
.app-shell {
  min-height: 100vh;
  padding-top: var(--top-h, 62px);
  background:
    radial-gradient(1200px 500px at 8% -10%, rgba(201, 132, 58, 0.1), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(90, 110, 160, 0.1), transparent 50%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease-out), transform 0.65s var(--ease-out), visibility 0.55s;
  pointer-events: none;
}
.app-shell.is-live {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.app-shell.is-live .toolbar,
.app-shell.is-live main {
  animation: riseIn 0.65s var(--ease-out) both;
}
.app-shell.is-live .toolbar { animation-delay: 0.05s; }
.app-shell.is-live main { animation-delay: 0.1s; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(22px) scale(0.96); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes softPulse {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.04); }
}
@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
}
.page-head.is-swap {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 1100px) {
  .home-menu { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .home-menu { grid-template-columns: 1fr; }
  .home-brand { font-size: clamp(52px, 18vw, 84px); }
  .plx-photo-b { clip-path: none; opacity: 0 !important; }
}

.top {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 28px;
  background: rgba(11, 12, 16, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 20;
  transform: translateY(0);
  transition: transform 0.32s var(--ease-out), box-shadow 0.32s ease;
}
.top.is-away {
  transform: translateY(-110%);
  pointer-events: none;
}
.top.is-float {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s var(--ease-spring);
}
.brand-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.logo {
  font-family: Syne, Manrope, sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.forge {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.tabs button, .ghost, .close {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--muted);
  transition:
    background 0.28s var(--ease-soft),
    color 0.28s var(--ease-soft),
    border-color 0.28s var(--ease-soft),
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s var(--ease-soft);
}
.tabs button.on {
  color: #1a140c;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(232, 184, 109, 0.28);
}
.tabs button:hover:not(.on), .ghost:hover {
  color: var(--text);
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
.tabs button:active, .ghost:active { transform: translateY(0) scale(0.97); }
.top-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.ghost { border: 1px solid var(--line); color: var(--muted); }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 22px 28px 0;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select {
  background: #161920;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft), background 0.25s ease;
}
.toolbar select option,
.mod-row select option {
  background: #161920;
  color: #f4f1ea;
}
.toolbar input:focus, .toolbar select:focus,
.login-card input:focus {
  border-color: rgba(232, 184, 109, 0.55);
  box-shadow: 0 0 0 3px var(--glow);
  background: rgba(255,255,255,0.06);
}
.toolbar input { min-width: 280px; flex: 1; }
.count { color: var(--muted); margin-left: auto; font-size: 13px; }

main { padding: 18px 28px 56px; }
h1 {
  margin: 10px 0 6px;
  font-family: Syne, Manrope, sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}
.sub {
  margin: 0 0 22px;
  color: var(--muted);
  transition: opacity 0.35s ease;
}
.empty { color: var(--muted); animation: fadeUp 0.4s var(--ease-out) both; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
  transition: opacity 0.28s var(--ease-soft), filter 0.28s ease;
}
.grid.is-swapping { opacity: 0.35; filter: blur(2px); }
.more-sent { height: 1px; grid-column: 1 / -1; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(22px) scale(0.96);
  animation: cardIn 0.55s var(--ease-out) calc(var(--i, 0) * 32ms) both;
  transition:
    transform 0.45s var(--ease-out),
    border-color 0.35s var(--ease-soft),
    box-shadow 0.45s var(--ease-out),
    background 0.35s ease;
  will-change: transform;
}
.card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(232, 184, 109, 0.45);
  box-shadow:
    0 22px 48px rgba(0,0,0,0.4),
    0 0 0 1px rgba(232, 184, 109, 0.08);
}
.card:active { transform: translateY(-2px) scale(0.995); transition-duration: 0.12s; }

.thumb {
  height: 158px;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.05) 48%, transparent 66%),
    radial-gradient(120px 80px at 50% 70%, rgba(232, 184, 109, 0.12), transparent 70%),
    var(--studio);
  background-size: 220% 100%, auto, auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card:hover .thumb { animation: shimmer 1.4s linear infinite; }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out);
}
.card:hover .thumb img.on { transform: scale(1.08); }
.thumb img.on { opacity: 1; transform: scale(1); }
.thumb .ph {
  width: 76px;
  height: 42px;
  border: 2px solid rgba(244, 241, 234, 0.22);
  border-radius: 8px 8px 12px 12px;
  position: relative;
  opacity: 0.55;
  z-index: 0;
  animation: softPulse 1.8s ease-in-out infinite;
}
.thumb .ph::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: -8px; height: 10px;
  border: 2px solid rgba(244, 241, 234, 0.22);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(12, 12, 14, 0.72);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 109, 0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-spring);
}
.card:hover .badge { transform: scale(1.06); }
.body { padding: 12px 14px 14px; }
.body h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}
.card:hover .body h3 { color: #fff8ec; }
.spawn {
  color: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 11px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #d8d2c6;
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease-spring), border-color 0.25s ease;
}
.card:hover .pill { transform: translateY(-1px); }
.pill.class { background: rgba(201, 132, 58, 0.14); color: #f0c88a; border-color: rgba(201, 132, 58, 0.22); }
.pill.type { background: rgba(120, 150, 200, 0.12); color: #c5d4ee; }
.pill.gender { background: rgba(90, 160, 140, 0.12); color: #b8e0d0; }
.pill.comp { background: rgba(180, 110, 150, 0.12); color: #f0c2d8; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 8, 0);
  z-index: 40;
  display: flex;
  padding: 18px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s var(--ease-soft), background 0.32s var(--ease-soft);
}
.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  background: rgba(6, 6, 8, 0.78);
}
.overlay.hidden { display: none; }
.hidden { display: none !important; }

.sheet {
  margin: auto;
  flex: 1 1 auto;
  width: min(1320px, 100%);
  height: 100%;
  max-height: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-out);
}
.overlay.is-open .sheet {
  opacity: 1;
  transform: none;
}
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  font-size: 22px;
  line-height: 1;
  background: rgba(12,12,14,0.55);
  border: 1px solid var(--line);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.close:hover {
  border-color: rgba(232, 184, 109, 0.45);
  transform: rotate(90deg) scale(1.05);
}

.viewer-wrap {
  position: relative;
  background:
    radial-gradient(420px 220px at 50% 70%, rgba(232, 184, 109, 0.1), transparent 70%),
    #2c2f38;
  min-width: 0;
  min-height: 0;
}
#view { width: 100%; height: 100%; display: block; }
.viewer-wrap.is-loading #view { visibility: hidden; }
.viewer-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #2c2f38;
  color: #f4f1ea;
  font-weight: 650;
  animation: fadeUp 0.35s var(--ease-out) both;
}
.viewer-wrap.is-loading .viewer-loading { display: flex; }
.viewer-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(244, 241, 234, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.viewer-hud, .viewer-hint {
  position: absolute;
  left: 16px;
  color: #f4f1ea;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
  transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}
.viewer-hud { top: 16px; }
.viewer-hint { bottom: 14px; font-size: 12px; opacity: 0.72; }
.viewer-lights {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.55);
  color: #f4f1ea;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    border-color 0.25s var(--ease-soft),
    background 0.25s var(--ease-soft),
    color 0.25s ease,
    box-shadow 0.25s ease;
}
.viewer-lights.hidden { display: none; }
.viewer-lights:hover { border-color: rgba(232, 184, 109, 0.45); }
.viewer-lights.on {
  border-color: rgba(232, 184, 109, 0.7);
  background: rgba(232, 184, 109, 0.2);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(232, 184, 109, 0.28);
}
.detail {
  padding: 26px 22px;
  border-left: 1px solid var(--line);
  overflow: auto;
  background: var(--bg-2);
}
.overlay.is-open .detail > * {
  animation: fadeUp 0.45s var(--ease-out) both;
}
.overlay.is-open .detail > *:nth-child(1) { animation-delay: 0.08s; }
.overlay.is-open .detail > *:nth-child(2) { animation-delay: 0.12s; }
.overlay.is-open .detail > *:nth-child(3) { animation-delay: 0.16s; }
.overlay.is-open .detail > *:nth-child(4) { animation-delay: 0.2s; }
.overlay.is-open .detail > *:nth-child(5) { animation-delay: 0.24s; }
.overlay.is-open .detail > *:nth-child(6) { animation-delay: 0.28s; }
.detail h2 {
  margin: 8px 0 12px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.meta { margin: 16px 0 0; }
.meta dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 10px;
}
.meta dd { margin: 2px 0 0; }
.paint-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin: 14px 0 0;
}
.paint-slots.hidden { display: none; }
.paint-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring);
}
.paint-chip:hover { transform: translateX(2px); }
.paint-chip input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  background: none;
  cursor: pointer;
}
.paint-chip input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.paint-chip input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}
.dirt-slot {
  margin: 14px 0 0;
}
.dirt-slot.hidden { display: none; }
.dirt-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text);
}
.dirt-chip input[type="range"] {
  width: 100%;
  accent-color: #8a6a42;
}
.dirt-chip span:last-child {
  min-width: 2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.vinyl-slot {
  margin: 14px 0 0;
}
.vinyl-slot.hidden { display: none; }
.vinyl-label {
  display: block;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 8px;
}
.vinyl-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vinyl-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}
.vinyl-chip img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: repeating-conic-gradient(#3a3a40 0 25%, #1c1c20 0 50%) 0 0 / 8px 8px;
}
.vinyl-chip.on {
  border-color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12);
}
.mod-panel {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.mod-panel.hidden { display: none; }
.mod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.mod-head h3 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.mod-actions { display: flex; gap: 6px; }
.mod-actions button,
.panel-grid button,
.shot-strip button,
.shot-nav {
  transition:
    border-color 0.25s var(--ease-soft),
    background 0.25s var(--ease-soft),
    color 0.25s ease,
    transform 0.25s var(--ease-spring),
    box-shadow 0.25s ease;
}
.mod-actions button {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.mod-actions button:hover { border-color: rgba(232, 184, 109, 0.45); transform: translateY(-1px); }
.mod-actions button.on {
  border-color: var(--accent);
  background: rgba(232, 184, 109, 0.14);
}
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.panel-grid + .mod-head {
  margin-top: 16px;
}
.panel-grid button {
  font-size: 12px;
  padding: 8px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}
.panel-grid button:hover { border-color: rgba(232, 184, 109, 0.4); transform: translateY(-1px); }
.panel-grid button.on {
  border-color: var(--accent);
  background: rgba(232, 184, 109, 0.16);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(232, 184, 109, 0.15);
}
.mod-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  margin-top: 8px;
  animation: fadeUp 0.35s var(--ease-out) both;
}
.mod-row label { font-size: 12px; color: var(--muted); padding-top: 6px; }
.mod-pick { min-width: 0; }
.mod-row select {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101218;
  color: var(--text);
  color-scheme: dark;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.mod-row select:focus {
  outline: none;
  border-color: rgba(232, 184, 109, 0.5);
  box-shadow: 0 0 0 3px var(--glow);
}
.mod-hide {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 3px;
  min-height: 14px;
}
.mod-hide.is-empty { opacity: 0.5; }
.err { color: #ff9b9b; }
.tex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tex-grid img { width: 100%; border-radius: 8px; background: #111; }

.login-card {
  margin: auto;
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.35s var(--ease-out), transform 0.4s var(--ease-out);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.overlay.is-open .login-card {
  opacity: 1;
  transform: none;
}
.login-card h2 {
  margin: 0;
  font-family: Syne, Manrope, sans-serif;
}
.login-note { margin: 0; color: var(--muted); font-size: 13px; }
.login-card label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.login-card input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.login-actions { display: flex; gap: 8px; }
.login-actions button[type="submit"] {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease;
}
.login-actions button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(232, 184, 109, 0.35);
  filter: brightness(1.05);
}

.shot-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #2c2f38;
  animation: fadeUp 0.4s var(--ease-out) both;
}
.shot-stage.hidden { display: none; }
.shot-stage img {
  width: 100%;
  height: calc(100% - 72px);
  object-fit: contain;
  display: block;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.28s var(--ease-soft), transform 0.45s var(--ease-out);
}
.shot-stage img.is-fading {
  opacity: 0;
  transform: scale(0.985);
}
.shot-nav {
  position: absolute;
  top: 42%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(12,12,14,0.55);
  color: var(--text);
  font-size: 22px;
  backdrop-filter: blur(8px);
}
.shot-nav:hover {
  border-color: rgba(232, 184, 109, 0.5);
  transform: scale(1.08);
  background: rgba(20, 18, 14, 0.72);
}
.shot-nav.prev { left: 12px; }
.shot-nav.next { right: 12px; }
.shot-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
  scrollbar-width: thin;
}
.shot-strip button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  white-space: nowrap;
}
.shot-strip button:hover { transform: translateY(-2px); }
.shot-strip button.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 184, 109, 0.12);
  box-shadow: 0 0 0 1px rgba(232, 184, 109, 0.12);
}
.viewer-wrap.is-guest #view { visibility: hidden; }
.viewer-wrap.is-guest .viewer-hint { display: none; }

@media (max-width: 860px) {
  .top { padding: 12px 16px; gap: 12px; }
  main, .toolbar { padding-left: 16px; padding-right: 16px; }
  .sheet {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 1fr) minmax(160px, 32%);
    width: 100%;
    border-radius: 14px;
  }
  .viewer-wrap { height: auto; }
  .detail { border-left: none; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card { opacity: 1; transform: none; }
  .plx { transition: none !important; }
}

/* —— Mapper texture browser —— */
.maps-shell {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: none;
  grid-template-rows: auto 1fr auto;
  background: #1e1e1e;
  color: #eee;
  font-size: 13px;
}
.maps-shell.is-live { display: grid; }
.maps-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  background: #2a2a2a;
  border-bottom: 1px solid #111;
}
.maps-search {
  flex: 1;
  min-width: 160px;
  max-width: 520px;
}
.maps-search input {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 8px 14px;
  color: #eee;
  outline: none;
  transition: border-color 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft);
}
.maps-search input:focus {
  border-color: rgba(232, 184, 109, 0.45);
  box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.12);
}
.maps-meta {
  margin-left: auto;
  color: #aaa;
  font-size: 12px;
}
.maps-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.maps-body {
  overflow: auto;
  background: #242424;
  min-height: 0;
}
.maps-body.is-drop {
  outline: 2px dashed var(--accent);
  outline-offset: -8px;
}
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--tile, 128px));
  gap: 4px;
  padding: 8px;
  align-content: start;
}
.maps-tile {
  position: relative;
  width: var(--tile, 128px);
  padding: 0;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  display: grid;
  grid-template-rows: var(--tile, 128px) auto;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.maps-tile-pick {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  margin: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}
.maps-tile-pick input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.maps-tile.is-picked {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.maps-tile img {
  width: var(--tile, 128px);
  height: var(--tile, 128px);
  object-fit: cover;
  image-rendering: auto;
  background:
    linear-gradient(45deg, #3a3a3a 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #3a3a3a 25%, transparent 25%) 0 8px / 16px 16px,
    #2a2a2a;
}
.maps-tile-name {
  display: block;
  padding: 2px 4px;
  background: #3d5a80;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: Segoe UI, Tahoma, sans-serif;
}
.maps-tile-flags {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.55);
  padding: 1px 4px;
}
.maps-tile.is-on {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.maps-empty {
  margin: 48px auto;
  max-width: 40ch;
  text-align: center;
  color: #aaa;
}
.maps-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 8px 12px;
  background: #3a3a3a;
  border-top: 1px solid #111;
  font-size: 12px;
}
.maps-bar-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ddd;
}
.maps-bar input[type="search"],
.maps-bar select {
  background: #1c1c1c;
  border: 1px solid #111;
  border-radius: 2px;
  padding: 4px 8px;
  min-width: 140px;
}
.maps-kw input[type="search"] { min-width: 120px; }
.maps-sel {
  color: #9cf;
  font-family: Consolas, ui-monospace, monospace;
  font-size: 12px;
}
.maps-bar-dl {
  border: 1px solid var(--accent);
  background: rgba(232, 184, 109, 0.14);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.maps-bar-dl:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.maps-count { margin-left: auto; color: #bbb; }
#mapsOverlay {
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.maps-sheet {
  margin: auto;
  width: min(1100px, 100%);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 22px 22px 18px;
  background: #16181d;
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-out);
}
.overlay.is-open .maps-sheet {
  opacity: 1;
  transform: none;
}
.maps-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  grid-column: 1;
  grid-row: 1;
  align-content: start;
}
.maps-fig {
  margin: 0;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.maps-fig.is-tile-src { border-color: var(--accent); }
.maps-fig.is-add { cursor: default; }
.maps-fig.is-missing { opacity: 0.4; cursor: default; }
.maps-fig figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.maps-map-dl {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(232, 184, 109, 0.12);
  color: var(--accent);
}
.maps-map-dl[hidden] { display: none !important; }
.maps-check {
  position: relative;
  aspect-ratio: 1;
  background:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%) 0 10px / 20px 20px,
    #1a1a1a;
}
.maps-check img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.maps-fig-x {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease;
}
.maps-fig-x:hover {
  background: rgba(180, 40, 50, 0.85);
  transform: scale(1.06);
}
.maps-fig-put {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.72);
  border: 1px solid rgba(232, 184, 109, 0.35);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), background 0.2s ease, filter 0.2s ease;
}
.maps-fig-put:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.maps-fig.is-add .maps-check {
  aspect-ratio: auto;
  min-height: 52px;
  background: #14161c;
  display: grid;
  place-items: center;
}
.maps-fig.is-add img { display: none; }
.maps-fig.is-add .maps-fig-put {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  margin: 8px;
}
.maps-map-undo {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(232, 184, 109, 0.12);
  border: 1px solid rgba(232, 184, 109, 0.28);
  color: var(--accent);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.maps-map-undo button {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
}
.maps-tile-box {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #101114;
}
.maps-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.maps-tile-head label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.maps-tile-head input[type="range"] { width: 160px; accent-color: var(--accent); }
.maps-tile-stage {
  min-height: 0;
  min-width: 0;
  height: 100%;
  container-type: size;
  display: grid;
  place-items: center;
  padding: 10px;
}
.maps-tile-view {
  width: min(100cqw, 100cqh);
  height: min(100cqw, 100cqh);
  background-repeat: repeat;
  background-position: 0 0;
  image-rendering: pixelated;
  border-radius: 8px;
}
.maps-detail {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
  min-height: 0;
  overflow: auto;
}
.maps-detail h2 {
  margin: 8px 28px 0 0;
  font-family: Syne, Manrope, sans-serif;
  font-size: 22px;
}
.maps-path { margin: 0; color: var(--muted); font-size: 12px; word-break: break-all; }
.maps-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.maps-tag {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--text);
}
.maps-tag span { margin-left: 6px; color: var(--muted); }
.maps-tag-form { display: flex; gap: 8px; }
.maps-tag-form input {
  flex: 1;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
}
.maps-tag-form button {
  border: 1px solid var(--accent);
  background: rgba(232, 184, 109, 0.12);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease;
}
.maps-tag-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.maps-dl {
  border: 1px solid var(--accent);
  background: rgba(232, 184, 109, 0.12);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: auto;
  width: 100%;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease;
}
.maps-dl:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(232, 184, 109, 0.2);
}
.maps-del {
  border-color: #c45;
  color: #f88;
  background: rgba(180, 40, 50, 0.12);
  margin-top: 8px;
}
.maps-account {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  color: #eee;
  font-size: 12px;
  font-weight: 650;
  transition: border-color 0.25s var(--ease-soft), transform 0.25s var(--ease-spring), background 0.25s ease;
}
.maps-account:hover {
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
.maps-avatar,
.maps-avatar-edit img,
.maps-person img,
.maps-avatar-ph {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}
.maps-avatar-ph {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
}
.maps-account-panel {
  margin: auto;
  width: min(720px, 100%);
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 18px;
  background: #16181d;
  border: 1px solid var(--line);
  border-radius: 18px;
  position: relative;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-out);
}
.maps-account-panel.is-admin { width: min(760px, 100%); }
.overlay.is-open .maps-account-panel {
  opacity: 1;
  transform: none;
}
.maps-acc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 36px 0 0;
}
.maps-acc-head h2 {
  margin: 0;
  font-family: Syne, Manrope, sans-serif;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.maps-acc-head .login-note {
  margin: 4px 0 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52ch;
}
.maps-acc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.maps-acc-tabs button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  color: var(--muted);
  font-weight: 650;
  transition:
    background 0.28s var(--ease-soft),
    color 0.28s var(--ease-soft),
    transform 0.28s var(--ease-spring),
    box-shadow 0.28s var(--ease-soft);
}
.maps-acc-tabs button.on {
  color: #1a140c;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(232, 184, 109, 0.28);
}
.maps-acc-tabs button:hover:not(.on) {
  color: var(--text);
  transform: translateY(-1px);
}
.maps-acc-pane {
  display: grid;
  gap: 12px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 2px;
}
.maps-acc-pane.hidden { display: none; }
.maps-acc-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 18px;
  align-items: center;
}
.maps-acc-hero-main { display: grid; gap: 10px; min-width: 0; }
.maps-acc-hero-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: end;
}
.maps-acc-hero-form label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
  flex: 1 1 160px;
}
.maps-acc-hero-form input,
.maps-role-create input,
.maps-user-create input,
.maps-user-create select,
.maps-role-card input {
  width: 100%;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.maps-acc-hero-form input:focus,
.maps-role-create input:focus,
.maps-user-create input:focus,
.maps-user-create select:focus,
.maps-role-card input:focus {
  border-color: rgba(232, 184, 109, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.12);
}
.maps-acc-hero-form button[type="submit"],
.maps-role-create button[type="submit"],
.maps-user-create button[type="submit"] {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  height: 38px;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease;
}
.maps-acc-hero-form button[type="submit"]:hover,
.maps-role-create button[type="submit"]:hover,
.maps-user-create button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(232, 184, 109, 0.28);
}
.maps-acc-form { padding: 0; background: none; border: 0; box-shadow: none; }
.maps-avatar-edit {
  display: grid;
  justify-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
.maps-avatar-edit img {
  width: 84px;
  height: 84px;
  border: 2px solid rgba(232, 184, 109, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.maps-acc-pane > .login-note { margin: 0; font-size: 12px; }
.maps-role-create,
.maps-user-create {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #12141a;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.maps-role-create-name,
.maps-user-create label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.maps-user-create {
  grid-template-columns: 1fr 1fr;
}
.maps-user-create .maps-user-pass,
.maps-user-create button[type="submit"] {
  grid-column: 1 / -1;
}
.maps-user-create button[type="submit"] { justify-self: start; }
.maps-role-create button[type="submit"] { justify-self: start; }
.maps-invite {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(232, 184, 109, 0.12);
  color: var(--accent);
  font-size: 13px;
  word-break: break-all;
}
.maps-role-cards,
.maps-user-cards { display: grid; gap: 8px; }
.maps-role-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101114;
}
.maps-role-card.is-locked {
  padding: 8px 12px;
  background: transparent;
}
.maps-role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.maps-role-head span { color: var(--muted); font-size: 11px; }
.maps-role-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.maps-role-perm {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  cursor: pointer;
}
.maps-role-perm input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.maps-role-perm span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.maps-role-perm input:checked + span {
  color: #1a140c;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.maps-role-perm input:disabled + span { opacity: 0.45; cursor: default; }
.maps-person {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101114;
}
.maps-person-acts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 11px;
}
.maps-person-acts select {
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #eee;
  padding: 4px 10px;
  font-size: 11px;
  transition: border-color 0.22s ease;
}
.maps-person span { display: block; color: var(--muted); font-size: 12px; }
.maps-person.is-owner {
  opacity: 1;
}
.maps-person-acts button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-spring);
}
.maps-person-acts button:hover {
  color: var(--text);
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
.maps-role-card .maps-person-acts button[data-act="save"] {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  font-weight: 700;
  padding: 8px 16px;
  height: 38px;
  box-shadow: none;
}
.maps-role-card .maps-person-acts button[data-act="save"]:hover {
  color: #1a140c;
  border: 0;
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(232, 184, 109, 0.28);
}
.maps-edit {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.maps-edit label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); }
.maps-edit input, .maps-edit select {
  background: #1a1a1a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: #eee;
}
.maps-edit-slots, .maps-edit-dels { display: flex; flex-wrap: wrap; gap: 8px; }
.maps-edit-slots label { font-size: 11px; }
.maps-edit-dels button, .maps-edit > button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-spring), background 0.22s ease;
}
.maps-edit-dels button:hover, .maps-edit > button:hover {
  color: var(--text);
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
#mapsSaveMeta {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  font-weight: 700;
}
#mapsSaveMeta:hover {
  color: #1a140c;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(232, 184, 109, 0.28);
  filter: brightness(1.05);
}
#mapsPacksModal {
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.maps-studio {
  position: relative;
  margin: 0 auto;
  width: min(1280px, 100%);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: #16181d;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 0.4s var(--ease-out), transform 0.45s var(--ease-out);
}
.overlay.is-open .maps-studio {
  opacity: 1;
  transform: none;
}
.maps-studio-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 56px 12px 18px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.maps-studio-top h2 { margin: 0 0 4px; }
.maps-studio-top .login-note { overflow: hidden; }
.maps-studio-side {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.maps-studio-create { display: grid; gap: 8px; }
.maps-studio-create > button[type="submit"] {
  justify-self: start;
  background: var(--accent);
  color: #1a140c;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease;
}
.maps-studio-create > button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(232, 184, 109, 0.35);
  filter: brightness(1.05);
}
.maps-studio-create > button[type="submit"]:active {
  transform: translateY(0) scale(0.97);
}
.maps-studio-quick {
  display: grid;
  gap: 6px;
}
.maps-studio-quick .login-note { margin: 0; font-size: 11px; }
.maps-studio-create label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.maps-studio-create input, .maps-studio-side > input, .maps-studio-meta input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  background: #1c1e24;
  border: 1px solid #3a3d45;
  border-radius: 999px;
  padding: 8px 12px;
  color: #eee;
  outline: none;
  transition: border-color 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft), background 0.25s ease;
}
.maps-studio-create input:focus, .maps-studio-side > input:focus, .maps-studio-meta input:focus {
  border-color: rgba(232, 184, 109, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.14);
  background: #22252c;
}
.maps-studio-create input::placeholder,
.maps-studio-side > input::placeholder,
.maps-studio-meta input::placeholder {
  color: #7a808c;
}
.maps-studio-packs {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding-right: 2px;
}
.maps-studio-pack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  flex: 0 0 auto;
  text-align: left;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #eee;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.3;
  overflow: visible;
  transition: border-color 0.25s var(--ease-soft), background 0.25s var(--ease-soft), transform 0.25s var(--ease-spring);
}
.maps-studio-pack:hover {
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
.maps-studio-pack.is-on { border-color: var(--accent); background: rgba(232, 184, 109, 0.08); }
.maps-studio-pack.is-empty strong { color: var(--accent); }
.maps-studio-pack strong,
.maps-studio-pack span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.maps-studio-pack span { color: var(--muted); font-size: 11px; }
.maps-studio-main {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 16px 18px;
}
.maps-studio-empty { color: var(--muted); }
.maps-studio-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
.maps-studio-meta label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.maps-studio-meta label em {
  font-style: normal;
  color: #6a7080;
  font-weight: 400;
}
.maps-studio-meta-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 6px;
}
.maps-studio-meta-acts button[type="submit"] {
  background: var(--accent);
  color: #1a140c;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease, filter 0.25s ease;
}
.maps-studio-meta-acts button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(232, 184, 109, 0.35);
  filter: brightness(1.05);
}
.maps-studio-meta-acts button[type="submit"]:active {
  transform: translateY(0) scale(0.97);
}
.maps-studio-drop {
  margin: 12px 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  transition: border-color 0.3s var(--ease-soft), color 0.3s var(--ease-soft), background 0.3s ease, transform 0.3s var(--ease-out);
}
.maps-studio-drop.is-drop {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 184, 109, 0.08);
  transform: scale(1.01);
}
.maps-studio-drop-lead {
  margin: 0 0 4px;
  color: #eee;
  font-size: 14px;
}
.maps-studio-drop .login-note { margin: 0; }
.maps-studio-drop-acts { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.maps-studio-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}
.maps-studio-bulk button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: #eee;
  font-size: 12px;
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-spring), background 0.22s ease;
}
.maps-studio-bulk button:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
.maps-studio-bulk button:disabled { opacity: 0.4; cursor: not-allowed; }
.maps-studio-bulk-count { color: var(--muted); font-size: 12px; }
.maps-studio-tex { display: grid; gap: 8px; min-width: 0; }
.maps-studio-row {
  display: grid;
  grid-template-columns: 22px 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: #101114;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  transition: border-color 0.25s var(--ease-soft), background 0.25s var(--ease-soft);
}
.maps-studio-row:hover {
  border-color: rgba(232, 184, 109, 0.28);
}
.maps-studio-row.is-picked { border-color: var(--accent); background: rgba(232, 184, 109, 0.08); }
.maps-studio-pick {
  display: grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
}
.maps-studio-pick input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}
.maps-studio-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #222;
  border-radius: 6px;
}
.maps-studio-row-main { display: grid; gap: 4px; min-width: 0; }
.maps-studio-row-main strong,
.maps-studio-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.maps-studio-name {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: #eee;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.maps-studio-name:focus {
  border-color: rgba(232, 184, 109, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.12);
}
.maps-studio-sub { color: var(--muted); font-size: 11px; }
.maps-studio-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.maps-studio-row-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.maps-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}
.maps-slot.is-on { color: var(--accent); border-color: var(--accent); }
.maps-slot-file { cursor: pointer; color: var(--muted); }
.maps-studio-row button, .maps-studio-row select {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 11px;
  max-width: 160px;
  transition: color 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-spring);
}
.maps-studio-row button:hover {
  color: var(--text);
  border-color: rgba(232, 184, 109, 0.35);
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .maps-acc-hero { grid-template-columns: 1fr; justify-items: start; }
  .maps-person { grid-template-columns: auto 1fr; }
  .maps-person-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .maps-studio {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
  }
  .maps-studio-top { grid-column: 1; }
  .maps-studio-side { max-height: 38vh; }
  .maps-studio-row { grid-template-columns: 22px 48px minmax(0, 1fr); }
  .maps-studio-row-acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .maps-sheet {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(240px, 1fr) auto;
    height: 100%;
    overflow: auto;
  }
  .maps-previews, .maps-tile-box, .maps-detail {
    grid-column: 1;
    grid-row: auto;
  }
  .maps-detail { overflow: visible; }
}

/* Плашка у полей пароля: не использовать основной пароль в наших инструментах */
.pw-warn { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #ef4444; background: rgba(239, 68, 68, 0.12); color: #fca5a5; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: left; }
.pw-warn > span:first-child { font-size: 18px; line-height: 1; color: #f87171; flex: none; }

/* texture library AI: categories, types, the AI box (24.10.2026) */
.maps-cats { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; background: #242424; border-bottom: 1px solid #111; }
.maps-cats.hidden { display: flex; height: 0; padding: 0; border: 0; overflow: hidden; }
.maps-cats-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.maps-cats-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); min-width: 78px; }
.maps-chip { border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; cursor: pointer; }
.maps-chip b { font-weight: 600; color: var(--muted); margin-left: 3px; }
.maps-chip:hover { border-color: rgba(232,184,109,0.5); }
.maps-chip.is-on { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }
.maps-chip.is-on b { color: #1a1a1a; }
.maps-ai-btn { border-style: dashed; color: var(--accent); }
.maps-ai-run { font-size: 12px; color: var(--accent); }
.maps-ai { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,0.03); }
.maps-ai.hidden { display: none; }
.maps-ai-head { font-size: 12px; color: var(--muted); }
.maps-ai-head span { color: var(--text); }
.maps-ai-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.maps-ai-row label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.maps-ai-row select { background: #101114; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.maps-ai-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.maps-ai-again { align-self: flex-start; font-size: 12px; }
.maps-shell.is-live { grid-template-rows: auto auto 1fr auto; }
