
@font-face {
  font-family: 'Nasalization';
  src: url('../fonts/nasalization-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html, body {
  cursor: url('../bilder/icons/cursor-pointer-24.png') 3 2, auto;
}

a, button, input[type="button"], input[type="submit"], input[type="reset"],
label[for], select, summary, [role="button"], [onclick] {
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
}

:root {

  --bg-deep:      #0D1210;
  --bg-panel:     #161C19;
  --bg-panel-2:   #1E2621;
  --sand:         #C4B896;
  --sand-dim:     #8C8570;
  --orange:       #FF5500;
  --orange-dim:   #A63700;
  --steel:        #3A4038;
  --steel-light:  #4E564C;
  --off-white:    #EDEAE0;
  --danger:       #C4402C;
  --success:      #6B8E4E;

  --room-highlight: #0FED94;
  --on-orange: #16110C;
  --gold: #E0B84A;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-2: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.48);
  --inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  --font-display: 'Oswald', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-nav:     'Nasalization', 'Oswald', sans-serif;

  --border-hard: 1px solid var(--steel);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 1000;
  background: var(--bg-panel);
  color: var(--off-white);
  border: var(--border-hard);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.skip-link:focus {
  top: 12px;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--steel-light) var(--bg-deep);
  scrollbar-width: thin;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--steel-light);
  border-radius: 999px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--orange-dim); }

body.nav-open { overflow: hidden; }

body {
  background: var(--bg-deep);
  color: var(--off-white);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 184, 150, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 184, 150, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.4) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: cover, 180px 180px;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--off-white);
}

h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--orange);
}

.mono { font-family: var(--font-mono); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 18, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-hard);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;

  max-width: 1450px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo .dot { color: var(--orange); }
.logo-img { height: 40px; width: auto; flex-shrink: 0; display: block; }

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  order: 1;
}

.nav-links a {
  position: relative;
  font-family: var(--font-nav);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 10px 12px;
  color: var(--sand);
  border-radius: 2px;
  transition: color 0.15s var(--ease-out), background 0.15s var(--ease-out);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav-links a:hover { color: var(--off-white); background: var(--bg-panel-2); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a:active { transform: scale(0.97); }
.nav-links a.active { color: var(--orange); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  order: 3;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--off-white);
}

.logo { margin-right: auto; }

.lang-switch {
  position: relative;
  order: 2;
}

.lang-switch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--sand);
  background: var(--bg-panel);
  border: var(--border-hard);
  border-radius: 2px;
  padding: 8px 12px;
  white-space: nowrap;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.lang-switch-btn:hover { color: var(--off-white); border-color: var(--sand); }
.lang-switch-btn:active { transform: scale(0.97); }
.lang-switch-caret { color: var(--sand-dim); font-size: 0.7rem; transition: transform 0.15s; }
.lang-switch.open .lang-switch-caret { transform: rotate(180deg); }

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--bg-panel);
  border: var(--border-hard);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 200;
  transform-origin: top right;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(-4px);
  transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out), visibility 0s linear 0.15s;
}
.lang-switch.open .lang-switch-menu {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  transition: opacity 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}

.lang-switch-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px 14px;
  color: var(--sand);
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
  transition: color 0.15s, background 0.15s;
}
.lang-switch-item:hover { background: var(--bg-panel-2); color: var(--off-white); }
.lang-switch-item.active { color: var(--success); font-weight: 600; }

