/* Original stylesheet sources (cascade order):
/static/result-workspace.css?v=20261023r1
/static/site-shell.css?v=20260930ux
/static/drop-onboarding.css?v=20260930ux
*/

    :root {
      color-scheme: dark;
      --bg: #071010;
      --panel: #101918;
      --panel-2: #13201f;
      --line: #263735;
      --line-strong: #36514d;
      --text: #ecfff8;
      --muted: #91aaa4;
      --accent: #54f7a5;
      --green: #54f7a5;
      --warn: #ffd166;
      --danger: #ff5a6f;
      --blue: #54c9ff;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      height: 100%;
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      overflow: hidden;
    }

    body {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 360px;
      grid-template-rows: auto auto minmax(0, 1fr);
      grid-template-areas:
        "header header"
        "toolbar side"
        "map side";
    }

    .app-header {
      grid-area: header;
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-width: 0;
      min-height: 58px;
      padding: 9px 22px;
      background: #0e1716;
    }

    .brand {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 6px 16px;
      overflow: hidden;
    }

    .brand p {
      flex: 1 1 auto;
      min-width: 120px;
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    aside {
      grid-area: side;
      min-width: 0;
      height: auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      padding: 16px;
      background: var(--panel);
      border-left: 1px solid var(--line);
      overflow-y: auto;
    }

    main {
      position: relative;
      height: auto;
      background: #050a0a;
    }

    h1 {
      flex: 0 0 auto;
      margin: 0;
      font-size: 18px;
      line-height: 1.35;
      letter-spacing: 0;
      white-space: normal;
      word-break: keep-all;
    }

    .top-nav {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: nowrap;
      margin: 0;
    }

    .top-nav a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 36px;
      border: 1px solid transparent;
      border-radius: 8px;
      padding: 8px 10px;
      font-weight: 800;
      white-space: nowrap;
      text-decoration: none;
    }

    .top-nav a.active {
      color: var(--green);
      background: #10231b;
      border-color: #2c5845;
    }

    .toolbar {
      grid-area: toolbar;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
      min-width: 0;
      padding: 12px 16px;
      background: #0b1414;
    }

    .toolbar-note {
      margin-left: auto;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.4;
    }

    /* usage-example: removable usage help entry points */
    .usage-help-btn {
      min-width: auto;
      padding: 8px 11px;
      border-style: dashed;
      color: #dff8ef;
      background: rgba(9, 20, 18, .72);
    }
    .usage-help-btn:hover,
    .usage-card-btn:hover,
    .usage-inline-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }
    .dropzone-actions {
      display: flex;
      justify-content: center;
      margin-top: 16px;
    }
    .usage-inline-btn,
    .usage-card-btn {
      border: 1px solid rgba(84, 247, 165, .34);
      border-radius: 999px;
      background: rgba(84, 247, 165, .08);
      color: #dff8ef;
      cursor: pointer;
      font: inherit;
      font-size: 13px;
      font-weight: 900;
    }
    .usage-inline-btn {
      padding: 8px 13px;
    }
    .usage-card-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-top: 11px;
      padding: 7px 12px;
    }
    .usage-modal-backdrop[hidden] { display: none; }
    .usage-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(1, 7, 6, .78);
      backdrop-filter: blur(10px);
    }
    .usage-modal {
      position: relative;
      width: min(1180px, calc(100vw - 48px));
      max-height: calc(100vh - 48px);
      overflow: auto;
      border: 1px solid rgba(84, 247, 165, .24);
      border-radius: 10px;
      background:
        linear-gradient(90deg, rgba(84,247,165,.06) 1px, transparent 1px),
        linear-gradient(0deg, rgba(84,247,165,.05) 1px, transparent 1px),
        #071410;
      background-size: 84px 84px;
      box-shadow: 0 26px 80px rgba(0, 0, 0, .52);
      padding: 30px;
    }
    .usage-modal-close {
      position: absolute;
      right: 18px;
      top: 16px;
      width: 36px;
      height: 36px;
      border: 1px solid rgba(188, 234, 220, .28);
      border-radius: 8px;
      background: rgba(9, 20, 18, .82);
      color: var(--text);
      cursor: pointer;
      font-size: 20px;
      line-height: 1;
    }
    .usage-modal-head {
      max-width: 880px;
      margin-bottom: 24px;
    }
    .usage-modal-eyebrow {
      display: inline-flex;
      align-items: center;
      border: 1px solid rgba(84,247,165,.44);
      border-radius: 999px;
      padding: 5px 10px;
      color: var(--accent);
      font-size: 12px;
      font-weight: 900;
    }
    .usage-modal h2 {
      margin: 13px 0 8px;
      color: var(--text);
      font-size: clamp(28px, 3vw, 44px);
      line-height: 1.12;
      letter-spacing: 0;
    }
    .usage-modal-lead {
      margin: 0;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.65;
    }
    .usage-modal-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 18px;
    }
    .usage-modal-chip {
      border: 1px solid rgba(188, 234, 220, .24);
      border-radius: 999px;
      padding: 7px 11px;
      color: #d7efe8;
      background: rgba(5, 14, 13, .62);
      font-size: 13px;
      font-weight: 800;
    }
    .usage-steps {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
      align-items: stretch;
    }
    .usage-step-card {
      position: relative;
      display: flex;
      flex-direction: column;
      min-height: 0;
      border: 1px solid rgba(84,247,165,.22);
      border-radius: 10px;
      background: rgba(10, 26, 22, .86);
      padding: 18px;
      overflow: hidden;
    }
    .usage-step-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }
    .usage-step-num {
      color: #ffe85a;
      font-size: 34px;
      font-weight: 900;
      line-height: 1;
    }
    .usage-step-card:nth-child(2) .usage-step-num { color: var(--accent); }
    .usage-step-card:nth-child(3) .usage-step-num { color: #4cc7ff; }
    .usage-step-tag {
      border: 1px solid currentColor;
      border-radius: 999px;
      padding: 5px 10px;
      color: var(--accent);
      font-size: 12px;
      font-weight: 900;
    }
    .usage-step-media {
      position: relative;
      display: grid;
      place-items: center;
      height: 190px;
      border: 1px solid rgba(188, 234, 220, .18);
      border-radius: 8px;
      background: #07100f;
      overflow: hidden;
      margin-bottom: 16px;
    }
    .usage-step-media img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .usage-paste-preview {
      width: 100%;
      height: 100%;
      display: grid;
      place-items: center;
      background:
        linear-gradient(90deg, rgba(84,247,165,.18) 1px, transparent 1px),
        linear-gradient(0deg, rgba(84,247,165,.16) 1px, transparent 1px),
        rgba(8, 20, 17, .86);
      background-size: 38px 38px;
    }
    .usage-paste-box {
      border: 1px solid rgba(84,247,165,.42);
      border-radius: 8px;
      background: rgba(12, 29, 25, .92);
      color: var(--text);
      padding: 22px 28px;
      text-align: center;
      font-weight: 900;
      box-shadow: 0 14px 34px rgba(0,0,0,.32);
    }
    .usage-key-row {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      margin-top: 12px;
      color: var(--muted);
    }
    .usage-key {
      border: 1px solid rgba(188,234,220,.38);
      border-radius: 6px;
      padding: 5px 10px;
      background: rgba(255,255,255,.05);
      color: var(--text);
      font-weight: 900;
    }
    .usage-step-card h3 {
      margin: 0 0 8px;
      color: var(--text);
      font-size: 21px;
      line-height: 1.25;
    }
    .usage-step-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.65;
      font-size: 14px;
    }
    .usage-step-foot {
      margin-top: auto;
      padding-top: 16px;
      border-top: 1px solid rgba(188,234,220,.14);
      color: rgba(188,234,220,.76);
      font-size: 12px;
    }

    /* paste-first onboarding refresh */
    .empty-onboarding {
      position: relative;
      min-height: min(620px, calc(100vh - 290px));
      border-radius: 10px;
      background:
        radial-gradient(circle at 50% 16%, rgba(84,247,165,.14), transparent 30%),
        linear-gradient(rgba(84,247,165,.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(84,247,165,.028) 1px, transparent 1px),
        radial-gradient(circle at 18% 72%, rgba(70,180,255,.055), transparent 28%),
        rgba(6,18,16,.78);
      background-size: auto, 32px 32px, 32px 32px, auto, auto;
      box-shadow: inset 0 0 0 1px rgba(84,247,165,.08), inset 0 0 90px rgba(0,0,0,.28);
    }
    .empty-onboarding::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: .16;
      background:
        radial-gradient(ellipse at 28% 28%, transparent 0 32%, rgba(188,234,220,.28) 33%, transparent 34%),
        radial-gradient(ellipse at 78% 72%, transparent 0 34%, rgba(188,234,220,.22) 35%, transparent 36%);
      filter: blur(.2px);
    }
    .empty-symbol {
      position: relative;
      z-index: 1;
    }
    .empty-symbol::after {
      content: var(--empty-icon, "D");
      font-size: 30px;
      color: var(--green);
      text-shadow: 0 0 18px rgba(84,247,165,.52);
    }
    body.mode-drop .empty-symbol { --empty-icon: "D"; }
    body.mode-mortar .empty-symbol { --empty-icon: "M"; }
    body.mode-zone .empty-symbol { --empty-icon: "Z"; }
    .empty-title,
    .empty-lead,
    .empty-flow,
    .empty-actions,
    .empty-foot {
      position: relative;
      z-index: 1;
    }
    .empty-flow {
      margin-top: 12px;
    }
    .empty-flow-card {
      min-height: 190px;
    }
    .empty-flow-card h3 {
      color: #f2fff9;
    }
    .empty-flow-card p {
      min-height: 34px;
      color: rgba(205,231,224,.76);
    }
    .empty-step-num {
      box-shadow: 0 0 0 7px rgba(84,247,165,.045);
    }
    .empty-thumb {
      height: 118px;
      border-radius: 10px;
    }
    .empty-key-visual,
    .empty-paste-visual {
      border: 1px solid rgba(188,234,220,.18);
      background:
        radial-gradient(circle at 50% 52%, rgba(84,247,165,.12), transparent 58%),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)),
        rgba(4,12,12,.72);
    }
    .empty-key-visual .keycap,
    .empty-paste-visual .keycap {
      min-width: 68px;
      min-height: 54px;
      padding: 7px 10px;
      border: 1px solid rgba(236,255,248,.32);
      border-radius: 10px;
      background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
      box-shadow: inset 0 -3px 0 rgba(0,0,0,.24), 0 0 20px rgba(84,247,165,.14);
      color: #f5fffb;
      font-size: 14px;
      font-weight: 900;
      line-height: 1.05;
    }
    .empty-key-visual .keycap small,
    .empty-paste-visual .keycap small {
      display: block;
      color: rgba(236,255,248,.62);
      font-size: 10px;
      font-weight: 800;
    }
    .empty-paste-visual {
      width: 100%;
      font: inherit;
      color: inherit;
    }
    .empty-paste-visual:hover,
    .empty-paste-visual:focus-visible {
      box-shadow: 0 0 0 1px rgba(84,247,165,.18), 0 14px 36px rgba(0,0,0,.24);
    }
    .paste-visual-inner {
      gap: 9px;
    }
    .paste-visual-title {
      color: #f3fff9;
      font-weight: 900;
    }
    .paste-visual-hint {
      gap: 7px;
      color: rgba(188,234,220,.72);
    }
    .empty-actions {
      margin-top: 10px;
    }
    .empty-action.primary {
      border-color: rgba(84,247,165,.52);
      color: #03110d;
      text-shadow: none;
    }
    .empty-action.secondary {
      border-color: rgba(84,247,165,.28);
    }
    .result-preview-card {
      box-shadow: inset 0 0 0 1px rgba(84,247,165,.07), 0 18px 55px rgba(0,0,0,.18);
    }
    .result-preview-head .eye-mark::before {
      content: "";
      width: 15px;
      height: 9px;
      border: 2px solid currentColor;
      border-radius: 50%;
      border-left-width: 1px;
      border-right-width: 1px;
    }
    .result-preview-head .eye-mark {
      font-size: 0;
    }
    .preview-image {
      border-radius: 10px;
    }
    .preview-image::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      border-radius: inherit;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 -38px 70px rgba(0,0,0,.18);
    }

    @media (max-width: 980px) {
      .usage-steps { grid-template-columns: 1fr; }
      .usage-step-media { height: 220px; }}
    @media (max-width: 640px) {
      .usage-modal-backdrop { padding: 10px; }
      .usage-modal { width: calc(100vw - 20px); padding: 22px 14px; }
      .usage-modal h2 { font-size: 28px; }
      .usage-step-media { height: 180px; }}


    /* usage-example-polish: actual screenshot tutorial */
    .usage-modal {
      width: min(1280px, calc(100vw - 48px));
      border-radius: 12px;
      border-color: rgba(84, 247, 165, .26);
      background:
        linear-gradient(90deg, rgba(84,247,165,.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(84,247,165,.045) 1px, transparent 1px),
        radial-gradient(circle at 18% 10%, rgba(84,247,165,.08), transparent 34%),
        #06120f;
      background-size: 80px 80px, 80px 80px, auto, auto;
      box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
    }
    .usage-modal-eyebrow,
    .usage-step-tag { color: var(--green, var(--accent, #54f7a5)); }
    .usage-modal h2 { font-size: clamp(30px, 3vw, 46px); }
    .usage-step-card {
      border-radius: 12px;
      border-color: rgba(84,247,165,.23);
      background: rgba(9, 28, 23, .88);
    }
    .usage-step-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 38%);
    }
    .usage-step-top,
    .usage-step-card h3,
    .usage-step-card p,
    .usage-step-foot { position: relative; }
    .usage-step-num { font-size: 36px; }
    .usage-step-card:nth-child(2) .usage-step-num { color: var(--green, var(--accent, #54f7a5)); }
    .usage-step-media {
      height: 250px;
      border-radius: 10px;
      background: #06100e;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
    }
    .usage-step-media.usage-media-contain img {
      object-fit: contain;
      background: #030807;
    }
    .usage-step-media::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 32%, rgba(0,0,0,.18));
    }
    .usage-media-badges {
      position: absolute;
      left: 12px;
      top: 12px;
      right: 12px;
      z-index: 2;
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      pointer-events: none;
    }
    .usage-media-badge {
      border: 1px solid rgba(255, 231, 73, .86);
      border-radius: 999px;
      background: rgba(5, 12, 11, .82);
      color: var(--yellow, #ffe85a);
      padding: 5px 9px;
      font-size: 12px;
      font-weight: 900;
      box-shadow: 0 8px 22px rgba(0,0,0,.32);
    }
    .usage-step-card:nth-child(3) .usage-media-badge {
      border-color: rgba(76, 199, 255, .8);
      color: #8be2ff;
    }
    .usage-paste-box {
      border-radius: 10px;
      border-color: rgba(84,247,165,.46);
      background: rgba(12, 29, 25, .94);
      padding: 24px 30px;
      font-size: 18px;
      box-shadow: 0 16px 38px rgba(0,0,0,.34);
    }
    @media (max-width: 1080px) {
      .usage-steps { grid-template-columns: 1fr; }
      .usage-step-media { height: 300px; }}
    @media (max-width: 640px) {
      .usage-step-media { height: 210px; }}
    .toolbar .mode-tabs {
      display: inline-flex;
      align-items: center;
      gap: 0;
      margin: 0;
      border-radius: 8px;
      background: #0c1414;
      overflow: hidden;
    }

    .toolbar .mode-tab,
    .toolbar button {
      min-width: 112px;
      padding: 0 14px;
      font-weight: 900;
    }

    .toolbar .mode-tabs .mode-tab {
      border: 0;
      background: transparent;
    }

    .toolbar .mode-tab.active {
      background: rgba(84,247,165,.13);
      color: var(--green);
    }

    .toolbar .mode-panel {
      align-items: end;
      gap: 10px;
      margin: 0;
    }

    .toolbar .mode-panel.active {
      display: flex;
      flex-wrap: wrap;
    }

    .toolbar-field {
      display: grid;
      gap: 4px;
      min-width: 132px;
    }

    .toolbar-field label {
      margin: 0;
      font-size: 11px;
    }

    .toolbar-field select {
      height: 36px;
    }

    .section {
      margin-bottom: 14px;
      background: #0d1816;
      border: 1px solid #29413a;
      border-radius: 8px;
      line-height: 1.5;
    }

    .section:first-of-type {
      border-top: 1px solid #29413a;
    }

    .section-title {
      margin: 0 0 10px;
      color: var(--green);
      font-size: 14px;
      line-height: 1.3;
      font-weight: 900;
    }

    .side-copy {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }

    .contact-links {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-top: 10px;
    }

    .contact-link {
      display: inline-flex;
      align-items: center;
      min-height: 38px;
      gap: 7px;
      border: 1px solid #263b37;
      border-radius: 8px;
      background: #101918;
      padding: 8px 9px;
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
      text-decoration: none;
      line-height: 1;
    }

    .contact-link:hover {
      border-color: rgba(84,247,165,.48);
      color: var(--green);
    }

    .contact-link svg {
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
    }

    .contact-link.discord svg { color: #8ea1ff; }
    .contact-link.kakao svg { color: #fee500; }

    label {
      display: block;
      margin: 0 0 7px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    select,
    button,
    input[type="range"] {
      font: inherit;
    }

    select {
      width: 100%;
      height: 38px;
      padding: 0 10px;
      color: var(--text);
      background: var(--panel-2);
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      outline: 0;
    }

    .row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 12px;
    }

    .tool-row {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .tool-row button::before {
      display: block;
      line-height: 1;
    }

    #toolSet::before { content: "◎"; }
    #toolPan::before { content: "↔"; }
    #fitMap::before { content: "⌂"; }
    #resetCenter::before { content: "×"; }

    button {
      height: 36px;
      border: 1px solid var(--line-strong);
      border-radius: 8px;
      color: var(--text);
      background: var(--panel-2);
      cursor: pointer;
      font-weight: 900;
    }

    button:hover {
      border-color: var(--green);
    }

    button.active {
      border-color: var(--accent);
      background: rgba(84, 247, 165, 0.13);
      color: var(--green);
    }

    .mode-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-bottom: 12px;
    }

    .mode-tab {
      height: 38px;
      font-weight: 700;
    }

    .mode-tab.active {
      border-color: var(--green);
      background: rgba(37, 215, 130, 0.18);
      color: #eafff4;
    }

    .mode-panel {
      display: none;
    }

    .mode-panel.active {
      display: block;
    }

    .drop-zone {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 138px;
      padding: 18px;
      text-align: center;
      background:
        radial-gradient(circle at 50% 18%, rgba(84,247,165,.13), transparent 28%),
        linear-gradient(90deg, rgba(84,247,165,.055) 1px, transparent 1px),
        linear-gradient(0deg, rgba(84,247,165,.045) 1px, transparent 1px),
        rgba(6, 18, 15, .9);
      background-size: auto, 42px 42px, 42px 42px, auto;
      border: 1px dashed rgba(84,247,165,.34);
      border-radius: 10px;
      outline: 0;
      cursor: pointer;
      overflow: hidden;
      color: var(--muted);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
    }

    .drop-zone::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(120deg, transparent 0 24%, rgba(84,247,165,.07) 24% 25%, transparent 25% 100%),
        radial-gradient(circle at 82% 72%, rgba(76,199,255,.08), transparent 34%);
      opacity: .55;
    }

    .drop-zone.drag-over {
      background-color: rgba(84,247,165,.08);
      border-color: var(--green);
    }

    .empty-onboarding {
      position: relative;
      z-index: 1;
      width: min(1040px, 100%);
      display: grid;
      justify-items: center;
      gap: 12px;
      padding: clamp(8px, 1.1vw, 16px) 0;
    }
    .empty-symbol {
      display: grid;
      place-items: center;
      border: 1px solid rgba(84,247,165,.38);
      border-radius: 999px;
      background: radial-gradient(circle, rgba(84,247,165,.2), rgba(84,247,165,.05) 58%, transparent 60%);
      color: var(--green);
      font-size: 14px;
      font-weight: 900;
      box-shadow: 0 0 0 10px rgba(84,247,165,.035), 0 14px 34px rgba(0,0,0,.28);
    }
    .empty-title {
      display: block;
      max-width: 980px;
      color: var(--text);
      font-size: clamp(26px, 2.6vw, 38px);
      font-weight: 900;
      word-break: keep-all;
      text-shadow: 0 2px 18px rgba(0,0,0,.42);
    }
    .empty-lead {
      display: block;
      color: #b8d6cf;
      font-size: clamp(13px, 1.05vw, 15px);
      word-break: keep-all;
    }
    .empty-flow {
      width: min(880px, 100%);
      display: grid;
      gap: 14px;
      align-items: stretch;
    }
    .empty-flow-card:not(:last-child)::after {
      content: "→";
      top: 58px;
      color: rgba(188,234,220,.75);
      font-size: 25px;
      font-weight: 800;
    }
    .empty-step-num {
      width: 32px;
      height: 32px;
      justify-self: center;
      border: 1px solid rgba(84,247,165,.75);
      background: rgba(8,20,17,.86);
      box-shadow: 0 8px 24px rgba(0,0,0,.32);
    }
    .empty-thumb {
      position: relative;
      height: 96px;
      overflow: hidden;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
    }
    .empty-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      opacity: .72;
      filter: saturate(1.08) contrast(1.05);
    }
    .empty-thumb::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.34));
      pointer-events: none;
    }
    .empty-flow-card h3 {
      color: var(--text);
      font-size: 15px;
      font-weight: 900;
      word-break: keep-all;
    }
    .empty-flow-card p {
      color: var(--muted);
      word-break: keep-all;
    }
    .empty-badge {
      position: absolute;
      z-index: 2;
      border: 1px solid rgba(84,247,165,.66);
      border-radius: 999px;
      background: rgba(5,12,11,.78);
      color: var(--green);
      padding: 4px 8px;
      font-size: 11px;
      font-weight: 900;
    }
    .empty-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(170px, 1fr));
      gap: 14px;
      width: min(520px, 100%);
      margin-top: 4px;
    }
    .empty-action {
      border: 1px solid rgba(84,247,165,.42);
      min-height: 64px;
      display: grid;
      place-items: center;
      gap: 4px;
      color: var(--text);
      background: rgba(9,22,19,.86);
      font: inherit;
      font-weight: 900;
      text-align: center;
      box-shadow: 0 12px 30px rgba(0,0,0,.24);
    }
    .empty-action.primary {
      border-color: rgba(84,247,165,.72);
      background: linear-gradient(180deg, rgba(44,161,96,.96), rgba(20,98,63,.96));
      color: #f0fff8;
    }
    .empty-action.secondary { background: rgba(8,20,17,.58); }
    .empty-action span {
      display: block;
      font-weight: 700;
    }
    .empty-action:hover,
    .empty-action:focus-visible {
      outline: none;
      border-color: var(--green);
      transform: translateY(-1px);
    }
    .empty-foot {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 14px;
      font-size: 12px;
    }
    .empty-foot span::before {
      content: "+";
      color: var(--green);
      font-weight: 900;
    }
    .quick-start-card {
      border-color: rgba(84,247,165,.24);
      background: linear-gradient(180deg, rgba(14,31,27,.92), rgba(10,21,19,.86));
    }
    .quick-start-head {
      display: flex;
      align-items: center;
      gap: 9px;
      margin-bottom: 10px;
    }
    .quick-mark {
      display: inline-grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border: 1px solid rgba(84,247,165,.55);
      border-radius: 50%;
      color: var(--green);
      font-weight: 900;
    }
    .quick-mark::before { content: "?"; }
    .quick-start-head .section-title { margin: 0; }
    .quick-steps {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }
    .quick-step {
      display: grid;
      grid-template-columns: 28px 1fr;
      gap: 10px;
      align-items: center;
      border: 1px solid rgba(188,234,220,.12);
      border-radius: 8px;
      background: rgba(7,17,15,.62);
      padding: 9px;
    }
    .quick-step-num {
      display: grid;
      place-items: center;
      width: 22px;
      height: 22px;
      border-radius: 999px;
      background: linear-gradient(180deg, #72f3ab, #38b976);
      color: #062016;
      font-size: 12px;
      font-weight: 900;
    }
    .quick-step strong {
      display: block;
      margin: 0 0 2px;
      color: var(--green);
      font-size: 13px;
    }
    .quick-step span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }
    .quick-fallback {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 38px;
      gap: 8px;
      margin-top: 12px;
      border-top: 1px dashed rgba(188,234,220,.18);
      padding-top: 12px;
      color: #dff8ef;
      text-decoration: none;
      font-weight: 900;
      font-size: 13px;
    }
    .quick-fallback span::before { content: "›"; }
    .quick-fallback:hover { color: var(--green); }
    .drop-zone kbd {
      padding: 2px 6px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 5px;
      background: rgba(255, 255, 255, 0.06);
      color: #f5fbff;
      font: 700 12px Arial, sans-serif;
    }
    @media (max-width: 980px) {
      .empty-flow { grid-template-columns: 1fr; max-width: 520px; }
      .empty-flow-card:not(:last-child)::after { display: none; }
      .empty-thumb { height: 150px; }}
    @media (max-width: 640px) {
      html,
      body {
        max-width: 100%;
        overflow-x: hidden;
      }
      .app-header {
        padding: 10px 12px;
      }
      .brand h1 {
        font-size: 16px;
      }
      .brand .subtitle {
        white-space: normal;
      }
      .top-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
      }
      .top-nav a {
        flex: 0 0 auto;
        min-width: auto;
        min-height: 38px;
        padding: 8px 10px;
      }
      .toolbar {
        padding: 10px 12px;
      }
      .toolbar-note {
        width: 100%;
        white-space: normal;
        text-align: left;
      }
      .toolbar .mode-tabs,
      .toolbar .mode-panel.active {
        min-width: 0;
      }
      .toolbar .mode-tab,
      .toolbar button,
      .toolbar-field {
        min-width: 0;
      }
      main {
        min-width: 0;
        overflow: hidden;
      }
      .map-drop-panel {
        padding: 12px;
      }
      .empty-symbol { width: 56px; height: 56px; }
      .empty-onboarding {
        width: 100%;
        gap: 14px;
      }
      .empty-title {
        width: 100%;
        max-width: calc(100vw - 48px);
        font-size: 22px;
        line-height: 1.2;
        word-break: normal;
        overflow-wrap: anywhere;
      }
      .empty-title em { display: block; }
      .empty-lead { font-size: 13px; }
      .empty-flow {
        width: 100%;
        max-width: 100%;
        gap: 12px;
      }
      .empty-actions { grid-template-columns: 1fr; }
      .empty-thumb { height: 118px; }
      .empty-foot {
        gap: 8px;
        font-size: 11px;
      }}

    .map-drop-panel {
      position: absolute;
      inset: 0;
      z-index: 4;
      display: none;
      place-items: center;
      padding: 24px;
      pointer-events: none;
    }

    .map-drop-panel.active {
      display: grid;
    }

    .map-drop-card {
      display: grid;
      gap: 12px;
      width: min(1120px, 100%);
      pointer-events: auto;
    }

    .map-drop-panel .drop-zone {
      min-height: min(620px, calc(100vh - 210px));
      border-color: rgba(84,247,165,.34);
      box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
      backdrop-filter: blur(6px);
    }

    body.has-zone-result .map-drop-panel.active {
      display: none;
    }

    .visually-hidden {
      position: fixed;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
    }

    .wide {
      grid-column: 1 / -1;
    }

    .toggle {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 10px;
      align-items: center;
      margin-top: 8px;
      color: var(--text);
      font-size: 13px;
    }

    .toggle input {
      width: 18px;
      height: 18px;
      accent-color: var(--accent);
    }

    .stats {
      display: grid;
      gap: 8px;
    }

    .stat {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: baseline;
      min-height: 25px;
      padding: 7px 9px;
      background: #101918;
      border: 1px solid #223330;
      border-radius: 7px;
    }

    .stat span:first-child {
      color: var(--muted);
      font-size: 12px;
      white-space: nowrap;
    }

    .stat span:last-child {
      font-size: 13px;
      font-weight: 700;
      text-align: right;
    }

    .stats {
      border-color: rgba(84,247,165,.54);
      background: linear-gradient(180deg, rgba(17,34,30,.98), rgba(10,20,19,.98));
      box-shadow: 0 0 0 1px rgba(84,247,165,.08), 0 14px 32px rgba(0,0,0,.20);
    }

    .stats .section-title {
      font-size: 16px;
    }

    .legend {
      display: grid;
      grid-template-columns: 44px 1fr 44px;
      gap: 8px;
      align-items: center;
      color: var(--muted);
      font-size: 12px;
    }

    .technical-stat,
    .tuning-panel,
    .manual-queue,
    #manualPanel .tool-row,
    #manualPanel .toggle,
    #screenCropMode,
    label[for="screenCropMode"] {
      display: none !important;
    }

    .bar {
      height: 10px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(93, 183, 255, 0.05), rgba(105, 210, 198, 0.55), rgba(255, 209, 102, 0.8), rgba(255, 90, 111, 0.95));
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .hint {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.55;
    }

    .range-label {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
      margin-top: 14px;
    }

    .range-label output {
      color: #eaf7fb;
      font-size: 12px;
      font-weight: 700;
    }

    #mapCanvas {
      width: 100%;
      height: 100%;
      display: block;
      cursor: crosshair;
      touch-action: none;
      user-select: none;
    }

    .hud {
      position: absolute;
      left: 16px;
      right: 16px;
      bottom: 14px;
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
      pointer-events: none;
    }

    .pill {
      max-width: 100%;
      padding: 8px 10px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 7px;
      color: #d8e6eb;
      background: rgba(5, 10, 14, 0.74);
      font-size: 12px;
      backdrop-filter: blur(8px);
    }

    .pill.status {
      min-width: 170px;
      text-align: center;
      color: #c9f4ee;
    }

    .loading {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: var(--muted);
      background: #04090d;
      font-size: 14px;
    }
    .loading::before { content: "지도 로딩 중"; }
    .loading:not(:empty)::before { display: none; }

    .analysis-overlay {
      position: absolute;
      inset: 0;
      z-index: 12;
      display: grid;
      place-items: center;
      background: rgba(2, 7, 10, 0.36);
      pointer-events: none;
    }

    .analysis-overlay.hidden {
      display: none;
    }

    .analysis-card {
      display: grid;
      gap: 12px;
      justify-items: center;
      min-width: 210px;
      padding: 24px 28px;
      color: #eefbff;
      background: rgba(6, 13, 18, 0.88);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 8px;
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
      backdrop-filter: blur(8px);
    }

    .analysis-spinner {
      width: 48px;
      height: 48px;
      border: 4px solid rgba(255, 255, 255, 0.18);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin 0.82s linear infinite;
    }

    .analysis-title {
      font-size: 17px;
      font-weight: 800;
    }

    .analysis-detail {
      color: var(--muted);
      font-size: 12px;
    }

    .analysis-steps {
      display: grid;
      gap: 7px;
      width: 100%;
      margin-top: 2px;
      text-align: left;
    }

    .analysis-step {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.25;
    }

    .analysis-step::before {
      content: "";
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: rgba(145,170,164,.36);
      box-shadow: 0 0 0 1px rgba(255,255,255,.06);
      flex: 0 0 auto;
    }

    .analysis-step.done {
      color: rgba(84,247,165,.86);
    }

    .analysis-step.done::before {
      background: var(--green);
      box-shadow: 0 0 0 3px rgba(84,247,165,.12);
    }

    .analysis-step.active {
      color: var(--text);
      font-weight: 800;
    }

    .analysis-step.active::before {
      background: var(--yellow);
      box-shadow: 0 0 0 4px rgba(255,231,73,.13);
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .debug-panel {
      display: none !important;
      gap: 10px;
    }

    .debug-summary,
    .debug-list,
    .debug-raw {
      color: #dbe8ed;
      font-size: 11px;
      line-height: 1.45;
    }

    .debug-summary {
      padding: 8px 0;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .debug-images {
      display: grid;
      gap: 8px;
    }

    .debug-images figure {
      margin: 0;
      display: grid;
      gap: 5px;
    }

    .debug-images img,
    .debug-images canvas {
      display: none;
      width: 100%;
      max-height: 250px;
      object-fit: contain;
      background: #03080c;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 7px;
    }

    .debug-images img[src],
    .debug-images canvas.active {
      display: block;
    }

    #debugOriginalCanvas {
      max-height: 360px;
    }

    #debugSelectedCanvas {
      max-height: 330px;
    }

    .debug-images figcaption {
      color: var(--muted);
      font-size: 11px;
    }

    .debug-list {
      display: grid;
      gap: 6px;
    }

    .debug-item {
      display: grid;
      gap: 3px;
      padding: 7px 8px;
      background: rgba(255, 255, 255, 0.032);
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 7px;
    }

    .debug-item.selected {
      border-color: rgba(105, 210, 198, 0.92);
      background: rgba(105, 210, 198, 0.08);
    }

    .debug-item strong {
      color: #effbff;
      font-size: 11px;
    }

    .debug-item span {
      color: var(--muted);
    }

    .debug-raw {
      max-height: 180px;
      overflow: auto;
      padding: 8px;
      margin: 0;
      white-space: pre-wrap;
      word-break: break-word;
      background: rgba(0, 0, 0, 0.22);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 7px;
    }

    .screenshot-debug-viewer {
      position: absolute;
      top: 16px;
      right: 16px;
      z-index: 6;
      width: min(760px, calc(100% - 32px));
      max-height: calc(100vh - 32px);
      display: grid;
      gap: 8px;
      padding: 10px;
      color: #eef8fb;
      background: rgba(5, 10, 14, 0.9);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 8px;
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
      pointer-events: auto;
    }

    .recommendation-detail {
      display: none;
    }

    .screenshot-debug-viewer.hidden {
      display: none;
    }

    .screenshot-debug-viewer {
      display: none !important;
    }

    .screenshot-debug-head {
      display: grid;
      grid-template-columns: 1fr auto auto;
      gap: 10px;
      align-items: center;
      min-height: 30px;
    }

    .screenshot-debug-head strong {
      font-size: 13px;
    }

    .screenshot-debug-head label {
      display: grid;
      grid-template-columns: auto auto;
      gap: 6px;
      align-items: center;
      margin: 0;
      font-size: 12px;
      color: var(--muted);
    }

    .screenshot-debug-head button {
      width: 32px;
      height: 30px;
      padding: 0;
    }

    #screenshotDebugCanvas {
      width: 100%;
      max-height: 68vh;
      object-fit: contain;
      background: #02070a;
      border: 1px solid rgba(255, 255, 255, 0.11);
      border-radius: 6px;
    }

    .screenshot-debug-meta {
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
    }

    @media (max-width: 920px) {
      html,
      body {
        height: auto;
        min-height: 100%;
        overflow: auto;
      }

      body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(420px, 58vh) auto;
        grid-template-areas:
          "header"
          "toolbar"
          "map"
          "side";
      }

      .app-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
      }

      .brand {
        display: grid;
        gap: 4px;
      }

      .top-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
      }

      .top-nav a {
        min-height: 38px;
        padding: 8px;
        font-size: 12px;
      }

      .toolbar {
        align-items: stretch;
      }

      .toolbar .mode-tabs,
      .toolbar .mode-panel.active {
        width: 100%;
      }

      .toolbar .mode-tab,
      .toolbar button,
      .toolbar-field {
        flex: 1 1 140px;
      }

      aside {
        height: auto;
        max-height: none;
        border-left: 0;
        border-top: 1px solid var(--line);
      }

      main {
        height: auto;
        min-height: 420px;
      }}
    @media (max-width: 640px) {
      .app-header {
        padding: 10px 12px;
      }
      .brand h1 {
        font-size: 16px;
      }
      .brand .subtitle {
        white-space: normal;
      }
      .top-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
      }
      .top-nav a {
        flex: 0 0 auto;
        min-width: auto;
        min-height: 38px;
        padding: 8px 10px;
      }
      .toolbar {
        padding: 10px 12px;
      }
      .toolbar .mode-tabs,
      .toolbar .mode-panel.active {
        min-width: 0;
      }
      .toolbar .mode-tab,
      .toolbar button,
      .toolbar-field {
        min-width: 0;
      }
      main {
        min-width: 0;
        overflow: hidden;
      }
      .map-drop-panel {
        padding: 12px;
      }
      .empty-onboarding {
        width: 100%;
        gap: 14px;
      }
      .empty-title {
        width: 100%;
        max-width: calc(100vw - 48px);
        font-size: 22px;
        line-height: 1.2;
        word-break: normal;
        overflow-wrap: anywhere;
      }
      .empty-title em { display: block; }
      .empty-lead { font-size: 13px; }
      .empty-flow {
        width: 100%;
        max-width: 100%;
        gap: 12px;
      }
      .empty-flow-card:not(:last-child)::after { display: none; }
      .empty-symbol { width: 56px; height: 56px; }
      .empty-actions { grid-template-columns: 1fr; }
      .empty-thumb { height: 118px; }
      .empty-foot {
        gap: 8px;
        font-size: 11px;
      }}
    /* onboarding mockup refresh */
    .empty-onboarding {
      width: min(1080px, 100%);
      gap: 12px;
      padding: clamp(10px, 1.2vw, 18px) clamp(10px, 1.6vw, 22px);
    }
    .empty-symbol {
      width: 60px;
      height: 60px;
      border-color: rgba(84,247,165,.52);
      background:
        radial-gradient(circle at 50% 48%, rgba(84,247,165,.24), rgba(84,247,165,.06) 62%, transparent 64%),
        rgba(7, 20, 16, .84);
      box-shadow: 0 0 0 9px rgba(84,247,165,.04), 0 14px 34px rgba(0,0,0,.3);
    }
    .empty-title {
      max-width: 880px;
      font-size: clamp(26px, 2.5vw, 38px);
      text-shadow: 0 2px 22px rgba(0,0,0,.5);
    }
    .empty-lead {
      max-width: 760px;
      font-size: 14px;
    }
    .empty-flow {
      width: min(960px, 100%);
      gap: clamp(10px, 1.4vw, 18px);
    }
    .empty-flow-card:not(:last-child)::after {
      right: -16px;
      top: 62px;
      color: rgba(84,247,165,.78);
    }
    .empty-step-num {
      display: inline-grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border: 1px solid rgba(84,247,165,.58);
      background: rgba(8,24,20,.86);
      font-weight: 900;
    }
    .empty-thumb {
      height: 94px;
      border-color: rgba(188,234,220,.16);
      background: #07100f;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 16px 36px rgba(0,0,0,.24);
    }
    .empty-thumb img {
      filter: saturate(.96) contrast(1.04);
    }
    .empty-badge {
      box-shadow: 0 8px 20px rgba(0,0,0,.32);
    }
    .empty-actions {
      width: min(620px, 100%);
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }
    .empty-action {
      min-height: 58px;
      cursor: pointer;
      font-size: 16px;
      box-shadow: 0 18px 46px rgba(0,0,0,.22);
    }
    .empty-action.primary {
      background: linear-gradient(180deg, rgba(34,177,99,.98), rgba(22,113,72,.98));
    }
    .empty-action.secondary {
      background: rgba(8,20,17,.66);
    }
    .empty-action span {
      margin-top: 3px;
    }
    .result-preview-card {
      order: -1;
      border-color: rgba(84,247,165,.25);
      background:
        radial-gradient(circle at 22% 0%, rgba(84,247,165,.08), transparent 38%),
        linear-gradient(180deg, rgba(14,31,27,.94), rgba(10,21,19,.9));
    }
    body.has-analysis-image aside .quick-start-card,
    body.has-analysis-image aside .result-preview-card {
      display: none;
    }
    .result-preview-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .result-preview-head .eye-mark {
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border: 1px solid rgba(84,247,165,.4);
      border-radius: 999px;
      color: var(--green);
      font-weight: 900;
    }
    .result-preview-head strong {
      margin: 0;
      font-size: 16px;
    }
    .result-preview-head span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-top: 2px;
    }
    .preview-image {
      position: relative;
      overflow: hidden;
      border: 1px solid rgba(188,234,220,.17);
      border-radius: 8px;
      background: #06100f;
      aspect-ratio: 16 / 9;
      margin-bottom: 12px;
    }
    .preview-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .preview-grid {
      gap: 8px;
      margin-bottom: 12px;
    }
    .preview-stat {
      border: 1px solid rgba(188,234,220,.14);
      border-radius: 8px;
      background: rgba(6,15,14,.64);
    }
    .preview-stat span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 4px;
    }
    .preview-stat strong {
      font-size: 17px;
      line-height: 1.1;
    }
    .preview-list {
      display: grid;
      gap: 8px;
      margin: 0;
      padding: 0;
      list-style: none;
      color: #c6ddd7;
      font-size: 13px;
      line-height: 1.45;
    }
    .preview-list li {
      display: flex;
      gap: 8px;
      align-items: flex-start;
    }
    .preview-list li::before {
      content: "✓";
      display: grid;
      place-items: center;
      flex: 0 0 18px;
      width: 18px;
      height: 18px;
      border-radius: 999px;
      background: rgba(84,247,165,.18);
      color: var(--green);
      font-weight: 900;
      font-size: 12px;
    }
    .hidden-file-action {
      margin-top: 10px;
      width: 100%;
      border: 1px dashed rgba(188,234,220,.24);
      border-radius: 8px;
      background: rgba(8,20,17,.42);
      color: var(--muted);
      padding: 8px 10px;
      cursor: pointer;
      font: inherit;
      font-size: 12px;
      font-weight: 800;
    }
    .hidden-file-action:hover {
      border-color: rgba(84,247,165,.5);
      color: var(--green);
    }
    @media (max-width: 980px) {
      .empty-flow { grid-template-columns: 1fr; max-width: 560px; }
      .empty-flow-card:not(:last-child)::after { display: none; }
      .empty-thumb { height: 180px; }
      .preview-grid { grid-template-columns: 1fr; }}

    /* paste-first onboarding final pass */
    .empty-onboarding {
      width: min(1120px, 100%);
      min-height: clamp(520px, 64vh, 760px);
      padding: clamp(26px, 3vw, 46px) clamp(18px, 3vw, 42px);
      gap: clamp(14px, 2vw, 24px);
      border-color: rgba(84,247,165,.28);
      background:
        radial-gradient(circle at 50% 10%, rgba(84,247,165,.12), transparent 34%),
        linear-gradient(180deg, rgba(7,24,20,.92), rgba(6,16,14,.9)),
        repeating-linear-gradient(0deg, rgba(188,234,220,.035) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(90deg, rgba(188,234,220,.032) 0 1px, transparent 1px 32px);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 28px 80px rgba(0,0,0,.25);
    }
    .empty-onboarding::before { opacity: .42; }
    .empty-symbol {
      width: 68px;
      height: 68px;
      font-size: 0;
      border-color: rgba(84,247,165,.5);
      background:
        radial-gradient(circle at 50% 45%, rgba(84,247,165,.32), rgba(84,247,165,.08) 60%, transparent 62%),
        rgba(6,18,16,.9);
      box-shadow: 0 0 0 12px rgba(84,247,165,.04), 0 18px 44px rgba(0,0,0,.34);
    }
    .empty-symbol::after {
      content: "D";
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 999px;
      border: 1px solid rgba(236,255,248,.72);
      color: #ecfff8;
      font-size: 18px;
      font-weight: 1000;
      line-height: 1;
    }
    body.mode-mortar .empty-symbol::after { content: "M"; }
    body.mode-zone .empty-symbol::after { content: "Z"; }
    .empty-title {
      font-size: clamp(28px, 3vw, 46px);
      line-height: 1.08;
      letter-spacing: 0;
    }
    .empty-title em { color: var(--green); font-style: normal; }
    .empty-lead { max-width: 780px; color: #c6ddd7; font-size: 15px; line-height: 1.5; }
    .empty-flow {
      width: min(980px, 100%);
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: clamp(14px, 2vw, 26px);
      margin-top: 4px;
    }
    .empty-flow-card {
      position: relative;
      display: grid;
      gap: 9px;
      justify-items: center;
      align-content: start;
      text-align: center;
      border: 0;
      background: transparent;
      padding: 0;
      min-width: 0;
    }
    .empty-flow-card:not(:last-child)::after {
      content: "->";
      position: absolute;
      right: calc(-1 * clamp(16px, 2vw, 25px));
      top: 114px;
      transform: translateX(50%);
      color: rgba(84,247,165,.82);
      font-size: 24px;
      line-height: 1;
    }
    .empty-step-num {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      border: 1px solid rgba(84,247,165,.62);
      background: rgba(6,22,18,.88);
      color: var(--green);
      font-size: 15px;
      font-weight: 1000;
      box-shadow: 0 10px 28px rgba(0,0,0,.22);
    }
    .empty-flow-card h3 { margin: 0; color: #ecfff8; font-size: 16px; line-height: 1.25; }
    .empty-flow-card p { margin: 0; color: rgba(198,221,215,.82); font-size: 12px; line-height: 1.45; }
    .empty-thumb {
      width: 100%;
      height: clamp(104px, 10vw, 132px);
      border-radius: 8px;
      border: 1px solid rgba(188,234,220,.18);
      background: linear-gradient(180deg, rgba(8,20,17,.8), rgba(5,13,12,.86));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.035), 0 18px 42px rgba(0,0,0,.26);
    }
    .empty-thumb img { filter: saturate(.96) contrast(1.05); }
    .empty-key-visual,
    .empty-paste-visual {
      display: grid;
      place-items: center;
      background:
        radial-gradient(circle at 50% 45%, rgba(84,247,165,.13), transparent 42%),
        linear-gradient(180deg, rgba(10,26,22,.92), rgba(4,12,11,.94));
    }
    .empty-key-visual .keycap,
    .empty-paste-visual .keycap {
      display: inline-grid;
      place-items: center;
      min-width: 54px;
      height: 46px;
      padding: 0 10px;
      border-radius: 8px;
      border: 1px solid rgba(236,255,248,.48);
      background: rgba(255,255,255,.06);
      color: #ecfff8;
      font-size: 15px;
      font-weight: 1000;
      box-shadow: 0 0 18px rgba(84,247,165,.14);
    }
    .empty-key-visual .keycap small { display: block; font-size: 10px; opacity: .8; }
    .empty-paste-visual {
      color: #ecfff8;
      cursor: pointer;
    }
    .empty-paste-visual:hover,
    .empty-paste-visual:focus-visible { border-color: rgba(84,247,165,.58); box-shadow: 0 0 0 3px rgba(84,247,165,.12), 0 18px 42px rgba(0,0,0,.26); outline: none; }
    .paste-visual-inner { display: grid; gap: 10px; justify-items: center; }
    .paste-visual-title { color: #ecfff8; font-size: 15px; font-weight: 1000; }
    .paste-visual-hint { display: inline-flex; align-items: center; gap: 8px; color: rgba(236,255,248,.85); }
    .empty-badge {
      left: 10px;
      top: 10px;
      right: auto;
      color: var(--yellow);
      border-color: rgba(255,232,90,.72);
      background: rgba(5,12,11,.84);
    }
    .empty-actions {
      width: min(650px, 100%);
      grid-template-columns: 1.08fr 1fr;
      gap: 12px;
      margin-top: 2px;
    }
    .empty-action {
      min-height: 66px;
      font-size: 17px;
      box-shadow: 0 20px 48px rgba(0,0,0,.24);
    }
    .empty-action.primary { background: linear-gradient(180deg, rgba(39,185,104,.98), rgba(20,119,75,.98)); }
    .empty-action.secondary { background: rgba(8,20,17,.72); }
    .empty-action span { margin-top: 4px; font-size: 12px; color: rgba(236,255,248,.72); }
    .empty-foot { margin-top: 0; color: rgba(188,234,220,.68); }
    .hidden-file-action { display: none !important; }
    @media (max-width: 980px) {
      .empty-onboarding { min-height: auto; padding: 26px 16px; }
      .empty-flow { grid-template-columns: 1fr; max-width: 560px; }
      .empty-flow-card:not(:last-child)::after { display: none; }
      .empty-thumb { height: 164px; }
      .empty-actions { grid-template-columns: 1fr; max-width: 520px; }}




    /* paste-first onboarding UX compact pass */
    body:not(.has-analysis-image) aside .quick-start-card,
    body:not(.has-analysis-image) aside .status {
      display: none !important;
    }
    body:not(.has-analysis-image) aside .result-preview-card {
      border-color: rgba(84,247,165,.36);
      background:
        radial-gradient(circle at 50% -10%, rgba(84,247,165,.13), transparent 42%),
        linear-gradient(180deg, rgba(8,28,23,.88), rgba(6,19,16,.82));
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.028), 0 14px 36px rgba(0,0,0,.18);
    }
    body:not(.has-analysis-image) aside .result-preview-card .preview-image {
      max-height: 158px;
    }
    body:not(.has-analysis-image) aside .result-preview-card .preview-image img {
      object-fit: cover;
    }
    .empty-onboarding {
      width: min(960px, calc(100% - 42px));
      min-height: clamp(360px, 44vh, 520px);
      padding: clamp(20px, 2vw, 30px) clamp(18px, 2.4vw, 32px);
      gap: clamp(8px, 1.2vw, 14px);
      border-radius: 8px;
      transform: translateY(-4px);
      background:
        radial-gradient(circle at 50% 2%, rgba(84,247,165,.13), transparent 30%),
        linear-gradient(180deg, rgba(7,24,20,.9), rgba(5,15,13,.88)),
        repeating-linear-gradient(0deg, rgba(188,234,220,.026) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(90deg, rgba(188,234,220,.024) 0 1px, transparent 1px 32px);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.022), 0 16px 44px rgba(0,0,0,.2);
    }
    .empty-onboarding::before {
      opacity: .2;
    }
    .empty-symbol {
      width: 50px;
      height: 50px;
      box-shadow: 0 0 0 8px rgba(84,247,165,.032), 0 12px 30px rgba(0,0,0,.26);
    }
    .empty-symbol::after {
      width: 24px;
      height: 24px;
      font-size: 14px;
    }
    .empty-title {
      max-width: 920px;
      font-size: clamp(24px, 2.05vw, 34px);
      line-height: 1.12;
      text-wrap: balance;
    }
    body.mode-zone:not(.has-analysis-image) .empty-title {
      max-width: 960px;
      font-size: clamp(23px, 1.95vw, 32px);
    }
    .empty-lead {
      max-width: 720px;
      font-size: 13px;
      line-height: 1.45;
    }
    .empty-actions {
      order: 4;
      width: min(600px, 100%);
      grid-template-columns: 1.06fr .94fr;
      gap: 10px;
      margin-top: 0;
    }
    .empty-action {
      min-height: 54px;
      border-radius: 8px;
      font-size: 15px;
      box-shadow: 0 14px 30px rgba(0,0,0,.18);
    }
    .empty-action span {
      margin-top: 2px;
      font-size: 11px;
    }
    .empty-flow {
      order: 5;
      width: min(820px, 100%);
      gap: clamp(9px, 1.2vw, 16px);
      margin-top: 2px;
    }
    .empty-flow-card {
      gap: 6px;
    }
    .empty-flow-card:not(:last-child)::after {
      top: 74px;
      right: calc(-1 * clamp(9px, 1.2vw, 15px));
      font-size: 18px;
      opacity: .68;
    }
    .empty-step-num {
      width: 28px;
      height: 28px;
      font-size: 12px;
    }
    .empty-flow-card h3 {
      font-size: 13px;
      line-height: 1.22;
    }
    .empty-flow-card p {
      font-size: 10.5px;
      line-height: 1.34;
      max-width: 220px;
    }
    .empty-thumb {
      height: clamp(72px, 6.4vw, 92px);
      border-radius: 7px;
    }
    .empty-key-visual .keycap,
    .empty-paste-visual .keycap {
      min-width: 44px;
      height: 36px;
      border-radius: 7px;
      font-size: 12px;
    }
    .paste-visual-title { font-size: 12px; }
    .paste-visual-hint { font-size: 11px; }
    .empty-foot {
      order: 6;
      font-size: 10.5px;
      opacity: .86;
    }
    body.mode-zone[data-input-mode="auto"]:not(.has-analysis-image) #mapCanvas {
      opacity: .2;
      filter: saturate(.68) brightness(.62);
    }
    body.mode-zone:not(.has-analysis-image) .map-drop-panel {
      align-items: center;
      justify-content: center;
    }
    @media (min-width: 1500px) {
      body:not(.has-analysis-image) aside .result-preview-card .preview-image { max-height: 154px; }
      .empty-onboarding { transform: translateY(-8px); }}
    @media (max-width: 980px) {
      body:not(.has-analysis-image) aside .quick-start-card { display: block !important; }
      body:not(.has-analysis-image) aside .status { display: block !important; }
      .empty-onboarding { width: min(100% - 24px, 620px); min-height: auto; transform: none; }
      .empty-actions { grid-template-columns: 1fr; }
      .empty-flow { grid-template-columns: 1fr; max-width: 520px; }
      .empty-flow-card:not(:last-child)::after { display: none; }
      .empty-thumb { height: 150px; }}

    /* unified pre-analysis layout: match drop and mortar */
    body.mode-zone:not(.has-analysis-image) .map-drop-panel {
      align-items: center;
      justify-content: center;
      justify-items: center;
      padding: clamp(18px, 2vw, 32px);
    }
    body.mode-zone:not(.has-analysis-image) .map-drop-card {
      width: min(976px, calc(100vw - 430px));
      max-width: 100%;
      justify-self: center;
    }
    body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
      width: 100%;
      padding: 12px;
      cursor: default;
    }
    body.mode-zone:not(.has-analysis-image) .empty-onboarding {
      width: 100%;
      max-width: 940px;
      min-height: clamp(500px, 58vh, 640px);
      margin: 0 auto;
      padding: clamp(18px, 2.2vw, 30px) clamp(16px, 2.4vw, 30px);
      gap: clamp(12px, 1.7vw, 20px);
      transform: none;
      align-content: center;
      cursor: default;
    }
    body.mode-zone:not(.has-analysis-image) .empty-symbol {
      width: 62px;
      height: 62px;
      margin: 0 auto;
    }
    body.mode-zone:not(.has-analysis-image) .empty-title {
      max-width: 860px;
      margin: 0 auto;
      font-size: clamp(26px, 2.45vw, 38px);
      line-height: 1.14;
    }
    body.mode-zone:not(.has-analysis-image) .empty-lead {
      max-width: 760px;
      margin: 0 auto;
      font-size: 14px;
      line-height: 1.48;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow {
      order: 4;
      width: 100%;
      max-width: 900px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: clamp(18px, 2vw, 26px);
      margin: 4px auto 0;
      align-items: start;
      overflow: visible;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow-card {
      min-height: 0;
      gap: 8px;
      padding: 0;
      justify-items: center;
      text-align: center;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow-card:not(:last-child)::after,
    body:not(.has-analysis-image) .empty-flow-card:not(:last-child)::after {
      content: none !important;
      display: none !important;
    }
    body.mode-zone:not(.has-analysis-image) .empty-step-num {
      width: 34px;
      height: 34px;
      font-size: 13px;
    }
    body.mode-zone:not(.has-analysis-image) .empty-thumb,
    body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
    body.mode-zone:not(.has-analysis-image) .empty-key-visual,
    body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
      width: 100%;
      height: clamp(116px, 10vw, 136px);
      border-radius: 8px;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow-card h3 {
      font-size: 15px;
      line-height: 1.25;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow-card p {
      min-height: 0;
      max-width: 240px;
      font-size: 12px;
      line-height: 1.4;
    }
    body.mode-zone:not(.has-analysis-image) .empty-flow .empty-paste-visual {
      cursor: default;
      pointer-events: none;
    }
    body.mode-zone:not(.has-analysis-image) .empty-actions {
      order: 5;
      width: 100%;
      max-width: 650px;
      grid-template-columns: 1.08fr 1fr;
      gap: 12px;
      margin: 0 auto;
    }
    body.mode-zone:not(.has-analysis-image) .empty-action {
      min-height: 64px;
      border-radius: 8px;
      font-size: 16px;
    }
    body.mode-zone:not(.has-analysis-image) .empty-foot {
      order: 6;
      justify-content: center;
      gap: 8px;
      margin-top: 0;
    }
    @media (max-width: 980px) {
      body.mode-zone:not(.has-analysis-image) .map-drop-panel {
        min-height: 640px;
      }
      body.mode-zone:not(.has-analysis-image) .map-drop-card {
        width: 100%;
        max-width: 620px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-onboarding {
        width: min(100% - 24px, 620px);
        min-height: auto;
        padding: 24px 16px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-flow {
        grid-template-columns: 1fr;
        width: min(100%, 520px);
        gap: 12px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-thumb,
      body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
      body.mode-zone:not(.has-analysis-image) .empty-key-visual,
      body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
        height: 150px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-actions {
        grid-template-columns: 1fr;
        max-width: 520px;
      }}
    @media (max-width: 640px) {
      body.mode-zone:not(.has-analysis-image) .map-drop-panel {
        width: 100vw;
        max-width: 100vw;
        min-height: 0;
        padding: 12px;
      }
      @supports (width: 100dvw) {
        body.mode-zone:not(.has-analysis-image) .map-drop-panel {
          width: 100dvw;
          max-width: 100dvw;
        }}
      body.mode-zone:not(.has-analysis-image) .map-drop-card,
      body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
        width: 100vw;
        max-width: 100vw;
      }
      @supports (width: 100dvw) {
        body.mode-zone:not(.has-analysis-image) .map-drop-card,
        body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
          width: 100dvw;
          max-width: 100dvw;
        }}
      body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
        padding: 12px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-onboarding {
        width: 100%;
        max-width: none;
        gap: 10px;
        padding: 15px 12px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-symbol {
        width: 48px;
        height: 48px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-title {
        font-size: 22px;
        line-height: 1.14;
      }
      body.mode-zone:not(.has-analysis-image) .empty-lead {
        font-size: 13px;
        line-height: 1.42;
      }
      body.mode-zone:not(.has-analysis-image) .empty-flow {
        gap: 9px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-thumb,
      body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
      body.mode-zone:not(.has-analysis-image) .empty-key-visual,
      body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
        height: 78px;
      }
      body.mode-zone:not(.has-analysis-image) .empty-action {
        min-height: 52px;
        font-size: 15px;
      }}

    /* unified tool icon refresh */
    body.mode-zone { --tool-badge-icon: url("/static/tool-icons/zone-badge.png?v=20260705b"); }
    .empty-symbol,
    .result-preview-head .eye-mark {
      background-image: var(--tool-badge-icon);
      background-position: center;
      background-repeat: no-repeat;
      background-size: contain;
      color: transparent !important;
      font-size: 0 !important;
      line-height: 0;
      overflow: hidden;
    }
    .empty-symbol::before,
    .empty-symbol::after,
    .result-preview-head .eye-mark::before,
    .result-preview-head .eye-mark::after {
      content: "" !important;
      display: none !important;
    }
    .result-preview-head .eye-mark {
      flex: 0 0 auto;
      border: 0 !important;
      box-shadow: 0 0 22px rgba(84, 247, 165, .12);
    }

    /* restrained blue-zone accents and flatter visual hierarchy */
    body.mode-zone { --zone-accent: #66d0ff; --zone-accent-rgb: 102, 208, 255; }
    body.mode-zone .top-nav a.active {
      color: var(--zone-accent);
      border-color: rgba(var(--zone-accent-rgb), .34);
      background: rgba(var(--zone-accent-rgb), .085);
    }
    body.mode-zone .mode-tab.active {
      color: var(--zone-accent);
      background: rgba(var(--zone-accent-rgb), .09);
    }
    body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
      border: 0;
      background: transparent;
      box-shadow: none;
    }
    body.mode-zone:not(.has-analysis-image) .empty-onboarding {
      border: 1px solid rgba(188,234,220,.075);
      background: linear-gradient(180deg, rgba(7,22,22,.68), rgba(5,14,15,.6));
      box-shadow: none;
    }
    body.mode-zone:not(.has-analysis-image) .empty-onboarding::before {
      opacity: .07;
    }
    body.mode-zone:not(.has-analysis-image) .empty-title em,
    body.mode-zone:not(.has-analysis-image) .empty-step-num {
      color: var(--zone-accent);
    }
    body.mode-zone:not(.has-analysis-image) .empty-step-num,
    body.mode-zone:not(.has-analysis-image) aside .result-preview-card {
      border-color: rgba(var(--zone-accent-rgb), .25);
    }
    body.mode-zone .result-preview-head .eye-mark {
      width: 26px;
      height: 26px;
      opacity: .78;
      box-shadow: none !important;
    }
    body.mode-zone aside .contact-card {
      border-color: rgba(145,170,164,.12);
      background: rgba(8,17,16,.46);
      box-shadow: none;
    }
    body.mode-zone aside .contact-card .section-title {
      color: #a9c5be;
    }
    body.mode-zone aside .section:has(#readout) .section-title,
    body.mode-zone aside .zone-results-card .section-title {
      color: var(--zone-accent);
    }
    body.mode-zone.has-analysis-image aside .section:has(#readout) { order: 1; }
    body.mode-zone.has-analysis-image aside .zone-results-card {
      order: 2;
      border-color: rgba(var(--zone-accent-rgb), .28);
    }
    body.mode-zone.has-analysis-image aside .contact-card { order: 4; }
    body.mode-zone.has-analysis-image aside .zone-results-card .stat span:last-child,
    body.mode-zone.has-analysis-image aside #analysisState {
      color: #dff6ff;
    }
    body.mode-zone aside {
      height: calc(100vh - 124px) !important;
      max-height: calc(100vh - 124px) !important;
      overflow-y: auto !important;
      scrollbar-color: rgba(93, 255, 178, .45) rgba(2, 17, 14, .32);
    }
    @media (min-width: 981px) {
      body.mode-zone {
        overflow: hidden;
      }
      body.mode-zone aside {
        height: calc(100vh - 124px);
        max-height: calc(100vh - 124px);
        overflow-x: hidden;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(93, 255, 178, .45) rgba(2, 17, 14, .32);
      }}
    @media (max-width: 980px) {
      body.mode-zone aside {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
      }}
    .clipboard-empty-notice {
      position: fixed;
      inset: 0;
      z-index: 90;
      display: grid;
      place-items: center;
      padding: 18px;
      pointer-events: none;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity .18s ease, transform .18s ease;
    }
    .clipboard-empty-notice.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .clipboard-empty-card {
      width: min(430px, calc(100vw - 36px));
      border: 1px solid rgba(84, 247, 165, .38);
      border-radius: 8px;
      background:
        radial-gradient(circle at 50% 0%, rgba(84,247,165,.16), transparent 45%),
        rgba(7, 19, 17, .96);
      box-shadow: 0 28px 80px rgba(0,0,0,.48), inset 0 0 0 1px rgba(255,255,255,.035);
      padding: 22px 24px;
      text-align: center;
    }
    .clipboard-empty-card strong {
      display: block;
      margin: 0 0 8px;
      color: #ecfff8;
      font-size: 20px;
      line-height: 1.35;
    }
    .clipboard-empty-card span {
      display: block;
      color: #b8d6cf;
      line-height: 1.55;
      word-break: keep-all;
    }

  
/* Scoped result UI only. Wheel events and map transforms remain in each tool. */
body.bm-result-ui .toolbar { min-width:0; max-width:100%; flex-wrap:wrap; gap:8px 12px; }
body.bm-result-ui .stage { display:flex; flex-direction:column; min-width:0; }
body.bm-result-ui .stage>:not(.viewer) { flex:0 0 auto; }
body.bm-result-ui .stage>.viewer { flex:1 1 auto; min-height:0; }
body.bm-result-ui .tools-left { min-width:0; flex:1 1 350px; flex-wrap:wrap; max-width:100%; }
body.bm-result-ui .tools-right { min-width:0; flex:1 1 270px; max-width:100%; flex-wrap:wrap; justify-content:flex-end; }
body.bm-result-ui .tools-right .hint { flex:1 1 100%; overflow-wrap:anywhere; }
body.bm-result-ui :is(.mode-toggle,.manual-map-controls,.view-toggle,.image-actions,.toolbar .mode-panel.active) { min-width:0; max-width:100%; flex-wrap:wrap; }
body.bm-result-ui .toolbar :is(button,summary,select) { max-width:100%; }
body.bm-result-ui .toolbar .mode-toggle { flex-wrap:nowrap; flex:0 1 230px; }
body.bm-result-ui .toolbar .mode-toggle .btn { min-width:0; white-space:nowrap; }
.bm-result-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:7px; min-width:0; max-width:100%; }
.bm-result-actions>.btn { white-space:normal; min-height:38px; font-size:12px; }
.bm-result-actions [hidden],.bm-result-feedback[hidden],.bm-result-toast[hidden] { display:none!important; }
.bm-result-more { position:relative; }
.bm-result-more>summary { min-height:38px; display:flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid #3a5145; border-radius:5px; color:#d4e7db; cursor:pointer; font-size:12px; list-style:none; }
.bm-result-more>summary::-webkit-details-marker { display:none; }
.bm-result-more>summary::after { content:'⌄'; font-size:14px; }
.bm-result-more[open]>summary::after { transform:rotate(180deg); }
.bm-result-more-panel { position:absolute; right:0; top:calc(100% + 5px); z-index:24; width:260px; max-width:calc(100vw - 24px); padding:10px; border:1px solid #3a5145; border-radius:6px; background:#101c15; box-shadow:0 8px 24px #0008; }
body.bm-result-ui .bm-result-more-panel :is(.image-actions,.view-toggle) { display:flex; flex-wrap:wrap; gap:7px; width:100%; border:0; }
body.bm-result-ui .bm-result-more-panel .hidden { display:none!important; }
body.bm-result-ui .bm-result-more-panel .btn { flex:1 1 110px; min-height:40px; font-size:12px; }
body.bm-result-ui .bm-result-more-panel .view-toggle { margin-top:7px; }
body.bm-result-ui .mobile-result-summary { min-width:0; max-width:100%; flex-wrap:wrap; gap:8px 12px; }
body.bm-result-ui .mobile-result-summary>div { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
body.bm-result-ui .mobile-result-summary>a { flex:0 0 auto; margin-left:auto; white-space:normal; }
body.bm-result-ui .mobile-result-summary>strong { flex:0 0 auto; }
body.bm-result-ui .grid-tune-panel { max-width:calc(100% - 16px); right:8px; }
body.bm-result-ui .toolbar .tool-row { flex-wrap:wrap; min-width:0; }
body.bm-result-ui .hud { max-width:calc(100% - 16px); gap:6px; flex-wrap:wrap; }
body.bm-result-ui .hud .pill { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
body.bm-result-ui #loadingOverlay,body.bm-result-ui #analysisOverlay { display:none!important; }
.bm-result-feedback { position:fixed; z-index:60; display:grid; place-items:center; padding:12px; box-sizing:border-box; background:rgba(4,12,8,.75); overflow:auto; }
.bm-result-feedback-card { width:min(430px,100%); max-height:100%; overflow:auto; padding:24px; box-sizing:border-box; border:1px solid #3d6952; border-radius:8px; background:#101e16; color:#e7f2eb; box-shadow:0 8px 32px #0007; text-align:center; }
.bm-result-feedback-card>strong { display:block; font-size:18px; line-height:1.5; }
.bm-result-feedback-card>p { margin:9px 0 14px; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.bm-result-feedback-card>small { display:block; min-height:20px; color:#a3bdad; font-size:12px; }
.bm-feedback-spinner,.bm-action-progress::before { display:inline-block; width:25px; height:25px; margin-bottom:12px; border:3px solid #345b46; border-top-color:#61e99f; border-radius:50%; animation:bm-result-spin .85s linear infinite; }
.bm-action-progress { display:inline-flex; align-items:center; gap:5px; margin-left:6px; font-size:11px; }
.bm-action-progress::before { content:''; width:12px; height:12px; margin:0; border-width:2px; }
.bm-result-sequence { display:flex; justify-content:center; flex-wrap:wrap; gap:5px 14px; padding:0; margin:12px 0; color:#a3bdad; font-size:11px; list-style:none; }
.bm-result-sequence>li:not(:last-child)::after { content:'›'; padding-left:10px; }
.bm-result-feedback.is-error .bm-feedback-spinner,.bm-result-feedback.is-error .bm-result-sequence { display:none; }
.bm-result-error-actions { display:flex; justify-content:center; gap:8px; }
.bm-result-feedback.is-error { background:rgba(9,12,6,.72); }
.bm-result-feedback.is-error .bm-result-feedback-card { border-color:#997f45; }
.bm-result-toast { position:fixed; z-index:100; bottom:18px; left:50%; transform:translateX(-50%); max-width:calc(100vw - 28px); box-sizing:border-box; padding:11px 17px; border:1px solid #476853; border-radius:7px; background:#17291e; color:#e6f4eb; font-size:14px; line-height:1.5; box-shadow:0 6px 24px #0009; }
.bm-result-details { margin-top:12px; padding:10px 0; border-top:1px solid #304438; color:#b8cfc0; font-size:13px; line-height:1.7; }
.bm-result-details summary { cursor:pointer; color:#d9ecdf; min-height:36px; display:flex; align-items:center; }
.bm-result-details summary::after { content:'⌄'; margin-left:8px; }
body.bm-result-ui .bm-result-details #readout { margin:8px 0; overflow-wrap:anywhere; }
body.bm-result-ui #zoneBasicReadout { margin:8px 0; color:#bad5c6; font-size:13px; }
@keyframes bm-result-spin { to { transform:rotate(360deg); } }
@media(max-width:1100px) {
  body.bm-result-ui .layout { grid-template-columns:minmax(0,1fr); height:auto; overflow:visible; }
  body.bm-result-ui .stage { min-height:0; height:auto; overflow:visible; }
  body.bm-result-ui.has-analysis-image .stage>.viewer { height:clamp(320px,calc(100dvh - 260px),650px); min-height:320px; flex:none; overflow:hidden; }
  body.bm-result-ui .layout>aside { height:auto; max-height:none; overflow:visible; }
  body.bm-result-ui .tools-left { width:auto; flex:1 1 240px; }
  body.bm-result-ui .tools-right { width:auto; flex:1 1 270px; }
  body.bm-result-ui.mode-zone { grid-template-columns:minmax(0,1fr); }
  body.bm-result-ui.mode-zone.has-analysis-image main,
  body.bm-result-ui.mode-zone[data-input-mode="manual"] main { height:min(650px,calc(100dvh - 230px),100vw); min-height:330px; overflow:hidden; }
  body.bm-result-ui.mode-zone .toolbar { width:100%; box-sizing:border-box; }
  body.bm-result-ui.mode-zone .toolbar .mode-tabs { width:auto; flex:1 1 230px; }
  body.bm-result-ui.mode-zone .bm-result-actions { flex:1 1 280px; }
  body.bm-result-ui .mortar-mobile-correction { display:none!important; }}
@media(max-width:600px) {
  body.bm-result-ui .toolbar { padding:8px 10px; gap:6px; }
  body.bm-result-ui .tools-left,body.bm-result-ui .tools-right { flex-basis:100%; width:100%; }
  body.bm-result-ui .toolbar .mode-toggle { flex:1 1 100%; }
  body.bm-result-ui .tools-right .hint { display:none; }
  .bm-result-actions { width:100%; justify-content:flex-start; gap:6px; }
  .bm-result-actions>.btn { flex:1 1 100px; padding:8px; }
  .bm-result-more>summary { padding:8px 10px; }
  .bm-result-more-panel { right:0; }
  body.bm-result-ui.has-analysis-image .stage>.viewer { height:clamp(320px,calc(100dvh - 285px),540px); min-height:320px; }
  body.bm-result-ui.mode-zone .toolbar .mode-tabs { flex:1 1 100%; width:100%; }
  body.bm-result-ui.mode-zone.has-analysis-image main,
  body.bm-result-ui.mode-zone[data-input-mode="manual"] main { height:min(560px,calc(100dvh - 240px),100vw); min-height:320px; }
  .bm-result-feedback-card { padding:20px 15px; }}
@media(prefers-reduced-motion:reduce) { .bm-feedback-spinner,.bm-action-progress::before { animation-duration:1.8s; }}


  .bm-content-pack {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .bm-content-section,
  .bm-fan-notice {
    min-width: 0;
    max-width: 100%;
    border: 1px solid rgba(145,170,164,.16);
    border-radius: 8px;
    background: rgba(11,17,17,.32);
    color: #c6ddd7;
    padding: 14px;
    overflow-wrap: anywhere;
  }
  .bm-content-head {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }
  .bm-content-section h2,
  .bm-fan-notice h2 {
    margin: 0;
    color: var(--text, #ecfff8);
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: 0;
  }
  .bm-content-section h3 {
    margin: 0;
    color: var(--text, #ecfff8);
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0;
  }
  .bm-content-section p,
  .bm-fan-notice p {
    margin: 0;
    color: #a9c2bd;
    font-size: 12px;
    line-height: 1.6;
  }
  .bm-info-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .bm-info-card {
    border: 1px solid rgba(188,234,220,.13);
    border-radius: 8px;
    background: rgba(6,15,14,.58);
    padding: 11px;
  }
  .bm-info-card p {
    margin-top: 5px;
  }
  .bm-tool-case-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .bm-tool-case .case-media {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(188,234,220,.14);
    border-radius: 8px;
    background: #06100f;
  }
  .bm-tool-case .case-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
  }
  .bm-tool-case .case-media-label {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 8px;
    border: 1px solid rgba(188,234,220,.2);
    border-radius: 4px;
    background: rgba(3,10,9,.9);
    color: #dff7ef;
    padding: 4px 7px;
    font-size: 10px;
    font-weight: 900;
  }
  .bm-tool-case-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin: 10px 0 0;
  }
  .bm-tool-case .case-metric {
    min-width: 0;
    border: 1px solid rgba(188,234,220,.13);
    border-radius: 6px;
    background: rgba(6,15,14,.58);
    padding: 9px;
  }
  .bm-tool-case .case-metric dt {
    color: #91aaa4;
    font-size: 10px;
    line-height: 1.35;
  }
  .bm-tool-case .case-metric dd {
    margin: 4px 0 0;
    color: #ecfff8;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
  }
  .bm-tool-case-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
  }
  .bm-tool-case-steps section {
    min-width: 0;
  }
  .bm-tool-case-steps ul,
  .bm-tool-case-steps ol {
    margin: 7px 0 0;
    padding-left: 18px;
    color: #a9c2bd;
    font-size: 12px;
    line-height: 1.55;
  }
  .bm-tool-case-steps li + li {
    margin-top: 5px;
  }
  .bm-tool-case-limit {
    border-left: 2px solid rgba(255,198,92,.56);
    padding-left: 10px;
  }
  .bm-tool-case-link {
    margin-top: 14px !important;
  }
  .bm-tool-case-link a {
    color: var(--green, #54f7a5);
    font-weight: 900;
  }
  .bm-eyebrow {
    color: var(--green, #54f7a5);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
  }
  .bm-note {
    border-left: 2px solid rgba(84,247,165,.42);
    padding-left: 9px;
    color: #91aaa4 !important;
  }
  .bm-accordion-list {
    display: grid;
    gap: 7px;
  }
  .bm-drop-principles details { border-top: 1px solid rgba(145,170,164,.24); padding: 12px 0; scroll-margin-top: 24px; }
  .bm-drop-principles summary { cursor: pointer; color: #ecfff8; font-weight: 700; line-height: 1.6; }
  .bm-drop-principles summary:hover { color: var(--green, #54f7a5); }
  .bm-drop-principles summary:focus-visible { outline: 2px solid var(--green, #54f7a5); outline-offset: 4px; }
  .bm-drop-principles table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
  .bm-drop-principles caption { text-align: left; margin-bottom: 8px; color: #a9c2bd; }
  .bm-drop-principles th, .bm-drop-principles td { text-align: left; padding: 9px; border-bottom: 1px solid rgba(145,170,164,.24); }
  .bm-drop-principles a { color: var(--green, #54f7a5); }
  .bm-accordion-item {
    border: 1px solid rgba(188,234,220,.13);
    border-radius: 8px;
    background: rgba(6,15,14,.5);
    overflow: hidden;
  }
  .bm-accordion-item h3 {
    margin: 0;
  }
  .bm-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--text, #ecfff8);
    padding: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
  }
  .bm-accordion-trigger:hover,
  .bm-accordion-trigger:focus-visible {
    color: var(--green, #54f7a5);
    outline: none;
  }
  .bm-accordion-trigger:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(84,247,165,.36);
  }
  .bm-accordion-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 1px solid rgba(84,247,165,.42);
    border-radius: 999px;
    position: relative;
  }
  .bm-accordion-icon::before,
  .bm-accordion-icon::after {
    content: "";
    position: absolute;
    inset: 8px 4px auto;
    height: 1px;
    background: currentColor;
  }
  .bm-accordion-icon::after {
    transform: rotate(90deg);
  }
  .bm-accordion-trigger[aria-expanded="true"] .bm-accordion-icon::after {
    opacity: 0;
  }
  .bm-accordion-panel {
    display: grid;
    gap: 8px;
    padding: 0 11px 12px;
  }
  .bm-accordion-panel[hidden] {
    display: none !important;
  }
  .bm-methodology-grid {
    display: grid;
    gap: 12px;
    margin-top: 12px;
  }
  .bm-methodology ul {
    margin: 7px 0 0;
    padding-left: 18px;
    color: #a9c2bd;
    font-size: 12px;
    line-height: 1.55;
  }
  .bm-methodology li + li {
    margin-top: 5px;
  }
  .bm-fan-notice {
    background: rgba(18,26,24,.5);
  }
  body .bm-content-pack > aside.bm-fan-notice {
    grid-area: auto !important;
    display: block;
    width: 100% !important;
    inline-size: 100% !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 14px;
  }
  .bm-fan-notice p {
    margin-top: 7px;
  }
  .bm-related-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
  }
  .bm-related-link {
    display: flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid rgba(188,234,220,.13);
    border-radius: 8px;
    background: rgba(6,15,14,.5);
    color: var(--green, #54f7a5);
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    text-decoration: none;
  }
  .bm-related-link:hover,
  .bm-related-link:focus-visible {
    border-color: rgba(84,247,165,.42);
    color: #ecfff8;
    outline: none;
  }
  @media (max-width: 980px) {
    .bm-content-pack {
      gap: 10px;
      margin-top: 12px;
    }
    .bm-content-section,
    .bm-fan-notice {
      padding: 12px;
    }
    body .bm-content-pack > aside.bm-fan-notice {
      padding: 12px;
    }
    .bm-tool-case-media,
    .bm-tool-case-steps {
      grid-template-columns: 1fr;
    }
    .bm-tool-case-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bm-tool-case .case-media img {
      max-height: 300px;
    }}


  html,
  body.mode-zone {
    height: auto !important;
    min-height: 100%;
    overflow: auto !important;
  }
  body.mode-zone {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    grid-template-areas:
      "header header"
      "toolbar toolbar"
      "map side"
      "content content"
      "footer footer";
    grid-template-rows: auto auto minmax(520px, calc(100vh - 118px)) auto auto;
  }
  body.mode-zone main {
    min-height: 0;
    height: 100%;
  }
  body.mode-zone aside {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .zone-content-below {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 18px;
    display: grid;
    gap: 14px;
  }
  .zone-utility-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .zone-utility-panels .section {
    margin: 0;
  }
  .zone-utility-panels .quick-start-card,
  .zone-utility-panels .result-preview-card {
    min-width: 0;
  }
  .zone-utility-panels .result-preview-card {
    display: grid;
  }
  .zone-utility-panels .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-footer {
    grid-area: footer;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto;
    padding: 16px 18px 20px;
    max-width: 1180px;
    border-top: 1px solid rgba(145, 170, 164, .18);
    color: #91aaa4;
    font-size: 12px;
    line-height: 1.55;
  }
  .tool-footer p { margin: 0; max-width: 980px; }
  .tool-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .tool-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    color: #ecfff8;
    font-weight: 800;
    text-decoration: none;
  }
  .tool-footer a:hover { color: #54f7a5; text-decoration: underline; }
  @media (max-width: 920px) {
    body.mode-zone {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas:
        "header"
        "toolbar"
        "map"
        "side"
        "content"
        "footer";
      grid-template-rows: auto auto minmax(420px, 58vh) auto auto auto;
    }
    body.mode-zone main,
    body.mode-zone aside {
      height: auto;
    }
    body.mode-zone aside {
      overflow: visible;
    }
    .zone-content-below {
      width: min(100% - 24px, 760px);
      margin: 18px auto;
    }
    .zone-utility-panels {
      grid-template-columns: 1fr;
      gap: 10px;
    }}


/* Battlemap workspace redesign: zone page. */
:root {
  --bg: #0b0e0d;
  --panel: #0d100f;
  --panel-2: #121614;
  --line: #29312e;
  --line-strong: #3a4541;
  --text: #f0f3f1;
  --muted: #a1aca7;
  --green: #4ed58a;
  --accent: #58add8;
  --blue: #58add8;
  --feature-accent: #58add8;
  --feature-accent-rgb: 88, 173, 216;
}
html,
body.mode-zone {
  height: auto;
  min-height: 100%;
  overflow: auto;
  background: var(--bg);
}
body.mode-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: 64px 58px minmax(520px, calc(100vh - 122px)) auto auto;
  grid-template-areas:
    "header header"
    "toolbar side"
    "map side"
    "content content"
    "footer footer";
  color: var(--text);
  font-family: Pretendard, "Pretendard Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.app-header {
  min-height: 64px;
  padding: 0 18px;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: #0d100f;
}
.app-header .brand {
  gap: 10px;
  overflow: hidden;
}
.site-identity {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.site-logo-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #d7dfdb;
}
.site-logo-mark svg {
  width: 30px;
  height: 30px;
}
.brand-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  background: var(--line);
}
.tool-page-title {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-page-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: url("/static/tool-icons/zone-badge.png?v=20260705b") center / contain no-repeat;
}
.app-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 780;
  white-space: nowrap;
}
.app-header .brand > p {
  display: none;
}
.top-nav {
  gap: 20px;
}
.top-nav a {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.top-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--line-strong);
}
body.mode-zone .top-nav a.active {
  color: var(--text);
  border-color: transparent;
  border-bottom-color: var(--feature-accent);
  background: transparent;
}
.toolbar {
  min-height: 58px;
  padding: 10px 16px;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--line);
  background: #0d100f;
}
.toolbar-note {
  color: #7f8b86;
  font-size: 12px;
}
.toolbar .mode-tabs {
  min-width: 230px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
}
.toolbar .mode-tab,
.toolbar button,
.toolbar-field select {
  min-height: 36px;
  border-color: var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}
.toolbar .mode-tabs .mode-tab {
  border-radius: 0;
}
.toolbar .mode-tabs .mode-tab + .mode-tab {
  border-left: 1px solid var(--line-strong);
}
body.mode-zone .toolbar .mode-tab.active {
  border-color: transparent;
  background: rgba(var(--feature-accent-rgb), .1);
  color: var(--feature-accent);
}
.toolbar .mode-panel.active {
  gap: 8px;
}
.toolbar-field label {
  color: #7f8b86;
  font-weight: 650;
}
.tool-row button {
  min-width: 36px;
  border-radius: 5px;
}
main {
  grid-area: map;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
#mapCanvas {
  background: var(--bg);
}
body.mode-zone[data-input-mode="auto"]:not(.has-analysis-image) #mapCanvas {
  opacity: .28;
  filter: saturate(.72) brightness(.76);
}
body.mode-zone.has-analysis-image #mapCanvas {
  opacity: 1;
  filter: none;
}
.map-drop-panel,
body.mode-zone:not(.has-analysis-image) .map-drop-panel {
  align-items: center;
  justify-content: center;
  justify-items: center;
  padding: 20px;
}
.map-drop-card,
body.mode-zone:not(.has-analysis-image) .map-drop-card {
  width: min(860px, 100%);
  max-width: 100%;
  background: transparent;
  box-shadow: none;
}
.map-drop-panel .drop-zone,
body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
  width: 100%;
  min-height: 0;
  padding: 18px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  cursor: default;
}
.drop-zone::before,
.empty-onboarding::before {
  display: none;
}
.empty-onboarding,
body.mode-zone:not(.has-analysis-image) .empty-onboarding {
  width: 100%;
  max-width: 860px;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  gap: 10px;
  align-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.empty-symbol,
body.mode-zone:not(.has-analysis-image) .empty-symbol {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 0;
  border-radius: 50%;
  background: url("/static/tool-icons/zone-badge.png?v=20260705b") center / contain no-repeat;
  box-shadow: none;
  color: transparent;
}
.empty-title,
body.mode-zone:not(.has-analysis-image) .empty-title {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
  font-size: 26px;
  line-height: 1.18;
  font-weight: 780;
  text-shadow: none;
}
.empty-title em,
body.mode-zone:not(.has-analysis-image) .empty-title em {
  color: var(--feature-accent);
}
.empty-lead,
body.mode-zone:not(.has-analysis-image) .empty-lead {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.empty-flow,
body.mode-zone:not(.has-analysis-image) .empty-flow {
  order: 4;
  width: min(800px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 2px auto 0;
  overflow: visible;
}
.empty-flow-card,
body.mode-zone:not(.has-analysis-image) .empty-flow-card {
  min-height: 0;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.empty-flow-card:not(:last-child)::after {
  display: none;
  content: none;
}
.empty-step-num,
body.mode-zone:not(.has-analysis-image) .empty-step-num {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(var(--feature-accent-rgb), .5);
  background: #0d100f;
  color: var(--feature-accent);
  font-size: 12px;
  box-shadow: none;
}
.empty-thumb,
.empty-step-thumb,
.empty-key-visual,
.empty-paste-visual,
body.mode-zone:not(.has-analysis-image) .empty-thumb,
body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
body.mode-zone:not(.has-analysis-image) .empty-key-visual,
body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
  width: 100%;
  height: 84px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #101412;
  box-shadow: none;
}
.empty-thumb::after,
.empty-step-thumb::after {
  display: none;
}
.empty-thumb img,
.empty-step-thumb img {
  opacity: 1;
  filter: saturate(.88) contrast(1.02);
}
.empty-key-visual .keycap,
.empty-paste-visual .keycap {
  min-width: 58px;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #171c19;
  box-shadow: none;
}
.empty-flow-card h3,
body.mode-zone:not(.has-analysis-image) .empty-flow-card h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}
.empty-flow-card p,
body.mode-zone:not(.has-analysis-image) .empty-flow-card p {
  min-height: 0;
  color: #83908a;
  font-size: 11px;
  line-height: 1.45;
}
#autoSampleButton { grid-column: 1 / -1; }
.empty-actions,
body.mode-zone:not(.has-analysis-image) .empty-actions {
  order: 5;
  width: min(580px, 100%);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 2px auto 0;
}
.empty-action,
body.mode-zone:not(.has-analysis-image) .empty-action {
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  box-shadow: none;
  transform: none;
}
.empty-action:hover,
.empty-action:focus-visible {
  border-color: var(--green);
  transform: none;
}
.empty-action.primary,
body.mode-zone:not(.has-analysis-image) .empty-action.primary {
  border-color: #319c68;
  background: #1b7f50;
  color: #f4fff9;
}
.empty-action.secondary {
  background: #101412;
  padding-inline: 18px;
}
.empty-action.secondary span {
  display: none;
}
.empty-action span {
  color: #b3bdb8;
  font-size: 10px;
}
.empty-foot,
body.mode-zone:not(.has-analysis-image) .empty-foot {
  order: 6;
  gap: 8px 16px;
  color: #75817c;
  font-size: 11px;
}
.empty-foot span::before {
  content: "·";
  margin-right: 6px;
  color: var(--feature-accent);
}
body.mode-zone aside {
  grid-area: side;
  align-self: start;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  padding: 14px;
  border-left: 1px solid var(--line);
  background: #0d100f;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #4a5751 #0d100f;
}
.section {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  box-shadow: none;
}
.section-title {
  color: var(--text);
}
body.mode-zone:not(.has-analysis-image) aside .quick-start-card,
body.mode-zone:not(.has-analysis-image) aside .status {
  display: none;
}
.result-preview-card,
body.mode-zone:not(.has-analysis-image) aside .result-preview-card {
  order: -1;
  border-color: var(--line);
  background: var(--panel-2);
  box-shadow: none;
}
.result-preview-head {
  margin-bottom: 12px;
}
body.mode-zone .result-preview-head .eye-mark {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: url("/static/tool-icons/zone-badge.png?v=20260705b") center / contain no-repeat;
  box-shadow: none;
  opacity: 1;
}
.result-preview-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}
.result-preview-head span,
.side-copy,
.hint {
  color: #7f8b86;
}
.preview-image,
body.mode-zone:not(.has-analysis-image) aside .result-preview-card .preview-image {
  max-height: none;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #080b0a;
}
.preview-image::after {
  display: none;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 13px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.preview-stat {
  min-width: 0;
  padding: 9px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.preview-stat span {
  color: #7f8b86;
  font-size: 11px;
}
.preview-stat strong {
  color: var(--text);
  font-size: 16px;
}
.preview-list {
  gap: 7px;
  color: #b8c1bd;
  font-size: 12px;
}
.preview-list li::before {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  border: 0;
  background: var(--green);
  color: #07110c;
  box-shadow: none;
}
.contact-card {
  border-color: var(--line);
  background: transparent;
}
.contact-links {
  gap: 8px 16px;
}
.contact-link {
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #b9c2be;
}
.usage-card-btn,
.usage-inline-btn,
.usage-help-btn {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}
.usage-modal {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0d100f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52);
}
.usage-step-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  box-shadow: none;
}
.usage-step-card::before,
.usage-step-media::after {
  display: none;
}
.usage-step-media {
  border-color: var(--line);
  border-radius: 5px;
  box-shadow: none;
}
.clipboard-empty-card,
.analysis-card {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #121614;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
}
.zone-content-below {
  grid-area: content;
  grid-column: 1 / -1;
  width: min(1180px, calc(100% - 48px));
  margin: 40px auto 24px;
  gap: 20px;
}
.zone-utility-panels {
  gap: 12px;
}
.zone-content-below .bm-content-pack {
  gap: 20px;
  margin-top: 0;
}
.bm-content-section,
.bm-fan-notice,
body .bm-content-pack > aside.bm-fan-notice {
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.bm-info-card,
.bm-example-cases .bm-example-card,
.bm-accordion-item,
.bm-related-link {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-2);
  box-shadow: none;
}
.tool-footer {
  border-top: 1px solid var(--line);
  background: #0d100f;
}
@media (max-width: 980px) {
  html,
  body.mode-zone {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }
  body.mode-zone {
    display: flex;
    flex-direction: column;
  }
  .app-header {
    order: 1;
    min-height: 0;
    padding: 11px 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .app-header .brand {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 8px;
  }
  .app-header .brand > p {
    display: none;
  }
  .top-nav {
    width: 100%;
    max-width: 100%;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar {
    display: none;
  }
  .top-nav a {
    flex: 0 0 auto;
    min-height: 38px;
  }
  .toolbar {
    order: 2;
    min-height: 0;
    padding: 10px 12px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .toolbar .mode-tabs,
  .toolbar .mode-panel.active {
    width: 100%;
  }
  .toolbar-note {
    width: 100%;
    margin-left: 0;
  }
  main {
    order: 3;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    overflow: visible;
  }
  body.mode-zone:not(.has-analysis-image) main {
    position: relative;
    display: grid;
  }
  body.mode-zone:not(.has-analysis-image) #mapCanvas {
    position: absolute;
    inset: 0;
    z-index: 0;
  }
  body.mode-zone:not(.has-analysis-image) .map-drop-panel {
    position: relative;
    inset: auto;
    z-index: 1;
    width: 100%;
    min-height: 0;
    padding: 18px 14px;
  }
  body.mode-zone:not(.has-analysis-image) .map-drop-card,
  body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
    width: 100%;
    max-width: 100%;
  }
  body.mode-zone:not(.has-analysis-image) .map-drop-panel .drop-zone {
    position: relative;
    min-height: 0;
    padding: 20px 0;
  }
  body.mode-zone.has-analysis-image main {
    height: 68vh;
    min-height: 500px;
  }
  .empty-onboarding,
  body.mode-zone:not(.has-analysis-image) .empty-onboarding {
    width: 100%;
    min-height: 0;
    padding: 0;
    gap: 12px;
  }
  .empty-title,
  body.mode-zone:not(.has-analysis-image) .empty-title {
    width: 100%;
    max-width: 620px;
    font-size: 26px;
  }
  .empty-lead,
  body.mode-zone:not(.has-analysis-image) .empty-lead {
    font-size: 13px;
  }
  .empty-flow,
  body.mode-zone:not(.has-analysis-image) .empty-flow {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .empty-flow-card,
  body.mode-zone:not(.has-analysis-image) .empty-flow-card {
    display: grid;
    grid-template-columns: 28px 96px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 3px 10px;
    align-items: center;
    justify-items: stretch;
    text-align: left;
  }
  .empty-step-num {
    grid-column: 1;
    grid-row: 1 / 3;
    justify-self: start;
  }
  .empty-thumb,
  .empty-step-thumb,
  .empty-key-visual,
  .empty-paste-visual,
  body.mode-zone:not(.has-analysis-image) .empty-thumb,
  body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
  body.mode-zone:not(.has-analysis-image) .empty-key-visual,
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 96px;
    height: 64px;
  }
  .empty-flow-card h3,
  body.mode-zone:not(.has-analysis-image) .empty-flow-card h3 {
    grid-column: 3;
    grid-row: 1;
    margin: 0;
    text-align: left;
  }
  .empty-flow-card p,
  body.mode-zone:not(.has-analysis-image) .empty-flow-card p {
    grid-column: 3;
    grid-row: 2;
    max-width: none;
    margin: 0;
    text-align: left;
  }
  .empty-actions,
  body.mode-zone:not(.has-analysis-image) .empty-actions {
    width: min(100%, 620px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .empty-action,
  body.mode-zone:not(.has-analysis-image) .empty-action {
    min-height: 54px;
    padding-inline: 8px;
    font-size: 13px;
  }
  body.mode-zone aside {
    order: 4;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 12px;
    border-top: 1px solid var(--line);
    border-left: 0;
    overflow: visible;
  }
  body.mode-zone:not(.has-analysis-image) aside .quick-start-card {
    display: none;
  }
  .zone-content-below {
    order: 5;
    width: calc(100% - 28px);
    margin: 34px auto 18px;
  }
  .tool-footer {
    order: 6;
    width: 100%;
    max-width: 100%;
  }}
@media (max-width: 680px) {
  .site-identity,
  .brand-divider {
    display: none;
  }
  .app-header .brand {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }
  .site-logo-mark,
  .site-logo-mark svg,
  .tool-page-icon {
    width: 28px;
    height: 28px;
  }
  .app-header h1 {
    font-size: 15px;
    white-space: normal;
  }
  .toolbar-note {
    font-size: 11px;
  }
  .empty-symbol {
    width: 44px;
    height: 44px;
  }
  .empty-title,
  body.mode-zone:not(.has-analysis-image) .empty-title {
    font-size: 24px;
    line-height: 1.2;
  }
  .empty-flow-card,
  body.mode-zone:not(.has-analysis-image) .empty-flow-card {
    grid-template-columns: 26px 82px minmax(0, 1fr);
    gap: 3px 8px;
  }
  .empty-thumb,
  .empty-step-thumb,
  .empty-key-visual,
  .empty-paste-visual,
  body.mode-zone:not(.has-analysis-image) .empty-thumb,
  body.mode-zone:not(.has-analysis-image) .empty-step-thumb,
  body.mode-zone:not(.has-analysis-image) .empty-key-visual,
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual {
    width: 82px;
    height: 58px;
  }
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual .paste-visual-title {
    display: none;
  }
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual .paste-visual-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual .paste-visual-hint {
    gap: 4px;
  }
  body.mode-zone:not(.has-analysis-image) .empty-paste-visual .keycap {
    width: 27px;
    height: 34px;
    min-width: 27px;
    min-height: 34px;
    padding: 4px 6px;
    font-size: 12px;
  }
  .empty-actions,
  body.mode-zone:not(.has-analysis-image) .empty-actions {
    gap: 8px;
  }}

.bm-mobile-menu { display:none; }
@media(max-width:520px) {
  .bm-site-header__inner { position:relative; }
  .bm-mobile-menu { display:block; position:absolute; top:8px; right:14px; z-index:12; }
  .bm-mobile-menu summary { display:flex; align-items:center; gap:8px; min-height:44px; box-sizing:border-box; padding:0 10px; border:1px solid #3b4b42; border-radius:6px; background:#121a16; color:#d3dfd9; cursor:pointer; font-size:12px; list-style:none; }
  .bm-mobile-menu summary::-webkit-details-marker { display:none; }
  .bm-mobile-menu nav { position:absolute; top:44px; right:0; width:190px; padding:6px; border:1px solid #3b4b42; border-radius:8px; background:#121a16; box-shadow:0 12px 30px #0008; }
  .bm-mobile-menu nav a { display:flex; align-items:center; min-height:44px; padding:0 12px; color:#d3dfd9; text-decoration:none; font-size:14px; border-radius:4px; }
  .bm-mobile-menu nav a[aria-current="page"] { background:#1c392a; color:#77e0b2; }}
:root {
  --bm-shell-bg: #0b0e0d;
  --bm-shell-line: #29312e;
  --bm-shell-text: #f0f3f1;
  --bm-shell-muted: #9ca8a3;
  --bm-shell-accent: #4ed58a;
  --bm-header-height: 65px;
}

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

.bm-site-header {
  box-sizing: border-box;
  position: sticky;
  z-index: 80;
  top: 0;
  width: 100%;
  min-width: 0;
  height: 65px;
  min-height: 65px;
  border-bottom: 1px solid var(--bm-shell-line);
  background: rgba(11, 14, 13, .97);
  backdrop-filter: blur(12px);
  font-family: Pretendard, "Pretendard Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.mode-zone > .bm-site-header {
  grid-area: header;
}

/* Tool workspaces have legacy direct-child header rules. Keep the shared
   shell authoritative without coupling it to each tool stylesheet. */
.app > .bm-site-header {
  min-height: 0;
  display: block;
  padding: 0;
  gap: 0;
}

.app > .bm-site-header .bm-site-header__inner {
  min-height: 64px;
}

.app > .bm-site-header .bm-site-nav {
  width: auto;
  overflow: visible;
  gap: 24px;
  color: var(--bm-shell-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.app > .bm-site-header .bm-site-nav a {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.bm-site-header__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 64px;
  min-height: 64px;
  margin: 0;
  padding-inline: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.bm-site-header__identity {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bm-site-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bm-shell-text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.bm-site-brand:hover,
.bm-site-brand:focus-visible {
  color: var(--bm-shell-text);
  text-decoration: none;
}

.bm-site-brand__mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid var(--bm-shell-accent);
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px var(--bm-shell-bg);
  background: var(--bm-shell-accent);
}

.bm-header-divider {
  width: 1px;
  height: 22px;
  flex: 0 0 auto;
  background: var(--bm-shell-line);
}

.bm-header-context {
  overflow: hidden;
  margin: 0;
  color: var(--bm-shell-text);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-site-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--bm-shell-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.bm-site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.bm-site-nav a:hover,
.bm-site-nav a:focus-visible {
  color: var(--bm-shell-text);
  text-decoration: none;
}

.bm-site-nav a[aria-current="page"] {
  border-bottom-color: var(--bm-shell-accent);
  color: var(--bm-shell-text);
}

.bm-site-footer {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--bm-shell-line);
  background: #090c0b;
  color: #a8b2ae;
  font-family: Pretendard, "Pretendard Variable", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.bm-site-footer__inner {
  box-sizing: border-box;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 46px;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(480px, 1.8fr);
  gap: 64px;
}

.bm-site-footer__about p {
  max-width: 560px;
  margin: 10px 0 0;
  color: #a8b2ae;
  font-size: 13px;
  line-height: 1.7;
}

.bm-site-footer__brand {
  color: var(--bm-shell-text);
  font-size: 17px;
  font-weight: 850;
  text-decoration: none;
}

.bm-site-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.bm-site-footer__group {
  min-width: 0;
}

.bm-site-footer__group h2 {
  margin: 0 0 13px;
  color: var(--bm-shell-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.bm-site-footer__group a {
  min-height: 32px;
  display: flex;
  align-items: center;
  width: fit-content;
  color: #a8b2ae;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

.bm-site-footer__group a:hover,
.bm-site-footer__group a:focus-visible,
.bm-site-footer__brand:hover,
.bm-site-footer__brand:focus-visible {
  color: var(--bm-shell-accent);
  text-decoration: none;
}

@media (max-width: 820px) {
  :root {
    --bm-header-height: 61px;
  }

  .bm-site-header {
    height: 61px;
    min-height: 61px;
  }

  .bm-site-header__inner {
    width: 100%;
    height: 60px;
    min-height: 60px;
    padding: 0 14px;
    gap: 18px;
  }

  .app > .bm-site-header .bm-site-header__inner {
    width: 100%;
    height: 60px;
    min-height: 60px;
    padding: 0 14px;
  }

  .app > .bm-site-header .bm-site-nav {
    overflow-x: auto;
  }

  .bm-header-divider,
  .bm-header-context {
    display: none;
  }

  .bm-site-nav {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 18px;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(78, 213, 138, .42) transparent;
  }

  .bm-site-nav::-webkit-scrollbar {
    height: 3px;
  }

  .bm-site-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .bm-site-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(78, 213, 138, .42);
  }

  .bm-site-nav a {
    scroll-snap-align: start;
  }

  .bm-site-nav::after {
    content: "";
    flex: 0 0 calc(50% - 20px);
  }

  .bm-site-footer__inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }}

@media (max-width: 520px) {
  :root {
    --bm-header-height: 90px;
  }

  .bm-site-header {
    height: auto;
    min-height: 89px;
  }

  /* Legacy tool styles still target the bare header element on small screens.
     Keep every page on the same shared shell dimensions. */
  body.mode-drop:not(.has-analysis-image) .app > .bm-site-header,
  body.mode-mortar:not(.has-analysis-image) .app > .bm-site-header {
    height: auto !important;
    min-height: 89px !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .bm-site-header__inner {
    height: auto;
    display: block;
    padding: 8px 14px 0;
  }

  .app > .bm-site-header .bm-site-header__inner {
    height: auto;
    display: block;
    padding: 8px 14px 0;
  }

  .app > .bm-site-header .bm-site-nav {
    gap: 18px;
    padding: 0;
  }

  .app > .bm-site-header .bm-site-nav a {
    min-height: 44px;
  }

  .bm-site-brand {
    min-height: 44px;
    font-size: 16px;
  }

  .bm-site-nav {
    margin-top: 1px;
  }

  .bm-site-nav a {
    min-height: 44px;
  }

  .bm-site-footer__inner {
    width: 100%;
    padding: 30px 18px 36px;
  }

  .bm-site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
  }}

/* Shared automatic tool onboarding; never change analysis or manual canvas geometry. */
.bm-mobile-guide-toggle { display:none; }
body:is(.mode-drop,.mode-mortar):not(.has-analysis-image):not([data-input-mode="manual"]) aside .quick-start-card { display:none!important; }
body:is(.mode-drop,.mode-mortar,.mode-zone) { --drop-bg:#101416; --drop-surface:#171d20; --drop-line:#30383d; --drop-text:#f1f4f5; --drop-muted:#b4bec4; --drop-accent:#35d6a3; }
body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
  background:var(--drop-bg); color:var(--drop-text);
  font-family:Pretendard,"Pretendard Variable",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic",sans-serif;
  & :is(.app,.layout,.stage,.viewer,.dropzone,.empty-onboarding,.toolbar) { width:100%!important; inline-size:100%!important; max-inline-size:100%!important; min-width:0!important; min-inline-size:0!important; box-sizing:border-box; }
  & .app { height:auto; min-height:100vh; }
  & .layout { grid-template-columns:minmax(0,1fr) 312px; height:auto; overflow:visible; align-items:start; gap:0; }
  & .stage { height:auto; }
  & .viewer { min-height:0; height:auto; background:var(--drop-bg); box-shadow:none; overflow:visible; }
  & :is(.viewer,.dropzone,.empty-onboarding)::before, & :is(.empty-symbol,.tools-right), & #warningBox:empty { display:none; }
  & .dropzone { position:relative; inset:auto; min-height:0; padding:32px; background:none; }
  & .empty-onboarding { inline-size:min(100%,1240px)!important; max-inline-size:1240px!important; min-height:0; padding:0; margin:auto; border:0; background:none; box-shadow:none; transform:none; gap:12px; }
  & .empty-title { max-width:none; color:var(--drop-text); font-size:36px; font-weight:700; letter-spacing:-.035em; line-height:1.25; margin:0; }
  & .empty-title em { display:inline; color:inherit; }
  & .empty-lead { max-width:760px; margin:0 auto; color:var(--drop-muted); font-size:16px; line-height:1.6; word-break:keep-all; }
  & .empty-flow { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; width:100%; max-width:none; margin:24px 0 0; order:4; align-items:stretch; }
  & .empty-actions { order:5; width:min(100%,480px); display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:20px auto 0; }
  & .empty-actions button { display:flex; flex-direction:row; align-items:center; justify-content:center; gap:10px; padding:10px 12px; min-height:44px; border:1px solid #48545d; border-radius:8px; background:var(--drop-surface); color:var(--drop-text); font-family:inherit; font-size:14px; font-weight:600; line-height:1.5; cursor:pointer; box-shadow:none; transition:background-color .15s,border-color .15s,box-shadow .15s; }
  & :is(#pasteClipboardBtn,#autoPasteButton) { grid-column:1/-1; min-height:54px; background:var(--drop-accent); border-color:var(--drop-accent); color:#062a20; font-size:18px; font-weight:700; letter-spacing:-.02em; }
  & :is(#sampleAnalyzeBtn,#fileSelectBtn,#autoSampleButton,#zoneFileSelectBtn) { grid-column:auto; }
  & .empty-foot { order:7; width:100%; flex-direction:row; flex-wrap:wrap; justify-content:center; gap:4px 16px; margin:8px 0 0; }
  & .empty-foot span { padding:0; border:0; border-radius:0; background:none; color:var(--drop-muted); font-size:12px; line-height:1.6; }
  & .empty-foot span::before { display:none; }
  & .layout > aside { width:auto; max-width:none; min-width:0; height:auto; max-height:none; margin:0; padding:28px 24px; overflow:visible!important; background:#14191c; border-left:1px solid #262e33; }
  & aside .result-preview-card { padding:0; background:none; border:0; border-radius:0; box-shadow:none; }
  & .result-preview-head { min-height:0; }
  & .result-preview-head .eye-mark { display:none; }
  & .result-preview-head strong { color:var(--drop-text); font-size:18px; font-weight:600; line-height:1.5; }
  & .result-preview-head span { color:var(--drop-muted); font-size:13px; line-height:1.65; margin-top:6px; }
  & .preview-image { height:auto; aspect-ratio:1; margin:24px 0 0; border:1px solid #303a40; border-radius:8px; overflow:hidden; }
  & .preview-image img { width:100%; height:100%; object-fit:cover; }
  & .preview-grid { display:grid; grid-template-columns:1fr; gap:0; margin-top:20px; border:0; background:none; }
  & .preview-stat { padding:0; border:0; background:none; }
  & .preview-stat span { color:var(--drop-muted); font-size:13px; }
  & .preview-stat strong { color:var(--drop-text); font-size:17px; font-weight:600; }
  & .drop-primary-stat strong { font-size:32px; line-height:1.3; font-weight:650; letter-spacing:-.03em; }
  & .preview-list:empty, & .preview-list::before, & aside::after { display:none; }
  & .toolbar { background:#121719; border-color:#2b3237; }
  & .toolbar .btn { border-color:#465159; border-radius:7px; background:#171d20; color:#d0d7dc; box-shadow:none; font-weight:600; }
  & .toolbar .btn.primary { color:#7ce9c5; background:#1a302b; border-color:#386859; }
  & .toolbar .btn:disabled { color:#89969f; cursor:not-allowed; }
  & .toolbar .check { color:var(--drop-muted); }
  & :is(button,summary,a,input):focus-visible { outline:2px solid #7ce9c5; outline-offset:4px; }
  & .empty-actions button:active:not(:disabled) { box-shadow:inset 0 2px 5px #0004; }
  & .empty-actions button:disabled { opacity:.55; cursor:wait; }
}
.drop-guide-step { min-width:0; display:grid; grid-template-rows:1fr auto; text-align:left; cursor:default; }
.drop-step-heading { display:grid; grid-template-columns:24px minmax(0,1fr); align-content:start; align-items:baseline; gap:8px; padding-bottom:20px; }
.drop-step-number { color:#8e9ba4; font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.drop-step-heading h3 { color:var(--drop-text); font-size:19px; font-weight:650; letter-spacing:-.035em; line-height:1.45; word-break:keep-all; margin:0; }
.drop-step-heading p { grid-column:2; margin:0; font-size:14px; line-height:1.65; color:#c1c9ce; word-break:keep-all; white-space:pre-line; }
.drop-guide-step kbd { display:inline-flex; justify-content:center; align-items:center; box-sizing:border-box; border:1px solid #5a656d; border-bottom-width:2px; border-radius:5px; background:#252d32; color:#f4f6f7; font-family:inherit; font-weight:600; box-shadow:0 1px 0 #080b0d; }
.drop-step-heading kbd { min-width:20px; height:21px; padding:0 4px; font-size:12px; vertical-align:1px; line-height:1; }
.drop-monitor-screen { position:relative; aspect-ratio:16/9; overflow:hidden; border:1px solid #414b52; border-radius:10px; background:#171d20; isolation:isolate; box-shadow:0 8px 20px #0002; }
.drop-monitor-screen > img { display:block; width:100%; height:100%; object-fit:contain; }
.drop-pin-label { position:absolute; left:53%; top:31%; padding:2px 5px; border:1px solid #d4c66e; border-radius:3px; color:#fff2ac; background:#20221c; font-size:10px; line-height:1.4; }
.drop-pin-label::before { content:''; position:absolute; left:-5px; bottom:-7px; height:8px; border-left:1px solid #d4c66e; transform:rotate(32deg); }
.drop-capture-overlay { position:absolute; inset:0; background:#0005; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:#edf0f2; font-size:12px; }
.drop-capture-overlay kbd,.drop-key-combination kbd { height:52px; min-width:52px; padding:0 16px; border-radius:8px; border-bottom-width:3px; font-size:22px; box-shadow:0 3px 0 #090d10,0 5px 12px #0003; }
.drop-key-combination { display:flex; align-items:center; gap:8px; }
.drop-key-combination > span { font-size:16px; color:var(--drop-muted); }
.drop-site-demo { position:absolute; inset:0; display:flex; flex-direction:column; background:#141a1e; padding:12px; gap:12px; }
.drop-demo-brand { display:flex; align-items:center; gap:7px; color:var(--drop-text); font-size:12px; font-weight:650; line-height:18px; }
.drop-demo-brand .bm-site-brand__mark { width:15px; height:15px; flex:0 0 15px; }
.drop-demo-paste { flex:1; min-height:0; border:1px dashed #4b5861; border-radius:6px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--drop-muted); font-size:12px; }
.drop-demo-paste > svg { width:22px; height:22px; }
.drop-action-icon { width:20px; height:20px; flex:0 0 20px; }
.drop-save-note { grid-column:1/-1; margin:-3px 0 1px; color:var(--drop-muted); font-size:13px; line-height:1.5; text-align:center; }
.drop-capture-help { order:6; max-width:620px; margin:4px auto 0; color:var(--drop-muted); font-size:13px; line-height:1.7; }
.drop-capture-help p { text-align:left; }
.drop-capture-help summary,.drop-detail-stats summary,.drop-preview-note summary { list-style:none; display:flex; align-items:center; gap:7px; cursor:pointer; border-radius:3px; }
:is(.drop-capture-help,.drop-detail-stats,.drop-preview-note) summary::-webkit-details-marker { display:none; }
:is(.drop-capture-help,.drop-detail-stats,.drop-preview-note) summary::before { content:''; width:14px; height:14px; flex:0 0 14px; background:currentColor; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m7 4 6 6-6 6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; transition:transform .15s; }
:is(.drop-capture-help,.drop-detail-stats,.drop-preview-note)[open] summary::before { transform:rotate(90deg); }
.drop-primary-stat small { font-size:14px; font-weight:500; color:var(--drop-muted); margin-left:6px; letter-spacing:0; }
.drop-detail-stats { margin-top:16px; border-top:1px solid #30383d; font-size:13px; color:var(--drop-muted); }
.drop-detail-stats summary { padding:12px 0; }
.drop-detail-stats > div { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:4px 0 16px; }
.drop-preview-note { margin-top:0; font-size:12px; line-height:1.65; color:var(--drop-muted); }
@media(hover:hover) and (pointer:fine) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .empty-actions button:hover:not(:disabled) { background:#252e34; border-color:#80919c; }
    & :is(#pasteClipboardBtn,#autoPasteButton):hover:not(:disabled) { background:#59e2b6; border-color:#59e2b6; }
    & .toolbar .btn:hover:not(:disabled) { border-color:#7b8c95; }
  }
  :is(.drop-capture-help,.drop-detail-stats,.drop-preview-note) summary:hover { color:#f1f4f5; }}
@media(min-width:1600px) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .layout { grid-template-columns:minmax(0,1fr) 344px; }
    & .dropzone { padding:44px 40px 32px; }
    & .empty-flow { margin-top:32px; }
    & .empty-actions { margin-top:28px; }
  }
  .drop-step-heading { min-height:112px; }
  .drop-step-heading p { font-size:15px; }}
@media(max-width:1200px) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .layout { grid-template-columns:minmax(0,1fr) 270px; }
    & .dropzone { padding:24px; }
    & .empty-flow { gap:16px; }
  }
  .drop-step-heading { grid-template-columns:1fr; }
  .drop-step-heading p { grid-column:1; }
  .drop-demo-paste > svg { display:none; }}
@media(min-width:801px) and (max-height:760px) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .dropzone { padding-top:20px; }
    & .empty-flow { margin-top:16px; }
    & .empty-title { font-size:32px; }
    & .empty-actions { margin-top:12px; }
  }}
@media(max-width:800px) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .layout,& .empty-flow { grid-template-columns:minmax(0,1fr); }
    & .dropzone { padding:28px 20px; }
    & .empty-onboarding { max-inline-size:560px!important; }
    & .empty-title { font-size:30px; }
    & .empty-lead { font-size:15px; }
    & .empty-flow { gap:28px; }
    & .layout > aside { width:min(100%,560px); margin:auto; padding:24px 20px; border:0; border-top:1px solid #30383d; }
    & .preview-image { max-width:320px; }
  }
  .drop-step-heading { grid-template-columns:24px minmax(0,1fr); padding-bottom:14px; }
  .drop-step-heading p { grid-column:2; }
  .drop-demo-paste > svg { display:block; }}
@media(prefers-reduced-motion:reduce) {
  body:is(.mode-drop,.mode-mortar,.mode-zone) .empty-actions button,:is(.drop-capture-help,.drop-detail-stats,.drop-preview-note) summary::before { transition:none; }}
@media(max-width:800px) {
  body:is(.mode-drop,.mode-mortar,.mode-zone):not(.has-analysis-image):not([data-input-mode="manual"]) {
    & .empty-onboarding { display:flex; flex-direction:column; align-items:center; }
    & .empty-title { order:0; }
    & .empty-lead { order:1; }
    & .bm-explain-entry { order:2; }
    & .empty-actions { order:3; margin-top:12px; grid-template-columns:1fr 1fr; width:100%; }
    & .empty-actions :is(#fileSelectBtn,#zoneFileSelectBtn) { order:-3; grid-column:1/-1; min-height:54px; font-size:17px; background:var(--drop-accent); border-color:var(--drop-accent); color:#062a20; }
    & .empty-actions :is(#pasteClipboardBtn,#autoPasteButton) { order:-1; grid-column:auto; min-height:48px; font-size:13px; background:var(--drop-surface); border-color:#48545d; color:var(--drop-text); }
    & .empty-actions :is(#sampleAnalyzeBtn,#autoSampleButton) { order:-2; min-height:48px; }
    & .empty-actions .drop-save-note { display:none; }
    & .bm-mobile-guide-toggle { order:4; display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px 16px; border:1px solid #48545d; border-radius:8px; background:transparent; color:var(--drop-muted); font:inherit; font-size:14px; cursor:pointer; }
    & .bm-mobile-guide-toggle::after { content:'⌄'; margin-left:10px; }
    & .bm-mobile-guide-toggle[aria-expanded="true"]::after { content:'⌃'; }
    & .empty-flow { order:5; display:none; margin-top:8px; }
    & .empty-onboarding[data-guide-expanded="true"] .empty-flow { display:grid; }
    & .drop-capture-help { width:100%; font-size:13px; }
    & .drop-step-heading p { font-size:15px; }
  }}
/* Zone owns a separate grid/canvas shell; adapt only the empty automatic state. */
body.mode-zone > .bm-site-footer { grid-area:footer; grid-column:1/-1; order:6; }
body.mode-zone:not(.has-analysis-image):not([data-input-mode="manual"]) {
  grid-template-columns:minmax(0,1fr) 312px;
  grid-template-rows:auto auto auto auto auto;
  & > .bm-site-footer { grid-area:footer; grid-column:1/-1; }
  & main { height:auto; min-height:0; overflow:visible; background:var(--drop-bg); border:0; }
  & #mapCanvas { display:none; }
  & .map-drop-panel { position:relative; inset:auto; padding:32px; min-height:0; height:auto; }
  & .map-drop-card { width:100%; max-width:none; padding:0; border:0; }
  & .map-drop-panel .drop-zone { padding:0; width:100%; border:0; background:none; }
  & .empty-onboarding { display:flex; flex-direction:column; align-items:center; }
  & > aside { align-self:stretch; height:auto; padding:28px 24px; background:#14191c; border-left:1px solid #262e33; }
  & > aside > :not(.result-preview-card), & main > .hud { display:none; }
  & .result-preview-card { display:block!important; }
  & .result-preview-card .preview-image { max-height:none; height:auto; aspect-ratio:1; }
  & .result-preview-card .preview-image img { height:100%; max-height:none; object-fit:contain; }
  & .empty-actions .empty-action { width:100%; }
  & .toolbar-note { display:none; }
  & .mode-tab { border-color:#465159; border-radius:7px; background:#171d20; color:#d0d7dc; box-shadow:none; font-weight:600; }
  & .mode-tab.active { color:#7ce9c5; background:#1a302b; border-color:#386859; }
}
body.mode-mortar:not(.has-analysis-image):not([data-input-mode="manual"]) aside .contact-card { display:none; }
.mortar-input-label { left:54%; top:52%; }
.zone-input-label { left:62%; top:29%; border-color:#bbc7cf; background:#20272c; color:#f2f5f7; }
.zone-input-label::before { border-color:#bbc7cf; }
@media(min-width:1600px) {
  body.mode-zone:not(.has-analysis-image):not([data-input-mode="manual"]) {
    grid-template-columns:minmax(0,1fr) 344px;
    & .map-drop-panel { padding:44px 40px 32px; }
  }}
@media(max-width:1200px) and (min-width:801px) {
  body.mode-zone:not(.has-analysis-image):not([data-input-mode="manual"]) {
    grid-template-columns:minmax(0,1fr) 270px;
    & .map-drop-panel { padding:24px; }
  }}
@media(min-width:801px) and (max-height:760px) {
  body.mode-zone:not(.has-analysis-image):not([data-input-mode="manual"]) .map-drop-panel { padding-top:20px; }}
@media(max-width:800px) {
  body.mode-zone:not(.has-analysis-image):not([data-input-mode="manual"]) {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"header" "toolbar" "map" "side" "content" "footer";
    grid-template-rows:repeat(6,auto);
    & .map-drop-panel { padding:28px 20px; }
    & > aside { width:min(100%,560px); box-sizing:border-box; margin:auto; padding:24px 20px; border:0; border-top:1px solid #30383d; }
  }}