@font-face {
  font-family: BlenderProBook;
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/BlenderProBook.woff2") format("woff2");
}

@font-face {
  font-family: Oxanium;
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Oxanium.woff2") format("woff2");
}

@font-face {
  font-family: Cyberpunk;
  src: url("../fonts/Cyberpunk.otf") format("opentype");
}

:root {
  --bg-dark: #05070a;
  --panel-dark: rgba(10, 14, 20, 0.88);
  --accent-yellow: #F7F242;
  --accent-blue: #23BCBD;
  --text-main: #f4f4f4;
  --text-muted: #a7b0b8;
  --danger: #ff4d8d;
  --ncr-yellow: #f8ef02;
  --ncr-cyan: #00ffd2;
  --ncr-red: #ff003c;
  --ncr-blue: #136377;
  --ncr-purple: purple;
  --ncr-black: #000;
  --panel-cyber: rgba(1, 10, 12, 0.9);
  --panel-cyber-soft: rgba(1, 10, 12, 0.82);
  --razor-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='168' height='32' viewBox='0 0 168 32'%3E%3Cpath fill='%23000' d='M0 0h168v18h-10l-8 8-8-8h-10v12l-7-7-7 7V18H97v8l-9-9-9 9v-8H82l-7 7-7-7H56v12l-7-7-7 7V18H28l-8 8-8-8H0z'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text-main);
  background: var(--ncr-yellow);
  font-family: "BlenderProBook", "Oxanium", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
}

.site-page {
  min-height: 100%;
  color: #0b0b0b;
  background:
    linear-gradient(135deg, rgba(255, 0, 60, 0.08), transparent 24%),
    linear-gradient(315deg, rgba(0, 255, 210, 0.12), transparent 28%),
    var(--ncr-yellow);
}

.site-page:not(.map-page) {
  overflow: auto;
}

.map-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 300;
  padding: 10px 28px 24px;
  color: #fff;
  background: #000;
}

.site-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 22px;
}

.cyberpunk-font,
.cyberpunk-font *,
.cyberpunk-font-og,
.cyberpunk-font-og * {
  font-family: Cyberpunk, BlenderProBook, sans-serif !important;
  text-transform: uppercase !important;
  letter-spacing: -0.25em;
}

.cyberpunk-font-og,
.cyberpunk-font-og * {
  color: #feef00;
  text-shadow: #46dffb 1px 1px, #45aefb 2px 2px;
}

.cyberpunk-font-og {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  font-weight: 900;
  text-decoration: none;
}

.cyberpunk-font .c,
.cyberpunk-font-og .c {
  position: relative;
  top: -0.2em;
  font-size: 2em;
}

.cyberpunk-font .p,
.cyberpunk-font-og .p {
  position: relative;
  bottom: -0.25em;
  left: -0.15em;
  font-size: 2em;
  letter-spacing: -0.45em;
}

.site-title {
  position: relative;
  top: 8px;
  color: var(--ncr-yellow);
  font-size: clamp(1.4rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: rgba(0, 255, 210, 0.4) 2px 2px;
}

.fg-yellow {
  color: var(--ncr-yellow) !important;
}

.fg-cyan {
  color: var(--ncr-cyan) !important;
}

.fg-white {
  color: #fff !important;
}

.bg-black {
  background-color: #000 !important;
}

.f-x2-5 {
  font-size: 2.5em !important;
}

.f-x3-5 {
  font-size: 3.5em !important;
}

.cyber-glitch-3 {
  animation: cyber-glitch-3 1s linear infinite;
}

@keyframes cyber-glitch-3 {
  0%, 49% { visibility: visible; }
  50%, 100% { visibility: hidden; }
}

.cyber-h {
  display: block;
  width: 100%;
}

.cyber-h::after {
  content: "";
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 8px;
  background: currentColor;
  clip-path: polygon(0 0, 0 100%, 10% 100%, calc(10% + 4px) 2px, 100% 2px, 100% 0);
}

.cyber-razor-bottom::after,
.cyber-razor-top::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  height: 32px;
  background-image: var(--razor-pattern);
  background-repeat: repeat-x;
  background-size: 168px 32px;
  pointer-events: none;
}