html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .eyebrow::before { margin-left: 10px; margin-right: 0; }
html[dir="rtl"] .lang-switch-menu { right: auto; left: 0; }
html[dir="rtl"] .draw-canvas,
html[dir="rtl"] .map-stage,
html[dir="rtl"] .map-canvas { direction: ltr; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease-out), background 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.btn-primary {
  background: linear-gradient(180deg, #FF6F26 0%, var(--orange) 55%, var(--orange-dim) 100%);
  color: var(--on-orange);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #FF8A4D 0%, #FF6F26 55%, var(--orange) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 85, 0, 0.25);
}

.btn-outline {

  background: transparent;
  border-color: var(--steel-light);
  color: var(--off-white);
}
.btn-outline:hover { border-color: var(--sand); background: var(--bg-panel-2); }
.btn-primary:active { transform: translateY(-1px) scale(0.97); }
.btn-outline:active { transform: scale(0.97); }
.btn-primary:disabled, .btn-outline:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.hero {
  padding: 90px 0 70px;
  border-bottom: var(--border-hard);
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, var(--bg-deep) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-grid > div:first-child > * { animation: fadeSlideUp 0.6s var(--ease-out) both; }
.hero-grid > div:first-child > *:nth-child(1) { animation-delay: 0s; }
.hero-grid > div:first-child > *:nth-child(2) { animation-delay: 0.08s; }
.hero-grid > div:first-child > *:nth-child(3) { animation-delay: 0.16s; }
.hero-grid > div:first-child > *:nth-child(4) { animation-delay: 0.24s; }
.hero-panel { animation: fadeSlideUp 0.6s var(--ease-out) 0.1s both; }

.hero h1 span { color: var(--orange); }

.hero-sub {
  color: var(--sand);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 46ch;
  margin: 20px 0 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-panel {
  background: linear-gradient(165deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: var(--border-hard);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-md), var(--inset-highlight);
}
.hero-panel::before {
  content: "SITREP";
  position: absolute;
  top: -11px;
  left: 20px;
  background: var(--bg-deep);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--orange);
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.status-row:last-child { border-bottom: none; }
.status-row span:first-child::before {
  content: "▸ ";
  color: var(--orange-dim);
}
.status-row .val { color: var(--sand); }
.status-row .val.on {
  color: var(--success);
  animation: status-glow 2.2s ease-in-out infinite;
}

@keyframes status-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%      { text-shadow: 0 0 8px rgba(107, 142, 78, 0.6); }
}

.section { padding: 64px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 36px;
  gap: 20px;
  flex-wrap: wrap;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.db-overview-section { margin-bottom: 48px; }
.db-overview-section:last-child { margin-bottom: 0; }
.db-overview-section .section-head { margin-bottom: 20px; }
.db-overview-section .section-head h2 { font-size: 1.3rem; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.db-index { border-top: var(--border-hard); }
.db-index-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: var(--border-hard);
  transition: background 0.15s, transform 0.15s;
}
.db-index-row:hover { background: var(--bg-panel-2); transform: translateX(8px); }
.db-index-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--orange);
  border: 1px solid var(--orange-dim);
  border-radius: 2px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.db-index-body { flex: 1; min-width: 0; }
.db-index-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.db-index-body p { color: var(--sand); font-size: 0.85rem; }
.db-index-arrow {
  color: var(--sand-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.db-index-row:hover .db-index-arrow { color: var(--orange); transform: translateX(4px); }

.card {
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: var(--border-hard);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow-sm), var(--inset-highlight);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  overflow: hidden;
}
.card::after, .mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,85,0,0.06) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.5s;
  pointer-events: none;
}
.card:hover::after, .mode-card:hover::after { transform: translateX(120%); }
.card:hover {
  border-color: var(--sand-dim);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), var(--inset-highlight);
}
.card:active { transform: translateY(-6px) scale(0.98); }

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255,85,0,0.1);
  border: 1px solid rgba(255,85,0,0.3);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,85,0,0.12);
  padding: 3px 8px;
  display: inline-block;
  margin-bottom: 14px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--sand); font-size: 0.9rem; }

.map-name { text-transform: uppercase; letter-spacing: 0.03em; }

.card-thumb {
  height: 130px;
  margin: -22px -22px 18px -22px;
  background-size: cover;
  background-position: center;
  border-bottom: var(--border-hard);
  position: relative;
}
.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,18,16,0) 45%, rgba(13,18,16,0.6) 100%);
}

.item-weight-overlay {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  z-index: 1;
}
.item-weight-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
}
.item-slot-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-slot-row { display: flex; gap: 2px; }
.item-slot-cell {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.1);
}
.item-slot-cell.filled { background: #fff; }

.card-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sand-dim);
}

.news-banner {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-bottom: var(--border-hard);
}
.article-container { max-width: 760px; }
.article-back {
  display: inline-block;
  color: var(--sand-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 24px;
  text-decoration: none;
}
.article-back:hover { color: var(--orange); }
.article-body { color: var(--sand); font-size: 1rem; line-height: 1.75; margin-top: 24px; }
.article-body p { margin-bottom: 18px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 { color: var(--off-white); margin: 28px 0 14px; line-height: 1.3; }
.article-body h1:first-child, .article-body h2:first-child, .article-body h3:first-child, .article-body h4:first-child { margin-top: 0; }
.article-body strong { color: var(--off-white); }
.article-body a { color: var(--orange); }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 1.4em; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 3px solid var(--orange);
  margin: 0 0 18px;
  padding: 4px 0 4px 16px;
  color: var(--sand-dim);
  font-style: italic;
}
.article-body img { max-width: 100%; height: auto; display: block; margin: 20px 0; border-radius: 2px; }
.article-body hr { border: none; border-top: 1px solid var(--steel-light); margin: 28px 0; }
.article-body pre {
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 14px 16px;
  margin: 0 0 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.article-body code { font-family: var(--font-mono); }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 0.92rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--steel-light);
  padding: 8px 10px;
  text-align: left;
}
.article-body th { background: var(--bg-panel-2); color: var(--off-white); }
.article-body .ql-indent-1 { padding-left: 2em; }
.article-body .ql-indent-2 { padding-left: 4em; }
.article-body .ql-indent-3 { padding-left: 6em; }
.article-body .ql-indent-4 { padding-left: 8em; }
.article-body .ql-indent-5 { padding-left: 10em; }
.article-body .ql-indent-6 { padding-left: 12em; }
.article-body .ql-indent-7 { padding-left: 14em; }
.article-body .ql-indent-8 { padding-left: 16em; }

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg-panel-2);
  border: var(--border-hard);
  margin-top: 20px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.mode-select-grid { gap: 28px; }
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-panel-2) 100%);
  border: var(--border-hard);
  padding: 40px 32px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm), var(--inset-highlight);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
