:root {
  color-scheme: dark;
  --bg: #080910;
  --panel: rgba(13, 16, 26, 0.92);
  --panel-strong: rgba(10, 12, 20, 0.98);
  --line: rgba(232, 220, 190, 0.14);
  --line-strong: rgba(235, 202, 130, 0.34);
  --text: #f5efe1;
  --muted: #aaa194;
  --dim: #766f67;
  --gold: #e1b45a;
  --gold-soft: rgba(225, 180, 90, 0.16);
  --green: #55d18f;
  --danger: #e66b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  font-family:
    "Noto Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #050408;
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  height: 100vh;
  min-height: 34rem;
  padding: 0.75rem;
}

.site-header {
  position: relative;
  z-index: 1700;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto minmax(15rem, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 4rem;
  border: 1px solid rgba(235, 218, 176, 0.13);
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(30, 25, 36, 0.96), rgba(16, 13, 21, 0.96));
  padding: 0.55rem 0.7rem;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
}

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

.brand-logo {
  width: 10.8rem;
  height: 2.8rem;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.brand-name {
  color: #f1d58a;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(5.6rem, 1fr));
  padding: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: rgba(22, 18, 28, 0.88);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22);
}

.tab {
  height: 2.35rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #a8a2ae;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tab.is-active {
  background: linear-gradient(180deg, rgba(255, 225, 148, 0.18), rgba(164, 109, 42, 0.16));
  color: #ffe9ac;
  box-shadow: inset 0 0 0 1px rgba(244, 209, 120, 0.25);
}

.header-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.icon-link,
.small-action,
.plain-button,
.primary-button,
.square-button {
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.045);
  color: #e9deca;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.icon-link {
  display: inline-flex;
  max-width: 14rem;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.icon-only {
  width: 2.35rem;
  padding: 0;
  font-size: 1rem;
}

.icon-link:hover,
.small-action:hover,
.plain-button:hover,
.square-button:hover {
  border-color: var(--line-strong);
  color: #fff0bc;
}

.support {
  border-color: rgba(245, 199, 102, 0.42);
  background: var(--gold-soft);
  color: #ffe4a3;
}

main {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.tab-panel {
  display: none;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.tab-panel.is-active {
  display: block;
}

#mapPanel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(235, 218, 176, 0.16);
  border-radius: 1.25rem;
  background: #100d14;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 22px 80px rgba(0, 0, 0, 0.56);
}

.site-footer {
  display: flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(235, 218, 176, 0.1);
  border-radius: 0.9rem;
  background: rgba(16, 13, 20, 0.74);
  padding: 0 0.8rem;
  color: #8f8794;
  font-size: 0.72rem;
}

.site-footer a {
  color: #c8bdcf;
  font-weight: 700;
}

.site-footer a:hover {
  color: #fff0bc;
}

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #10121b;
}

#mapPanel {
  -webkit-user-select: none;
  user-select: none;
}

.search-box input,
.marker-form input {
  -webkit-user-select: text;
  user-select: text;
}

.point-canvas {
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
}

.ql-map-marker-icon {
  border: 0;
  background: transparent;
}

