/* WoS-Mapper — Design analog WoS-Advisor (--wos-* Tokens) */

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --wos-bg: #0c1222;
  --wos-bg-accent: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(99, 102, 241, 0.22), transparent 55%);
  --wos-surface: #151d33;
  --wos-surface-elevated: #1c2642;
  --wos-text: #e8ecf4;
  --wos-muted: #94a3b8;
  --wos-border: rgba(148, 163, 184, 0.22);
  --wos-link: #a5b4fc;
  --wos-accent: #6366f1;
  --wos-accent-hover: #818cf8;
  --wos-topbar-bg: rgba(12, 18, 34, 0.92);
  --wos-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --wos-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 8px 28px rgba(0, 0, 0, 0.2);
  --wos-sidebar-width: 15.5rem;
  --wos-topbar-height: 3.5rem;
}

html[data-theme="light"] {
  color-scheme: light;
  --wos-bg: #eef2f7;
  --wos-bg-accent: radial-gradient(ellipse 120% 70% at 50% -15%, rgba(99, 102, 241, 0.12), transparent 50%);
  --wos-surface: #ffffff;
  --wos-surface-elevated: #f8fafc;
  --wos-text: #0f172a;
  --wos-muted: #64748b;
  --wos-border: rgba(15, 23, 42, 0.12);
  --wos-link: #4338ca;
  --wos-accent: #4f46e5;
  --wos-accent-hover: #6366f1;
  --wos-topbar-bg: rgba(255, 255, 255, 0.94);
  --wos-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --wos-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --wos-bg: #eef2f7;
    --wos-bg-accent: radial-gradient(ellipse 120% 70% at 50% -15%, rgba(99, 102, 241, 0.12), transparent 50%);
    --wos-surface: #ffffff;
    --wos-surface-elevated: #f8fafc;
    --wos-text: #0f172a;
    --wos-muted: #64748b;
    --wos-border: rgba(15, 23, 42, 0.12);
    --wos-link: #4338ca;
    --wos-accent: #4f46e5;
    --wos-accent-hover: #6366f1;
    --wos-topbar-bg: rgba(255, 255, 255, 0.94);
    --wos-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    --wos-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--wos-bg);
  background-image: var(--wos-bg-accent);
  color: var(--wos-text);
  overflow: hidden;
}

a {
  color: var(--wos-link);
}

.wos-shell {
  display: grid;
  grid-template-rows: var(--wos-topbar-height) 1fr;
  height: 100vh;
}

.wos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  background: var(--wos-topbar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wos-border);
  z-index: 50;
}

.wos-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.wos-topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.wos-topbar-about {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--wos-muted);
  font-size: 1rem;
  cursor: pointer;
}

.wos-topbar-about:hover {
  color: var(--wos-text);
  background: var(--wos-surface-elevated);
}

.wos-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wos-lang-group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 9999px;
  background: var(--wos-surface);
  border: 1px solid var(--wos-border);
}

.wos-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  color: var(--wos-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.wos-lang-btn:hover {
  color: var(--wos-text);
  background: var(--wos-surface-elevated);
}

.wos-lang-btn.is-active {
  color: #fff;
  background: var(--wos-accent);
}

.wos-topbar-nav-toggle,
.wos-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface);
  color: var(--wos-text);
  cursor: pointer;
}

.wos-topbar-nav-toggle:hover,
.wos-theme-toggle:hover {
  background: var(--wos-surface-elevated);
}

.wos-theme-icon {
  display: none;
}

.wos-theme-icon--sun {
  display: block;
}

html[data-theme="dark"] .wos-theme-icon--sun {
  display: none;
}

html[data-theme="dark"] .wos-theme-icon--moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wos-theme-icon--sun {
    display: none;
  }

  :root:not([data-theme="light"]) .wos-theme-icon--moon {
    display: block;
  }
}

html[data-theme="light"] .wos-theme-icon--sun {
  display: block;
}

html[data-theme="light"] .wos-theme-icon--moon {
  display: none;
}