.mode-card:hover {
  border-color: var(--sand-dim);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), var(--inset-highlight);
}
.mode-card:active { transform: translateY(-6px) scale(0.98); }
.mode-card h2 { font-size: 1.8rem; margin: 6px 0 10px; }
.mode-card p { color: var(--sand); font-size: 1rem; margin-bottom: 24px; max-width: 40ch; }
.mode-card-cta { margin-top: auto; }

.loadout-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-panel-2);
  border: 1px dashed var(--steel-light);
  padding: 8px 10px;
  margin-top: 14px;
  font-size: 0.7rem;
}
.loadout-code-label { color: var(--sand-dim); flex-shrink: 0; }
.loadout-code-value { color: var(--success); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-code-btn {
  background: none;
  border: none;
  color: var(--sand);
  font-size: 1rem;
  padding: 2px 4px;
  flex-shrink: 0;
}
.copy-code-btn:hover { color: var(--orange); }
.copy-code-btn:disabled { opacity: 0.5; cursor: default; color: var(--sand); }
.copy-code-btn.copied { color: var(--success); }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 16px;
  background: var(--bg-panel);
  border: var(--border-hard);
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--steel-light);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: 2px;
  transition: border-color 0.15s var(--ease-out), background 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.1s var(--ease-out);
}
.filter-btn:hover { border-color: var(--sand); }
.filter-btn:active { transform: scale(0.96); }
.filter-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.filter-btn.active {
  background: linear-gradient(180deg, #FF6F26 0%, var(--orange) 100%);
  border-color: var(--orange);
  color: var(--on-orange);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(255, 85, 0, 0.3);
}

.loadout-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loadout-row {
  background: var(--bg-panel);
  border: var(--border-hard);
  transition: border-color 0.2s;
}
.loadout-row:hover { border-color: var(--sand-dim); }

.loadout-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  flex-wrap: wrap;
}

.loadout-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  color: var(--success);
  font-size: 1rem;
  object-fit: contain;
  padding: 3px;
}

.loadout-name-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.loadout-name {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.loadout-tags {
  font-size: 0.7rem;
  color: var(--sand-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.loadout-tags .tag-sep { margin: 0 6px; opacity: 0.5; }

.meta-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  border: 1px solid var(--orange);
  background: rgba(255,85,0,0.12);
  padding: 6px 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

.loadout-updated {
  font-size: 0.7rem;
  color: var(--sand-dim);
  margin-left: auto;
  white-space: nowrap;
}

.loadout-details-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--success);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}
.loadout-details-btn:hover { background: rgba(107,142,78,0.12); }
.loadout-details-btn[aria-expanded="true"] { background: var(--success); color: var(--on-orange); }

.loadout-row-details {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 0 18px 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--steel);
}
.loadout-row.open .loadout-row-details { display: flex; padding-top: 16px; }

.tier-select-wrap { position: relative; }
.tier-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-panel-2);
  border: 1px solid var(--success);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 34px 10px 14px;
  border-radius: 2px;
  min-width: 170px;
}
.tier-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15);
}
.tier-select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  pointer-events: none;
  font-size: 0.9rem;
}

.loadout-row-details .loadout-code-row {
  margin-top: 0;
  min-width: 220px;
}

.loadout-detail-image {
  margin-left: auto;
  width: 130px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  padding: 6px;
  position: relative;
}
.loadout-detail-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.stat-line { margin: 8px 0; }
.stat-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand-dim);
  margin-bottom: 3px;
  text-transform: uppercase;
}
.stat-track {
  height: 5px;
  background: var(--steel);
  position: relative;
}
.stat-fill {
  height: 100%;
  background: var(--orange);
}

.ammo-admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.ammo-admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
}
.ammo-admin-item img {
  width: 34px;
  height: 26px;
  object-fit: contain;
  background: var(--bg-panel);
  flex-shrink: 0;
}
.ammo-admin-item .ammo-admin-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--sand);
}
.chip-remove {
  background: none;
  border: none;
  color: var(--sand-dim);
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}
.chip-remove:hover { color: var(--danger); }

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 8px;
}
.detail-header-text { flex: 1; min-width: 0; }
.detail-header .loadout-detail-image { flex-shrink: 0; }

.detail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-section {
  background: var(--bg-panel);
  border: var(--border-hard);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.detail-section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .detail-header { flex-direction: column-reverse; }
  .detail-grid-2 { grid-template-columns: 1fr; }
}

.stat-label-left { display: flex; align-items: center; gap: 8px; }
.stat-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  border-radius: 4px;
  flex-shrink: 0;
}
.stat-icon { width: 18px; height: 18px; object-fit: contain; filter: drop-shadow(0 0 1px rgba(0,0,0,0.6)); }