.ql-map-marker-shell {
  display: inline-flex;
  position: relative;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.ql-map-marker-shell.is-selected {
  transform: scale(1.2);
  box-shadow:
    0 0 0 2px rgba(18, 12, 26, 0.98),
    0 0 0 5px rgba(222, 255, 132, 0.78),
    0 0 24px rgba(224, 255, 156, 0.72),
    0 10px 28px rgba(0, 0, 0, 0.42);
}

.ql-map-marker-shell.is-collected {
  box-shadow:
    0 0 0 2px rgba(12, 16, 12, 0.98),
    0 0 0 4px rgba(82, 214, 146, 0.45),
    0 0 18px rgba(82, 214, 146, 0.28);
}

.ql-map-marker-image {
  width: 29px;
  height: 29px;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  user-select: none;
}

.ql-map-marker-shell.is-collected .ql-map-marker-image {
  opacity: 0.78;
  filter:
    saturate(0.8)
    brightness(0.92)
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.ql-map-neutral-marker {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(64, 26, 3, 0.9);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 25%, rgba(244, 178, 67, 0.95), rgba(182, 96, 7, 0.96) 58%, rgba(109, 49, 7, 0.98));
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(241, 147, 43, 0.16);
}

.ql-map-neutral-marker.is-selected {
  border-color: rgba(255, 243, 180, 0.98);
  box-shadow:
    0 0 0 2px rgba(18, 12, 26, 0.98),
    0 0 0 5px rgba(222, 255, 132, 0.78),
    0 0 22px rgba(224, 255, 156, 0.65),
    0 8px 22px rgba(0, 0, 0, 0.42);
}

.ql-map-marker-collected {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 255, 232, 0.52);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(70, 190, 125, 0.98), rgba(29, 130, 80, 0.98));
  box-shadow:
    0 1px 6px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(61, 214, 138, 0.32);
}

.ql-map-marker-collected__check {
  transform: translateY(-0.5px);
  color: #f2fff7;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72);
}

.ql-map-tooltip {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ql-map-tooltip .leaflet-tooltip-content {
  margin: 0;
  padding: 0;
}

.ql-map-tooltip__title {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(16, 12, 22, 0.96);
  padding: 0 0.85rem;
  color: #fff2dc;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.map-sidebar {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  bottom: 0.75rem;
  z-index: 1300;
  display: flex;
  width: 23.5rem;
  max-width: calc(100% - 1.5rem);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.9rem;
  background: rgba(30, 26, 36, 0.96);
  padding: 0.65rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
}

.sidebar-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.sidebar-top-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sidebar-header {
  display: flex;
  height: 2.55rem;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  background: rgba(12, 10, 16, 0.82);
  padding: 0 0.55rem;
}

.search-box {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0.45rem;
}

.search-icon {
  width: 1rem;
  height: 1rem;
  background: #817987;
  -webkit-mask: url("/assets/icons/search.svg") center / contain no-repeat;
  mask: url("/assets/icons/search.svg") center / contain no-repeat;
}

.search-box input,
.marker-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  outline: none;
}

.search-box input {
  height: 2rem;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.88rem;
}

.search-box input:focus,
.marker-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(220, 168, 82, 0.12);
}

.square-button {
  display: inline-flex;
  width: 2rem;
  min-height: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(16, 13, 20, 0.78);
  color: #a8a2ae;
  font-size: 0;
  line-height: 1;
}

.search-reset {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #928897;
  cursor: pointer;
}

.search-reset::before,
.square-button::before,
.sidebar-toggle::before,
.map-tool::before {
  display: block;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  content: "";
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.search-reset::before {
  -webkit-mask-image: url("/assets/icons/rotate-ccw.svg");
  mask-image: url("/assets/icons/rotate-ccw.svg");
}

#collapseSidebar::before {
  -webkit-mask-image: url("/assets/icons/chevron-left.svg");
  mask-image: url("/assets/icons/chevron-left.svg");
}

.sidebar-toggle::before {
  width: 1.15rem;
  height: 1.15rem;
  -webkit-mask-image: url("/assets/icons/chevron-right.svg");
  mask-image: url("/assets/icons/chevron-right.svg");
}

.search-reset:hover,
.square-button:hover {
  border-color: rgba(235, 202, 130, 0.34);
  color: #fff0bc;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 0.15rem 0 0;
  scrollbar-width: none;
}

.sidebar-scroll::-webkit-scrollbar {
  display: none;
}

.search-results,
.category-list {
  display: grid;
  gap: 0.45rem;
}

