:root {
  color-scheme: dark;
  --bg-top: #1a1d20;
  --bg-bottom: #0d0f12;
  --panel: rgba(22, 25, 29, 0.92);
  --panel-strong: #1a1e23;
  --border: rgba(116, 125, 135, 0.28);
  --border-strong: rgba(151, 161, 172, 0.4);
  --text-main: #e7e1d3;
  --text-muted: #aeb6bf;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --green: #64c977;
  --green-glow: rgba(100, 201, 119, 0.60);
  --yellow: #d8c05b;
  --yellow-glow: rgba(216, 192, 91, 0.60);
  --red: #dd6a61;
  --red-glow: rgba(221, 106, 97, 0.60);
  --ghost: rgba(138, 202, 244, 0.52);
  --focus: rgba(168, 210, 181, 0.45);
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 28px 16px 40px;
  background:
    radial-gradient(circle at top, rgba(92, 118, 105, 0.18), transparent 38%),
    radial-gradient(circle at bottom right, rgba(110, 98, 78, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text-main);
}

img {
  max-width: 100%;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  width: min(92vw, 760px);
  background: linear-gradient(180deg, rgba(28, 32, 37, 0.97), rgba(16, 18, 21, 0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.app-shell[data-layout-mode="desktop"] {
  width: min(96vw, 1480px);
}

.app-shell[data-layout-mode="mobile"] {
  width: min(92vw, 760px);
}

.app-header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, rgba(43, 49, 56, 0.62), rgba(28, 31, 36, 0));
}

.app-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.header-meta {
  margin-left: auto;
  min-width: min(46vw, 520px);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.league-header,
.league-header__content {
  display: grid;
  gap: 6px;
}

.league-header__content {
  justify-items: end;
}

.league-header__label {
  margin: 0;
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.league-header__bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.league-header__bubble {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 19, 0.64);
  color: var(--text-main);
  font-size: 0.74rem;
}

.league-header__bubble--primary {
  border-color: rgba(168, 210, 181, 0.28);
  background: rgba(20, 33, 25, 0.56);
}

.storage-alert {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(92vw, 360px);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(221, 106, 97, 0.24);
  background: linear-gradient(180deg, rgba(28, 17, 17, 0.98), rgba(22, 13, 13, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.storage-alert[hidden] {
  display: none;
}

.storage-alert.is-visible {
  display: grid;
}

.storage-alert[data-severity="warning"] {
  border-color: rgba(216, 192, 91, 0.3);
  background: linear-gradient(180deg, rgba(35, 28, 16, 0.98), rgba(24, 19, 12, 0.98));
}

.storage-alert[data-severity="critical"] {
  border-color: rgba(221, 106, 97, 0.34);
}

.storage-alert__content {
  display: grid;
  gap: 6px;
}

.storage-alert__title,
.storage-alert__message,
.storage-alert__usage {
  margin: 0;
}

.storage-alert__title {
  font-size: 0.96rem;
  color: var(--text-main);
}

.storage-alert__message,
.storage-alert__usage {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.storage-alert__dismiss {
  width: 32px;
  min-height: 32px;
  padding: 0;
  align-self: start;
  display: grid;
  place-items: center;
}

.storage-alert__dismiss img {
  width: 12px;
  height: 12px;
}

.app-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px 0;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  flex: 1 1 auto;
}

.tab-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 42px;
  padding: 0;
}

.tab-toolbar:empty {
  display: none;
}

.tab-panel {
  padding: 18px 20px 20px;
}

.feature-view {
  display: grid;
  gap: 14px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-group--end {
  margin-left: auto;
}

.toolbar-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.menu-button,
.help-button {
  min-height: 42px;
  min-width: 42px;
  padding: 0 10px;
  display: grid;
  place-items: center;
}

.help-button {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.help-menu,
.grid-menu {
  position: relative;
}

.help-menu {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.grid-menu {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.menu-panel,
.configure-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(92vw, 340px);
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 17, 20, 0.96);
  border: 1px solid rgba(138, 202, 244, 0.14);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.menu-panel {
  display: none;
}

.help-menu.is-open .menu-panel,
.grid-menu.is-open .configure-panel {
  display: grid;
}

.help-panel {
  gap: 10px;
}

.help-panel__title {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-main);
}

.help-panel__text,
.help-list {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.help-list {
  padding-left: 18px;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(45, 49, 55, 0.94), rgba(28, 31, 35, 0.98));
  color: var(--text-main);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.svg-icon {
  display: block;
  filter: brightness(0) invert(1);
}

.svg-icon--original {
  filter: none;
}

.tab-button,
.utility-button,
.nudge-button,
.icon-button,
.menu-button {
  min-height: 42px;
}

.tab-button,
.utility-button,
.nudge-button {
  padding: 10px 12px;
}

.tab-button.is-active,
.utility-button.is-active,
.icon-button.is-active,
.help-button.is-active,
.menu-button.is-active {
  border-color: rgba(138, 202, 244, 0.5);
  box-shadow: 0 0 16px rgba(138, 202, 244, 0.16);
}

.tab-button.is-active {
  background: linear-gradient(180deg, rgba(56, 64, 71, 0.98), rgba(31, 36, 40, 0.98));
}

.icon-button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.icon-button img {
  width: 18px;
  height: 18px;
}

.grid-menu__session-actions {
  display: none;
  grid-template-columns: repeat(2, 20px);
  gap: 2px;
  justify-content: end;
  width: auto;
  align-self: center;
}

.grid-menu__session-actions.is-visible {
  display: grid;
}

.mini-icon-button {
  width: 20px;
  min-height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.mini-icon-button img {
  width: 10px;
  height: 10px;
}

.mini-icon-button--confirm {
  border-color: rgba(100, 201, 119, 0.4);
  background: linear-gradient(180deg, rgba(34, 79, 45, 0.92), rgba(20, 48, 28, 0.98));
}

.mini-icon-button--cancel {
  border-color: rgba(221, 106, 97, 0.4);
  background: linear-gradient(180deg, rgba(95, 38, 35, 0.92), rgba(58, 23, 21, 0.98));
}

.utility-button--danger {
  border-color: rgba(221, 106, 97, 0.38);
  background: linear-gradient(180deg, rgba(98, 36, 33, 0.92), rgba(60, 21, 20, 0.98));
}

.utility-button--danger.is-active {
  border-color: rgba(221, 106, 97, 0.68);
  box-shadow: 0 0 16px rgba(221, 106, 97, 0.22);
}

.utility-button--danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.utility-button--danger:disabled:hover {
  transform: none;
}

.image-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(34, 38, 43, 0.88), rgba(19, 21, 24, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.image-stage {
  position: relative;
  width: min(100%, var(--stage-max-width, 408px));
  user-select: none;
  touch-action: none;
}

.image-stage img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.overlay-layer,
.ghost-grid {
  position: absolute;
  inset: 0;
}

.overlay-layer {
  z-index: 2;
}

.overlay-layer.is-configuring {
  pointer-events: none;
}

.grid-cell {
  position: absolute;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.image-stage .grid-cell__icon {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.grid-cell.has-note-indicator::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow:
    0 0 0 1px rgba(10, 12, 15, 0.7),
    0 0 6px rgba(100, 201, 119, 0.7),
    0 0 10px rgba(100, 201, 119, 0.35);
  pointer-events: none;
  z-index: 1;
}

.grid-cell:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.grid-cell:focus-visible,
button:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.grid-cell.is-green {
  border-color: var(--green);
  box-shadow:
    inset 0 0 0 1px rgba(100, 201, 119, 0.48),
    inset 0 0 10px rgba(100, 201, 119, 0.24),
    inset 0 0 22px rgba(100, 201, 119, 0.09),
    inset 0 0 34px rgba(100, 201, 119, 0.025),
    0 0 14px var(--green-glow);
  background: radial-gradient(ellipse at center, rgba(100, 201, 119, 0) 0%, rgba(100, 201, 119, 0) 18%, rgba(100, 201, 119, 0.015) 32%, rgba(100, 201, 119, 0.06) 48%, rgba(100, 201, 119, 0.14) 66%, rgba(100, 201, 119, 0.24) 84%, rgba(100, 201, 119, 0.34) 100%);
}

.grid-cell.is-yellow {
  border-color: var(--yellow);
  box-shadow:
    inset 0 0 0 1px rgba(216, 192, 91, 0.48),
    inset 0 0 10px rgba(216, 192, 91, 0.24),
    inset 0 0 22px rgba(216, 192, 91, 0.09),
    inset 0 0 34px rgba(216, 192, 91, 0.025),
    0 0 14px var(--yellow-glow);
  background: radial-gradient(ellipse at center, rgba(216, 192, 91, 0) 0%, rgba(216, 192, 91, 0) 18%, rgba(216, 192, 91, 0.015) 32%, rgba(216, 192, 91, 0.06) 48%, rgba(216, 192, 91, 0.14) 66%, rgba(216, 192, 91, 0.24) 84%, rgba(216, 192, 91, 0.34) 100%);
}

.grid-cell.is-red {
  border-color: var(--red);
  box-shadow:
    inset 0 0 0 1px rgba(221, 106, 97, 0.48),
    inset 0 0 10px rgba(221, 106, 97, 0.24),
    inset 0 0 22px rgba(221, 106, 97, 0.09),
    inset 0 0 34px rgba(221, 106, 97, 0.025),
    0 0 14px var(--red-glow);
  background: radial-gradient(ellipse at center, rgba(221, 106, 97, 0) 0%, rgba(221, 106, 97, 0) 18%, rgba(221, 106, 97, 0.015) 32%, rgba(221, 106, 97, 0.06) 48%, rgba(221, 106, 97, 0.14) 66%, rgba(221, 106, 97, 0.24) 84%, rgba(221, 106, 97, 0.34) 100%);
}

.grid-cell.is-selected {
  border-color: rgba(138, 202, 244, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(138, 202, 244, 0.45),
    inset 0 0 14px rgba(138, 202, 244, 0.12),
    0 0 14px rgba(138, 202, 244, 0.24);
  background: radial-gradient(circle at center, rgba(138, 202, 244, 0.18) 0%, rgba(138, 202, 244, 0.1) 58%, rgba(138, 202, 244, 0.03) 100%);
}

.grid-cell.is-debug-selected {
  border-color: rgba(221, 106, 97, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(221, 106, 97, 0.48),
    inset 0 0 12px rgba(221, 106, 97, 0.12),
    0 0 14px rgba(221, 106, 97, 0.3);
  background: radial-gradient(circle at center, rgba(221, 106, 97, 0.16) 0%, rgba(221, 106, 97, 0.08) 62%, rgba(221, 106, 97, 0.03) 100%);
}

.ghost-grid {
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.ghost-grid.is-active {
  opacity: 1;
  pointer-events: auto;
}

.ghost-grid__frame {
  position: absolute;
  border: 1px solid var(--ghost);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(10, 12, 15, 0.6), 0 0 18px rgba(138, 202, 244, 0.18), 0 0 0 999px rgba(6, 8, 10, 0.16);
  background:
    repeating-linear-gradient(45deg, rgba(138, 202, 244, 0.09), rgba(138, 202, 244, 0.09) 8px, rgba(8, 10, 12, 0.02) 8px, rgba(8, 10, 12, 0.02) 16px),
    rgba(10, 12, 15, 0.06);
  cursor: grab;
  overflow: visible;
}

.ghost-grid__frame.is-dragging,
.ghost-grid__frame.is-resizing {
  cursor: grabbing;
}

.ghost-grid__cell {
  position: absolute;
  z-index: 1;
  border: 2px dashed rgba(138, 202, 244, 0.82);
  border-radius: 6px;
  background: rgba(138, 202, 244, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ghost-grid__handle {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(138, 202, 244, 0.85);
  background: linear-gradient(180deg, rgba(138, 202, 244, 0.72), rgba(62, 122, 161, 0.72));
  box-shadow: 0 0 16px rgba(138, 202, 244, 0.35);
}

.ghost-grid__handle--uniform {
  right: -10px;
  bottom: -10px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  cursor: nwse-resize;
}

.ghost-grid__handle--horizontal {
  top: 50%;
  right: -10px;
  width: 18px;
  height: 38px;
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.ghost-grid__handle--vertical {
  left: 50%;
  bottom: -10px;
  width: 38px;
  height: 18px;
  border-radius: 999px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.control-bar,
.notes-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 31, 36, 0.92), rgba(20, 22, 26, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-panel {
  position: relative;
}

.control-bar__top,
.notes-panel__header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.notes-panel__header {
  display: block;
  min-height: 0;
  padding-right: 122px;
}

.notes-panel__header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.behavior-summary,
.notes-panel__meta,
.note-status,
.status-line {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.note-status {
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: right;
}

.notes-panel__header-actions {
  position: absolute;
  top: 10px;
  right: 14px;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 4px;
  width: max-content;
  max-width: 118px;
}

.color-actions,
.utility-actions,
.configure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.color-button {
  min-width: 130px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  text-align: left;
}

.color-button__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.color-button__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
}

.color-button[data-action="green"] .color-dot {
  color: var(--green);
  background: var(--green);
}

.color-button[data-action="yellow"] .color-dot {
  color: var(--yellow);
  background: var(--yellow);
}

.color-button[data-action="red"] .color-dot {
  color: var(--red);
  background: var(--red);
}

.color-button--clear .color-dot {
  color: #9aa3ad;
  background: #9aa3ad;
  box-shadow: 0 0 12px rgba(154, 163, 173, 0.32);
}

.color-button.is-selected {
  border-color: rgba(182, 203, 190, 0.3);
  background: linear-gradient(180deg, rgba(56, 64, 71, 0.98), rgba(31, 36, 40, 0.98));
  box-shadow: inset 0 0 0 1px rgba(184, 211, 193, 0.12);
}

.grid-menu {
  align-items: end;
}

.configure-panel {
  display: none;
  gap: 8px;
  max-height: min(58vh, 320px);
  overflow: auto;
}

.configure-panel .utility-actions {
  gap: 6px;
}

.configure-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.configure-toolbar .utility-actions {
  flex: 1 1 auto;
}

.grid-debug-button {
  margin-left: auto;
}

.grid-debug-button img {
  width: 14px;
  height: 14px;
}

.configure-panel .utility-button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.configure-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: 110px minmax(0, 1fr);
}

.configure-group {
  padding: 8px;
  border-radius: 12px;
  background: rgba(28, 32, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.configure-group h2,
.notes-panel__title {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-main);
}

.configure-group h2 {
  margin-bottom: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readout-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.readout-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.readout-list strong {
  color: var(--text-main);
  min-width: 0;
  display: inline-block;
}

.readout-list span {
  white-space: nowrap;
  text-align: right;
}

.debug-readout {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.debug-readout[hidden] {
  display: none;
}

.debug-readout h3 {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
}

.debug-readout__hint,
.debug-readout__list {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.debug-readout__list {
  display: grid;
  gap: 4px;
  padding-left: 16px;
}

.debug-readout__item {
  word-break: break-word;
}

.configure-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-items: stretch;
}

.nudge-button {
  min-height: 24px;
  padding: 4px 6px;
  font-size: 0.7rem;
  line-height: 1.2;
  border-radius: 8px;
}

.configure-panel > p,
.status-line {
  font-size: 0.78rem;
  line-height: 1.35;
}

.notes-panel__editor-shell {
  width: 100%;
  min-width: 0;
}

.markdown-editor {
  position: relative;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 21, 25, 0.95), rgba(13, 15, 18, 0.98));
  overflow: hidden;
}

.markdown-editor__toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(31, 35, 40, 0.96), rgba(24, 28, 32, 0.98));
  overflow-x: auto;
}

.markdown-editor__toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.markdown-editor__toolbar-group + .markdown-editor__toolbar-group {
  padding-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-editor__toolbar-group--mode {
  padding-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-editor__spacer {
  flex: 1 1 auto;
  min-width: 8px;
}

.markdown-editor__button {
  min-width: 24px;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.markdown-editor__button--icon {
  width: 24px;
  padding: 0;
}

.markdown-editor__button--header {
  min-width: 62px;
  padding: 0 10px;
}

.markdown-editor__button-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.markdown-editor__button-label {
  display: inline-block;
}

.markdown-editor__button-label--bold {
  font-weight: 800;
}

.markdown-editor__button-label--italic {
  font-style: italic;
  font-weight: 600;
}

.markdown-editor__button--mode {
  min-width: 22px;
}

.markdown-editor__button.is-active {
  border-color: rgba(138, 202, 244, 0.5);
  box-shadow: inset 0 0 0 1px rgba(138, 202, 244, 0.12);
}

.markdown-editor__body {
  display: grid;
  min-width: 0;
}

.markdown-editor__menu-shell {
  display: flex;
  flex-shrink: 0;
}

.markdown-editor__menu {
  position: absolute;
  z-index: 6;
  width: min(176px, calc(100% - 12px));
  display: grid;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(24, 28, 32, 0.99), rgba(18, 21, 25, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.markdown-editor__menu[hidden] {
  display: none;
}

.markdown-editor__header-option {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: start;
  text-align: left;
}

.markdown-editor__header-option-markdown {
  color: var(--text-muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
}

.markdown-editor__header-option-preview {
  line-height: 1.05;
}

.markdown-editor__header-option-preview--1 {
  font-size: 1rem;
  font-weight: 700;
}

.markdown-editor__header-option-preview--2 {
  font-size: 0.94rem;
  font-weight: 700;
}

.markdown-editor__header-option-preview--3 {
  font-size: 0.88rem;
  font-weight: 700;
}

.markdown-editor__header-option-preview--4 {
  font-size: 0.82rem;
  font-weight: 700;
}

.markdown-editor[data-mode="split"] .markdown-editor__body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.markdown-editor[data-mode="write"] .markdown-editor__preview {
  display: none;
}

.markdown-editor[data-mode="preview"] .markdown-editor__input {
  display: none;
}

.markdown-editor[data-mode="split"] .markdown-editor__input {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-editor__input,
.markdown-editor__preview {
  width: 100%;
  min-height: 180px;
  min-width: 0;
  padding: 12px 14px;
}

.markdown-editor__input {
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text-main);
  line-height: 1.5;
}

.markdown-editor__input:focus {
  outline: none;
}

.markdown-editor__preview {
  overflow: auto;
  line-height: 1.5;
}

.markdown-editor__preview > :first-child {
  margin-top: 0;
}

.markdown-editor__preview > :last-child {
  margin-bottom: 0;
}

.markdown-editor__preview p,
.markdown-editor__preview ul,
.markdown-editor__preview ol,
.markdown-editor__preview blockquote,
.markdown-editor__preview pre,
.markdown-editor__preview hr {
  margin: 0 0 10px;
}

.markdown-editor__preview h1,
.markdown-editor__preview h2,
.markdown-editor__preview h3,
.markdown-editor__preview h4 {
  margin: 0 0 8px;
  line-height: 1.25;
}

.markdown-editor__preview h1 {
  font-size: 1.3rem;
}

.markdown-editor__preview h2 {
  font-size: 1.12rem;
}

.markdown-editor__preview h3 {
  font-size: 1rem;
}

.markdown-editor__preview h4 {
  font-size: 0.92rem;
}

.markdown-editor__preview ul,
.markdown-editor__preview ol {
  padding-left: 20px;
}

.markdown-editor__checklist {
  padding-left: 0;
  list-style: none;
}

.markdown-editor__checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.markdown-editor__checklist-box {
  margin: 3px 0 0;
}

.markdown-editor__preview blockquote {
  margin-left: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(138, 202, 244, 0.35);
  color: var(--text-muted);
}

.markdown-editor__preview code,
.markdown-editor__preview pre {
  font-family: Consolas, "Courier New", monospace;
}

.markdown-editor__preview :not(pre) > code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(138, 202, 244, 0.08);
}

.markdown-editor__preview pre {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(9, 12, 15, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: auto;
}

.markdown-editor__preview hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.markdown-editor__preview a {
  color: rgba(138, 202, 244, 0.92);
}

.markdown-editor__placeholder {
  color: var(--text-muted);
}

.markdown-editor.is-disabled {
  opacity: 0.76;
}

.notes-panel__reset-size {
  width: 36px;
  min-height: 36px;
}

.notes-panel__reset-size img {
  width: 14px;
  height: 14px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 19, 0.64);
  color: var(--text-main);
  font-size: 0.79rem;
}

button.selection-chip {
  font: inherit;
}

.selection-chip.is-muted {
  color: var(--text-muted);
}

.selection-chip.is-focused {
  box-shadow: 0 0 0 1px rgba(168, 210, 181, 0.55) inset;
}

.selection-chip.is-green {
  border-color: rgba(100, 201, 119, 0.34);
  background: rgba(22, 48, 28, 0.62);
}

.selection-chip.is-yellow {
  border-color: rgba(216, 192, 91, 0.34);
  background: rgba(70, 58, 19, 0.56);
}

.selection-chip.is-red {
  border-color: rgba(221, 106, 97, 0.3);
  background: rgba(54, 24, 22, 0.56);
}

.grid-cell.has-linked-green::after,
.grid-cell.has-linked-yellow::after,
.grid-cell.has-linked-red::after {
  content: "";
  position: absolute;
  left: 12.5%;
  bottom: 3px;
  width: 75%;
  height: 1px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

.grid-cell.has-linked-green::after {
  background: rgba(100, 201, 119, 0.98);
  box-shadow: 0 0 4px rgba(100, 201, 119, 0.95), 0 0 10px rgba(100, 201, 119, 0.42);
}

.grid-cell.has-linked-yellow::after {
  background: rgba(216, 192, 91, 0.98);
  box-shadow: 0 0 4px rgba(216, 192, 91, 0.95), 0 0 10px rgba(216, 192, 91, 0.42);
}

.grid-cell.has-linked-red::after {
  background: rgba(221, 106, 97, 0.98);
  box-shadow: 0 0 4px rgba(221, 106, 97, 0.95), 0 0 10px rgba(221, 106, 97, 0.42);
}

.skill-marker-feature,
.notes-feature {
  display: grid;
  gap: 14px;
  align-items: start;
}

.skill-marker-feature {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.notes-feature {
  grid-template-columns: minmax(340px, 0.84fr) minmax(0, 1fr);
}

.skill-marker-feature__grid-column,
.skill-marker-feature__side-column,
.notes-feature__selector-column,
.notes-feature__meta-stack,
.notes-feature__editor-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.skill-marker-feature__panel-header,
.notes-feature__meta-panel {
  display: grid;
  gap: 10px;
}

.skill-marker-feature__panel-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 12px;
}

.skill-marker-feature__panel-copy,
.notes-feature__meta-panel {
  min-width: 0;
}

.skill-marker-feature__eyebrow,
.notes-feature__meta-eyebrow {
  margin: 0 0 4px;
  color: rgba(168, 210, 181, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-marker-feature__title,
.notes-feature__meta-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.96rem;
}

.skill-marker-feature__description,
.notes-feature__meta-copy,
.skill-marker-feature__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.skill-marker-feature__meta-row,
.skill-marker-feature__note-chip-row,
.notes-feature__meta-row,
.notes-feature__linked-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-marker-feature__selection-body {
  display: grid;
  gap: 12px;
}

.skill-marker-feature__markdown-preview {
  min-height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 13, 16, 0.58);
}

.skill-marker-feature__empty.is-hidden,
.notes-feature__empty.is-hidden {
  display: none;
}

.notes-feature__meta-panel {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(27, 31, 36, 0.92), rgba(20, 22, 26, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notes-feature__linked-skills {
  min-height: 0;
}

.notes-feature__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.notes-feature__editor-panel {
  min-width: 0;
  height: 100%;
}

.notes-feature__editor-panel .markdown-editor,
.notes-feature__editor-panel .markdown-editor__body,
.notes-feature__editor-panel .markdown-editor__input,
.notes-feature__editor-panel .markdown-editor__preview {
  min-width: 0;
}

.notes-feature__editor-panel .notes-panel__editor-shell {
  display: grid;
  min-height: 0;
}

.app-shell[data-layout-mode="mobile"] .header-meta {
  width: 100%;
  margin-left: 0;
  min-width: 0;
}

.app-shell[data-layout-mode="mobile"] .app-header__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "meta meta";
  align-items: start;
}

.app-shell[data-layout-mode="mobile"] .app-header h1 {
  grid-area: title;
}

.app-shell[data-layout-mode="mobile"] .header-actions {
  grid-area: actions;
  justify-self: end;
}

.app-shell[data-layout-mode="mobile"] .header-meta {
  grid-area: meta;
}

.app-shell[data-layout-mode="mobile"] .league-header__content {
  justify-items: start;
}

.app-shell[data-layout-mode="mobile"] .league-header__bubbles {
  justify-content: flex-start;
}

.skill-marker-feature[data-layout-mode="mobile"],
.notes-feature[data-layout-mode="mobile"] {
  grid-template-columns: 1fr;
}

.skill-marker-feature[data-layout-mode="mobile"] .skill-marker-feature__panel-header {
  grid-template-columns: 1fr;
}

.notes-feature[data-layout-mode="mobile"] .notes-feature__meta-stack {
  display: none;
}

.feature-state {
  display: grid;
  gap: 8px;
  min-height: 180px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(34, 38, 43, 0.9), rgba(18, 20, 24, 0.92));
  align-content: center;
  text-align: center;
}

.feature-state__title,
.feature-state__message {
  margin: 0;
}

.feature-state__title {
  color: var(--text-main);
  font-size: 1rem;
}

.feature-state__message {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.feature-state--error {
  border-color: rgba(221, 106, 97, 0.24);
  background: linear-gradient(180deg, rgba(38, 24, 24, 0.94), rgba(23, 15, 15, 0.94));
}

.map-planner {
  display: grid;
  gap: 14px;
}

.map-planner__toolbar {
  gap: 10px;
}

.map-planner__toolbar-summary {
  margin: 0;
}

.map-planner__content {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  align-items: start;
}

.map-planner__map-column,
.map-planner__side-column {
  display: grid;
  gap: 14px;
}

.map-planner__panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(34, 38, 43, 0.9), rgba(18, 20, 24, 0.93));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.map-planner__panel--route {
  gap: 10px;
}

.map-planner__panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.map-planner__panel-header--map {
  align-items: start;
}

.map-planner__panel-copy {
  min-width: 0;
}

.map-planner__panel-header--compact {
  gap: 10px;
}

.map-planner__eyebrow {
  margin: 0 0 4px;
  color: rgba(168, 210, 181, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-planner__title {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
}

.map-planner__description,
.map-planner__section-label,
.map-planner__entry-meta,
.map-planner__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.map-planner__section-label {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-planner__legend,
.map-planner__chip-row,
.map-planner__status-row,
.map-planner__count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-planner__chip-row--dense {
  gap: 6px;
}

.map-planner__legend-chip,
.map-planner__chip,
.map-planner__status-pill,
.map-planner__count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 16, 19, 0.64);
  color: var(--text-main);
  font-size: 0.79rem;
}

.map-planner__map-header-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.map-planner__map-info-row,
.map-planner__map-route-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.map-planner__legend-chip--route,
.map-planner__legend-chip--info {
  min-height: 24px;
  padding: 4px 8px;
  gap: 6px;
  font-size: 0.72rem;
}

button.map-planner__legend-chip--route {
  font: inherit;
  cursor: pointer;
}

.map-planner__legend-chip--overlay {
  min-height: 24px;
  padding: 4px 8px;
  gap: 6px;
  font-size: 0.72rem;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(11, 13, 16, 0.48);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 10px rgba(255, 255, 255, 0.04);
}

.map-planner__canvas-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: min(72%, 360px);
  pointer-events: none;
}

.map-planner__legend-prefix {
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-planner__chip {
  font: inherit;
  cursor: pointer;
}

.map-planner__chip-prefix {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-planner__chip.is-fixed,
.map-planner__legend-chip--route.is-fixed {
  border-color: rgba(216, 192, 91, 0.34);
  background: rgba(70, 58, 19, 0.56);
}

.map-planner__chip.is-selected,
.map-planner__legend-chip--route.is-selected {
  border-color: rgba(100, 201, 119, 0.34);
  background: rgba(22, 48, 28, 0.62);
}

.map-planner__chip.is-unavailable,
.map-planner__legend-chip--route.is-unavailable {
  border-color: rgba(221, 106, 97, 0.3);
  background: rgba(54, 24, 22, 0.56);
}

.map-planner__chip.is-focused,
.map-planner__legend-chip--route.is-focused {
  box-shadow: 0 0 0 1px rgba(168, 210, 181, 0.55) inset;
}

.map-planner__legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.map-planner__legend-dot.is-focused {
  background: rgba(168, 210, 181, 0.95);
}

.map-planner__legend-dot.is-fixed {
  background: rgba(216, 192, 91, 0.95);
}

.map-planner__legend-dot.is-selected {
  background: rgba(100, 201, 119, 0.95);
}

.map-planner__legend-dot.is-unavailable {
  background: rgba(221, 106, 97, 0.95);
}

.map-planner__quick-focus {
  display: grid;
  gap: 8px;
}

.map-planner__details {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(24, 27, 32, 0.6);
  overflow: hidden;
}

.map-planner__details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.map-planner__details summary::-webkit-details-marker {
  display: none;
}

.map-planner__details-summary {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.map-planner__details-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
  max-height: 390px;
  overflow: auto;
}

.map-planner__subsection {
  display: grid;
  gap: 6px;
}

.map-planner__subsection h3 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.8rem;
}

.map-planner__service-group-label {
  margin: 2px 0 0;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 700;
}

.map-planner__list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-main);
  font-size: 0.84rem;
  line-height: 1.45;
}

.map-planner__link {
  color: var(--text-main);
  text-decoration-color: rgba(168, 210, 181, 0.45);
}

.map-planner__link:hover {
  text-decoration-color: rgba(168, 210, 181, 0.85);
}

.svg-region-map {
  display: grid;
}

.svg-region-map__frame {
  position: relative;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(circle at top, rgba(92, 118, 105, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 17, 20, 0.95), rgba(10, 11, 13, 0.96));
}

.svg-region-map__host {
  display: grid;
  place-items: center;
}

.svg-region-map__host svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
}

.svg-region-map__host .region.is-starting .region-hit-area,
.svg-region-map__host .region.is-forced .region-hit-area {
  fill: rgba(216, 192, 91, 0.88) !important;
  fill-opacity: 0.23 !important;
}

.svg-region-map__host .region.is-selected .region-hit-area {
  fill: rgba(100, 201, 119, 0.92) !important;
  fill-opacity: 0.28 !important;
}

.svg-region-map__host .region.is-unavailable .region-hit-area {
  fill: rgba(221, 106, 97, 0.92) !important;
  fill-opacity: 0.18 !important;
}

.svg-region-map__host .region.is-unavailable .static-flag,
.svg-region-map__host .region.is-unavailable .hover-flag {
  opacity: 0.64 !important;
}

.svg-region-map__host .region[data-active="true"] .region-hit-area {
  fill: rgba(168, 210, 181, 0.95) !important;
  fill-opacity: 0.22 !important;
}

.map-planner[data-layout-mode="mobile"] .map-planner__content {
  grid-template-columns: 1fr;
}

.map-planner[data-layout-mode="mobile"] .map-planner__panel-header {
  flex-direction: column;
}

.map-planner[data-layout-mode="mobile"] .map-planner__map-header-meta {
  width: 100%;
  justify-items: start;
}

.map-planner[data-layout-mode="mobile"] .map-planner__map-route-meta {
  display: none;
}

.map-planner[data-layout-mode="desktop"] .map-planner__routebar {
  display: none;
}

.map-planner[data-layout-mode="desktop"] .map-planner__content {
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.88fr);
}

.map-planner[data-layout-mode="desktop"] .map-planner__legend {
  justify-content: flex-end;
}

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

@media (max-width: 640px) {
  body {
    padding: 16px 10px 24px;
  }

  .app-shell {
    width: min(100vw - 20px, 680px);
  }

  .app-header,
  .app-topbar,
  .tab-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .notes-panel__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    padding-right: 0;
  }

  .notes-panel__header-actions {
    position: static;
    width: auto;
    max-width: none;
  }

  .app-topbar {
    gap: 8px;
  }

  .header-meta {
    width: 100%;
    margin-left: 0;
    min-width: 0;
  }

  .league-header__content,
  .league-header__bubbles {
    justify-items: start;
    justify-content: flex-start;
  }

  .tab-bar {
    width: 100%;
  }

  .tab-toolbar {
    width: 100%;
    justify-content: flex-end;
  }

  .image-card {
    padding: 12px;
  }

  .color-button {
    min-width: calc(50% - 5px);
  }

  .menu-panel,
  .configure-panel {
    left: 0;
    right: auto;
    width: min(100vw - 48px, 340px);
  }

  .storage-alert {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .markdown-editor[data-mode="split"] .markdown-editor__body {
    grid-template-columns: 1fr;
  }

  .markdown-editor[data-mode="split"] .markdown-editor__input {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .configure-grid {
    grid-template-columns: 1fr;
  }

  .feature-state {
    min-height: 140px;
    padding: 14px;
  }

  .map-planner__panel,
  .svg-region-map__frame {
    padding: 12px;
  }

  .skill-marker-feature,
  .notes-feature {
    grid-template-columns: 1fr;
  }

  .skill-marker-feature__panel-header {
    grid-template-columns: 1fr;
  }

  .notes-feature__meta-stack {
    display: none;
  }

  .selection-chip,
  .map-planner__legend-chip--route,
  .map-planner__legend-chip--info {
    width: 100%;
    justify-content: flex-start;
  }

  .map-planner__chip,
  .map-planner__legend-chip,
  .map-planner__status-pill,
  .map-planner__count-pill {
    width: 100%;
    justify-content: flex-start;
  }

  .map-planner__toolbar {
    width: 100%;
    justify-content: flex-end;
  }

  .map-planner__toolbar-summary {
    width: 100%;
  }

  .map-planner__canvas-legend {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    justify-content: flex-start;
  }
}

.shops-feature {
  --shops-results-height: 31rem;
  --shops-stock-height: 31rem;
}

.shops-feature__toolbar,
.world-map-feature__toolbar {
  gap: 10px;
}

.shops-feature__toolbar-summary,
.world-map-feature__toolbar-summary {
  margin: 0;
}

.shops-feature__panel,
.world-map-feature__panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(34, 38, 43, 0.9), rgba(18, 20, 24, 0.93));
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.shops-feature__panel-header,
.shops-feature__panel-header--between,
.shops-feature__section-head,
.shops-feature__search-block,
.shops-feature__route-block,
.shops-feature__regions-block,
.world-map-feature__panel-header,
.world-map-feature__panel-header--between,
.world-map-feature__search-block,
.world-map-feature__route-block,
.world-map-feature__regions-block {
  display: grid;
  gap: 6px;
}

.shops-feature__panel-header--between,
.world-map-feature__panel-header--between {
  align-items: start;
}

.shops-feature__panel-copy,
.world-map-feature__panel-copy {
  min-width: 0;
}

.shops-feature__eyebrow,
.world-map-feature__eyebrow {
  margin: 0;
  color: rgba(168, 210, 181, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shops-feature__title,
.shops-feature__detail-title,
.world-map-feature__title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.98rem;
}

.shops-feature__description,
.shops-feature__result-variant,
.shops-feature__result-location,
.shops-feature__empty,
.shops-feature__detail-copy,
.shops-feature__detail-location,
.shops-feature__label,
.shops-feature__type-empty,
.world-map-feature__description,
.world-map-feature__result-location,
.world-map-feature__empty,
.world-map-feature__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.81rem;
  line-height: 1.42;
}

.shops-feature__label,
.world-map-feature__label {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shops-feature__search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.shops-feature__selected-region-slot {
  display: flex;
  min-width: 0;
}

.shops-feature__selected-region-slot:empty {
  display: none;
}

.shops-feature__search-input,
.world-map-feature__search-input {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.66);
  color: var(--text-main);
}

.shops-feature__search-input:focus-visible,
.world-map-feature__search-input:focus-visible {
  outline: none;
  border-color: rgba(168, 210, 181, 0.52);
  box-shadow: 0 0 0 1px rgba(168, 210, 181, 0.42);
}

.shops-feature__toggle,
.shops-feature__selected-region-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.58);
  color: var(--text-main);
  font-size: 0.79rem;
  white-space: nowrap;
}

.shops-feature__selected-region-chip.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.shops-feature__toggle-input {
  width: 16px;
  height: 16px;
}

.shops-feature__type-filter {
  display: grid;
  gap: 0;
}

.shops-feature__type-filter-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
  list-style: none;
  margin-left: 10px;
  padding: 7px 12px 6px;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 0;
  background: rgba(20, 23, 27, 0.92);
}

.shops-feature__type-filter-summary::-webkit-details-marker {
  display: none;
}

.shops-feature__type-filter-tab {
  color: var(--text-main);
  font-size: 0.78rem;
}

.shops-feature__type-filter-count {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.shops-feature__type-filter-body {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-height: 182px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 13, 16, 0.42);
  overflow: auto;
}

.shops-feature__type-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(16, 18, 22, 0.66);
  color: var(--text-main);
  font-size: 0.77rem;
}

.shops-feature__type-option input {
  width: 15px;
  height: 15px;
}

.shops-feature__route-chips,
.shops-feature__all-region-chips,
.shops-feature__result-meta,
.shops-feature__detail-meta,
.world-map-feature__route-chips,
.world-map-feature__all-region-chips,
.world-map-feature__result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shops-feature__route-chip.selection-chip,
.world-map-feature__route-chip.selection-chip {
  min-height: 34px;
  padding: 6px 12px;
}

.shops-feature__route-chip--selected,
.world-map-feature__route-chip--selected {
  box-shadow: 0 0 0 1px rgba(168, 210, 181, 0.44) inset, 0 0 14px rgba(100, 201, 119, 0.16);
}

.shops-feature__region-chip,
.world-map-feature__region-chip,
.shops-feature__meta-pill,
.shops-feature__stock-count,
.shops-feature__match-pill,
.shops-feature__match-more,
.world-map-feature__meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 14, 18, 0.62);
  color: var(--text-main);
  font-size: 0.74rem;
}

.shops-feature__region-chip,
.world-map-feature__region-chip {
  font-size: 0.73rem;
}

.shops-feature__region-chip.is-selected,
.world-map-feature__region-chip.is-selected {
  border-color: rgba(138, 202, 244, 0.42);
  box-shadow: 0 0 12px rgba(138, 202, 244, 0.14);
}

.shops-feature__region-chip.is-unavailable,
.shops-feature__region-chip:disabled,
.world-map-feature__region-chip.is-unavailable,
.world-map-feature__region-chip:disabled {
  border-color: rgba(221, 106, 97, 0.3);
  background: rgba(54, 24, 22, 0.56);
  color: var(--text-muted);
  cursor: not-allowed;
}

.shops-feature__meta-pill--region,
.world-map-feature__meta-pill--region {
  border-color: rgba(100, 201, 119, 0.24);
}

.shops-feature__meta-pill--type {
  border-color: rgba(138, 202, 244, 0.22);
}

.shops-feature__meta-pill--button {
  font: inherit;
  cursor: pointer;
}

.shops-feature__match-pill,
.shops-feature__match-more {
  border-color: rgba(216, 192, 91, 0.34);
  background: linear-gradient(90deg, rgba(78, 63, 18, 0.8), rgba(118, 95, 30, 0.96));
}

.shops-feature__match-more {
  min-width: 36px;
  justify-content: center;
}

.shops-feature__meta-icon,
.shared-world-map__marker-icon {
  width: 14px;
  height: 14px;
}

.shops-feature__content,
.world-map-feature__content {
  display: grid;
  gap: 14px;
  align-items: start;
}

.shops-feature__content {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  grid-template-areas: "results detail";
}

.shops-feature__panel--results {
  grid-area: results;
  min-height: 0;
}

.shops-feature__panel--detail {
  grid-area: detail;
  min-height: 0;
}

.shops-feature__results-scroller {
  max-height: var(--shops-results-height);
  overflow: auto;
}

.shops-feature__stock-wrap {
  max-height: var(--shops-stock-height);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(13, 15, 18, 0.52);
}

.shops-feature__results-list,
.world-map-feature__results-list {
  display: grid;
  gap: 8px;
}

.shops-feature__result-card,
.world-map-feature__result-card {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(19, 22, 26, 0.84), rgba(13, 15, 18, 0.92));
  cursor: pointer;
}

.shops-feature__result-card.is-selected,
.world-map-feature__result-card.is-selected {
  border-color: rgba(138, 202, 244, 0.48);
  box-shadow: 0 0 18px rgba(138, 202, 244, 0.12);
}

.shops-feature__result-card:focus-visible,
.world-map-feature__result-card:focus-visible {
  outline: 1px solid rgba(138, 202, 244, 0.55);
  outline-offset: 1px;
}

.shops-feature__result-head,
.shops-feature__detail-header-row,
.world-map-feature__result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.shops-feature__result-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shops-feature__result-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.shops-feature__detail-body,
.world-map-feature__result-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.shops-feature__result-title,
.world-map-feature__result-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.92rem;
}

.shops-feature__detail-link,
.shops-feature__stock-link {
  color: var(--text-main);
  text-decoration-color: rgba(168, 210, 181, 0.45);
}

.shops-feature__detail-link:hover,
.shops-feature__stock-link:hover {
  text-decoration-color: rgba(168, 210, 181, 0.82);
}

.shops-feature__detail-toggle {
  display: none;
  width: 32px;
  min-height: 32px;
  padding: 0;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.66);
}

.shops-feature__detail-toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

.shops-feature__detail-toggle.is-collapsed .shops-feature__detail-toggle-icon {
  transform: rotate(180deg);
}

.shops-feature__stock-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

.shops-feature__stock-table th,
.shops-feature__stock-table td {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  font-size: 0.83rem;
}

.shops-feature__stock-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(18, 21, 24, 0.98);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shops-feature__stock-table tr:last-child td {
  border-bottom: 0;
}

.shops-feature__stock-table tr.is-zero td {
  color: var(--text-muted);
}

.shops-feature__stock-table tr.is-match td {
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.shops-feature__stock-table tr.is-match td:first-child {
  border-right: 0;
  box-shadow: inset 2px 0 0 rgba(216, 192, 91, 0.48);
}

.shops-feature__stock-table tr.is-match td:last-child {
  border-left: 0;
  box-shadow: inset -2px 0 0 rgba(216, 192, 91, 0.48);
}

.shops-feature__stock-table tr.is-match-start td {
  border-top: 1px solid rgba(216, 192, 91, 0.48);
}

.shops-feature__stock-table tr.is-match-end td {
  border-bottom: 1px solid rgba(216, 192, 91, 0.48);
}

.shops-feature__stock-table tr.is-match-start td:first-child {
  border-top-left-radius: 10px;
}

.shops-feature__stock-table tr.is-match-start td:last-child {
  border-top-right-radius: 10px;
}

.shops-feature__stock-table tr.is-match-end td:first-child {
  border-bottom-left-radius: 10px;
}

.shops-feature__stock-table tr.is-match-end td:last-child {
  border-bottom-right-radius: 10px;
}

.shops-feature__stock-table tr.is-match-start td:first-child,
.shops-feature__stock-table tr.is-match-end td:first-child {
  box-shadow: inset 2px 0 0 rgba(216, 192, 91, 0.48), 0 0 15px rgba(216, 192, 91, 0.08);
}

.shops-feature__stock-table tr.is-match-start td:last-child,
.shops-feature__stock-table tr.is-match-end td:last-child {
  box-shadow: inset -2px 0 0 rgba(216, 192, 91, 0.48), 0 0 15px rgba(216, 192, 91, 0.08);
}

.shops-feature__qty {
  font-variant-numeric: tabular-nums;
}

.shops-feature__map-preview {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.shops-feature__map-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 12, 0.78);
}

.shops-feature__map-preview-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(920px, calc(100vw - 24px));
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 34, 39, 0.98), rgba(18, 20, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.shops-feature__map-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.shops-feature__map-preview-map {
  position: relative;
  min-height: min(70vh, 640px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background: #050607;
}

.world-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.world-map-toolbar__map-picker {
  display: block;
  min-width: min(340px, 100%);
}

.world-map-toolbar__map-select {
  min-width: 0;
  min-height: 36px;
  width: 100%;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.66);
  color: var(--text-main);
}

.world-map-toolbar__map-select:focus-visible {
  outline: none;
  border-color: rgba(168, 210, 181, 0.52);
  box-shadow: 0 0 0 1px rgba(168, 210, 181, 0.42);
}

.world-map-toolbar__planes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.world-map-toolbar__plane-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.58);
  color: var(--text-main);
  font-size: 0.72rem;
}

.world-map-toolbar__plane-button.is-active {
  border-color: rgba(138, 202, 244, 0.42);
  box-shadow: 0 0 0 1px rgba(138, 202, 244, 0.44) inset, 0 0 12px rgba(138, 202, 244, 0.14);
}

.world-map-toolbar__reset-button,
.world-map-feature__search-reset {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 12px;
  white-space: nowrap;
}

.world-map-feature__content {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  grid-template-areas: "map list";
}

.world-map-feature__panel--map {
  grid-area: map;
}

.world-map-feature__panel--list {
  grid-area: list;
}

.world-map-feature__results-scroller {
  max-height: 31rem;
  overflow: auto;
}

@media (min-width: 821px) {
  .shops-feature__panel-header--between,
  .world-map-feature__panel-header--between {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 820px) {
  .shops-feature {
    --shops-results-height: 25rem;
    --shops-stock-height: 25rem;
  }

  .shops-feature__panel,
  .world-map-feature__panel {
    padding: 12px;
  }

  .shops-feature__content,
  .world-map-feature__content {
    grid-template-columns: 1fr;
  }

  .shops-feature__content {
    grid-template-areas:
      "detail"
      "results";
  }

  .world-map-feature__content {
    grid-template-areas:
      "map"
      "list";
  }

  .shops-feature__search-row {
    gap: 6px;
  }

  .shops-feature__toggle,
  .shops-feature__selected-region-chip {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .shops-feature__result-secondary,
  .shops-feature__result-head,
  .world-map-feature__result-head,
  .shops-feature__map-preview-header {
    flex-direction: column;
  }

  .shops-feature__detail-toggle {
    display: grid;
    align-self: flex-end;
  }

  .shops-feature .selection-chip,
  .shops-feature__region-chip,
  .shops-feature__selected-region-chip,
  .shops-feature__meta-pill,
  .shops-feature__stock-count,
  .shops-feature__match-pill,
  .shops-feature__match-more,
  .world-map-feature .selection-chip,
  .world-map-feature__region-chip,
  .world-map-feature__meta-pill {
    width: auto;
    justify-content: center;
  }

  .shops-feature__map-preview-dialog {
    width: min(100%, calc(100vw - 24px));
  }

  .world-map-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .world-map-toolbar__map-picker {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .shops-feature__type-filter-body {
    grid-template-columns: 1fr;
  }

  .shops-feature__search-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

.world-map-feature__panel--stage {
  position: relative;
  isolation: isolate;
  align-content: start;
  gap: 10px;
}

.world-map-feature__control-strip {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.world-map-feature__search-shell {
  position: relative;
  z-index: 4;
  width: min(680px, 100%);
}

.world-map-feature__search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.world-map-feature__search-step {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
}

.world-map-feature__search-step:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.world-map-feature__search-step-icon {
  display: block;
  width: 14px;
  height: 14px;
}

.world-map-feature__search-step-icon--left {
  transform: rotate(-90deg);
}

.world-map-feature__search-step-icon--right {
  transform: rotate(90deg);
}

.world-map-feature__search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.58);
  color: var(--text-main);
  font-size: 0.76rem;
  white-space: nowrap;
}

.world-map-feature__search-toggle-input {
  width: 15px;
  height: 15px;
}

.world-map-feature__search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  max-height: min(50vh, 360px);
  padding: 8px;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 18, 22, 0.96);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.world-map-feature__search-results[hidden] {
  display: none;
}

.world-map-feature__search-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.world-map-feature__search-result {
  display: flex;
  align-items: start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(22, 26, 31, 0.94);
  color: var(--text-main);
  text-align: left;
}

.world-map-feature__search-result:hover,
.world-map-feature__search-result:focus-visible {
  border-color: rgba(138, 202, 244, 0.3);
  outline: none;
}

.world-map-feature__search-result-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(216, 192, 91, 0.32);
  background: rgba(92, 72, 19, 0.72);
  color: var(--text-main);
  font-size: 0.71rem;
}

.world-map-feature__search-result-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.world-map-feature__search-result-label,
.world-map-feature__search-result-meta {
  display: block;
}

.world-map-feature__search-result-label {
  color: var(--text-main);
  font-size: 0.84rem;
}

.world-map-feature__search-result-meta {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.world-map-feature__selection-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(138, 202, 244, 0.24);
  background: rgba(16, 20, 26, 0.84);
  color: var(--text-main);
  font-size: 0.72rem;
}

.world-map-feature__help-button {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
}

.world-map-feature__help-panel {
  width: min(92vw, 360px);
  gap: 6px;
}

.world-map-feature__help-menu {
  display: grid;
  justify-items: end;
  position: relative;
}

.world-map-feature__help-copy {
  margin: 0;
  font-size: 0.78rem;
}

.world-map-feature__map-host {
  position: relative;
  z-index: 0;
  min-height: clamp(460px, 70vh, 860px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  background: #050607;
}

.world-map-feature__region-chip {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 0.7rem;
}

.world-map-feature__region-chip.is-unlocked {
  border-color: rgba(90, 173, 92, 0.48);
  background: rgba(43, 106, 48, 0.96);
}

.world-map-feature__region-chip.is-unavailable,
.world-map-feature__region-chip:disabled {
  border-color: rgba(196, 82, 74, 0.44);
  background: rgba(125, 43, 37, 0.96);
  color: rgba(255, 237, 234, 0.92);
}

.world-map-feature__region-chip.is-selected {
  box-shadow: 0 0 0 1px rgba(138, 202, 244, 0.44) inset, 0 0 12px rgba(138, 202, 244, 0.14);
}

.shared-world-map,
.shops-feature__map-preview-map .shared-world-map,
.world-map-feature__map-host .shared-world-map {
  width: 100%;
  height: 100%;
}

.shared-world-map__canvas,
.shared-world-map .leaflet-container,
.world-map-feature__map-host .leaflet-container,
.shops-feature__map-preview-map .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #050607;
}

.shared-world-map__marker {
  background: transparent;
  border: 0;
  overflow: visible;
  pointer-events: none;
}

.shared-world-map__marker-shell {
  position: relative;
  width: 18px;
  height: 24px;
}

.shared-world-map__marker-icon {
  width: 18px;
  height: 24px;
  filter: drop-shadow(0 0 1px rgba(138, 202, 244, 0.95)) drop-shadow(0 0 5px rgba(138, 202, 244, 0.6)) drop-shadow(0 0 10px rgba(138, 202, 244, 0.32));
}

.shared-world-map__marker-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.88);
  color: var(--text-main);
  font-size: 0.71rem;
  white-space: nowrap;
}

.shared-world-map__zoom-meta {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  min-width: 92px;
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 12, 15, 0.78);
  color: var(--text-muted);
  font-size: 0.66rem;
  line-height: 1.2;
  text-align: center;
}

.shared-world-map .leaflet-control-zoom {
  border: 0;
  box-shadow: var(--shadow);
}

.shared-world-map .leaflet-top.leaflet-right {
  margin-top: 42px;
}

.shared-world-map .leaflet-control-zoom a {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 13, 16, 0.82);
  color: var(--text-main);
}

.shared-world-map .leaflet-bar a:first-child,
.shared-world-map .leaflet-bar a:last-child {
  border-radius: 10px;
}

@media (max-width: 820px) {
  .world-map-feature__panel--stage {
    padding: 10px;
  }

  .world-map-feature__search-shell {
    width: 100%;
  }

  .world-map-feature__search-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .world-map-feature__search-toggle {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .world-map-feature__map-host {
    min-height: clamp(360px, 62vh, 620px);
  }

  .shops-feature__map-preview-map {
    min-height: min(62vh, 520px);
  }
}