.cyber-razor-bottom::after {
  bottom: -31px;
}

.cyber-razor-top::before {
  top: -31px;
  transform: rotate(180deg);
}

.site-nav {
  position: relative;
  z-index: 250;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  min-height: 48px;
  padding: 14px 18px 6px;
}

.site-nav a {
  color: var(--ncr-blue);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.site-nav a:hover {
  color: var(--ncr-purple);
  text-shadow: var(--ncr-cyan) 0 0 3px;
}

.character-back-link,
.character-edit-button,
.admin-tab,
.icon-button,
.menu-button {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 92% 100%, 92% 82%, 78% 82%, 78% 100%, 12px 100%, 0 calc(100% - 12px));
}

.glitchtext {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 2px 0 var(--ncr-cyan), -2px 0 var(--ncr-red);
  animation: glitchtext-shift 2.2s steps(2, end) infinite;
}

.glitchtext::before,
.glitchtext::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}

.glitchtext::before {
  color: var(--ncr-cyan);
  transform: translate(-2px, 0);
  clip-path: inset(0 0 58% 0);
}

.glitchtext::after {
  color: var(--ncr-red);
  transform: translate(2px, 0);
  clip-path: inset(56% 0 0 0);
}

.glitchtext:hover::before,
.glitchtext:hover::after,
.glitchtext:focus-visible::before,
.glitchtext:focus-visible::after {
  opacity: 0.72;
  animation: glitchtext-layer 420ms steps(2, end) infinite;
}

@keyframes glitchtext-shift {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(1px, -1px); }
  92% { transform: translate(-1px, 1px); }
}

@keyframes glitchtext-layer {
  0% { transform: translate(-3px, -1px); }
  50% { transform: translate(3px, 1px); }
  100% { transform: translate(-1px, 0); }
}

.site-footer {
  position: relative;
  margin-top: 46px;
  padding: 22px 24px 26px;
  color: #fff;
  background: #000;
}

.map-page .site-footer {
  margin-top: 0;
}

.site-footer h4 {
  margin: 0 0 8px;
  color: var(--ncr-yellow);
  font-size: 1.25rem;
}

.site-footer p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer a {
  color: var(--ncr-yellow);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ncr-cyan);
}

.site-footer__section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
}

.site-footer__section:last-child {
  margin-bottom: 0;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  width: 100vw;
  height: auto;
  min-height: 0;
  border-top: 3px solid #000;
}

.sidebar {
  position: relative;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.96), var(--panel-dark));
  border-right: 1px solid rgba(35, 188, 189, 0.35);
  box-shadow: 0 0 28px rgba(35, 188, 189, 0.12);
}

.sidebar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  color: var(--accent-yellow);
  font-size: 1.65rem;
  text-shadow: 0 0 12px rgba(247, 242, 66, 0.42);
}

h2 {
  font-size: 0.94rem;
}

.panel {
  padding: 13px;
  background: var(--panel-cyber-soft);
  border: 1px solid rgba(167, 176, 184, 0.18);
  border-radius: 8px;
  min-height: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.search-panel {
  position: relative;
  overflow: visible;
}

.search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.55);
  border-radius: 6px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.15);
}

.search-dropdown {
  position: absolute;
  top: calc(100% - 4px);
  right: 13px;
  left: 13px;
  z-index: 800;
  max-height: 260px;
  overflow: auto;
  background: rgba(5, 7, 10, 0.97);
  border: 1px solid rgba(247, 242, 66, 0.4);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.result-list {
  display: grid;
  gap: 8px;
  max-height: 30vh;
  overflow: auto;
  padding-right: 4px;
}

.layer-list {
  display: grid;
  gap: 5px;
  max-height: 42vh;
  overflow: auto;
  padding-right: 4px;
}

.result-item {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px;
  color: var(--text-main);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 176, 184, 0.16);
  border-radius: 6px;
  cursor: pointer;
}