.category-section {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1.5rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #8b8491;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.category-button,
.result-button {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.55rem;
  background: rgba(18, 15, 23, 0.72);
  color: #bdb6c3;
  cursor: pointer;
  text-align: left;
}

.category-button {
  display: grid;
  grid-template-columns: 1.05rem minmax(0, 1fr);
  align-items: center;
  gap: 0.32rem;
  min-height: 2.45rem;
  padding: 0.36rem 0.52rem;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.15;
}

.category-button img,
.result-button img {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.category-button span {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.category-button.is-active {
  border-color: rgba(235, 202, 130, 0.66);
  background: rgba(38, 32, 43, 0.92);
  color: #f5efe1;
}

.result-button {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem;
  min-height: 3.55rem;
  padding: 0.55rem;
}

.result-title {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
  color: #fff3dd;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.18;
}

.result-meta {
  display: block;
  overflow: hidden;
  margin-top: 0.18rem;
  color: var(--dim);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-badge {
  display: inline-flex;
  min-width: 1.75rem;
  justify-content: center;
  border: 1px solid rgba(104, 224, 151, 0.35);
  border-radius: 999px;
  color: #baf7cf;
  font-size: 0.7rem;
  font-weight: 900;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  gap: 0.3rem;
}

.segment {
  min-width: 2.5rem;
  height: 1.95rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(16, 13, 20, 0.78);
  color: #a8a2ae;
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.segment.is-active {
  border-color: rgba(235, 202, 130, 0.62);
  color: #f5efe1;
}

.t2-pill {
  position: relative;
  display: inline-flex;
  height: 2rem;
  min-width: 2.4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.55rem;
  background: rgba(16, 13, 20, 0.78);
  color: #a8a2ae;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.t2-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.t2-pill:has(input:checked) {
  border-color: rgba(235, 202, 130, 0.42);
  color: #f5efe1;
}

.color-swatch {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.color-swatch.is-active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(240, 201, 106, 0.42);
}

.marker-form label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.sidebar-toggle,
.map-toolbar {
  position: absolute;
  z-index: 1300;
}

.sidebar-toggle {
  left: 0.85rem;
  top: 0.85rem;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(235, 202, 130, 0.28);
  border-radius: 0.65rem;
  background: rgba(18, 14, 24, 0.76);
  color: #f8e8bb;
  cursor: pointer;
  font-size: 0;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.sidebar-toggle:hover {
  border-color: rgba(235, 202, 130, 0.5);
  background: rgba(30, 24, 36, 0.88);
  color: #fff2c8;
}

.map-toolbar {
  right: 0.9rem;
  top: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.95rem;
  background: rgba(28, 24, 34, 0.92);
  padding: 0.35rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.map-tool {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.7rem;
  background: rgba(12, 10, 16, 0.82);
  color: #f0e9d8;
  cursor: pointer;
  font-weight: 900;
}

.map-tool::before {
  width: 1.08rem;
  height: 1.08rem;
}

#briefingDrawToggle::before {
  -webkit-mask-image: url("/assets/icons/pencil.svg");
  mask-image: url("/assets/icons/pencil.svg");
}

#briefingVisibilityToggle::before {
  -webkit-mask-image: url("/assets/icons/eye.svg");
  mask-image: url("/assets/icons/eye.svg");
}

#briefingVisibilityToggle.is-muted::before {
  -webkit-mask-image: url("/assets/icons/eye-off.svg");
  mask-image: url("/assets/icons/eye-off.svg");
}

.map-toolbar.is-expanded #briefingVisibilityToggle {
  display: none;
}

#briefingEraseToggle::before {
  -webkit-mask-image: url("/assets/icons/eraser.svg");
  mask-image: url("/assets/icons/eraser.svg");
}

#briefingUndo::before {
  -webkit-mask-image: url("/assets/icons/undo-2.svg");
  mask-image: url("/assets/icons/undo-2.svg");
}

#briefingClear::before {
  -webkit-mask-image: url("/assets/icons/trash-2.svg");
  mask-image: url("/assets/icons/trash-2.svg");
}