.wos-app-body {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.wos-sidebar {
  flex: 0 0 var(--wos-sidebar-width);
  width: var(--wos-sidebar-width);
  padding: 0.75rem 0;
  overflow-y: auto;
  border-right: 1px solid var(--wos-border);
  transition: margin-left 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wos-shell[data-sidebar="closed"] .wos-sidebar {
  margin-left: calc(-1 * var(--wos-sidebar-width));
  opacity: 0;
  pointer-events: none;
}

.wos-shell--map {
  --wos-sidebar-width: 17.5rem;
}

.wos-shell--map .wos-workspace {
  padding: 0.5rem 0.65rem 0.5rem;
  overflow: hidden;
}

.wos-shell--map .wos-content {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wos-shell--map .wos-card--map {
  flex: 1;
  min-height: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
}

.wos-sidebar-map {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
  padding: 0.75rem 0.5rem 0.5rem;
  border-top: 1px solid var(--wos-border);
  margin-top: 0.5rem;
}

.wos-shell--map .wos-map-panel--select {
  flex: 1;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0.15rem;
  background: transparent;
  overflow: auto;
}

.wos-map-inspect-btn {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  font-size: 0.8rem;
}

.wos-map-capture {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
}

.wos-map-capture-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--wos-muted);
}

.wos-map-capture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.wos-map-capture-btn {
  margin: 0;
  min-height: 2.1rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.78rem;
}

.wos-inspect-result {
  max-height: 16rem;
  overflow: auto;
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.4rem;
  background: var(--wos-surface);
  color: var(--wos-text);
  font-size: 0.85rem;
  line-height: 1.4;
}

.wos-inspect-headline {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
}

.wos-inspect-section-title {
  margin: 0.65rem 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wos-muted);
}

.wos-inspect-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  margin: 0;
}

.wos-inspect-dl dt {
  margin: 0;
  color: var(--wos-muted);
}

.wos-inspect-dl dd {
  margin: 0;
}

.wos-inspect-error {
  margin: 0 0 0.5rem;
  color: #b91c1c;
}

.wos-map-zoom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.35rem;
}

.wos-map-zoom-btn {
  flex: 1 1 2.25rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.4rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.wos-map-zoom-btn:hover {
  background: var(--wos-hover, rgba(127, 127, 127, 0.12));
}

.wos-map-zoom-fit,
.wos-map-zoom-explorer {
  flex: 1 1 2.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.wos-map-zoom-level {
  flex: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--wos-muted);
  background: var(--wos-surface);
}

.wos-map-zoom-level[data-zoom-level="mittel"] {
  color: var(--wos-fg, var(--wos-text));
}

.wos-map-zoom-level[data-zoom-level="fein"] {
  color: var(--wos-link);
}

.wos-icon-previews {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
}

.wos-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 0.5rem;
}

.wos-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  color: var(--wos-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.wos-sidebar-item:hover {
  background: var(--wos-surface-elevated);
}

.wos-sidebar-item.is-active {
  background: rgba(99, 102, 241, 0.2);
  color: var(--wos-link);
  font-weight: 600;
}

.wos-sidebar-icon {
  width: 1.25rem;
  text-align: center;
}

.wos-workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 1.5rem;
  overflow: auto;
}

.wos-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--wos-muted);
}

.wos-breadcrumb-sep {
  opacity: 0.6;
}

.wos-breadcrumb-link {
  color: var(--wos-link);
  text-decoration: none;
}

.wos-breadcrumb-current {
  color: var(--wos-text);
}

.wos-page-hint {
  margin: 0 0 0.75rem;
  color: var(--wos-muted);
  font-size: 0.9rem;
}

.wos-content {
  flex: 1;
}

.wos-card {
  background: var(--wos-surface);
  border: 1px solid var(--wos-border);
  border-radius: 0.75rem;
  box-shadow: var(--wos-card-shadow);
  padding: 1.25rem 1.35rem;
}

.wos-card--map {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 8rem);
}

.wos-shell--map .wos-card--map {
  min-height: 0;
  height: 100%;
}

.wos-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.wos-muted {
  color: var(--wos-muted);
}

.wos-stats {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.wos-stats dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wos-muted);
}

.wos-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
}

.wos-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.wos-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wos-btn-primary {
  background: var(--wos-accent);
  border-color: transparent;
  color: #fff;
}

.wos-btn-primary:hover {
  background: var(--wos-accent-hover);
}

.wos-form {
  display: grid;
  gap: 0.5rem;
  max-width: 28rem;
  margin-top: 1rem;
}

.wos-form input[type="search"],
.wos-form input[type="number"],
.wos-about-dialog input[type="number"] {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  font: inherit;
}

.wos-fieldset {
  margin-top: 1rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
}

.wos-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0;
}

.wos-map-toolbar {
  margin-bottom: 0.75rem;
}

.wos-map-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wos-map-toolbar .wos-page-title {
  margin: 0;
}

.wos-map-meta {
  margin: 0.25rem 0 0;
}