.ammo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.ammo-card {
  --ammo-color: var(--steel-light);
  max-width: 120px;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--ammo-color) 24%, transparent), transparent 60%),
    var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  border-top: 3px solid var(--ammo-color);
  padding: 6px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ammo-card:hover {
  transform: translateY(-2px);
  border-color: var(--ammo-color);
}
.ammo-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: color-mix(in srgb, var(--ammo-color) 55%, var(--bg-panel));
  margin-bottom: 5px;
}
.ammo-card-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.produce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.produce-card {
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  padding: 14px;
}
.produce-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.produce-card-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--bg-panel);
  border: 1px solid var(--steel-light);
  border-radius: 4px;
  flex-shrink: 0;
}
.produce-card-name { font-weight: 600; color: var(--off-white); font-size: 0.9rem; line-height: 1.25; }
.produce-card-meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--sand-dim); margin-top: 3px; }
.produce-card-materials { display: flex; flex-wrap: wrap; gap: 6px; }
.produce-material-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-panel);
  border: 1px solid var(--steel);
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand);
}
.produce-material-chip img { width: 18px; height: 18px; object-fit: contain; }

.spec-list { max-width: 480px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.spec-row:last-child { border-bottom: none; }
.spec-row .spec-label { color: var(--sand-dim); text-transform: uppercase; font-size: 0.7rem; }
.spec-row .spec-value { color: var(--off-white); }

.stat-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  margin-bottom: 16px;
}
.stat-input-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--sand-dim);
  text-transform: uppercase;
}
.stat-input-grid input { margin-bottom: 0; }

.gear-level-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-panel-2);
  border: 1px solid var(--orange-dim);
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.layer-panel {
  background: var(--bg-panel);
  border: var(--border-hard);
}
.layer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 14px 16px;
  border-bottom: 1px solid var(--steel);
}

.layer-group { border-bottom: 1px solid var(--steel); }
.layer-group:last-of-type { border-bottom: none; }

.layer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 14px 16px;
  text-align: left;
}
.layer-group-toggle:hover { background: var(--bg-panel-2); }
.layer-group-toggle > span:nth-child(2) { flex: 1; }

.standalone-toggle-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 14px 16px;
}
.standalone-toggle-row > span:first-child { flex: 1; }

.layer-group-toggle .chevron {
  color: var(--orange);
  font-size: 1rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.layer-group.open .chevron { transform: rotate(90deg); }

.layer-switch {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--steel);
  border: 1px solid var(--steel-light);
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.layer-switch::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sand);
  transition: transform 0.18s ease, background 0.18s ease;
}
.layer-switch.on {
  background: var(--orange);
  border-color: var(--orange);
}
.layer-switch.on::after {
  transform: translateX(14px);
  background: var(--on-orange);
}

.layer-group-body {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 4px 16px 16px;
}
.layer-group.open .layer-group-body { display: grid; }

.layer-icon-btn {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--steel);
  background: var(--bg-panel-2) center/62% no-repeat;
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
  opacity: 0.45;
}
.layer-icon-btn:hover { border-color: var(--sand); }
.layer-icon-btn.active {
  opacity: 1;
  border-color: var(--orange);
  background-color: rgba(255, 85, 0, 0.14);
}

.layer-panel-actions {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
}
.btn-mini {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-radius: 2px;
  transition: border-color 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.1s var(--ease-out);
}
.btn-mini:hover { border-color: var(--sand); color: var(--off-white); }
.btn-mini:active { transform: scale(0.96); }
.btn-mini:disabled { opacity: 0.5; cursor: default; transform: none; }

.verified-badge, .owner-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
}
.verified-badge { background: url('../bilder/icons/golden-verified.png') center / contain no-repeat; }
.owner-badge { background: url('../bilder/icons/owner.png') center / contain no-repeat; }

.config-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(196, 64, 44, 0.15);
  border: 1px solid var(--danger);
  color: var(--off-white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 10px 16px;
  max-width: 90%;
  text-align: center;
}
.config-banner code {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
}

.building-panel {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 18, 16, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--steel-light);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: transform 0.3s var(--ease-out-2), opacity 0.25s ease;
  max-width: 90%;
  flex-wrap: wrap;
  justify-content: center;
}
.building-panel.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.building-panel-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  font-size: 0.85rem;
  white-space: nowrap;
  padding-right: 4px;
  border-right: 1px solid var(--steel-light);
  margin-right: 4px;
}
.building-panel-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 3px;
}
.building-panel-tabs button {
  background: transparent;
  border: none;
  color: var(--sand-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.building-panel-tabs button:hover { background: rgba(255, 255, 255, 0.06); color: var(--sand); }
.building-panel-tabs button.active {
  background: var(--orange);
  color: var(--on-orange);
}
.building-panel-close {
  background: none;
  border: none;
  color: var(--sand-dim);
  font-size: 0.85rem;
  padding: 4px 6px;
  margin-left: 2px;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}
.building-panel-close:hover { color: var(--orange); background: rgba(255, 255, 255, 0.06); }

.draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  z-index: 20;
  pointer-events: none;
  cursor: crosshair;
}
.draw-canvas.active { pointer-events: auto; }

.draw-panel.floating {
  position: absolute;
  top: 16px;
  right: 16px;
  left: auto;
  z-index: 31;
  width: 248px;
  background: rgba(13, 18, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg), var(--inset-highlight);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
  max-height: calc(100% - 32px);
  overflow-y: auto;
}
.draw-panel.floating.open { transform: translateX(0); opacity: 1; }
.draw-panel-body { padding: 16px; }

.admin-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand-dim);
  margin: 14px 0 6px;
}
.admin-label:first-of-type { margin-top: 0; }

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.draw-disclaimer {
  font-size: 0.7rem;
  color: var(--sand-dim);
  line-height: 1.5;
  margin-top: 10px;
}