#briefingCollapseToggle::before {
  -webkit-mask-image: url("/assets/icons/chevron-right.svg");
  mask-image: url("/assets/icons/chevron-right.svg");
}

.map-tool:hover,
.map-tool.is-active,
.color-swatch:hover {
  border-color: rgba(235, 202, 130, 0.52);
  color: #fff0bc;
}

.map-tool.is-muted {
  color: #766f7e;
  opacity: 0.74;
}

.text-tool {
  width: auto;
  padding: 0 1rem;
  font-size: 0.73rem;
  letter-spacing: 0.08em;
}

.mini-tool {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.55rem;
}

.draw-palette {
  display: none;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.2rem;
}

.briefing-expanded {
  display: none;
}

.map-toolbar.is-expanded > .briefing-expanded.map-tool,
.map-toolbar.is-expanded .draw-palette {
  display: flex;
}

.point-tooltip {
  position: absolute;
  z-index: 1300;
  max-width: 16rem;
  transform: translate(-50%, calc(-100% - 0.9rem));
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  padding: 0.45rem 0.7rem;
  color: #fff2dc;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

.selected-point {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 1300;
  width: min(24rem, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel-strong);
  padding: 0.85rem;
  box-shadow: var(--shadow);
}

.selected-point-row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}

.selected-point img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.selected-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.selected-meta {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.codex-toggle {
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #eadfcc;
  cursor: pointer;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.codex-toggle.is-done {
  border-color: rgba(102, 226, 148, 0.42);
  background: rgba(77, 186, 112, 0.16);
  color: #c8f8d8;
}

.map-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1500;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel-strong);
  padding: 0.9rem 1rem;
  color: #fff0bd;
  box-shadow: var(--shadow);
}

.ql-map-custom-marker-icon {
  background: transparent;
  border: 0;
}

.ql-map-custom-marker {
  position: relative;
  display: inline-flex;
  width: 34px;
  height: 40px;
  align-items: center;
  justify-content: center;
  clip-path: polygon(18% 8%, 82% 8%, 100% 34%, 86% 72%, 50% 100%, 14% 72%, 0% 34%);
  background:
    linear-gradient(180deg, rgba(197, 255, 64, 0.98), rgba(113, 225, 34, 0.98) 55%, rgba(62, 168, 28, 0.98));
  box-shadow:
    0 0 0 1px rgba(236, 255, 171, 0.72) inset,
    0 0 12px rgba(156, 255, 65, 0.32),
    0 10px 18px rgba(0, 0, 0, 0.42);
}