.wos-map-readout {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--wos-fg);
}

.wos-map-readout-sep {
  margin: 0 0.35rem;
  color: var(--wos-muted);
}

.wos-map-readout-surface {
  color: var(--wos-muted);
}

.wos-map-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.wos-map-kingdom-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.wos-map-kingdom {
  margin: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--wos-fg);
  background: var(--wos-surface);
  white-space: nowrap;
  max-width: 14rem;
  cursor: pointer;
}

.wos-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;
}

.wos-map-proj {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--wos-surface);
}

.wos-map-proj-btn {
  margin: 0;
  padding: 0.35rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--wos-muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  line-height: 1.25;
}

.wos-map-proj-btn + .wos-map-proj-btn {
  border-left: 1px solid var(--wos-border);
}

.wos-map-proj-btn:hover {
  color: var(--wos-fg);
  background: var(--wos-hover, rgba(127, 127, 127, 0.12));
}

.wos-map-proj-btn.is-active {
  color: var(--wos-fg);
  background: var(--wos-accent-soft, rgba(99, 102, 241, 0.18));
  font-weight: 600;
}

.wos-map-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: #070b14;
  overflow: hidden;
  touch-action: none;
}

.wos-map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.wos-map-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated, var(--wos-surface));
  overflow: auto;
  max-height: none;
  min-height: 0;
}

.wos-map-panel-title {
  margin: 0;
  font-size: 0.95rem;
}

.wos-map-select-empty {
  margin: 0;
  font-size: 0.875rem;
}

.wos-map-select-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

.wos-map-select-icon {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
}

.wos-map-select-swatch {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--wos-border);
}

.wos-map-select-swatch[hidden],
.wos-map-select-icon[hidden] {
  display: none !important;
}

.wos-map-select-name {
  margin: 0 0 0.45rem;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
}

.wos-map-select-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  column-gap: 0.5rem;
  row-gap: 0.28rem;
  align-items: baseline;
  font-size: 0.78rem;
}

.wos-map-select-dl dt {
  margin: 0;
  color: var(--wos-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.68rem;
  font-weight: 600;
}

.wos-map-select-dl dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  word-break: break-word;
}

.wos-map-legend-heading {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: var(--wos-muted);
  font-weight: 600;
}

.wos-map-legend-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.wos-map-legend-heading-row .wos-map-legend-heading {
  margin: 0;
}

.wos-map-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--wos-muted);
  white-space: nowrap;
}

.wos-map-legend-list {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.wos-map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.wos-map-legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 0.15rem;
  border: 1px solid var(--wos-border);
  flex-shrink: 0;
}

.wos-map-legend-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.wos-map-legend-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.8rem;
  width: 100%;
}

.wos-map-legend-filter input {
  flex-shrink: 0;
}

.wos-csv-preview {
  max-height: 12rem;
  overflow: auto;
  font-size: 0.75rem;
  background: var(--wos-surface, #111827);
  border: 1px solid var(--wos-border);
  border-radius: 0.35rem;
  padding: 0.5rem;
  white-space: pre-wrap;
}

.wos-form textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}

.wos-form select {
  width: 100%;
}

.wos-manual-fields {
  display: grid;
  gap: 0.35rem;
  margin: 0.35rem 0 0.15rem;
}

.wos-manual-fields[hidden] {
  display: none !important;
}

.wos-map-ctx {
  position: fixed;
  z-index: 80;
  min-width: 11rem;
  padding: 0.25rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface);
  box-shadow: var(--wos-shadow);
  display: grid;
  gap: 0.15rem;
}

.wos-map-ctx[hidden] {
  display: none !important;
}

.wos-map-ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--wos-text);
  font: inherit;
  cursor: pointer;
}

.wos-map-ctx-item:hover,
.wos-map-ctx-item:focus-visible {
  background: var(--wos-accent-soft, rgba(99, 102, 241, 0.18));
  outline: none;
}

.wos-map-ctx-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wos-map-ctx-item:disabled:hover,
.wos-map-ctx-item:disabled:focus-visible {
  background: transparent;
}

#wos-map-ctx-rect[hidden],
#wos-map-ctx-normal[hidden] {
  display: none !important;
}

.wos-map-ctx-sep {
  display: block;
  height: 1px;
  margin: 0.3rem 0.4rem;
  border: none;
  background: var(--wos-border);
}

.wos-map-ctx-sep[hidden] {
  display: none !important;
}

