﻿
    :root {
      color-scheme: light;
      --ink: #12212b;
      --muted: #667985;
      --line: rgba(18, 33, 43, .12);
      --panel: rgba(255, 255, 255, .94);
      --accent: #155e75;
      --accent-strong: #0e7490;
      --danger: #b42318;
      --shadow: 0 16px 48px rgba(18, 33, 43, .18);
      --soft-shadow: 0 8px 22px rgba(18, 33, 43, .12);
    }

    * { box-sizing: border-box; }

    html,
    body {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      color: var(--ink);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
      letter-spacing: 0;
      -webkit-font-smoothing: antialiased;
      background: #dbe8ec;
    }

    button,
    input {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
      background: transparent;
      color: inherit;
      padding: 0;
    }

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

    .screen {
      position: relative;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    #map {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      background: #c8dadd;
    }

    .topbar {
      position: fixed;
      z-index: 30;
      top: max(12px, env(safe-area-inset-top));
      left: max(12px, env(safe-area-inset-left));
      right: max(12px, env(safe-area-inset-right));
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: start;
      pointer-events: none;
    }

    .search-wrap,
    .account-trigger,
    .tool-stack,
    .bottom-panel,
    .toast,
    .sheet,
    .dialog {
      pointer-events: auto;
    }

    .search-box {
      height: 48px;
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr) 42px;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: var(--soft-shadow);
      backdrop-filter: blur(16px);
      overflow: hidden;
    }

    .search-icon,
    .search-submit::before,
    .account-trigger::before,
    .locate-btn::before,
    .telegram-link::before,
    .github-link::before,
    .close-btn::before,
    .delete-btn::before,
    .selected-marker::before,
    .my-marker::before {
      content: "";
      display: block;
      width: 18px;
      height: 18px;
      margin: auto;
      background: currentColor;
      -webkit-mask-repeat: no-repeat;
      -webkit-mask-position: center;
      -webkit-mask-size: contain;
      mask-repeat: no-repeat;
      mask-position: center;
      mask-size: contain;
    }

    .search-icon {
      color: #475569;
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 0 1 5.17 10.44l3.45 3.44a.88.88 0 1 1-1.24 1.24l-3.44-3.45A6.5 6.5 0 1 1 10.5 4Zm0 1.75a4.75 4.75 0 1 0 0 9.5a4.75 4.75 0 0 0 0-9.5Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M10.5 4a6.5 6.5 0 0 1 5.17 10.44l3.45 3.44a.88.88 0 1 1-1.24 1.24l-3.44-3.45A6.5 6.5 0 1 1 10.5 4Zm0 1.75a4.75 4.75 0 1 0 0 9.5a4.75 4.75 0 0 0 0-9.5Z'/%3E%3C/svg%3E");
    }

    .search-box input {
      width: 100%;
      min-width: 0;
      height: 100%;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--ink);
      font-size: 15px;
    }

    .search-submit {
      width: 42px;
      height: 42px;
      margin-right: 3px;
      border-radius: 7px;
      color: #fff;
      background: var(--ink);
    }

    .search-submit::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 11.25h10.64l-4.22-4.22l1.24-1.24l6.34 6.34l-6.34 6.34l-1.24-1.24l4.22-4.22H5v-1.76Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M5 11.25h10.64l-4.22-4.22l1.24-1.24l6.34 6.34l-6.34 6.34l-1.24-1.24l4.22-4.22H5v-1.76Z'/%3E%3C/svg%3E");
    }

    .account-trigger {
      width: 48px;
      height: 48px;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      background: var(--panel);
      box-shadow: var(--soft-shadow);
      backdrop-filter: blur(16px);
    }

    .account-trigger::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8Zm0 1.8c-4.24 0-7.5 2.05-7.5 4.55c0 .92.73 1.65 1.65 1.65h11.7c.92 0 1.65-.73 1.65-1.65c0-2.5-3.26-4.55-7.5-4.55Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8Zm0 1.8c-4.24 0-7.5 2.05-7.5 4.55c0 .92.73 1.65 1.65 1.65h11.7c.92 0 1.65-.73 1.65-1.65c0-2.5-3.26-4.55-7.5-4.55Z'/%3E%3C/svg%3E");
    }

    .search-results {
      margin-top: 8px;
      max-height: min(45vh, 360px);
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: var(--shadow);
      backdrop-filter: blur(16px);
    }

    .result-row {
      width: 100%;
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      padding: 12px;
      text-align: left;
      border-bottom: 1px solid rgba(15, 23, 42, .08);
    }

    .result-row:last-child { border-bottom: 0; }

    .search-attribution {
      padding: 7px 12px;
      color: var(--muted);
      text-align: right;
      font-size: 11px;
    }

    .search-attribution a:hover { text-decoration: underline; }

    .row-pin {
      width: 26px;
      height: 26px;
      border-radius: 7px;
      background: #e6f4f1;
      position: relative;
    }

    .row-pin::after {
      content: "";
      position: absolute;
      inset: 6px 8px 7px;
      background: var(--accent);
      clip-path: polygon(50% 0, 100% 42%, 65% 42%, 65% 100%, 35% 100%, 35% 42%, 0 42%);
    }

    .result-row strong,
    .favorite-row strong {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
    }

    .result-row small,
    .favorite-row small,
    .muted {
      display: block;
      min-width: 0;
      margin-top: 3px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--muted);
      font-size: 12px;
    }

    .tool-stack {
      position: fixed;
      z-index: 25;
      right: max(12px, env(safe-area-inset-right));
      top: calc(50% - 100px);
      transform: translateY(-50%);
      display: grid;
      gap: 8px;
    }

    .tool-btn {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      color: var(--ink);
      background: var(--panel);
      box-shadow: var(--soft-shadow);
      backdrop-filter: blur(16px);
    }

    .locate-btn::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2.5a.88.88 0 0 1 .88.88v1.18a7.53 7.53 0 0 1 6.56 6.56h1.18a.88.88 0 0 1 0 1.76h-1.18a7.53 7.53 0 0 1-6.56 6.56v1.18a.88.88 0 0 1-1.76 0v-1.18a7.53 7.53 0 0 1-6.56-6.56H3.38a.88.88 0 0 1 0-1.76h1.18a7.53 7.53 0 0 1 6.56-6.56V3.38A.88.88 0 0 1 12 2.5Zm0 3.75a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5Zm0 3a2.75 2.75 0 1 1 0 5.5a2.75 2.75 0 0 1 0-5.5Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2.5a.88.88 0 0 1 .88.88v1.18a7.53 7.53 0 0 1 6.56 6.56h1.18a.88.88 0 0 1 0 1.76h-1.18a7.53 7.53 0 0 1-6.56 6.56v1.18a.88.88 0 0 1-1.76 0v-1.18a7.53 7.53 0 0 1-6.56-6.56H3.38a.88.88 0 0 1 0-1.76h1.18a7.53 7.53 0 0 1 6.56-6.56V3.38A.88.88 0 0 1 12 2.5Zm0 3.75a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5Zm0 3a2.75 2.75 0 1 1 0 5.5a2.75 2.75 0 0 1 0-5.5Z'/%3E%3C/svg%3E");
    }

    .telegram-link {
      color: #168acd;
    }

    .telegram-link::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M21.7 3.3a1.2 1.2 0 0 0-1.24-.2L3.1 9.8c-1.18.46-1.16 1.13-.2 1.43l4.45 1.39l1.72 5.3c.22.62.12.87.75.87c.49 0 .7-.22.98-.49l2.14-2.08l4.46 3.3c.82.45 1.4.22 1.61-.76L21.92 5c.3-1.2-.46-1.74-.22-1.7ZM8.05 12.3l9.83-6.2c.49-.3.93-.14.57.18l-8.12 7.33l-.32 3.43l-1.96-4.74Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M21.7 3.3a1.2 1.2 0 0 0-1.24-.2L3.1 9.8c-1.18.46-1.16 1.13-.2 1.43l4.45 1.39l1.72 5.3c.22.62.12.87.75.87c.49 0 .7-.22.98-.49l2.14-2.08l4.46 3.3c.82.45 1.4.22 1.61-.76L21.92 5c.3-1.2-.46-1.74-.22-1.7ZM8.05 12.3l9.83-6.2c.49-.3.93-.14.57.18l-8.12 7.33l-.32 3.43l-1.96-4.74Z'/%3E%3C/svg%3E");
    }

    .github-link::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2a10 10 0 0 0-3.16 19.49c.5.09.68-.22.68-.48v-1.87c-2.78.6-3.37-1.18-3.37-1.18c-.45-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.61.07-.61c1 .07 1.53 1.03 1.53 1.03c.9 1.53 2.35 1.09 2.92.83c.09-.65.35-1.09.64-1.34c-2.22-.25-4.55-1.11-4.55-4.94c0-1.09.39-1.98 1.03-2.68c-.1-.25-.45-1.27.1-2.64c0 0 .84-.27 2.75 1.02A9.58 9.58 0 0 1 12 6.83c.85 0 1.71.11 2.51.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.37.2 2.39.1 2.64c.64.7 1.03 1.59 1.03 2.68c0 3.84-2.34 4.68-4.57 4.93c.36.31.68.92.68 1.85v2.77c0 .27.18.58.69.48A10 10 0 0 0 12 2Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 2a10 10 0 0 0-3.16 19.49c.5.09.68-.22.68-.48v-1.87c-2.78.6-3.37-1.18-3.37-1.18c-.45-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.61.07-.61c1 .07 1.53 1.03 1.53 1.03c.9 1.53 2.35 1.09 2.92.83c.09-.65.35-1.09.64-1.34c-2.22-.25-4.55-1.11-4.55-4.94c0-1.09.39-1.98 1.03-2.68c-.1-.25-.45-1.27.1-2.64c0 0 .84-.27 2.75 1.02A9.58 9.58 0 0 1 12 6.83c.85 0 1.71.11 2.51.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.37.2 2.39.1 2.64c.64.7 1.03 1.59 1.03 2.68c0 3.84-2.34 4.68-4.57 4.93c.36.31.68.92.68 1.85v2.77c0 .27.18.58.69.48A10 10 0 0 0 12 2Z'/%3E%3C/svg%3E");
    }

    .bottom-panel {
      position: fixed;
      z-index: 26;
      left: max(12px, env(safe-area-inset-left));
      right: max(12px, env(safe-area-inset-right));
      bottom: max(12px, env(safe-area-inset-bottom));
      display: grid;
      gap: 10px;
    }

    .selection-strip {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: var(--soft-shadow);
      backdrop-filter: blur(16px);
    }

    .selection-strip strong {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
    }

    .selection-actions {
      display: flex;
      gap: 8px;
    }

    .lock-actions {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
    }

    .ghost-action,
    .primary-action,
    .danger-action {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      padding: 0 14px;
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
    }

    .ghost-action {
      border: 1px solid var(--line);
      background: #fff;
      color: var(--ink);
    }

    .primary-action {
      background: #12212b;
      color: #ffffff;
      box-shadow: 0 10px 22px rgba(15, 118, 110, .24);
    }

    .danger-action {
      background: #fff1f0;
      color: var(--danger);
    }

    #lockBtn,
    #advancedLockBtn {
      width: 100%;
      min-height: 52px;
      font-size: 16px;
    }

    #advancedBtn {
      min-width: 108px;
      min-height: 52px;
    }

    .selected-marker {
      width: 34px;
      height: 34px;
      border-radius: 18px 18px 18px 4px;
      transform: rotate(-45deg);
      color: #fff;
      background: var(--accent-strong);
      border: 3px solid #fff;
      box-shadow: 0 10px 24px rgba(15, 23, 42, .28);
      display: grid;
      place-items: center;
    }

    .selected-marker::before {
      width: 12px;
      height: 12px;
      transform: rotate(45deg);
      border-radius: 999px;
      background: #fff;
      -webkit-mask-image: none;
      mask-image: none;
    }

    .my-marker {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      background: rgba(37, 99, 235, .22);
      border: 1px solid rgba(37, 99, 235, .28);
      display: grid;
      place-items: center;
    }

    .my-marker::before {
      width: 12px;
      height: 12px;
      border-radius: 999px;
      background: #2563eb;
      box-shadow: 0 0 0 4px #fff;
      -webkit-mask-image: none;
      mask-image: none;
    }

    .toast {
      position: fixed;
      z-index: 80;
      left: 50%;
      top: calc(max(16px, env(safe-area-inset-top)) + 58px);
      max-width: min(520px, calc(100vw - 32px));
      transform: translateX(-50%);
      border-radius: 8px;
      padding: 10px 14px;
      background: rgba(17, 24, 39, .92);
      color: #fff;
      box-shadow: var(--soft-shadow);
      font-size: 14px;
      text-align: center;
    }

    .toast.success { background: #3d4954; }
    .toast.error { background: rgba(180, 35, 24, .96); }

    .hidden { display: none !important; }

    .sheet-mask,
    .dialog-mask {
      position: fixed;
      z-index: 70;
      inset: 0;
      background: rgba(15, 23, 42, .22);
      backdrop-filter: blur(2px);
    }

    .sheet {
      position: fixed;
      z-index: 75;
      right: 0;
      top: 0;
      bottom: 0;
      width: 50vw;
      min-width: 360px;
      max-width: 520px;
      height: 100dvh;
      border-left: 1px solid var(--line);
      border-top: 0;
      border-right: 0;
      border-bottom: 0;
      border-radius: 12px 0 0 12px;
      background: #fff;
      box-shadow: var(--shadow);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
      transform: translateX(104%);
      opacity: .98;
      transition: transform .26s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
      will-change: transform;
    }

    .sheet.is-open {
      transform: translateX(0);
      opacity: 1;
    }

    .advanced-sheet {
      grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .sheet-footer {
      padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
      border-top: 1px solid var(--line);
      background: #fff;
    }

    .sheet-head,
    .dialog-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 40px;
      gap: 8px;
      align-items: center;
      padding: calc(14px + env(safe-area-inset-top)) 14px 14px;
      border-bottom: 1px solid var(--line);
    }

    .sheet-head strong,
    .dialog-head strong {
      display: block;
      font-size: 17px;
    }

    .close-btn {
      width: 40px;
      height: 40px;
      border-radius: 8px;
      background: #f1f5f9;
      color: #334155;
    }

    .close-btn::before {
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m6.4 5.15l5.6 5.6l5.6-5.6l1.25 1.25l-5.6 5.6l5.6 5.6l-1.25 1.25l-5.6-5.6l-5.6 5.6l-1.25-1.25l5.6-5.6l-5.6-5.6l1.25-1.25Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='m6.4 5.15l5.6 5.6l5.6-5.6l1.25 1.25l-5.6 5.6l5.6 5.6l-1.25 1.25l-5.6-5.6l-5.6 5.6l-1.25-1.25l5.6-5.6l-5.6-5.6l1.25-1.25Z'/%3E%3C/svg%3E");
    }

    .sheet-body {
      overflow: auto;
      padding: 14px;
    }

    .stack {

    }

    .section {
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
      background: #fff;
    }

    .section-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      margin-bottom: 10px;
    }

    .section h2,
    .dialog h2 {
      margin: 0;
      font-size: 15px;
    }

    .readonly-grid,
    .config-grid {
      display: grid;
      gap: 10px;
    }

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

    .readonly-box {
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fafc;
    }

    .readonly-box strong,
    .config-field label {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .readonly-box span {
      display: block;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
      font-weight: 800;
    }

    .config-field {
      display: grid;
      gap: 4px;
    }

    .hint-link {
      width: fit-content;
      color: var(--accent-strong);
      font-size: 1rem;
      font-weight: 800;
      text-decoration: underline;
    }

    .tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      padding: 4px;
      border-radius: 8px;
      background: #f1f5f9;
      margin-bottom: 12px;
    }

    .tab-btn {
      height: 36px;
      border-radius: 7px;
      font-size: 14px;
      font-weight: 700;
      color: #64748b;
    }

    .tab-btn.active {
      background: #fff;
      color: var(--ink);
      box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
    }

    .form {
      display: none;
      gap: 10px;
    }

    .form.active { display: grid; }

    .field {
      width: 100%;
      height: 46px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0 12px;
      outline: 0;
      background: #fff;
      color: var(--ink);
      font-size: 15px;
    }

    .field:focus {
      border-color: rgba(15, 118, 110, .52);
      box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
    }

    .account-line {
      display: grid;
      gap: 6px;
      margin-bottom: 12px;
    }

    .download-link {
      width: 100%;
    }

    .favorite-list {
      display: grid;
      gap: 8px;
    }

    .favorite-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      text-align: left;
    }

    .delete-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: #fff1f0;
      color: var(--danger);
    }

    .delete-btn::before {
      width: 16px;
      height: 16px;
      -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 4h8l1 2h4v1.75H3V6h4l1-2Zm1 6h2v8H9v-8Zm4 0h2v8h-2v-8ZM6.5 9h11l-.75 11H7.25L6.5 9Z'/%3E%3C/svg%3E");
      mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M8 4h8l1 2h4v1.75H3V6h4l1-2Zm1 6h2v8H9v-8Zm4 0h2v8h-2v-8ZM6.5 9h11l-.75 11H7.25L6.5 9Z'/%3E%3C/svg%3E");
    }

    .empty {
      padding: 18px 12px;
      border: 1px dashed rgba(100, 116, 139, .35);
      border-radius: 8px;
      color: var(--muted);
      text-align: center;
      font-size: 13px;
    }

    .dialog {
      position: fixed;
      z-index: 76;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: min(520px, calc(100vw - 24px));
      max-height: min(82vh, 680px);
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
      box-shadow: var(--shadow);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
    }

    .dialog-body {
      min-height: 0;
      overflow: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      padding: 14px;
    }

    #guideDialog {
      left: 50%;
      right: auto;
      top: 50%;
      bottom: auto;
      width: 860px;
      max-width: calc(100vw - 24px);
      height: calc(100vh - 24px);
      max-height: 900px;
      transform: translate(-50%, -50%);
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden;
    }

    #guideDialog .dialog-head {
      position: relative;
      z-index: 1;
      background: #fff;
    }

    #guideDialog .dialog-body {
      min-height: 0;
      overflow-x: hidden;
      overflow-y: scroll;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      touch-action: pan-y;
    }

    .amap-toolbar span {
      width: 50px !important;
      height: 50px !important;
      line-height: 50px !important;
    }

    .guide-body {
      display: grid;
      gap: 12px;
    }

    .guide-hero {
      display: grid;
      gap: 8px;
      padding: 14px;
      border: 1px solid rgba(37, 99, 235, .16);
      border-radius: 8px;
      background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
    }

    .guide-hero h2 {
      margin: 0;
      color: #0f172a;
      font-size: 24px;
      line-height: 1.25;
    }

    .guide-hero h2 span {
      color: #1261d8;
    }

    .guide-hero p {
      margin: 0;
      color: #475569;
      font-size: 14px;
      line-height: 1.55;
    }

    .guide-alert,
    .guide-tip {
      border-radius: 8px;
      padding: 10px 12px;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.45;
    }

    .guide-alert {
      color: #c2410c;
      background: #fff7ed;
      border: 1px solid rgba(249, 115, 22, .22);
    }

    .guide-tip {
      color: #b42318;
      background: #fff1f0;
      border: 1px solid rgba(180, 35, 24, .18);
    }

    .guide-section {
      display: grid;
      gap: 10px;
    }

    .guide-title {
      width: fit-content;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      margin: 0;
      border-radius: 8px;
      padding: 0 14px;
      color: #fff;
      font-size: 17px;
      font-weight: 900;
      line-height: 1;
    }

    .guide-title.blue { background: #1261d8; }
    .guide-title.green { background: #07883f; }

    .guide-grid {
      display: grid;
      gap: 10px;
      counter-reset: step;
    }

    .vpn-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .device-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .step {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fafc;
    }

    .step::before {
      counter-increment: step;
      content: counter(step);
      width: 30px;
      height: 30px;
      display: grid;
      place-items: center;
      border-radius: 8px;
      background: var(--ink);
      color: #fff;
      font-size: 13px;
      font-weight: 800;
    }

    .step strong {
      display: block;
      margin-bottom: 4px;
      font-size: 14px;
    }

    .step p {
      margin: 0;
      color: #475569;
      font-size: 13px;
      line-height: 1.55;
    }

    .guide-card {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fff;
    }

    .guide-card.green {
      background: #f3fbf6;
      border-color: rgba(8, 136, 63, .18);
    }

    .guide-card.blue {
      background: #f5f9ff;
      border-color: rgba(18, 97, 216, .18);
    }

    .guide-card h3 {
      margin: 0;
      color: #0f172a;
      font-size: 15px;
    }

    .mini-steps {
      display: grid;
      gap: 8px;
      counter-reset: mini-step;
    }

    .mini-step {
      display: grid;
      grid-template-columns: 28px minmax(0, 1fr);
      gap: 8px;
      align-items: start;
    }

    .mini-step::before {
      counter-increment: mini-step;
      content: counter(mini-step);
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      background: #1261d8;
      color: #fff;
      font-size: 13px;
      font-weight: 900;
    }

    .guide-card.green .mini-step::before {
      background: #07883f;
    }

    .mini-step strong {
      display: block;
      margin-bottom: 3px;
      color: #0f172a;
      font-size: 14px;
    }

    .mini-step p {
      margin: 0;
      color: #475569;
      font-size: 13px;
      line-height: 1.55;
    }

    .guide-after {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 12px;
      align-items: center;
      padding: 12px;
      border-radius: 8px;
      background: #eff6ff;
      text-align: center;
      color: #0f172a;
      font-size: 14px;
      font-weight: 800;
    }

    .guide-after strong {
      display: block;
      color: #1261d8;
      font-size: 13px;
    }

    .guide-after .plus {
      color: #1261d8;
      font-size: 24px;
      font-weight: 900;
    }

    .guide-after > div:last-child {
      grid-column: 1 / -1;
      color: #0f172a;
      font-size: 13px;
    }

    .guide-footer {
      display: grid;
      gap: 8px;
      justify-items: center;
      padding: 14px;
      border: 1px solid rgba(18, 97, 216, .16);
      border-radius: 8px;
      background: #f8fbff;
      text-align: center;
    }

    .guide-footer span {
      color: #475569;
      font-size: 13px;
      font-weight: 700;
    }

    .guide-footer a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      border-radius: 8px;
      padding: 0 18px;
      color: #fff;
      background: #1261d8;
      font-size: 16px;
      font-weight: 900;
    }

    @media (max-width: 640px) {
      .topbar {
        grid-template-columns: minmax(0, 1fr) 48px;
      }

      .selection-strip {
        grid-template-columns: 1fr;
      }

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

      #guideDialog {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        top: calc(var(--guide-viewport-top, 0px) + max(8px, env(safe-area-inset-top)));
        bottom: auto;
        width: auto;
        max-width: none;
        height: calc(
          var(--guide-viewport-height, 100vh)
          - max(8px, env(safe-area-inset-top))
          - max(8px, env(safe-area-inset-bottom))
        );
        max-height: none;
        transform: none;
      }

      .guide-hero h2 {
        font-size: 20px;
      }

      .vpn-grid,
      .device-grid,
      .guide-after {
        grid-template-columns: 1fr;
      }

      .guide-after .plus {
        line-height: 1;
      }

      .sheet {
        right: 0;
        top: 0;
        bottom: 0;
        width: min(390px, calc(100vw - 12px));
        min-width: 0;
        max-width: none;
        height: 100dvh;
        max-height: none;
      }

      #accountSheet {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        top: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        width: auto;
        height: auto;
        max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)) - 8px);
        border: 1px solid var(--line);
        border-radius: 12px;
        grid-template-rows: auto minmax(0, 1fr);
        transform: translateY(104%);
      }

      #accountSheet.is-open {
        transform: translateY(0);
      }

      #accountSheet .sheet-head {
        grid-template-columns: minmax(0, 1fr) 36px;
        padding: 10px 10px 8px;
      }

      #accountSheet .sheet-head strong {
        font-size: 16px;
      }

      #accountSheet .close-btn {
        width: 36px;
        height: 36px;
      }

      #accountSheet .sheet-body {
        padding: 8px 10px 10px;
      }

      #accountSheet .section {
        margin-top: 8px;
        padding: 10px;
      }

      #accountSheet .section:first-child {
        margin-top: 0;
      }

      #accountSheet .section-head {
        margin-bottom: 8px;
      }

      #accountSheet .account-line {
        gap: 4px;
        margin-bottom: 8px;
      }

      #accountSheet .tabs {
        margin-bottom: 8px;
      }

      #accountSheet .form {
        gap: 8px;
      }

      #accountSheet .field {
        height: 42px;
      }

      #accountSheet .ghost-action,
      #accountSheet .primary-action,
      #accountSheet .danger-action {
        min-height: 40px;
      }
    }
  