.ql-map-custom-marker__face {
  position: relative;
  display: inline-flex;
  width: 24px;
  height: 29px;
  align-items: center;
  justify-content: center;
  clip-path: polygon(18% 8%, 82% 8%, 100% 34%, 86% 70%, 50% 100%, 14% 70%, 0% 34%);
  background:
    radial-gradient(circle at 50% 18%, rgba(226, 255, 171, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(116, 154, 42, 0.98), rgba(64, 101, 24, 0.98) 44%, rgba(36, 57, 16, 0.98));
  box-shadow:
    0 0 0 1px rgba(220, 255, 146, 0.42) inset,
    0 0 0 1px rgba(18, 28, 10, 0.92);
}

.ql-map-custom-marker__face::after {
  position: absolute;
  inset: 2px 3px 6px;
  clip-path: polygon(18% 8%, 82% 8%, 100% 34%, 86% 70%, 50% 100%, 14% 70%, 0% 34%);
  background:
    linear-gradient(180deg, rgba(235, 255, 196, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(135, 186, 48, 0.12), rgba(0, 0, 0, 0) 60%);
  opacity: 0.9;
  content: "";
}

.ql-map-custom-marker__label {
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
  color: #d6dbca;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.98),
    1px 0 0 rgba(0, 0, 0, 0.98),
    -1px 0 0 rgba(0, 0, 0, 0.98),
    0 -1px 0 rgba(0, 0, 0, 0.98),
    0 2px 6px rgba(0, 0, 0, 0.42);
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.is-briefing-draw {
  cursor: crosshair;
}

.is-briefing-erase {
  cursor: cell;
}

.info-panel {
  width: 100%;
  max-width: none;
  overflow: hidden;
  border: 1px solid rgba(235, 218, 176, 0.16);
  border-radius: 1.25rem;
  background: rgba(16, 13, 20, 0.96);
  padding: clamp(0.5rem, 0.9vw, 1rem);
}

.info-native {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  gap: 0.75rem;
  overflow: auto;
  border: 1px solid rgba(235, 218, 176, 0.12);
  border-radius: 0.95rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18rem),
    rgba(13, 10, 18, 0.96);
  padding: clamp(0.75rem, 1.2vw, 1.25rem);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
  scrollbar-width: none;
}

.info-native::-webkit-scrollbar {
  display: none;
}

.info-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.info-kicker,
.info-summary {
  color: #938a9b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info-topbar h1 {
  margin: 0.1rem 0 0;
  color: #fff2dc;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  line-height: 1.1;
}

.info-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  color: #918897;
  font-size: 0.78rem;
  font-weight: 700;
}

.info-meta a,
.info-link {
  color: #ffe3a0;
  font-weight: 900;
  text-decoration: none;
}

.info-sheet-tabs,
.info-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.info-sheet-tab,
.info-filter,
.info-clear {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.22);
  color: #bfb7c8;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 2.15rem;
  padding: 0 0.75rem;
}

.info-sheet-tab.is-active,
.info-filter.is-active {
  border-color: rgba(235, 202, 130, 0.6);
  background: rgba(235, 202, 130, 0.13);
  color: #fff1c5;
}

.info-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.info-search {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-height: 2.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  padding: 0 0.75rem;
}

.info-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f5efe1;
  font: inherit;
  outline: none;
}

.info-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.info-filter-group > span {
  color: #918897;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-filter small {
  color: #877f8c;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0.75rem;
}

.info-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.85rem;
  background: rgba(20, 16, 25, 0.74);
  padding: 0.85rem;
}

.info-card-head {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.info-card h2 {
  margin: 0;
  color: #fff4de;
  font-size: 1rem;
  line-height: 1.2;
}

.info-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.info-card dl {
  display: grid;
  gap: 0.4rem;
  margin: 0;
}

.info-card dl > div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.78fr) minmax(0, 1.22fr);
  gap: 0.6rem;
  align-items: start;
}

.info-card dt {
  color: #918897;
  font-size: 0.72rem;
  font-weight: 900;
}

.info-card dd {
  min-width: 0;
  margin: 0;
  color: #ded7e6;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.info-sheet-view {
  display: grid;
  gap: 0.35rem;
  min-width: max(100%, calc(var(--info-cols, 1) * 11rem));
}

.info-sheet-row {
  display: grid;
  grid-template-columns: repeat(var(--info-cols, 1), minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
}

.info-sheet-row.is-spacer {
  min-height: 0.75rem;
}

.info-sheet-cell {
  min-height: 2.15rem;
  min-width: 0;
  border-radius: 0.55rem;
  color: #ddd7e4;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: 0.45rem 0.55rem;
}

.info-sheet-cell:not(.is-empty) {
  background: rgba(255, 255, 255, 0.035);
}

.info-sheet-row.is-title .info-sheet-cell:not(.is-empty) {
  color: #fff2dc;
  font-size: 0.9rem;
  font-weight: 950;
}

.info-image-link {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0.55rem;
}

.info-image-link img {
  display: block;
  max-width: min(100%, 14rem);
  max-height: 8rem;
  object-fit: contain;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ddd7e4;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 0.22rem 0.46rem;
}

.info-badge.is-positive {
  border-color: rgba(93, 220, 139, 0.3);
  color: #b9f7cd;
}

.info-badge.is-negative,
.info-badge.is-danger {
  border-color: rgba(239, 111, 111, 0.32);
  color: #ffc4c4;
}

.info-badge.is-warning {
  border-color: rgba(239, 111, 111, 0.46);
  background: rgba(136, 35, 35, 0.22);
  color: #ffd0d0;
}

.info-badge.is-blue {
  border-color: rgba(128, 185, 255, 0.34);
  color: #cce3ff;
}

.info-badge.is-muted,
.info-empty {
  color: #817985;
}

.info-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.14);
}