.wos-map-ctx-item--danger {
  color: var(--wos-danger, #b91c1c);
}

.wos-map-ctx-item--danger:hover,
.wos-map-ctx-item--danger:focus-visible {
  background: rgba(185, 28, 28, 0.12);
}

.wos-form select,
.wos-form input[type="text"],
.wos-form input[type="number"],
.wos-about-dialog input[type="number"],
.wos-about-dialog input[type="text"],
.wos-about-dialog select {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}

/* Number-Spinner ausblenden — Koordinaten tippen, nicht hochzählen */
.wos-form input[type="number"]::-webkit-outer-spin-button,
.wos-form input[type="number"]::-webkit-inner-spin-button,
.wos-about-dialog input[type="number"]::-webkit-outer-spin-button,
.wos-about-dialog input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wos-form input[type="number"],
.wos-about-dialog input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.wos-manual-hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

@media (max-width: 1100px) {
  .wos-map-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(16rem, 1fr) auto;
  }

  .wos-map-panel {
    max-height: 14rem;
  }
}

html[data-theme="light"] .wos-map-stage {
  background: #dbe3f0;
}

.wos-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.wos-map-hint {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.wos-footer-meta {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--wos-muted);
}

.wos-icon-grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.85rem;
}

.wos-icon-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated);
}

.wos-icon-preview {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  align-self: center;
  background: var(--wos-surface);
  border-radius: 0.35rem;
  border: 1px solid var(--wos-border);
}

.wos-icon-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.wos-icon-status {
  margin: 0;
  font-size: 0.75rem;
  text-align: center;
}

.wos-icon-actions {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.wos-icon-dialog-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.wos-about-dialog {
  max-width: 24rem;
  padding: 1rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.75rem;
  background: var(--wos-surface);
  color: var(--wos-text);
  box-shadow: var(--wos-shadow);
}

.wos-about-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.wos-about-dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.wos-about-dialog p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--wos-muted);
}

.wos-about-dialog p strong {
  color: var(--wos-text);
}

.wos-about-dialog ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--wos-muted);
}

.wos-about-dialog form {
  margin: 0;
}

/* Login */
.wos-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--wos-bg);
  background-image: var(--wos-bg-accent);
  color: var(--wos-text);
}

.wos-login-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  background: var(--wos-surface);
  border: 1px solid var(--wos-border);
  border-radius: 1rem;
  box-shadow: var(--wos-card-shadow);
}

.wos-login-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.wos-login-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wos-login-subtitle {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--wos-muted);
}

.wos-login-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--wos-muted);
}

.wos-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.wos-form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wos-form-coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
}

.wos-form-coords > div {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.wos-form-row label {
  font-size: 0.875rem;
  font-weight: 600;
}

.wos-form-row input {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.5rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  font: inherit;
}

.wos-login-submit {
  width: 100%;
  margin-top: 0.35rem;
}

.wos-msg {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.wos-msg-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.wos-user-chip {
  font-size: 0.8rem;
  color: var(--wos-muted);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Regionen-Tabelle */
.wos-regions-wrap {
  margin-top: 1rem;
  overflow-x: auto;
}

.wos-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.wos-data-table th,
.wos-data-table td {
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--wos-border);
  text-align: left;
  vertical-align: middle;
}

.wos-data-table th {
  font-weight: 600;
  color: var(--wos-muted);
  white-space: nowrap;
}

.wos-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wos-th-sort.is-active {
  color: var(--wos-text);
}

.wos-th-ind {
  font-size: 0.7rem;
  opacity: 0.85;
}

.wos-th-actions {
  width: 3rem;
  text-align: right;
}

.wos-td-actions {
  text-align: right;
  width: 3rem;
}

.wos-table-input {
  width: 100%;
  min-width: 5rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--wos-border);
  border-radius: 0.35rem;
  background: var(--wos-surface-elevated);
  color: var(--wos-text);
  font: inherit;
}

.wos-table-input[type="number"] {
  max-width: 8rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.wos-table-input[type="number"]::-webkit-outer-spin-button,
.wos-table-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wos-btn-icon {
  min-width: 2.25rem;
  min-height: 2.25rem;
  padding: 0.25rem 0.45rem;
  line-height: 1;
}

.wos-btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--wos-muted);
}

.wos-manual-color-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wos-manual-color-label input[type="color"] {
  width: 2.5rem;
  height: 1.75rem;
  padding: 0;
  border: 1px solid var(--wos-border);
  border-radius: 0.35rem;
  background: transparent;
  cursor: pointer;
}


