    :root {
      --ink: #eaf0ec;
      --muted: #9aa8a2;
      --surface: #17201f;
      --surface-raised: #202c2a;
      --line: #35423e;
      --accent: #d6db9d;
      --accent-strong: #edf2b8;
      --brand-logo-color: #edf2b8;
      --red: #ee7771;
      --blue: #76b6e8;
      --shadow: 0 18px 55px rgba(0, 0, 0, .25);
      --site-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
    }

    * { box-sizing: border-box; }
    html { color-scheme: dark; scroll-behavior: smooth; }
    html.map-modal-open { overflow: hidden; overscroll-behavior: none; scroll-behavior: auto; }
    body.map-modal-open { overflow: hidden; overscroll-behavior: none; }
    dialog[open], dialog[open] .modal-workspace { overscroll-behavior: contain; }
    body {
      min-width: 320px;
      margin: 0;
      color: var(--ink);
      font-family: var(--site-font);
      font-kerning: normal;
      font-synthesis: none;
      background:
        radial-gradient(circle at 84% -8%, rgba(104, 135, 105, .25), transparent 32rem),
        radial-gradient(circle at 0% 25%, rgba(214, 219, 157, .09), transparent 25rem),
        #111719;
    }
    body::before {
      position: fixed;
      z-index: -1;
      inset: 0;
      content: "";
      pointer-events: none;
      opacity: .18;
      background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
      background-size: 32px 32px;
      mask-image: linear-gradient(to bottom, black, transparent 80%);
    }
    button, input, select { font: inherit; }
    button { color: inherit; }

    .site-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      width: min(1240px, calc(100% - 40px));
      min-height: 76px;
      margin: 0 auto;
      border-bottom: 1px solid rgba(154, 168, 162, .18);
    }
    .brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
    .brand-mark {
      display: block;
      flex: 0 0 36px;
      width: 36px;
      height: 36px;
      background-color: var(--brand-logo-color);
      -webkit-mask: url("../../icon/Logo.svg") center / contain no-repeat;
      mask: url("../../icon/Logo.svg") center / contain no-repeat;
      transition: background-color .18s ease;
    }
    .brand-name { font-size: 1.05rem; font-weight: 800; letter-spacing: .04em; }
    .brand-owner { color: var(--ink); }
    .brand-product { color: var(--accent); }
    .primary-nav { display: flex; align-items: center; justify-content: center; gap: 4px; margin-left: auto; }
    .primary-nav a { padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .055em; text-decoration: none; transition: color .18s, background .18s; }
    .primary-nav a:hover, .primary-nav a:focus-visible { color: var(--ink); background: rgba(255,255,255,.05); }
    .primary-nav a[aria-current="page"] { color: var(--accent); }
    .header-actions { display: flex; align-items: center; gap: 18px; }
    .squadron-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-family: Arial, "Helvetica Neue", sans-serif; font-size: .72rem; font-weight: 650; letter-spacing: .01em; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: color .18s; }
    .squadron-link:hover, .squadron-link:focus-visible { color: var(--accent); }
    .squadron-link img { display: block; width: 20px; height: 20px; object-fit: contain; }
    .squadron-link strong { color: var(--ink); font-weight: 800; }
    .squadron-member-count { padding-left: 8px; border-left: 1px solid var(--line); color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 800; }
    .squadron-link:hover .squadron-member-count, .squadron-link:focus-visible .squadron-member-count { color: var(--accent); }
    .language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: rgba(13, 19, 18, .7); }
    .language-button { padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; cursor: pointer; transition: .18s; }
    .language-button:hover { color: var(--ink); }
    .language-button[aria-pressed="true"] { background: var(--accent); color: #171b1a; }
    .language-divider { color: #62716a; font-size: .72rem; user-select: none; }
    .theme-toggle { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(13, 19, 18, .7); color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; cursor: pointer; transition: .18s; }
    .theme-toggle:hover { border-color: #56675f; color: var(--ink); }

    main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
    .content-switcher { display: inline-flex; margin-top: 24px; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13, 19, 18, .7); box-shadow: var(--shadow); }
    .content-switch-button { padding: 10px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .065em; cursor: pointer; transition: .18s; }
    .content-switch-button:hover { color: var(--ink); }
    .content-switch-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #171b1a; }
    .content-view[hidden] { display: none !important; }

    .hero { padding: clamp(32px, 3vw, 36px) 0 38px; }
    .home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: clamp(36px, 7vw, 100px); align-items: end; }
    .eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .14em; }
    .hero-title { max-width: 900px; margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: clamp(3rem, 9vw, 7rem); font-kerning: normal; font-synthesis: none; font-weight: 850; line-height: .8; letter-spacing: -.07em; }
    .hero-title em { color: transparent; font-style: normal; -webkit-text-stroke: 1px var(--accent); }
    .seo-title { max-width: 900px; margin: 20px 0 0; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
    .hero-copy { max-width: 620px; margin: 20px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.12rem); line-height: 1.75; }
    .recent-updates { width: 100%; padding-bottom: 3px; }
    .map-news { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
    .map-news p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.6; overflow-wrap: anywhere; }
    .recent-updates h2 { margin: 0 0 8px; color: var(--accent); font-size: .68rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
    .recent-updates ol { margin: 0; padding: 0; list-style: none; }
    .recent-updates li { border-bottom: 1px solid var(--line); }
    .recent-updates a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 7px 0; color: var(--ink); font-size: .76rem; font-weight: 700; text-decoration: none; transition: color .18s, padding-left .18s; }
    .recent-updates a:hover, .recent-updates a:focus-visible { padding-left: 5px; color: var(--accent); }
    .recent-update-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .recent-updates time { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
    .recent-updates a:hover time, .recent-updates a:focus-visible time { color: inherit; }
    .search-wrap { position: relative; margin: 12px; }
    .search-wrap svg { position: absolute; top: 50%; left: 18px; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
    #map-search {
      width: 100%;
      padding: 18px 52px;
      color: var(--ink);
      outline: 0;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(23, 32, 31, .88);
      box-shadow: var(--shadow);
      transition: border-color .2s, box-shadow .2s;
    }
    #map-search::placeholder { color: #7c8a84; }
    #map-search:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(214, 219, 157, .12), var(--shadow); }
    .clear-search { position: absolute; top: 50%; right: 10px; display: none; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transform: translateY(-50%); }
    .clear-search:hover { color: var(--ink); background: rgba(255,255,255,.08); }
    .clear-search.visible { display: grid; place-items: center; }

    .workspace { --side-panel-height: clamp(480px, calc(100vh - 150px), 720px); display: grid; grid-template-columns: minmax(235px, 310px) minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 72px; }
    .map-index, .map-viewer { border: 1px solid var(--line); border-radius: 18px; background: rgba(23, 32, 31, .8); box-shadow: var(--shadow); }
    .map-index { display: grid; height: var(--map-index-height, var(--side-panel-height)); min-height: 0; overflow: hidden; grid-template-rows: auto auto minmax(0, 1fr); }
    .index-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
    .index-heading h2 { margin: 0; font-size: .95rem; }
    #map-count { color: var(--muted); font-size: .78rem; }
    .map-list { min-height: 0; max-height: none; padding: 8px; overflow-x: hidden; overflow-y: scroll; scrollbar-color: #52635d transparent; scrollbar-gutter: stable; }
    .map-card {
      display: flex;
      width: 100%;
      padding: 13px 12px;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border: 1px solid transparent;
      border-radius: 10px;
      background: transparent;
      color: var(--ink);
      text-align: left;
      text-decoration: none;
      cursor: pointer;
      transition: background .16s, border-color .16s, transform .16s;
    }
    .map-card:hover { background: rgba(255,255,255,.05); transform: translateX(2px); }
    .map-card.active { border-color: rgba(214, 219, 157, .4); background: rgba(214, 219, 157, .12); }
    .map-card-content { display: grid; min-width: 0; gap: 5px; }
    .map-card-name { font-size: .93rem; font-weight: 700; line-height: 1.3; }
    .map-variation-tag { width: max-content; max-width: 100%; padding: 3px 6px; overflow: hidden; border: 1px solid rgba(214, 219, 157, .28); border-radius: 999px; color: var(--accent); font-size: .61rem; font-weight: 800; letter-spacing: .045em; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
    .map-card-arrow { color: var(--accent); font-size: 1.08rem; }
    .empty-state { padding: 42px 18px; color: var(--muted); font-size: .9rem; text-align: center; }

    .map-viewer { min-height: 600px; overflow: hidden; }
    .viewer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: clamp(20px, 4vw, 32px) clamp(20px, 4vw, 38px) 18px; }
    .viewer-heading { min-width: 0; flex: 1; }
    .viewer-controls { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
    .viewer-top h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; }
    .viewer-top p { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
    .map-tactical-summary { width: 100%; padding: 13px 16px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: rgba(214, 219, 157, .07); }
    .map-tactical-summary[hidden] { display: none; }
    .map-tactical-summary summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--accent); font-size: .67rem; font-weight: 900; letter-spacing: .105em; list-style: none; text-transform: uppercase; cursor: pointer; }
    .map-tactical-summary summary::-webkit-details-marker { display: none; }
    .map-tactical-summary summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
    .map-tactical-summary-toggle::before { content: "+"; display: block; font-size: 1rem; line-height: 1; }
    .map-tactical-summary[open] .map-tactical-summary-toggle::before { content: "−"; }
    .map-tactical-summary-scope { color: var(--muted); font-size: .75rem; margin: 10px 0 0; }
    .map-tactical-summary-scope:empty { display: none; }
    .map-tactical-summary-view { position: relative; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(214, 219, 157, .16); }
    .map-tactical-summary-view[hidden], .map-tactical-summary-editor[hidden], .map-tactical-summary-edit[hidden] { display: none; }
    .map-tactical-summary blockquote { margin: 0; padding-right: 38px; }
    .map-tactical-summary p { margin: 0; color: var(--ink); font-size: clamp(.82rem, 1.5vw, .9rem); line-height: 1.58; }
    .map-tactical-summary p + p { margin-top: 3px; }
    .map-tactical-summary .map-tactical-summary-empty { color: var(--muted); font-style: italic; }
    .map-tactical-summary-edit { position: absolute; top: 7px; right: 0; display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--accent); cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
    .map-tactical-summary-edit:hover, .map-tactical-summary-edit:focus-visible { border-color: var(--accent); background: var(--accent); color: #171b1a; }
    .map-tactical-summary-edit svg { width: 15px; height: 15px; }
    .map-tactical-summary-editor { display: grid; margin-top: 11px; padding-top: 10px; gap: 7px; border-top: 1px solid rgba(214, 219, 157, .16); }
    .map-tactical-summary-editor label { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .045em; }
    .map-tactical-summary-editor textarea { box-sizing: border-box; width: 100%; min-height: 82px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; outline: none; background: var(--surface); color: var(--ink); font: inherit; font-size: .78rem; line-height: 1.5; }
    .map-tactical-summary-editor textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(214, 219, 157, .11); }
    .map-tactical-summary .map-tactical-summary-editor-status { min-height: 1.2em; color: var(--red); font-size: .7rem; }
    .map-tactical-summary-editor-actions { display: flex; flex-wrap: wrap; gap: 7px; }
    .map-meta-row { display: flex; margin-top: 13px; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
    .map-variation-control { display: inline-flex; align-items: center; gap: 8px; }
    .map-variation-control label { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
    .viewer-top .map-battle-rating { margin: 0; padding: 6px 9px; border: 1px solid rgba(214, 219, 157, .34); border-radius: 999px; color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .035em; line-height: 1; white-space: nowrap; }
    .viewer-top .map-last-updated { margin: 0 0 0 auto; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .035em; text-align: right; white-space: nowrap; }
    #map-variation, #modal-map-variation { min-width: 150px; padding: 7px 28px 7px 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #111719; color: var(--ink); font: inherit; font-size: .77rem; font-weight: 750; cursor: pointer; }
    #map-variation:hover, #map-variation:focus-visible, #modal-map-variation:hover, #modal-map-variation:focus-visible { border-color: #56675f; }
    .copy-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 116px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 8px; background: rgba(214, 219, 157, .08); color: var(--accent); font-size: .75rem; font-weight: 750; cursor: pointer; transition: .18s; }
    .copy-link svg { width: 16px; height: 16px; }
    .copy-link:hover, .copy-link:focus-visible { background: var(--accent); color: #171b1a; }
    .copy-link.copied { border-color: #83d49d; background: rgba(131, 212, 157, .14); color: #9ae5b1; }
    .copy-link.failed { border-color: var(--red); color: var(--red); }
    .team-switch { display: inline-flex; flex-shrink: 0; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: #111719; }
    .team-button { min-width: 84px; padding: 9px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: .84rem; font-weight: 800; cursor: pointer; transition: .18s; }
    .team-button[aria-pressed="true"] { color: #171b1a; }
    .team-button.red[aria-pressed="true"] { border-color: var(--red); background: var(--red); }
    .team-button.blue[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); }
    .marker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 clamp(20px, 4vw, 38px) 18px; }
    .marker-danger-actions { display: grid; gap: 8px; }
    .marker-danger-actions[hidden] { display: none; }
    .marker-tool { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #111719; color: var(--muted); font-size: .75rem; font-weight: 750; cursor: pointer; transition: .18s; }
    .marker-tool:hover { border-color: #56675f; color: var(--ink); }
    .marker-tool.primary, .marker-tool[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #171b1a; }
    .marker-status { min-height: 1.2em; color: var(--muted); font-size: .74rem; }
    .map-sync-alert { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid rgba(214,219,157,.36); border-radius: 8px; background: rgba(214,219,157,.08); color: var(--accent-strong); font-size: .74rem; line-height: 1.4; }
    .map-sync-alert .marker-tool { flex: 0 0 auto; border-color: rgba(214,219,157,.5); color: var(--accent-strong); }
    .map-sync-alert[hidden] { display: none; }
    .marker-editor-note { width: 100%; margin: 1px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
    [data-editor-action][hidden], .copy-link[hidden], .marker-editor-note[hidden], .modal-marker-editor-note[hidden] { display: none; }
    .map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(208px, 245px); gap: 16px; align-items: start; padding: 0 clamp(12px, 3vw, 28px) 20px; }
    .map-primary-column { display: grid; min-width: 0; gap: 14px; }
    .map-stage { position: relative; min-height: 470px; display: grid; overflow: hidden; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #0d1111; }
    .map-enlarge-hint { position: absolute; right: 14px; bottom: 12px; z-index: 1; padding: 7px 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(10, 14, 13, .78); color: #d7ded9; font-size: .73rem; pointer-events: none; }
    .map-overlay-layer, .annotation-layer, .marker-layer { position: absolute; overflow: hidden; pointer-events: none; }
    .map-overlay-layer { z-index: 1; }
    .annotation-layer { z-index: 2; }
    .marker-layer { z-index: 3; }
    .map-area-overlay { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; transition: opacity .16s ease; }
    .map-area-overlay.is-dimmed { opacity: .2; }
    .map-annotation { position: absolute; display: block; padding: 0; border: 0; background: transparent; color: #fff; cursor: default; opacity: var(--annotation-opacity, .5); pointer-events: none; transition: opacity .16s ease; }
    .map-annotation.is-dimmed { opacity: var(--annotation-dimmed-opacity, .1); }
    .map-annotation.is-preview { pointer-events: none; }
    .annotation-opacity-zero .map-annotation, .annotation-opacity-zero .route-line polyline { pointer-events: none; }
    .aim-arrow { height: 16px; transform-origin: 0 8px; }
    .aim-arrow-shaft { position: absolute; top: 6px; left: 0; height: 4px; background: #fff; }
    .aim-arrow-head { position: absolute; top: 0; display: block; width: 0; height: 0; border-style: solid; border-right-width: 0; border-color: transparent; border-left-color: #fff; pointer-events: none; }
    .route-line { inset: 0; width: 100%; height: 100%; overflow: visible; --route-color: #fff; pointer-events: none; }
    .route-line polyline { fill: none; stroke: var(--route-color); pointer-events: none; }
    .route-line.is-preview polyline { pointer-events: none; }
    html:not(.annotation-opacity-zero) .map-viewer.is-editing .aim-arrow:not(.is-preview), html:not(.annotation-opacity-zero) dialog.is-editing .aim-arrow:not(.is-preview) { cursor: pointer; pointer-events: auto; }
    html:not(.annotation-opacity-zero) .map-viewer.is-editing .route-line:not(.is-preview) polyline, html:not(.annotation-opacity-zero) dialog.is-editing .route-line:not(.is-preview) polyline { cursor: pointer; pointer-events: stroke; }
    .route-line.is-danger-route { --route-color: #E60012; }
    .aim-arrow.is-special-dark-annotation .aim-arrow-shaft { background: #000; }
    .aim-arrow.is-special-dark-annotation .aim-arrow-head { border-left-color: #000; }
    .route-line.is-special-dark-annotation { --route-color: #000; }
    .map-marker { position: absolute; display: block; width: auto; height: auto; padding: 0; transform: translate(-50%, -50%); border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: default; line-height: 0; pointer-events: auto; transition: opacity .16s ease; }
    .map-marker.is-dimmed { opacity: .1; }
    .map-viewer.is-editing .map-marker:hover, dialog.is-editing .map-marker:hover { filter: drop-shadow(0 0 4px var(--accent)); }
    .map-marker img { display: block; width: auto; height: auto; max-width: none; max-height: none; object-fit: initial; pointer-events: none; }
    .map-marker img.is-special-role-marker { filter: brightness(0); opacity: 1; }
    .map-viewer:not(.is-editing) :is(.map-marker, .legend-panel),
    .map-viewer:not(.is-editing) :is(.map-marker, .legend-panel) *,
    #image-modal:not(.is-editing) :is(.map-marker, .modal-legend-region),
    #image-modal:not(.is-editing) :is(.map-marker, .modal-legend-region) * { -webkit-user-select: none; user-select: none; }
    .map-viewer:not(.is-editing) :is(.map-marker, .legend-panel) img,
    #image-modal:not(.is-editing) :is(.map-marker, .modal-legend-region) img { -webkit-user-drag: none; }
    .map-marker.has-comment { cursor: help; }
    .map-marker-comment-popover { box-sizing: border-box; position: fixed; z-index: 1200; display: grid; width: max-content; max-width: min(720px, calc(100vw - 16px)); max-height: 80dvh; overflow: auto; overscroll-behavior: contain; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 38px rgba(0,0,0,.48); color: var(--ink); font-size: .78rem; font-weight: 500; line-height: 1.5; text-align: left; white-space: pre-wrap; pointer-events: none; }
    .map-marker-comment-popover[hidden] { display: none; }
    .map-marker-comment-popover.has-image { width: min(720px, calc(100vw - 16px)); }
    .map-marker-comment-popover.is-pinned { pointer-events: auto; }
    .map-marker-comment-carousel { position: relative; display: inline-grid; max-width: 100%; justify-self: center; place-items: center; overflow: hidden; border-radius: 7px; touch-action: pan-y; }
    .map-marker-comment-image { box-sizing: border-box; display: block; justify-self: center; width: auto; max-width: 100%; height: auto; max-height: min(60dvh, 420px); border: 1px solid var(--line); border-radius: 7px; background: var(--bg); object-fit: contain; }
    .map-marker-comment-image.is-changing { animation: comment-image-fade .15s ease-out; }
    @keyframes comment-image-fade { from { opacity: .2; } to { opacity: 1; } }
    .map-marker-comment-click-navigation { position: absolute; z-index: 1; inset: 0; display: grid; grid-template-columns: 20% 20%; justify-content: space-between; pointer-events: none; }
    .map-marker-comment-click-navigation[hidden] { display: none; }
    .map-marker-comment-click-zone { position: relative; min-width: 0; padding: 0 12px; border: 0; background: transparent; color: #fff; opacity: 0; cursor: pointer; pointer-events: auto; transition: opacity .15s ease, background .15s ease; }
    .map-marker-comment-click-zone::after { display: grid; width: 30px; height: 42px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: 2rem; line-height: 1; place-items: center; }
    .map-marker-comment-click-zone.previous::after { content: "‹"; }
    .map-marker-comment-click-zone.next::after { content: "›"; margin-left: auto; }
    .map-marker-comment-click-zone:hover, .map-marker-comment-click-zone:focus-visible { opacity: .9; }
    .map-marker-comment-click-zone:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
    .map-marker-comment-indicator-hit-area { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; min-height: 52px; padding: 0 12px 10px; align-items: flex-end; justify-content: center; }
    .map-marker-comment-indicators { display: flex; max-width: 100%; gap: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.16); opacity: .2; transition: opacity .15s ease; }
    .map-marker-comment-indicator-hit-area:hover .map-marker-comment-indicators,
    .map-marker-comment-carousel.is-indicator-active .map-marker-comment-indicators { opacity: 1; }
    .map-marker-comment-indicator { box-sizing: border-box; width: 12px; height: 12px; flex: 0 0 12px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; box-shadow: 0 1px 4px rgba(0,0,0,.75); cursor: pointer; }
    .map-marker-comment-indicator[aria-pressed="true"] { background: #fff; }
    .map-marker-comment-indicator:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    .map-marker-comment-popover.is-pinned .map-marker-comment-image { cursor: zoom-in; }
    .map-marker-comment-popover.is-mobile-sheet { display: grid; overflow-x: hidden; overflow-y: auto; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); border-radius: 16px 16px 10px 10px; gap: 10px; overscroll-behavior: contain; touch-action: pan-y; }
    .map-marker-comment-popover.is-mobile-sheet > .map-marker-comment-close { position: absolute; z-index: 3; top: max(8px, env(safe-area-inset-top)); right: 8px; background: rgba(13,19,18,.88); color: #fff; }
    .map-marker-comment-close, .map-marker-comment-image-preview-close { display: grid; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-raised); color: var(--ink); font: inherit; font-size: 1.45rem; line-height: 1; cursor: pointer; place-items: center; touch-action: manipulation; }
    .map-marker-comment-close:focus-visible, .map-marker-comment-image-preview-close:focus-visible, .map-marker-comment-image:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .map-marker-comment-popover.is-mobile-sheet .map-marker-comment-image { width: 100%; max-width: 100%; height: auto; max-height: none; touch-action: manipulation; }
    .map-marker-comment-image-preview { box-sizing: border-box; position: fixed; z-index: 1300; display: grid; padding: 8px; background: transparent; place-items: center; pointer-events: none; }
    .map-marker-comment-image-preview[hidden] { display: none; }
    .map-marker-comment-preview-carousel { max-width: 100%; max-height: 100%; border-radius: 10px; touch-action: pan-y; }
    .map-marker-comment-image-preview .map-marker-comment-image { display: block; width: auto; height: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: 0 20px 56px rgba(0,0,0,.65); object-fit: contain; }
    .map-marker-comment-image-preview:not(.is-touch-open) .map-marker-comment-indicator-hit-area { pointer-events: none; }
    .map-marker-comment-image-preview-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: none; background: rgba(13,19,18,.92); color: #fff; }
    .map-marker-comment-image-preview.is-touch-open { background: rgba(4,7,6,.78); pointer-events: auto; }
    .map-marker-comment-image-preview.is-touch-open .map-marker-comment-image-preview-close { display: grid; }
    .map-marker-comment-text { min-width: 0; max-width: 700px; }
    .map-viewer.is-editing .map-stage { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(214,219,157,.3); }
    .map-stage.is-drawing, .modal-map-stage.is-drawing { cursor: crosshair; }
    .map-viewer.is-editing .map-marker { cursor: grab; }
    .map-viewer.is-editing .map-marker:active { cursor: grabbing; }
    .map-viewer.is-editing .legend-item[data-marker-type] { cursor: grab; }
    .map-viewer.is-editing .legend-item[data-marker-type="route"] { cursor: crosshair; }
    .map-viewer.is-editing .legend-item[data-marker-type]:hover { outline: 1px dashed rgba(214,219,157,.5); }
    .map-viewer.is-editing .legend-item.is-placement-disabled,
    .map-viewer.is-editing .legend-item.is-placement-disabled:hover { cursor: not-allowed; opacity: .48; outline: 0; }
    #map-image { display: block; width: 100%; max-height: 670px; object-fit: contain; cursor: zoom-in; }
    .image-loading { position: absolute; color: var(--muted); font-size: .9rem; }
    .map-stage.loaded .image-loading { display: none; }
    .map-stage.load-error .image-loading { display: block; color: var(--red); }
    .legend-panel { display: grid; height: var(--side-panel-height); min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; background: rgba(13, 19, 18, .82); overflow: hidden; }
    .legend-heading { margin: 0; padding: 14px 15px 11px; border-bottom: 1px solid var(--line); font-size: .88rem; letter-spacing: .02em; }
    .legend-note { margin: 0; padding: 0 15px 12px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
    .legend-groups { min-height: 0; padding: 7px; overflow-x: hidden; overflow-y: auto; scrollbar-color: #52635d transparent; scrollbar-gutter: stable; }
    .legend-group { border-bottom: 1px solid rgba(154, 168, 162, .14); }
    .legend-group:last-child { border-bottom: 0; }
    .legend-group summary { padding: 10px 8px; color: var(--accent); font-size: .7rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; cursor: pointer; }
    .legend-list { display: grid; min-height: 0; gap: 2px; margin: 0; padding: 0 0 7px; list-style: none; }
    .annotation-opacity-slot { grid-column: 1 / -1; min-width: 0; padding: 2px 7px 7px; }
    .annotation-opacity-control { display: grid; min-width: 0; gap: 6px; padding: 8px 9px; border: 1px solid rgba(154,168,162,.18); border-radius: 7px; background: rgba(255,255,255,.035); }
    .annotation-opacity-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 7px; color: #d8e1db; font-size: .7rem; font-weight: 750; line-height: 1.35; }
    .annotation-opacity-heading label { min-width: 0; }
    .annotation-opacity-heading output { flex: 0 0 auto; min-width: 3.5ch; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
    .annotation-opacity-slider { width: 100%; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; touch-action: manipulation; }
    .annotation-opacity-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .legend-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
    .legend-actions .marker-tool, .modal-legend-actions .marker-tool { width: 100%; }
    .legend-item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 5px 8px; border-radius: 7px; color: #d8e1db; font-size: .79rem; cursor: pointer; transition: opacity .18s, filter .18s, background .18s; }
    .legend-item:hover { background: rgba(255,255,255,.055); }
    .legend-item.is-marker-hidden { filter: brightness(.5); }
    .legend-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: rgba(255,255,255,.035); }
    .legend-icon img { display: block; max-width: 22px; max-height: 22px; object-fit: contain; }
    .marker-context-menu, .annotation-context-menu { box-sizing: border-box; position: absolute; z-index: 4; min-width: min(172px, calc(100vw - 16px)); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
    .marker-context-menu { width: min(212px, calc(100vw - 16px)); }
    .marker-context-menu[hidden], .annotation-context-menu[hidden] { display: none; }
    .marker-comment-editor { box-sizing: border-box; display: grid; width: min(232px, calc(100vw - 28px)); max-width: 100%; gap: 7px; padding: 3px; }
    .marker-comment-editor[hidden] { display: none; }
    .marker-comment-input { box-sizing: border-box; width: 100%; min-height: 78px; resize: vertical; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font: inherit; font-size: .76rem; line-height: 1.45; }
    .marker-comment-input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
    .marker-comment-language-label { color: var(--muted); font-size: .67rem; font-weight: 750; }
    .marker-comment-image-field { display: grid; gap: 4px; }
    .marker-comment-image-field label, .marker-comment-byte-counter { margin: 0; color: var(--muted); font-size: .67rem; font-weight: 750; letter-spacing: .035em; }
    .marker-comment-image-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-height: 236px; overflow-y: auto; padding: 2px; }
    .marker-comment-image-option { display: grid; min-width: 0; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); cursor: pointer; text-align: left; }
    .marker-comment-image-option:hover { border-color: var(--muted); }
    .marker-comment-image-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .marker-comment-image-option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
    .marker-comment-image-option.selected[draggable="true"] { cursor: grab; }
    .marker-comment-image-option.is-dragging { opacity: .45; }
    .marker-comment-image-option:disabled { cursor: not-allowed; opacity: .38; }
    .marker-comment-image-option .marker-comment-media-thumbnail { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 3px; object-fit: cover; }
    .marker-comment-image-option span { overflow: hidden; padding: 0 2px 1px; font-size: .62rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
    .marker-comment-image-option.no-image { grid-column: 1 / -1; display: block; padding: 7px 9px; font-size: .72rem; text-align: center; }
    .marker-comment-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
    .marker-comment-actions .marker-context-action { padding: 8px; text-align: center; }
    .marker-context-tank-actions, .marker-context-role-actions { margin: 0 0 5px; padding: 0 0 5px; border-bottom: 1px solid var(--line); }
    .marker-context-tank-actions[hidden], .marker-context-role-actions[hidden] { display: none; }
    .marker-context-role-title { margin: 4px 8px 3px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .marker-context-action { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: .77rem; text-align: left; cursor: pointer; }
    .marker-context-action[hidden] { display: none !important; }
    .marker-context-action:hover { background: var(--surface-raised); }
    .marker-context-action.role[aria-pressed="true"], .marker-context-action.tank-type[aria-pressed="true"], .marker-context-action.danger-route[aria-checked="true"] { background: rgba(214,219,157,.15); color: var(--accent-strong); }
    .marker-context-action.tank-type { display: inline-flex; align-items: center; gap: 7px; }
    .marker-context-action.tank-type img { display: block; width: 24px; height: 24px; object-fit: contain; }
    .annotation-context-divider { height: 1px; margin: 5px 0; background: var(--line); }
    .annotation-context-divider[hidden] { display: none; }
    .marker-context-action.drawing-tool { display: inline-flex; align-items: center; gap: 7px; }
    .marker-context-action.drawing-tool img { display: block; width: 24px; height: 24px; object-fit: contain; }

    @media (hover: none), (pointer: coarse) {
      .map-marker-comment-indicator-hit-area { pointer-events: none; }
      .map-marker-comment-indicator-hit-area:hover .map-marker-comment-indicators { opacity: .2; }
      .map-marker-comment-carousel.is-indicator-active .map-marker-comment-indicators { opacity: 1; }
    }
    .marker-context-action.delete { color: var(--red); }

    .tier-view { padding-bottom: 72px; }
    .tier-hero { padding-bottom: clamp(36px, 6vw, 64px); }
    .tier-category-switch { display: inline-flex; margin-top: 30px; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(13, 19, 18, .72); }
    .tier-category-button { padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .77rem; font-weight: 850; letter-spacing: .04em; cursor: pointer; }
    .tier-category-button small { margin-left: 5px; font-size: .68rem; font-weight: 650; opacity: .75; }
    .tier-category-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #151a18; }

    .tier-maker-shell { padding: clamp(16px, 3vw, 30px); border: 1px solid var(--line); border-radius: 18px; background: rgba(23, 31, 29, .88); box-shadow: var(--shadow); }
    .tier-maker-header { display: flex; padding: 2px 2px 22px; align-items: flex-end; justify-content: space-between; gap: 20px; }
    .tier-maker-kicker { margin: 0 0 7px; color: var(--accent); font-size: .69rem; font-weight: 900; letter-spacing: .17em; }
    .tier-maker-header h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.85rem); letter-spacing: -.035em; }
    .tier-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
    .tier-export-button { padding: 9px 13px; border: 1px solid var(--accent); border-radius: 8px; background: rgba(214, 219, 157, .14); color: var(--accent-strong); font-size: .72rem; font-weight: 900; letter-spacing: .05em; cursor: pointer; }
    .tier-export-button:hover { background: rgba(214, 219, 157, .24); }
    .tier-export-button:disabled { cursor: wait; opacity: .55; }
    .tier-reset-button { padding: 9px 13px; border: 1px solid #764a4a; border-radius: 8px; background: rgba(123, 47, 47, .18); color: #ffb5b5; font-size: .72rem; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
    .tier-reset-button:hover { background: rgba(164, 54, 54, .28); }
    .tier-instructions { margin: 0 0 13px; color: var(--muted); font-size: .79rem; line-height: 1.5; }

    .tier-board { overflow: hidden; border: 1px solid #070908; border-radius: 10px; background: #0a0e0d; }
    .tier-row { display: grid; min-height: 112px; border-bottom: 1px solid #070908; grid-template-columns: 86px minmax(0, 1fr); }
    .tier-row:last-child { border-bottom: 0; }
    .tier-label { display: grid; place-items: center; color: #151817; font-size: 1.35rem; font-weight: 950; }
    .tier-s { background: #ff7b7b; }
    .tier-a { background: #ffb978; }
    .tier-b { background: #f5d878; }
    .tier-c { background: #eff376; }
    .tier-d { background: #a9ee75; }
    .tier-dropzone { display: flex; min-width: 0; min-height: 112px; padding: 6px; align-content: flex-start; align-items: flex-start; flex-wrap: wrap; gap: 5px; background: #111714; transition: background .15s, box-shadow .15s; }
    .tier-dropzone:empty::after { margin: auto; color: #4c5853; content: attr(data-empty-label); font-size: .64rem; font-weight: 900; letter-spacing: .16em; }
    .tier-dropzone.is-over { background: #1c2823; box-shadow: inset 0 0 0 2px var(--accent); }

    .tier-card { position: relative; display: block; width: 158px; height: 100px; flex: 0 0 158px; overflow: hidden; padding: 0; border: 1px solid #39463f; border-radius: 5px; background: #252d34; cursor: grab; touch-action: manipulation; transition: border-color .15s, opacity .15s, transform .15s; }
    .tier-card:hover { border-color: var(--accent); transform: translateY(-1px); }
    .tier-card:active { cursor: grabbing; }
    .tier-card.is-dragging { opacity: .38; }
    .tier-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
    .tier-card img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
    .tier-card-caption { position: absolute; z-index: 1; top: 0; right: 0; left: 0; display: flex; min-width: 0; height: 25px; padding: 4px 6px; align-items: center; gap: 6px; background: linear-gradient(90deg, rgba(5, 8, 8, .94), rgba(5, 8, 8, .78)); color: #fff; line-height: 1; pointer-events: none; }
    .tier-card .tier-card-flag { width: 25px; height: 16px; flex: 0 0 25px; border: 1px solid rgba(255,255,255,.35); border-radius: 2px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
    .tier-card-country-code { flex: 0 0 auto; color: var(--accent); font-size: .62rem; font-weight: 900; }
    .tier-card-equipment-name { min-width: 0; overflow: hidden; font-size: .66rem; font-weight: 850; letter-spacing: .01em; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; white-space: nowrap; }

    .tier-card-bank { margin-top: 22px; }
    .tier-filter-bar { display: flex; min-width: 0; padding: 0 2px 12px; align-items: center; gap: 10px; }
    .tier-country-filters { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
    .tier-country-filter { display: grid; width: 42px; height: 32px; flex: 0 0 42px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: rgba(13, 19, 18, .72); color: var(--muted); place-items: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s; }
    .tier-country-filter:hover { border-color: var(--accent); transform: translateY(-1px); }
    .tier-country-filter[aria-pressed="true"] { border-color: var(--accent); background: rgba(214, 219, 157, .16); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
    .tier-country-filter img { display: block; width: 30px; height: 20px; border: 1px solid rgba(255,255,255,.28); border-radius: 2px; object-fit: cover; pointer-events: none; }
    .tier-country-filter-all { width: auto; min-width: 48px; flex-basis: auto; padding-inline: 9px; font-size: .66rem; font-weight: 900; letter-spacing: .07em; }
    .tier-rank-filter, .tier-br-filter { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
    .tier-rank-filter label, .tier-br-filter label { color: var(--muted); font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .tier-rank-filter select { height: 32px; min-width: 76px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(13, 19, 18, .72); color: var(--ink); font: inherit; font-size: .75rem; font-weight: 850; cursor: pointer; }
    .tier-br-input { width: 54px; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: rgba(13, 19, 18, .72); color: var(--ink); font: inherit; font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 850; text-align: center; }
    .tier-br-separator { color: var(--muted); font-size: .72rem; font-weight: 850; }
    .tier-rank-filter select:focus-visible, .tier-br-input:focus-visible, .tier-country-filter:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
    .tier-unit-count { flex: 0 0 auto; color: var(--muted); font-size: .72rem; font-weight: 800; white-space: nowrap; }
    .tier-class-filter-row { display: flex; min-width: 0; padding: 0 2px 12px; align-items: center; gap: 9px; }
    .tier-class-filter-label { flex: 0 0 auto; color: var(--muted); font-size: .7rem; font-weight: 900; letter-spacing: .06em; }
    .tier-class-filters { display: flex; min-width: 0; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
    .tier-class-filter { display: grid; width: 42px; height: 36px; flex: 0 0 42px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: rgba(13, 19, 18, .72); color: var(--muted); place-items: center; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s; }
    .tier-class-filter:hover { border-color: var(--accent); transform: translateY(-1px); }
    .tier-class-filter[aria-pressed="true"] { border-color: var(--accent); background: rgba(214, 219, 157, .16); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent); }
    .tier-class-filter img { display: block; width: 32px; height: 32px; object-fit: contain; pointer-events: none; }
    .tier-class-filter-all { width: auto; min-width: 48px; flex-basis: auto; padding-inline: 9px; font-size: .66rem; font-weight: 900; letter-spacing: .07em; }
    .tier-class-filter:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
    .tier-card-pool { min-height: 220px; padding: 10px; border: 1px dashed #43534c; border-radius: 10px; background: #0e1412; }
    .tier-save-status { min-height: 1.4em; margin: 12px 2px 0; color: var(--muted); font-size: .72rem; }

    body.light-theme {
      color-scheme: light;
      --ink: #17231d;
      --muted: #52635b;
      --surface: #ffffff;
      --surface-raised: #edf3ed;
      --line: #c8d5cb;
      --accent: #708250;
      --accent-strong: #57673d;
      --brand-logo-color: #708250;
      --red: #c84c46;
      --blue: #327db8;
      --shadow: 0 18px 55px rgba(30, 53, 39, .12);
      background:
        radial-gradient(circle at 84% -8%, rgba(117, 149, 103, .2), transparent 32rem),
        radial-gradient(circle at 0% 25%, rgba(112, 130, 80, .1), transparent 25rem),
        #edf2ed;
    }
    body.light-theme::before { opacity: .45; background-image: linear-gradient(rgba(25,48,35,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(25,48,35,.06) 1px, transparent 1px); }
    body.light-theme .site-header { border-bottom-color: rgba(55, 81, 63, .2); }
    body.light-theme .language-switch, body.light-theme .theme-toggle, body.light-theme .team-switch, body.light-theme .marker-tool, body.light-theme .copy-link, body.light-theme #map-variation, body.light-theme #modal-map-variation, body.light-theme .content-switcher, body.light-theme .tier-category-switch, body.light-theme .tier-country-filter, body.light-theme .tier-class-filter, body.light-theme .tier-rank-filter select, body.light-theme .tier-br-input { background: rgba(255,255,255,.88); }
    body.light-theme #map-search, body.light-theme .map-index, body.light-theme .map-viewer { background: rgba(255,255,255,.82); }
    body.light-theme #map-search::placeholder { color: #738078; }
    body.light-theme .map-stage, body.light-theme dialog, body.light-theme .modal-workspace, body.light-theme .modal-map-stage { background: #f7faf7; }
    body.light-theme .legend-panel { background: rgba(248,251,248,.94); }
    body.light-theme .legend-item { color: var(--ink); }
    body.light-theme .annotation-opacity-heading { color: var(--ink); }
    body.light-theme .map-sync-alert { border-color: rgba(75,91,42,.3); background: rgba(116,132,70,.1); color: #4b5b2a; }
    body.light-theme .map-sync-alert .marker-tool { border-color: rgba(75,91,42,.35); color: #4b5b2a; }
    body.light-theme .legend-item:hover, body.light-theme .map-card:hover, body.light-theme .clear-search:hover, body.light-theme .close-modal:hover { background: rgba(42,79,54,.07); }
    body.light-theme .legend-icon { border-color: rgba(25,48,35,.1); background: rgba(25,48,35,.035); }
    body.light-theme .map-enlarge-hint { border-color: rgba(25,48,35,.15); background: rgba(255,255,255,.88); color: var(--ink); }
    body.light-theme .marker-context-menu, body.light-theme .annotation-context-menu { box-shadow: 0 12px 30px rgba(30,53,39,.16); }
    body.light-theme .tier-maker-shell { background: rgba(255,255,255,.84); }
    body.light-theme .tier-board { border-color: #a9b8ae; background: #dfe8e1; }
    body.light-theme .tier-row { border-bottom-color: #a9b8ae; }
    body.light-theme .tier-dropzone { background: #f5f8f5; }
    body.light-theme .tier-dropzone:empty::after { color: #8a9890; }
    body.light-theme .tier-dropzone.is-over { background: #e7efe8; }
    body.light-theme .tier-card-pool { border-color: #9daba2; background: #eef3ef; }
    body.light-theme .site-footer { color: #607066; }

    dialog { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #0d1111; box-shadow: none; }
    dialog[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
    dialog::backdrop { background: rgba(4, 7, 6, .82); backdrop-filter: blur(4px); }
    .modal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
    .modal-toolbar-actions { display: flex; align-items: center; gap: 8px; }
    .modal-variation-control { display: inline-flex; align-items: center; gap: 7px; }
    .modal-variation-control label { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
    #modal-map-variation { min-width: 132px; padding-block: 7px; }
    .modal-team-switch { padding: 3px; gap: 3px; }
    .modal-team-switch .team-button { min-width: 66px; padding: 7px 9px; }
    #modal-title { color: var(--muted); font-size: .86rem; font-weight: 700; }
    .close-modal { min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
    .close-modal:hover { background: rgba(255,255,255,.08); }
    .modal-marker-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 14px 8px; border-bottom: 1px solid var(--line); background: rgba(13,19,18,.5); }
    .modal-marker-tools .marker-tool { padding: 7px 9px; }
    .modal-marker-status { color: var(--muted); font-size: .73rem; }
    .modal-marker-editor-note { width: 100%; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
    .modal-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 290px); min-height: 0; background: #0d1111; overflow: hidden; }
    .modal-legend-region { grid-column: 2; grid-row: 1; min-width: 0; padding: 12px 10px; overflow: auto; border-left: 1px solid var(--line); background: rgba(13,19,18,.36); }
    .modal-legend-note { margin: 0 0 6px; color: var(--muted); font-size: .7rem; }
    .modal-legend-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
    .modal-legend-list .legend-group summary { padding: 8px 5px; font-size: .65rem; }
    .modal-legend-list .legend-list { padding-bottom: 5px; }
    .modal-legend-actions { display: grid; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
    .modal-legend-list .legend-item { min-height: 34px; padding: 4px 7px; font-size: .72rem; }
    .modal-legend-list .legend-icon { flex-basis: 24px; width: 24px; height: 24px; }
    .modal-legend-list .legend-icon img { max-width: 19px; max-height: 19px; }
    .modal-map-stage { grid-column: 1; grid-row: 1; position: relative; display: grid; min-width: 0; min-height: 0; overflow: hidden; place-items: center; background: #0d1111; }
    #modal-image { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
    .modal-map-close-layer { position: absolute; z-index: 0; pointer-events: none; }
    .modal-map-close { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 26px; line-height: 1; text-shadow: 0 1px 4px #000; cursor: pointer; pointer-events: auto; }
    .modal-map-close:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
    #modal-map-overlay-layer { z-index: 1; }
    #modal-annotation-layer { z-index: 2; }
    #modal-marker-layer { z-index: 3; }
    dialog.is-editing .modal-map-stage { box-shadow: inset 0 0 0 1px rgba(214,219,157,.3); }
    dialog.is-editing .map-marker { cursor: grab; }
    dialog.is-editing .map-marker:active { cursor: grabbing; }
    dialog.is-editing .modal-legend-list .legend-item[data-marker-type] { cursor: grab; }
    dialog.is-editing .modal-legend-list .legend-item[data-marker-type="route"] { cursor: crosshair; }
    dialog.is-editing .modal-legend-list .legend-item[data-marker-type]:hover { outline: 1px dashed rgba(214,219,157,.5); }
    dialog.is-editing .modal-legend-list .legend-item.is-placement-disabled,
    dialog.is-editing .modal-legend-list .legend-item.is-placement-disabled:hover { cursor: not-allowed; opacity: .48; outline: 0; }

    .site-footer { width: min(1240px, calc(100% - 40px)); padding: 0 0 30px; margin: 0 auto; color: #718079; font-size: .75rem; text-align: center; }
    .footer-community { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
    .community-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-weight: 750; text-decoration: none; transition: border-color .18s, color .18s; }
    .community-link:hover, .community-link:focus-visible { border-color: var(--accent); color: var(--accent); }
    .community-link img { display: block; object-fit: contain; }
    .member-count { padding-left: 8px; border-left: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
    .footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; margin-bottom: 18px; }
    .footer-links a, .footer-links button { padding: 2px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 750; text-decoration: underline; text-decoration-color: rgba(154, 168, 162, .45); text-underline-offset: 3px; cursor: pointer; transition: color .18s, text-decoration-color .18s; }
    .footer-links a:hover, .footer-links a:focus-visible, .footer-links button:hover, .footer-links button:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
    .consent-settings-status { max-width: 720px; margin: -8px auto 16px; color: var(--muted); line-height: 1.55; }
    @media (max-width: 760px) {
      .site-header, main, .site-footer { width: min(100% - 28px, 1240px); }
      .site-header { min-height: 64px; }
      .hero { padding-top: 12px; }
      .home-hero { grid-template-columns: 1fr; gap: 28px; }
      .recent-updates { max-width: 320px; }
      .workspace { grid-template-columns: 1fr; }
      .map-index { height: min(70vh, 620px); }
      .map-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 250px; gap: 3px; }
      .map-card { min-height: 58px; }
      .map-card-arrow { display: none; }
      .map-viewer { min-height: 0; }
      .marker-tools { padding-bottom: 14px; }
      .modal-marker-tools { padding: 8px 10px 7px; }
      .modal-workspace { grid-template-columns: minmax(0, 1fr) 172px; }
      .modal-legend-region { padding: 7px 6px; }
      .modal-legend-list .legend-item { gap: 6px; padding: 4px; font-size: .67rem; }
      .map-layout { grid-template-columns: 1fr; }
      .map-stage { min-height: 270px; }
      .legend-panel { height: min(70vh, 620px); }
      .legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .tier-category-switch { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .tier-category-button { padding-inline: 8px; }
      .tier-maker-shell { padding: 10px; border-radius: 12px; }
      .tier-maker-header { align-items: center; }
      .tier-header-actions { align-items: stretch; flex-direction: column; }
      .tier-export-button, .tier-reset-button { padding: 8px 10px; }
      .tier-filter-bar { flex-wrap: wrap; }
      .tier-country-filters { width: 100%; flex-basis: 100%; }
      .tier-unit-count { margin-left: auto; }
      .tier-row { min-height: 82px; grid-template-columns: 54px minmax(0, 1fr); }
      .tier-dropzone { min-height: 82px; padding: 4px; gap: 3px; }
      .tier-label { font-size: 1rem; }
      .tier-card { width: 112px; height: 71px; flex-basis: 112px; }
      .tier-card-caption { height: 21px; padding: 3px 4px; gap: 4px; }
      .tier-card .tier-card-flag { width: 21px; height: 14px; flex-basis: 21px; }
      .tier-card-equipment-name { font-size: .58rem; }
      .tier-card-pool { min-height: 168px; }
    }
    @media (max-width: 760px), (any-pointer: coarse) {
      #toggle-editor, #modal-toggle-editor { display: none; }
      .map-layout { grid-template-columns: 1fr; }
      .legend-panel { height: min(70vh, 620px); }
      .legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .modal-marker-tools { padding: 0; border-bottom: 0; }
      .modal-marker-tools > :not(.map-sync-alert) { display: none; }
      .modal-marker-tools .map-sync-alert { width: auto; margin: 8px 10px 7px; }
      .modal-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) min(35dvh, 320px); }
      .modal-map-stage { grid-column: 1; grid-row: 1; }
      .modal-legend-region { grid-column: 1; grid-row: 2; min-height: 0; padding: 8px 10px; border-top: 1px solid var(--line); border-left: 0; }
      .modal-legend-list .legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .modal-legend-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 560px) {
      .site-header { gap: 8px; }
      .brand-name { display: none; }
      .primary-nav { gap: 0; }
      .primary-nav a { padding-inline: 7px; font-size: .65rem; }
      .header-actions { gap: 6px; }
    }
    @media (max-width: 430px) {
      h1 { font-size: 3rem; }
      .map-list { grid-template-columns: 1fr; }
      .viewer-top { display: block; }
      .viewer-controls { margin-top: 18px; gap: 6px; }
      .viewer-controls .team-button { min-width: 72px; }
      .viewer-controls .team-switch { margin-top: 0; }
      .team-button { min-width: 104px; }
      .legend-list { grid-template-columns: 1fr; }
      .site-header { flex-wrap: nowrap; justify-content: space-between; padding: 8px 0; }
      .brand-mark { flex-basis: 30px; width: 30px; height: 30px; }
      .primary-nav a:first-child { font-size: 0; }
      .primary-nav a:first-child::after { content: "MAPS"; font-size: .65rem; }
      .language-button { padding-inline: 6px; }
      .theme-toggle { padding-inline: 7px; }
      .modal-toolbar { align-items: flex-start; }
      .modal-toolbar-actions { gap: 5px; }
      .modal-variation-control label { display: none; }
      #modal-map-variation { min-width: 112px; max-width: 32vw; }
      .modal-team-switch .team-button { min-width: 58px; padding: 7px; }
    }
    .modal-workspace { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(220px, 290px); }
    .modal-workspace > .map-index { grid-column: 1; grid-row: 1; width: 100%; height: 100%; min-width: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
    .modal-workspace .map-list { display: block; max-height: none; }
    .modal-workspace .modal-map-stage { grid-column: 2; }
    .modal-workspace .modal-legend-region { grid-column: 3; }
    @media (max-width: 1100px) {
      .modal-workspace { grid-template-columns: 200px minmax(0, 1fr) 172px; }
    }
    @media (max-width: 760px), (any-pointer: coarse) {
      .modal-workspace { grid-template-columns: clamp(130px, 27vw, 220px) minmax(0, 1fr); }
      .modal-workspace > .map-index { grid-row: 1 / -1; }
      .modal-workspace .modal-legend-region { grid-column: 2; }
      .modal-workspace .index-heading { flex-wrap: wrap; gap: 4px; padding: 12px 8px; }
      .modal-workspace .search-wrap { margin-inline: 6px; }
      .modal-workspace .map-list { padding: 4px; }
      .modal-workspace .map-card { padding: 10px 6px; }
    }
    @media (any-pointer: coarse) and (orientation: landscape) and (min-width: 900px) and (min-height: 600px) {
      .modal-workspace { grid-template-columns: clamp(160px, 18vw, 210px) minmax(0, 1fr) clamp(150px, 17vw, 190px); grid-template-rows: minmax(0, 1fr); }
      .modal-workspace > .map-index { grid-column: 1; grid-row: 1; }
      .modal-workspace .modal-map-stage { grid-column: 2; grid-row: 1; }
      .modal-workspace .modal-legend-region { grid-column: 3; grid-row: 1; min-height: 0; padding: 8px 6px; border-top: 0; border-left: 1px solid var(--line); }
      .modal-workspace .modal-legend-list .legend-list { grid-template-columns: 1fr; }
      .modal-workspace .modal-legend-actions { grid-template-columns: 1fr; }
    }
    @media (max-width: 760px), (any-pointer: coarse) and (max-height: 599px), (any-pointer: coarse) and (max-width: 899px) {
      .modal-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; overflow-x: hidden; overflow-y: auto; }
      .modal-workspace > .map-index { position: relative; z-index: 2; grid-column: 1; grid-row: 1; width: 100%; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
      .modal-workspace .map-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 128px; overflow-y: auto; }
      .modal-workspace .modal-map-stage { position: relative; z-index: 1; grid-column: 1; grid-row: 2; min-height: min(75dvh, 100vw); }
      .modal-workspace .modal-legend-region { grid-column: 1; grid-row: 3; max-height: min(45dvh, 320px); padding: 8px 10px; overflow: auto; border-top: 1px solid var(--line); border-left: 0; }
      .modal-workspace .modal-legend-list .legend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .modal-workspace .modal-legend-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 430px) {
      .modal-workspace .map-list { grid-template-columns: 1fr; }
    }
.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; }

/* Keep map guides focused on reading; editor controls are a secondary disclosure. */
.hero.map-detail-hero { display: block; padding: 20px 0 22px; }
.map-detail-hero .hero-title, .map-detail-hero .hero-copy, .map-detail-hero .recent-updates { display: none; }
.map-detail-hero .eyebrow { margin-bottom: 8px; font-size: .65rem; }
.map-detail-hero .seo-title { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.25; }
.map-tactical-summary blockquote { padding-right: 0; }
.map-tactical-summary blockquote.is-condensed { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.is-editing .map-tactical-summary blockquote { padding-right: 38px; }
.summary-read-more { margin-top: 8px; padding: 4px 0; border: 0; background: transparent; color: var(--accent-strong); font: inherit; font-size: .78rem; font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.summary-read-more[hidden] { display: none; }
.editor-disclosure { margin: 16px clamp(20px, 4vw, 38px) 0; border-top: 1px solid var(--line); }
.editor-disclosure[hidden] { display: none; }
.editor-disclosure > summary { padding: 14px 0; color: var(--muted); font-size: .8rem; cursor: pointer; }
.editor-disclosure > summary:focus-visible, .summary-read-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.editor-disclosure .marker-tools { padding: 0 0 14px; }
.vector-editor-tools { display: contents; }
.vector-editor-tools[hidden], .vector-editor-tools [hidden] { display: none !important; }
.vector-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.vector-actions label { display: inline-flex; align-items: center; gap: 6px; }
.vector-actions input[type="number"] { width: 78px; padding: 6px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.vector-lock, .vector-hint, .vector-status { font-size: 12px; }
.vector-status { color: var(--accent); }
.vector-selection-layer { position: absolute; z-index: 8; pointer-events: none; overflow: visible; }
.vector-selection-layer[hidden] { display: none; }
.vector-box, .vector-marquee { position: absolute; box-sizing: border-box; border: 1px solid var(--accent); }
.vector-box { pointer-events: none; }
.vector-move { left: 50%; top: 50%; width: 24px; height: 24px; cursor: move; }
.vector-move::after { content: "✥"; }
.vector-marquee { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.vector-handle { position: absolute; width: 13px; height: 13px; padding: 0; border: 1px solid var(--ink); background: var(--accent); border-radius: 2px; transform: translate(-50%, -50%); pointer-events: auto; }
.vector-nw { left: -10px; top: -10px; cursor: nwse-resize; }
.vector-ne { left: calc(100% + 10px); top: -10px; cursor: nesw-resize; }
.vector-sw { left: -10px; top: calc(100% + 10px); cursor: nesw-resize; }
.vector-se { left: calc(100% + 10px); top: calc(100% + 10px); cursor: nwse-resize; }
.vector-rotate { left: 50%; top: -22px; border-radius: 50%; cursor: grab; }
.is-vector-selecting { touch-action: none; cursor: crosshair; }
.map-marker.is-vector-selected > img { outline: 1px solid var(--accent); outline-offset: 2px; }
.vector-marker-label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; line-height: 1.4; padding: 1px 4px; color: var(--ink); background: var(--surface); border-radius: 3px; pointer-events: none; }

.viewer-sync-status:has(.map-sync-alert:not([hidden])) { padding: 0 clamp(20px, 4vw, 38px) 16px; }
@media (max-width: 760px) {
  .map-detail-hero + .workspace .map-index { height: auto; }
  .map-detail-hero + .workspace .map-list { max-height: 128px; }
}

.legend-actions { grid-template-columns: 1fr; }

@media (max-width: 760px) {
  .modal-toolbar { flex-wrap: wrap; padding: 8px 10px; }
  #modal-title { width: 100%; }
  .modal-toolbar-actions { width: 100%; }
  .modal-variation-control { min-width: 0; flex: 1; }
  .modal-variation-control label { display: none; }
  #modal-map-variation { width: 100%; min-width: 0; max-width: none; }
  .modal-team-switch { margin-top: 0; }
}

/* Keep editing active while reclaiming space for the map. */
.marker-tools.is-tools-collapsed > :not(#toggle-editor):not(.editor-tools-toggle),
.modal-marker-tools.is-tools-collapsed > :not(#modal-toggle-editor):not(.editor-tools-toggle) {
  display: none !important;
}
.editor-tools-toggle[hidden] { display: none; }
.map-wip-layer { position: absolute; z-index: 0; pointer-events: none; user-select: none; }
.map-wip-layer[hidden] { display: none; }
.map-wip-layer > img { display: block; width: 100%; height: 100%; object-fit: contain; }

.marker-tools, .modal-marker-tools { flex-wrap: nowrap; overflow-x: auto; }
.marker-tools > *, .modal-marker-tools > *, .vector-editor-tools > * { flex-shrink: 0; }
.vector-lock { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.marker-editor-note, .modal-marker-editor-note { display: none; }
.vector-status:empty, .marker-status:empty, .modal-marker-status:empty { display: none; }