.result-item:hover,
.result-item:focus-visible {
  border-color: var(--accent-yellow);
  background: rgba(247, 242, 66, 0.09);
}

.result-item small {
  color: var(--text-muted);
}

.result-item--compact {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.layer-item {
  display: grid;
  grid-template-columns: auto 14px 1fr;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 6px;
  cursor: pointer;
}

.layer-item input {
  accent-color: var(--accent-yellow);
}

.layer-item--all {
  grid-template-columns: auto 1fr;
  margin-bottom: 1px;
  background: rgba(247, 242, 66, 0.08);
  border: 1px solid rgba(247, 242, 66, 0.22);
}

.layer-item__swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.layer-item__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.layer-item__text--all {
  font-weight: 700;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.leaflet-tooltip-pane,
.leaflet-popup-pane {
  z-index: 1400;
}

.map {
  width: 100%;
  height: 100%;
  background: #020305;
}

.menu-button,
.icon-button {
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.78);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 6px;
  cursor: pointer;
}

.menu-button {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 700;
  display: none;
  padding: 9px 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
}

.sidebar__close {
  display: none;
}

.status-banner {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  color: var(--bg-dark);
  background: var(--accent-yellow);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.status-banner--error {
  color: #fff;
  background: var(--danger);
}

.marker-popup {
  color: #101418;
}

.marker-popup h3 {
  margin: 0 0 6px;
  color: #05070a;
}

.marker-popup p {
  margin: 8px 0;
}

.marker-popup img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.marker-popup a {
  color: #007378;
  font-weight: 700;
}

.marker-popup__action {
  display: inline-flex;
  margin-top: 8px;
  padding: 7px 9px;
  color: #05070a !important;
  text-decoration: none;
  background: var(--accent-yellow);
  border-radius: 5px;
}

.marker-popup__meta {
  color: #52606b;
  font-size: 0.82rem;
}

.polygon-overlay {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.polygon-tooltip {
  color: #05070a;
  background: rgba(247, 242, 66, 0.95);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.marker-tooltip {
  color: #05070a;
  background: rgba(247, 242, 66, 0.95);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}

.polygon-debug-label {
  max-width: 160px;
  padding: 3px 6px;
  color: #05070a;
  text-align: center;
  white-space: normal;
  background: rgba(247, 242, 66, 0.92);
  border: 1px solid rgba(5, 7, 10, 0.5);
  border-radius: 4px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  pointer-events: none;
}

.map-marker.marker-highlight {
  filter: drop-shadow(0 0 8px var(--accent-yellow)) drop-shadow(0 0 14px var(--accent-blue));
  z-index: 900 !important;
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(92vw, 380px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar__close,
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .map-stage,
  .map {
    width: 100vw;
    height: 100%;
    min-height: 0;
  }

  .result-list {
    max-height: 25vh;
  }

  .layer-list {
    max-height: 36vh;
  }
}

.character-page {
  min-height: 100%;
  overflow: auto;
}

.character-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.character-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.88);
  border: 2px solid rgba(0, 255, 210, 0.28);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.character-header__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.character-back-link {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: #05070a;
  font-weight: 800;
  text-decoration: none;
  background: var(--accent-yellow);
  border-radius: 6px;
}

.character-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.character-auth-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--panel-cyber);
  border: 1px solid rgba(167, 176, 184, 0.18);
  border-radius: 8px;
}

.character-auth-panel__intro,
.character-auth-panel > div {
  display: grid;
  gap: 2px;
}

.character-auth-panel span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.character-auth-forms {
  flex: 1 1 100%;
}

.login-shell {
  max-width: 780px;
}

.login-panel {
  display: grid;
  gap: 18px;
}

.login-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-forms h2 {
  margin: 0;
  font-size: 1rem;
}

.login-forms .character-auth-form {
  grid-template-columns: 1fr;
}

.character-auth-forms summary {
  color: var(--accent-yellow);
  cursor: pointer;
  font-weight: 800;
}

.character-auth-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 8px;
  margin-top: 10px;
}

.character-auth-form input {
  min-width: 0;
  padding: 8px 9px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 5px;
  outline: none;
}

.character-auth-form button {
  padding: 8px 10px;
  color: #05070a;
  font-weight: 800;
  background: var(--accent-yellow);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.character-list--detail {
  grid-template-columns: minmax(0, 760px);
}

.character-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  background: var(--panel-cyber);
  border: 1px solid rgba(167, 176, 184, 0.18);
  border-radius: 8px;
}

.character-list--detail .character-card {
  grid-template-columns: 220px 1fr;
  grid-template-rows: auto;
}

.character-card--active {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.18);
}