.info-table {
  width: 100%;
  min-width: 76rem;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.62rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(18, 14, 24, 0.98);
}

.info-table th button {
  border: 0;
  background: transparent;
  color: #bfb7c8;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
}

.info-table td {
  color: #ded7e6;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.info-table-primary {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.info-empty-state,
.info-loading {
  margin: auto;
  max-width: 34rem;
  color: #beb6c6;
  text-align: center;
}

.info-empty-state h2 {
  margin: 0 0 0.5rem;
  color: #fff2dc;
}

.modal {
  width: min(38rem, calc(100vw - 2rem));
  border: 1px solid var(--line-strong);
  border-radius: 0.9rem;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}

.compact-modal {
  width: min(25rem, calc(100vw - 2rem));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(3px);
}

.modal-inner {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
}

.modal h2 {
  margin: 0;
  font-family: Georgia, serif;
  color: #ffe3a1;
}

.modal p {
  margin: 0;
  color: #d7ccba;
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  right: 0.6rem;
  top: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
}

.marker-form input {
  height: 2.65rem;
  padding: 0 0.75rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.plain-button,
.primary-button {
  padding: 0 0.9rem;
  font-weight: 800;
}

.plain-button {
  color: #ffd0d0;
}

.primary-button {
  border-color: rgba(241, 204, 116, 0.42);
  background: rgba(228, 176, 75, 0.2);
  color: #ffe7a4;
}

@media (max-width: 1040px) {
  .app-shell {
    height: 100vh;
    min-height: 34rem;
    padding: 0.75rem;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .brand-logo {
    width: 8.6rem;
  }

  .brand-copy {
    display: none;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .tab-panel {
    height: 100%;
    min-height: 0;
  }

  .info-panel {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 0.45rem;
    gap: 0.45rem;
    min-height: 40rem;
  }

  .site-header {
    grid-template-columns: 1fr;
    border-radius: 0.95rem;
  }

  .brand {
    display: none;
  }

  .tabs {
    width: 100%;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .icon-link {
    max-width: none;
    min-height: 2.2rem;
  }

  #mapPanel,
  .info-panel {
    border-radius: 1rem;
  }

  .info-panel {
    padding: 0.35rem;
  }

  .info-native {
    gap: 0.6rem;
    padding: 0.7rem;
  }

  .info-topbar,
  .info-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .info-meta,
  .info-sheet-tabs,
  .info-filters {
    overflow-x: auto;
  }

  .info-sheet-view {
    min-width: max(100%, calc(var(--info-cols, 1) * 9rem));
  }

  .info-sheet-cell {
    min-height: 2rem;
    padding: 0.4rem 0.48rem;
  }

  .map-sidebar {
    inset: 0.45rem 0.45rem auto;
    height: min(72vh, 34rem);
    width: calc(100vw - 0.9rem);
  }

  .map-toolbar {
    top: auto;
    right: 0.8rem;
    bottom: 0.8rem;
    left: 0.8rem;
    justify-content: flex-end;
    overflow-x: auto;
  }

  .selected-point {
    left: 0.6rem;
    right: 0.6rem;
    bottom: 4.6rem;
    width: auto;
  }

  .selected-point-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .codex-toggle {
    grid-column: 1 / -1;
  }

  .site-footer {
    display: none;
  }
}