.draw-panel-body .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.draw-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.draw-tools:has(.draw-tool-btn:nth-child(5)) { grid-template-columns: repeat(5, 1fr); }

.draw-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-2);
  border: 2px solid var(--steel);
  color: var(--sand);
  font-size: 0;
  line-height: 0;
  padding: 11px 0;
  border-radius: 8px;
  opacity: 0.75;
  transition: border-color 0.15s var(--ease-out), background-color 0.15s var(--ease-out), color 0.15s var(--ease-out), opacity 0.15s var(--ease-out);
}
.draw-tool-btn:hover { border-color: var(--sand); color: var(--off-white); opacity: 1; }
.draw-tool-btn.active { border-color: var(--orange); background: rgba(255,85,0,0.15); color: var(--orange); opacity: 1; }

.draw-tool-btn::before {
  content: '';
  display: block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.draw-tool-btn[data-tool="none"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='4,2 4,18.5 8.2,14.7 11.3,21 14,19.7 11,13.5 17,13.2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolygon points='4,2 4,18.5 8.2,14.7 11.3,21 14,19.7 11,13.5 17,13.2'/%3E%3C/svg%3E");
}
.draw-tool-btn[data-tool="pen"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(45 12 12)'%3E%3Crect x='10.2' y='1.5' width='3.6' height='2' rx='0.5'/%3E%3Crect x='10.5' y='3.3' width='3' height='13.2' rx='0.4'/%3E%3Cpolygon points='10.5,16.5 13.5,16.5 12,20.5'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg transform='rotate(45 12 12)'%3E%3Crect x='10.2' y='1.5' width='3.6' height='2' rx='0.5'/%3E%3Crect x='10.5' y='3.3' width='3' height='13.2' rx='0.4'/%3E%3Cpolygon points='10.5,16.5 13.5,16.5 12,20.5'/%3E%3C/g%3E%3C/svg%3E");
}
.draw-tool-btn[data-tool="route"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5,18 L12,7 L19,14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='5' cy='18' r='2.3'/%3E%3Ccircle cx='12' cy='7' r='2.3'/%3E%3Ccircle cx='19' cy='14' r='2.3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5,18 L12,7 L19,14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='5' cy='18' r='2.3'/%3E%3Ccircle cx='12' cy='7' r='2.3'/%3E%3Ccircle cx='19' cy='14' r='2.3'/%3E%3C/svg%3E");
}
.draw-tool-btn[data-tool="radius"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='black' stroke-width='2' stroke-dasharray='3.6 3.6'/%3E%3Ccircle cx='12' cy='12' r='1.7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='black' stroke-width='2' stroke-dasharray='3.6 3.6'/%3E%3Ccircle cx='12' cy='12' r='1.7'/%3E%3C/svg%3E");
}
.draw-tool-btn[data-tool="icon"]::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='9.3' r='5.3'/%3E%3Cpolygon points='7.2,12.6 16.8,12.6 12,21'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='9.3' r='5.3'/%3E%3Cpolygon points='7.2,12.6 16.8,12.6 12,21'/%3E%3C/svg%3E");
}

.draw-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.draw-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: var(--inset-highlight);
  transition: transform 0.12s var(--ease-out), border-color 0.15s var(--ease-out);
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
}
.draw-color:hover { transform: scale(1.12); }
.draw-color.active { border-color: var(--off-white); transform: scale(1.06); }

.draw-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.draw-icon-choice {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--steel);
  background-color: var(--bg-panel-2);
  background-size: 65%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.75;
  transition: border-color 0.15s var(--ease-out), opacity 0.15s var(--ease-out), transform 0.12s var(--ease-out);
}
.draw-icon-choice:hover { border-color: var(--sand); opacity: 1; transform: scale(1.05); }
.draw-icon-choice.active { border-color: var(--orange); opacity: 1; }

.draw-panel-body input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--steel);
  outline: none;
  margin: 6px 0 4px;
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
}
.draw-panel-body input[type="range"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.25);
}
.draw-panel-body input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--on-orange);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s var(--ease-out);
}
.draw-panel-body input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
.draw-panel-body input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--steel);
}
.draw-panel-body input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--on-orange);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s var(--ease-out);
}
.draw-panel-body input[type="range"]:hover::-moz-range-thumb { transform: scale(1.15); }