.character-card__image,
.character-card__placeholder {
  width: 100%;
  height: 260px;
  border-radius: 6px;
}

.character-card__image {
  object-fit: cover;
}

.character-card__image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.character-card__image-link:hover .character-card__image,
.character-card__image-link:hover .character-card__placeholder {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.14);
}

.character-list--detail .character-card__image,
.character-list--detail .character-card__placeholder {
  height: 300px;
}

.character-card__placeholder {
  display: grid;
  place-items: center;
  color: #05070a;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-blue));
  font-size: 1.4rem;
  font-weight: 900;
}

.character-card__body {
  min-width: 0;
}

.character-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.character-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.character-card h2 {
  margin-bottom: 8px;
  color: var(--accent-yellow);
}

.character-card h2 a {
  color: inherit;
  text-decoration: none;
}

.character-card h2 a:hover {
  text-decoration: underline;
}

.character-description p,
.empty-state {
  margin: 0;
  color: var(--text-main);
  line-height: 1.45;
}

.character-description a {
  color: var(--accent-yellow);
  font-weight: 800;
}

.bbcode-underline {
  text-decoration: underline;
}

.character-edit-button,
.character-delete-button,
.character-form button {
  color: #05070a;
  font-weight: 800;
  background: var(--accent-yellow);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.character-edit-button {
  flex: 0 0 auto;
  padding: 6px 8px;
  font-size: 0.82rem;
}

.admin-import-button {
  display: inline-flex;
  align-items: center;
}

.character-delete-button {
  flex: 0 0 auto;
  padding: 6px 8px;
  color: #fff;
  background: var(--danger);
  font-size: 0.82rem;
}

.character-form {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.character-form label {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.character-form__hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
}

.character-form input,
.character-form textarea {
  width: 100%;
  padding: 8px 9px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 5px;
  outline: none;
}

.character-form textarea {
  resize: vertical;
}

.character-form input:focus,
.character-form textarea:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.12);
}

.character-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.character-form button {
  padding: 8px 10px;
}

.character-form button[data-action="cancel"] {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(167, 176, 184, 0.22);
}

@media (max-width: 960px) {
  .character-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-list--detail .character-card {
    grid-template-columns: 180px 1fr;
  }
}

@media (max-width: 560px) {
  .character-list {
    grid-template-columns: 1fr;
  }

  .character-header,
  .character-card {
    display: block;
  }

  .character-list--detail .character-card {
    display: block;
  }

  .character-auth-form {
    grid-template-columns: 1fr;
  }

  .login-forms {
    grid-template-columns: 1fr;
  }

  .character-back-link {
    display: inline-flex;
    margin-top: 14px;
  }

  .character-header__actions,
  .character-card__heading,
  .character-card__actions {
    justify-content: flex-start;
  }

  .character-card__image,
  .character-card__placeholder {
    width: 100%;
    height: 220px;
    margin-bottom: 12px;
  }
}

.admin-page {
  min-height: 100%;
  overflow: auto;
}

.admin-login-shell {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 24px;
}

.admin-login {
  display: grid;
  gap: 13px;
  width: min(420px, 100%);
  padding: 18px;
  background: var(--panel-cyber);
  border: 1px solid rgba(167, 176, 184, 0.18);
  border-radius: 8px;
}

.admin-login label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-login input {
  width: 100%;
  padding: 10px 11px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 5px;
  outline: none;
}

.admin-login input:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.12);
}

