:root {
  color-scheme: light;
  --panel-bg: rgba(15, 23, 42, 0.9);
  --panel-border: rgba(148, 163, 184, 0.25);
  --panel-text: #e2e8f0;
  --panel-sub: #94a3b8;
  --accent: #22d3ee;
  --shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  background: #0f172a;
  color: #0f172a;
}

.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.panel {
  width: 320px;
  min-width: 260px;
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  z-index: 2;
}

.panel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-row--stack {
  flex-direction: column;
  align-items: flex-start;
}

.row-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-sub);
  min-width: 78px;
}

.panel-footer {
  margin-top: auto;
  font-size: 0.7rem;
  color: var(--panel-sub);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.action-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: var(--panel-text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.action-btn--tiny {
  padding: 6px 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.action-icon {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.action-icon:hover {
  border-color: rgba(34, 211, 238, 0.7);
}

.icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: var(--panel-text);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.icon-center {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='3' fill='black'/><path d='M12 2v4M12 18v4M2 12h4M18 12h4' stroke='black' stroke-width='2' stroke-linecap='round'/></svg>");
}

.icon-csi {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 18h3V8H4v10zm6 0h3V4h-3v14zm6 0h3v-6h-3v6z' fill='black'/></svg>");
}

.icon-amp {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 12c3-6 7-6 10 0s7 6 10 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.icon-gec {
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 18h18l-6-8-4 5-3-4-5 7z' fill='black'/></svg>");
}
.action-btn:hover {
  border-color: rgba(34, 211, 238, 0.7);
  color: var(--accent);
}

.action-btn:active {
  transform: translateY(1px);
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.layer-item {
  padding: 0;
}

.layer-item.dragging {
  opacity: 0.5;
}

.layer-chip {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: var(--panel-text);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.layer-chip.active {
  border-color: rgba(34, 211, 238, 0.7);
}

.layer-chip.active .icon {
  background: var(--accent);
}

.map-shell {
  flex: 1;
  position: relative;
}

.map {
  position: absolute;
  inset: 0;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }
  .panel {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
    box-shadow: none;
  }
}