.map-page { padding: 0; }

.map-toolbar {
  border-top: var(--border-hard);
  border-bottom: var(--border-hard);
  background: var(--bg-panel);
  padding: 12px 0;
}
.map-toolbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.map-select { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-toggle { display: flex; gap: 8px; }

.floor-tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--steel);
}
.floor-label { color: var(--sand-dim); font-size: 0.75rem; }
.floor-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  background: rgba(13, 18, 16, 0.6);
  border: 1px solid var(--steel);
  border-radius: 999px;
  padding: 4px;
}
.floor-tab {
  background: transparent;
  border: none;
  color: var(--sand-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
}
.floor-tab:hover { background: rgba(255, 85, 0, 0.12); color: var(--sand); }
.floor-tab:active { transform: scale(0.96); }
.floor-tab.active {
  background: var(--orange);
  color: var(--on-orange);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(255, 85, 0, 0.35);
}

.map-full-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #0a0e0c;
  overflow: hidden;
}

body.locked-map-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body.locked-map-page main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.locked-map-page .map-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-full-stage .map-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  cursor: url('../bilder/icons/cursor-move.png') 11 11, grab;
  overflow: hidden;

  touch-action: none;
}
.map-full-stage .map-stage:active { cursor: url('../bilder/icons/cursor-move.png') 11 11, grabbing; }

.room-box-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
}

.map-canvas {
  position: absolute;
  transform-origin: 0 0;

}

.map-canvas.button-zoom {
  transition: transform 0.2s ease-out;
}
.map-canvas img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
}