.admin-login button {
  padding: 10px 12px;
  color: #05070a;
  font-weight: 800;
  background: var(--accent-yellow);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.admin-login__error {
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.admin-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.admin-grid,
.admin-tabs,
.character-list,
.character-auth-panel {
  position: relative;
}

.admin-logout-button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-tab {
  padding: 9px 13px;
  color: var(--ncr-yellow);
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(0, 255, 210, 0.38);
  border-radius: 6px;
  cursor: pointer;
}

.admin-tab:hover,
.admin-tab:focus-visible {
  color: #fff;
  border-color: var(--ncr-yellow);
  box-shadow: 0 0 0 2px rgba(248, 239, 2, 0.12);
}

.admin-tab.is-active {
  color: #05070a;
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  font-weight: 800;
}

.admin-tab--action {
  margin-left: auto;
  color: #05070a;
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  font-weight: 800;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 14px;
  min-height: 58vh;
}

.admin-list-panel,
.admin-editor-panel,
.admin-export-panel {
  min-width: 0;
  padding: 13px;
  background: var(--panel-cyber);
  border: 1px solid rgba(167, 176, 184, 0.18);
  border-radius: 8px;
}

.admin-list {
  display: grid;
  gap: 6px;
  max-height: 62vh;
  margin-top: 10px;
  overflow: auto;
}

.admin-list-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px;
  color: var(--text-main);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 176, 184, 0.14);
  border-radius: 6px;
  cursor: pointer;
}

.admin-list-item.is-active,
.admin-list-item:hover {
  border-color: var(--accent-yellow);
  background: rgba(247, 242, 66, 0.1);
}

.admin-list-item small {
  color: var(--text-muted);
}

.admin-form {
  display: grid;
  gap: 11px;
}

.admin-form h2 {
  color: var(--accent-yellow);
}

.admin-form label,
.admin-fieldset {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-form__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-export-panel textarea {
  width: 100%;
  padding: 8px 9px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 5px;
  outline: none;
}

.admin-form select {
  appearance: none;
}

.admin-form textarea,
.admin-export-panel textarea {
  resize: vertical;
}

.admin-upload-field input {
  padding: 7px;
}

.admin-wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-wysiwyg-toolbar button {
  padding: 6px 8px;
  color: var(--text-main);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(167, 176, 184, 0.22);
  border-radius: 5px;
  cursor: pointer;
}

.admin-wysiwyg-toolbar button:hover {
  color: #05070a;
  background: var(--accent-yellow);
}

.admin-wysiwyg-editor {
  min-height: 180px;
  padding: 10px;
  color: var(--text-main);
  background: rgba(5, 7, 10, 0.86);
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 5px;
  outline: none;
  line-height: 1.5;
}

.admin-wysiwyg-editor:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px rgba(247, 242, 66, 0.12);
}

.admin-wysiwyg-editor a {
  color: var(--accent-yellow);
}

.admin-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-marker-map-wrap {
  display: grid;
  gap: 6px;
}

.admin-marker-map {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #020305;
  border: 1px solid rgba(35, 188, 189, 0.45);
  border-radius: 6px;
}

.admin-polygon-map {
  height: 340px;
}

.admin-check {
  display: flex !important;
  align-items: center;
  gap: 7px;
  color: var(--text-main);
  font-weight: 500 !important;
}

.admin-check input {
  width: auto;
  accent-color: var(--accent-yellow);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-actions button {
  padding: 8px 10px;
  color: #05070a;
  font-weight: 800;
  background: var(--accent-yellow);
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.admin-actions button[data-admin-delete] {
  color: #fff;
  background: var(--danger);
}

.admin-actions button[data-admin-reset] {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(167, 176, 184, 0.22);
}

.admin-export-panel {
  margin-top: 14px;
}

.admin-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-local-state {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.admin-export-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-export-panel textarea {
  min-height: 220px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
}

@media (max-width: 820px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-list {
    max-height: 34vh;
  }

  .admin-marker-map {
    height: 220px;
  }

  .admin-polygon-map {
    height: 260px;
  }
}