.building-overlay-img {
  position: absolute;
  user-select: none;
  pointer-events: none;
  opacity: 1;
  transform: scale(1);
  transform-origin: center;

  filter: url(#buildingOutline) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  transition: opacity 0.35s var(--ease-out-2), transform 0.35s var(--ease-out-2);
  z-index: 2;
}
.building-overlay-img.hidden-floor {
  opacity: 0;
  transform: scale(0.97);
  visibility: hidden;
}

.map-canvas.interacting .building-overlay-img {
  filter: none;
}

.map-canvas.extreme-zoom .building-overlay-img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.overlay-drag-preview {
  position: absolute;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  outline: 2px dashed var(--orange);
  cursor: move;
  z-index: 15;
}
.layer-panel.floating {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 30;
  width: 260px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  background: rgba(13, 18, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg), var(--inset-highlight);
  transform: translateX(-120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.layer-panel.floating.open { transform: translateX(0); opacity: 1; }

.panel-close {
  background: none;
  border: none;
  color: var(--sand);
  font-size: 0.9rem;
  padding: 4px 8px;
}
.panel-close:hover { color: var(--orange); }

#panelToggle { flex-shrink: 0; }

.map-controls.floating {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-controls.floating button {
  background: rgba(22, 28, 25, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--steel-light);
  border-radius: 10px;
  color: var(--off-white);
  width: 44px;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 1rem;
  box-shadow: var(--shadow-sm), var(--inset-highlight);
  transition: border-color 0.15s var(--ease-out), color 0.15s var(--ease-out), transform 0.12s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.map-controls.floating button:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }
.map-controls.floating button:active { transform: scale(0.94); }

.map-marker {
  position: absolute;
  width: 42px;
  height: 42px;
  --inv: 1;

  --mx: 0px;
  --my: 0px;
  transform: translate(var(--mx), var(--my)) translate(-50%, -50%) scale(var(--inv));
  border-radius: 50%;
  border: 2px solid rgba(237,234,224,0.85);
  background: rgba(13,18,16,0.55);
  cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--off-white);
  transition: transform 0.1s;
  z-index: 5;
}
.map-marker:hover, .map-marker.selected {
  transform: translate(var(--mx), var(--my)) translate(-50%, -50%) scale(calc(var(--inv) * 1.25));
  z-index: 10;
}
.map-marker.hidden-layer { display: none; }

.map-marker::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.map-marker.safe::after        { background: #C9A86C; }
.map-marker.weaponcrate::after { background: var(--orange); }
.map-marker.valuables::after   { background: #D9C36B; }
.map-marker.crate::after       { background: #9A8F6E; }
.map-marker.keycard::after     { background: #6C9BC9; }
.map-marker.spawn::after       { background: #7FB0E0; }
.map-marker.extract::after     { background: var(--success); }
.map-marker.task::after        { background: #B08CC9; }
.map-marker.station::after     { background: #8CC9B4; }
.map-marker.enemy::after       { background: var(--danger); }
.map-marker.boss::after        { background: #8A1F12; }
.map-marker.egg::after         { background: #C9A86C; }
.map-marker.event::after       { background: #C96CAE; }
.map-marker.building::after    { background: #7A8B99; }
.map-marker.building {
  width: 50px;
  height: 50px;
  border-color: #EDEAE0;
  border-width: 3px;
}
.map-marker.building::after {
  width: 18px;
  height: 18px;
}

.map-marker.has-icon {
  background-size: 80% 80%;
  background-repeat: no-repeat;
  background-position: center;
  border-color: rgba(237,234,224,0.6);
}
.map-marker.has-icon::after { display: none; }

.map-marker.is-random {
  background: rgba(224, 184, 74, 0.55);
  border-color: var(--gold);
}

.map-marker.in-keycard-room {
  box-shadow: 0 0 0 3px var(--orange);
}
.map-marker.in-keycard-room:hover,
.map-marker.in-keycard-room.selected {
  box-shadow: 0 0 0 3px var(--orange), 0 0 10px 2px rgba(255, 85, 0, 0.6);
}

.map-marker.has-found-item::before {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #C96CAE;
  border: 2px solid var(--bg-deep);
  z-index: 1;
}

.map-marker.pending {
  width: 14px;
  height: 14px;
  border: 2px solid var(--orange);
  background: rgba(255, 85, 0, 0.35);
  pointer-events: none;
}
.map-marker.pending::after { display: none; }

.placement-crosshair {
  position: absolute;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 600;
}
.placement-crosshair::before,
.placement-crosshair::after {
  content: "";
  position: absolute;
  background: var(--orange);
}
.placement-crosshair::before {
  left: 50%; top: 0;
  width: 1px; height: 100%;
  transform: translateX(-50%);
}
.placement-crosshair::after {
  top: 50%; left: 0;
  height: 1px; width: 100%;
  transform: translateY(-50%);
}

.map-popup {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 30;
  width: 280px;
  background: rgba(13, 18, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--border-hard);
  box-shadow: var(--shadow-lg), var(--inset-highlight);
  transform: translateX(120%) scale(0.97);
  opacity: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.map-popup.show { transform: translateX(0) scale(1); opacity: 1; }

.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--sand);
  font-size: 0.9rem;
  z-index: 2;
  padding: 6px;
}
.popup-close:hover { color: var(--orange); }

.popup-img {
  --popup-icon: none;
  width: 100%;
  height: 140px;
  background-color: var(--bg-panel-2);
  background-image:
    var(--popup-icon),
    radial-gradient(ellipse at center, rgba(255,85,0,0.16) 0%, rgba(255,85,0,0) 62%),
    linear-gradient(rgba(196,184,150,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,184,150,0.05) 1px, transparent 1px);
  background-size: 56px 56px, auto, 22px 22px, 22px 22px;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  border-bottom: 1px solid var(--steel);
}
.popup-img.is-photo {
  background-image: var(--popup-icon);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.popup-body { padding: 16px; }
.popup-body h3 { font-size: 1rem; margin: 8px 0 6px; }
.popup-body p { font-size: 0.85rem; color: var(--sand); }

.popup-unlocks {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--steel);
}
.popup-unlocks-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.room-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}
.room-icon-grid .icon-cell {
  width: 28px;
  height: 28px;
  background-color: var(--bg-panel-2);
  background-size: 80% 80%;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--steel-light);
  border-radius: 3px;
}
.room-icon-grid .icon-cell.is-random {
  background-color: rgba(224, 184, 74, 0.55);
  border-color: var(--gold);
}

.popup-random-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(224, 184, 74, 0.12);
  border: 1px solid rgba(224, 184, 74, 0.35);
  padding: 3px 8px;
  border-radius: 2px;
  margin-left: 6px;
}

.map-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.map-controls button {
  background: linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--steel-light);
  color: var(--off-white);
  width: 44px;
  height: 44px;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm), var(--inset-highlight);
  transition: border-color 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}
.map-controls button:hover { border-color: var(--sand); transform: translateY(-1px); }
.map-controls button:active { transform: scale(0.94); }

.site-footer {
  border-top: var(--border-hard);
  padding: 48px 0 28px;
  margin-top: 60px;
  color: var(--sand-dim);
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--sand); font-size: 0.85rem; margin-bottom: 14px; letter-spacing: 0.06em;}
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul li a:hover { color: var(--orange); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 14px;
}
.footer-legal a { color: var(--sand-dim); }
.footer-legal a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid var(--steel);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-auth {
  display: contents;
}
.nav-logout-btn {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  color: var(--sand);
  background: none;
  border: none;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}
.nav-logout-btn:hover { color: var(--off-white); background: var(--bg-panel-2); }
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-panel-2) center/cover no-repeat;
  border: 1px solid var(--steel-light);
  flex-shrink: 0;
}

.nav-profile-wrap {
  position: relative;
  display: inline-flex;
}
.nav-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: var(--bg-panel-2);
  border: none;
  border-radius: 20px;
  padding: 6px 12px 6px 6px;
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-profile-trigger:hover { background: var(--steel); color: var(--off-white); }
.nav-profile-caret { color: var(--sand-dim); font-size: 0.7rem; transition: transform 0.15s; }
.nav-profile-wrap.open .nav-profile-caret { transform: rotate(180deg); }

.nav-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-panel);
  border: var(--border-hard);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: none;
  flex-direction: column;
}
.nav-profile-wrap.open .nav-profile-menu { display: flex; }
.nav-profile-menu a, .nav-profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  color: var(--sand);
  background: none;
  border: none;
  border-bottom: 1px solid var(--steel);
  white-space: nowrap;
}
.nav-profile-menu a:last-child, .nav-profile-menu button:last-child { border-bottom: none; }
.nav-profile-menu a:hover, .nav-profile-menu button:hover { background: var(--steel); color: var(--off-white); }
html[dir="rtl"] .nav-profile-menu { right: auto; left: 0; }

.form-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel);
  border: var(--border-hard);
  padding: 28px;
}
.form-box h1, .form-box h2 { margin-bottom: 6px; }
.form-narrow { margin: 0 auto; }

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand-dim);
  margin: 16px 0 6px;
}
.form-label:first-of-type { margin-top: 0; }

.form-input {
  width: 100%;
  background: var(--bg-panel-2);
  border: 1px solid var(--steel-light);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 11px 12px;
  border-radius: 2px;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.form-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15);
}
textarea.form-input { resize: vertical; }

.form-hint { color: var(--sand-dim); font-size: 0.8rem; margin-top: 10px; }
.form-error {
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 12px;
  display: none;
}
.form-error.show { display: block; }
.form-success {
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 12px;
  display: none;
}
.form-success.show { display: block; }
.g-recaptcha { margin-top: 18px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.form-switch { margin-top: 18px; font-size: 0.9rem; color: var(--sand); }
.form-switch a { color: var(--orange); }
.form-switch a:hover { text-decoration: underline; }

.login-section { position: relative; overflow: hidden; }
.login-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-auto-rows: 48px;
  pointer-events: none;
}
.login-grid-bg .cell {
  border: 1px solid rgba(196, 184, 150, 0.05);
  background: transparent;
  transition: background 1.6s ease;
}
.login-grid-bg .cell.active {
  background: rgba(255, 85, 0, 0.28);
  transition: background 0s;
}
.login-section .container { z-index: 1; }

.profile-header {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-panel-2) center/cover no-repeat;
  border: 2px solid var(--steel-light);
  flex-shrink: 0;
}
.profile-name { margin-bottom: 6px; }
.profile-name .verified-badge, .profile-name .owner-badge { width: 26px; height: 26px; margin-left: 8px; }
.social-links { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--steel-light);
  border-radius: 2px;
  color: var(--sand);
}
.social-links a:hover { border-color: var(--orange); color: var(--off-white); }

.build-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--sand-dim);
}
.build-author img {
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-panel-2) center/cover no-repeat;
  border: 1px solid var(--steel-light);
}
.build-author a { color: var(--sand); }
.build-author a:hover { color: var(--orange); }
.build-attachment-link {
  display: block;
  margin-top: 10px;
  border: var(--border-hard);
  overflow: hidden;
}
.build-attachment-img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  transition: transform 0.3s;
}
.build-attachment-link:hover .build-attachment-img { transform: scale(1.04); }
.build-attachment-link { cursor: url('../bilder/icons/cursor-hand-24.png') 9 2, pointer; width: 100%; padding: 0; background: none; }

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 18, 16, 0.92);
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}
.image-lightbox.open { opacity: 1; pointer-events: auto; }
.image-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border: var(--border-hard);
  box-shadow: var(--shadow-lg);
}
.image-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--sand);
  font-size: 1.6rem;
  padding: 8px 12px;
}
.image-lightbox-close:hover { color: var(--orange); }
.build-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.build-code-value { color: var(--success); word-break: break-all; }
.build-card-actions { display: flex; gap: 8px; margin-top: 14px; }
.vote-btn {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 10px 16px;
}
.vote-btn.voted { color: var(--orange); border-color: var(--orange); }
.vote-btn.voted:hover { color: var(--orange); border-color: var(--orange); background: rgba(255, 85, 0, 0.1); }
.vote-btn:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .layer-panel { order: 2; }

  .layer-panel.floating {
    width: calc(100% - 32px);
    max-width: 320px;
  }
  .map-full-stage { height: 70vh; }
  .map-popup { width: calc(100% - 32px); max-width: 300px; }
}

@media (max-width: 1450px) {
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--bg-deep);
    border-bottom: var(--border-hard);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.25s, opacity 0.25s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--steel); width: 100%; }
  .nav-toggle { display: flex; }
}

@media (max-width: 640px) {
  .news-banner { height: 160px; }

  .lang-switch-btn { padding: 7px 9px; font-size: 0.7rem; }
  .lang-switch-current { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 44px 0; }

  .loadout-row-main { gap: 10px; }
  .loadout-updated { margin-left: 0; order: 5; width: 100%; }
  .loadout-details-btn { width: 100%; text-align: center; order: 6; }
  .loadout-row-details { flex-direction: column; align-items: stretch; }
  .tier-select { width: 100%; }
  .loadout-detail-image { width: 100%; height: 90px; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
