:root {
      --bg-deep: #080b14;
      --bg-panel: #101626;
      --bg-card: #161f35;
      --bg-elevated: #1f2b47;
      --border: #29385c;
      --neon-pink: #ff2e93;
      --neon-pink-soft: rgba(255, 46, 147, 0.16);
      --neon-cyan: #00f0ff;
      --neon-cyan-soft: rgba(0, 240, 255, 0.14);
      --neon-amber: #ffb800;
      --neon-green: #10e896;
      --neon-purple: #c084fc;
      --neon-lime: #a3e635;
      --text-main: #f8fafc;
      --text-sub: #94a3b8;
      --text-muted: #64748b;
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    input, textarea { user-select: text; }

    html {
      min-height: 100%;
      background: var(--bg-deep);
      overflow-x: clip;
      scroll-behavior: smooth;
    }

    body {
      min-height: 100%;
      background: var(--bg-deep);
      color: var(--text-main);
      font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
      overflow-x: clip;
      font-size: 14px;
    }

    /* Unified smooth native scrolling across Web & Installed App */

    button, input, select, textarea {
      font-family: inherit;
      color: inherit;
    }

    .app-shell {
      display: flex;
      flex-direction: column;
      min-height: 100dvh;
      width: 100%;
      max-width: 100%;
      margin: 0 auto;
      background: var(--bg-deep);
      padding-top: var(--safe-top);
      padding-bottom: calc(74px + var(--safe-bottom));
    }



    .top-header {
      background: linear-gradient(180deg, #11182c 0%, #090d18 100%);
      border-bottom: 1px solid var(--border);
      padding: 9px 12px 9px;
      flex-shrink: 0;
      position: sticky;
      top: 0;
      z-index: 45;
    }

    .header-left-stack {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
      min-width: 0;
    }

    .header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-width: 0;
      overflow: hidden;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
      min-width: 0;
      overflow: hidden;
    }

    .brand-icon {
      width: 32px;
      height: 32px;
      border-radius: 9px;
      background: linear-gradient(135deg, var(--neon-pink) 0%, #7928ca 55%, var(--neon-cyan) 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 13px;
      letter-spacing: -0.5px;
      color: #fff;
      box-shadow: 0 0 12px rgba(255, 46, 147, 0.38);
      flex-shrink: 0;
    }

    .brand-text-col {
      flex: 1;
      min-width: 0;
      overflow: hidden;
    }

    .brand-title {
      font-size: 14px;
      font-weight: 900;
      letter-spacing: -0.3px;
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      overflow: hidden;
    }

    .brand-name-text {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }

    .brand-badges-inline {
      display: none;
      align-items: center;
      gap: 4px;
      flex-shrink: 0;
    }

    .mobile-status-strip {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }

    .brand-sub {
      font-size: 10.5px;
      color: var(--text-sub);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-top: 1px;
    }

    .header-btns {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    .header-btns .pill-btn {
      padding: 5px 8px;
      font-size: 11px;
    }

    .pill-btn {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 9px;
      font-size: 11.5px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
    }

    .pill-btn.active-mode {
      background: rgba(163, 230, 53, 0.18);
      border-color: var(--neon-lime);
      color: var(--neon-lime);
    }

    .progress-wrap {
      margin-top: 8px;
      background: rgba(22, 31, 53, 0.85);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 7px 10px;
    }

    .progress-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 11.5px;
      font-weight: 800;
      margin-bottom: 5px;
    }

    .progress-track {
      height: 7px;
      background: #070a12;
      border-radius: 999px;
      overflow: hidden;
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
      border-radius: 999px;
      transition: width 0.25s ease;
    }

    .workspace {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }



    .right-panes-col {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }



    .tab-pane {
      display: none;
      flex: 1;
      min-height: 0;
      padding: 11px 12px 24px;
      gap: 9px;
      flex-direction: column;
    }



    .tab-pane.active { display: flex; }

    .card {
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 12px;
    }

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

    .card-title {
      font-size: 13.5px;
      font-weight: 800;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chip-scroll {
      display: flex;
      flex-wrap: wrap;
      width: 100%;
      min-width: 0;
      gap: 5px;
      overflow: visible;
      padding-bottom: 2px;
      flex-shrink: 0;
    }

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

    .chip {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-sub);
      padding: 6px 10px;
      border-radius: 9px;
      font-size: 11.5px;
      font-weight: 800;
      white-space: nowrap;
      cursor: pointer;
      flex-shrink: 0;
    }

    .chip.active {
      background: var(--neon-pink-soft);
      color: #ff7ab8;
      border-color: var(--neon-pink);
    }

    .chip.reg-chip.active {
      background: var(--neon-cyan-soft);
      color: var(--neon-cyan);
      border-color: var(--neon-cyan);
    }

    .badge {
      font-size: 10px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 6px;
      display: inline-flex;
      align-items: center;
      gap: 3px;
      white-space: nowrap;
    }

    .badge-pink { background: var(--neon-pink-soft); color: #ff7ab8; border: 1px solid rgba(255, 46, 147, 0.4); }
    .badge-cyan { background: var(--neon-cyan-soft); color: var(--neon-cyan); border: 1px solid rgba(0, 240, 255, 0.35); }
    .badge-amber { background: rgba(255, 184, 0, 0.15); color: var(--neon-amber); border: 1px solid rgba(255, 184, 0, 0.4); }
    .badge-purple { background: rgba(192, 132, 252, 0.15); color: var(--neon-purple); border: 1px solid rgba(192, 132, 252, 0.4); }
    .badge-lime { background: rgba(163, 230, 53, 0.16); color: var(--neon-lime); border: 1px solid rgba(163, 230, 53, 0.45); }
    .badge-orange { background: rgba(249, 115, 22, 0.18); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.48); }
    .badge-teal { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.48); }
    .badge-crimson { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.52); }
    .badge-indigo { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.52); }

    /* v13 OP.GG-Style Map Quick Action Strip & Fullscreen / Focus Modes */
    .opgg-map-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 5px;
      flex-wrap: wrap;
    }

    .opgg-tool-group {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }

    .opgg-mini-btn {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-sub);
      border-radius: 8px;
      padding: 5px 8px;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      white-space: nowrap;
      transition: all 0.14s ease;
    }

    .opgg-mini-btn:hover {
      border-color: var(--neon-cyan);
      color: var(--text-main);
    }

    .opgg-mini-btn.active {
      background: rgba(0, 240, 255, 0.16);
      border-color: var(--neon-cyan);
      color: var(--neon-cyan);
    }

    .map-coord-badge {
      position: absolute;
      right: 46px;
      bottom: 9px;
      background: rgba(8, 11, 20, 0.88);
      border: 1px solid rgba(148, 163, 184, 0.38);
      border-radius: 6px;
      padding: 3px 8px;
      font-size: 10px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      color: #e2e8f0;
      pointer-events: none;
      z-index: 4;
    }

    @media (max-width: 540px) {
      .map-frame .map-top-right {
        top: 37px !important;
        right: 8px !important;
      }
      .map-frame .map-top-right .pill-btn {
        padding: 4px 7px;
        font-size: 10.5px;
      }
      .map-frame .map-hud-tag {
        top: 38px !important;
        max-width: calc(100% - 148px) !important;
      }
      .map-frame .map-coord-badge {
        right: auto;
        left: 9px;
        bottom: 33px;
      }
      .map-frame .map-cc-attrib {
        bottom: 56px;
      }
    }

    .map-cc-attrib {
      position: absolute;
      left: 8px;
      bottom: 33px;
      background: rgba(8, 11, 20, 0.78);
      border: 1px solid rgba(148, 163, 184, 0.28);
      border-radius: 5px;
      padding: 2px 6px;
      font-size: 9px;
      color: #cbd5e1;
      pointer-events: none;
      z-index: 4;
      display: none;
    }

    .map-cc-attrib.show {
      display: block;
    }

    .map-frame.focus-mode .map-hud-tag,
    .map-frame.focus-mode .map-legend {
      display: none !important;
    }

    /* Fullscreen Map Mode (Shortcut F) */
    body.is-fullscreen-map {
      overflow: hidden !important;
    }

    body.is-fullscreen-map #mapStageBlock {
      position: fixed !important;
      inset: 0 !important;
      z-index: 190 !important;
      background: #060913 !important;
      padding: calc(10px + var(--safe-top)) 12px calc(10px + var(--safe-bottom)) !important;
      display: flex !important;
      flex-direction: column !important;
      gap: 7px !important;
    }

    body.is-fullscreen-map #mapStageBlock .map-frame {
      flex: 1 1 auto !important;
      height: auto !important;
      min-height: 0 !important;
    }

    body.is-fullscreen-map #mapStageBlock #activeObjectivesCard {
      display: none !important;
    }

    .map-frame {
      position: relative;
      width: 100%;
      height: 392px;
      background: #060913;
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      touch-action: none;
      flex-shrink: 0;
      transition: height 0.22s ease;
    }

    .map-frame.expanded-map {
      height: 68dvh !important;
      min-height: 440px !important;
    }

    .map-theme-bar {
      position: absolute;
      left: 8px;
      top: 8px;
      z-index: 5;
      display: inline-flex;
      background: rgba(8, 11, 20, 0.9);
      backdrop-filter: blur(6px);
      border: 1px solid rgba(148, 163, 184, 0.35);
      border-radius: 8px;
      padding: 2px;
      gap: 2px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    }

    .map-theme-btn {
      background: transparent;
      border: none;
      color: #cbd5e1;
      font-size: 10.5px;
      font-weight: 800;
      padding: 4px 7px;
      border-radius: 6px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.14s ease;
    }

    .map-theme-btn.active {
      background: linear-gradient(135deg, var(--neon-cyan), #0284c7);
      color: #04101f;
      font-weight: 900;
    }

    .map-frame.adding-pin {
      border-color: var(--neon-lime);
      box-shadow: 0 0 16px rgba(163, 230, 53, 0.28);
    }

    #radarMapCanvas {
      width: 100%;
      height: 100%;
      display: block;
      cursor: grab;
    }

    .map-controls {
      position: absolute;
      right: 9px;
      bottom: 9px;
      display: flex;
      flex-direction: column;
      gap: 5px;
      z-index: 4;
    }

    .map-ctrl-btn {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: rgba(16, 22, 38, 0.92);
      border: 1px solid var(--border);
      font-size: 15px;
      font-weight: 900;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .map-top-right {
      position: absolute;
      right: 9px;
      top: 9px;
      z-index: 4;
    }

    .map-hud-tag {
      position: absolute;
      left: 8px;
      top: 38px;
      max-width: calc(100% - 140px);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      background: rgba(8, 11, 20, 0.84);
      border: 1px solid rgba(0, 240, 255, 0.35);
      color: var(--neon-cyan);
      font-size: 10px;
      font-weight: 800;
      padding: 3px 7px;
      border-radius: 6px;
      pointer-events: none;
      z-index: 3;
    }

    .map-legend {
      position: absolute;
      left: 9px;
      bottom: 8px;
      display: flex;
      gap: 6px;
      background: rgba(8, 11, 20, 0.82);
      border: 1px solid rgba(41, 56, 92, 0.7);
      border-radius: 6px;
      padding: 3px 7px;
      font-size: 9.5px;
      color: var(--text-sub);
      pointer-events: none;
    }

    .leg-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      display: inline-block;
      margin-right: 3px;
    }

    .pin-detail-bar {
      background: var(--bg-card);
      border: 1px solid var(--neon-cyan);
      border-radius: 11px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-shrink: 0;
    }

    .check-action-btn {
      background: linear-gradient(135deg, var(--neon-pink), #b81d77);
      border: none;
      color: #fff;
      padding: 8px 11px;
      border-radius: 9px;
      font-size: 12px;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .check-action-btn.done {
      background: rgba(16, 232, 150, 0.16);
      color: var(--neon-green);
      border: 1px solid var(--neon-green);
    }

    .search-row {
      display: flex;
      gap: 6px;
      margin-bottom: 9px;
    }

    .search-input {
      flex: 1;
      background: #080b14;
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 8px 11px;
      font-size: 12.5px;
      font-weight: 700;
      outline: none;
    }

    .search-input:focus { border-color: var(--neon-cyan); }

    .pin-list {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .pin-row {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 9px 11px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: pointer;
    }

    .pin-row.selected-row {
      border-color: var(--neon-cyan);
      background: rgba(0, 240, 255, 0.07);
    }

    .pin-row.found { opacity: 0.52; }

    .region-prog-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      margin-bottom: 9px;
    }

    .reg-stat-cell {
      background: #0b1020;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 7px;
      cursor: pointer;
    }

    .reg-stat-cell.active {
      border-color: var(--neon-cyan);
      background: rgba(0, 240, 255, 0.1);
    }

    .platform-switch {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      background: #090d18;
      padding: 4px;
      border-radius: 10px;
      border: 1px solid var(--border);
      flex-shrink: 0;
    }

    .plat-btn {
      padding: 8px;
      border: none;
      border-radius: 7px;
      background: transparent;
      color: var(--text-sub);
      font-weight: 900;
      font-size: 12.5px;
      cursor: pointer;
    }

    .plat-btn.active.ps { background: #1d4ed8; color: #fff; }
    .plat-btn.active.xb { background: #15803d; color: #fff; }

    .cheat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 10px 12px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .pad-seq {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
    }

    .pad-key {
      min-width: 28px;
      height: 26px;
      padding: 0 7px;
      border-radius: 7px;
      background: #090d18;
      border: 1px solid #3b4c7a;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11.5px;
      font-weight: 900;
      box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.08);
    }

    .pad-key.tri, .pad-key.yb { color: #facc15; border-color: rgba(250, 204, 21, 0.5); }
    .pad-key.cir, .pad-key.bb { color: #fb7185; border-color: rgba(251, 113, 133, 0.5); }
    .pad-key.crs, .pad-key.ab { color: #38bdf8; border-color: rgba(56, 189, 248, 0.5); }
    .pad-key.sqr, .pad-key.xb { color: #e879f9; border-color: rgba(232, 121, 249, 0.5); }

    .timer-grid {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .timer-item {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .timer-clock {
      font-size: 17px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      color: var(--neon-cyan);
    }

    .timer-clock.ready { color: var(--neon-green); }

    .spec-item {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 11px 12px;
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .stat-line {
      display: grid;
      grid-template-columns: 68px 1fr 34px;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: var(--text-sub);
    }

    .stat-bar {
      height: 6px;
      background: #080b14;
      border-radius: 999px;
      overflow: hidden;
    }

    .stat-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
      border-radius: 999px;
    }

    #citizenCanvas {
      width: 100%;
      height: auto;
      border-radius: 12px;
      border: 1px solid var(--border);
      display: block;
    }

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

    .input-box {
      background: #080b14;
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 9px 10px;
      font-size: 13px;
      font-weight: 700;
      width: 100%;
      outline: none;
    }

    .input-box:focus { border-color: var(--neon-cyan); }

    .btn-row {
      display: flex;
      gap: 8px;
      margin-top: 10px;
    }

    .btn-primary {
      flex: 1;
      background: linear-gradient(135deg, var(--neon-pink), #9333ea);
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 11px;
      font-size: 13px;
      font-weight: 900;
      cursor: pointer;
    }

    .btn-secondary {
      flex: 1;
      background: var(--bg-elevated);
      color: var(--text-main);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 11px;
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
    }

    .bottom-nav {
      display: grid;
      grid-template-columns: repeat(7, 1fr) !important;
      background: rgba(10, 15, 29, 0.98);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--border);
      height: calc(62px + var(--safe-bottom));
      padding-bottom: var(--safe-bottom);
      flex-shrink: 0;
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      transform: none !important;
      width: 100% !important;
      max-width: none !important;
      z-index: 90 !important;
    }

    .nav-btn {
      background: none;
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      color: var(--text-muted);
      font-size: 10.5px;
      font-weight: 800;
      cursor: pointer;
    }

    .nav-btn.active { color: var(--neon-cyan); }
    .nav-ico { font-size: 17px; line-height: 1; }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 7, 15, 0.82);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      z-index: 100;
    }

    .modal-backdrop.open { display: flex; }

    .modal-box {
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-radius: 15px;
      width: 100%;
      max-width: 400px;
      padding: 16px;
      max-height: 85dvh;
      overflow-y: auto;
    }

    .disclaimer-foot {
      font-size: 10.5px;
      color: var(--text-muted);
      text-align: center;
      line-height: 1.45;
      padding: 6px 4px 2px;
    }

    .toast {
      position: fixed;
      bottom: calc(72px + var(--safe-bottom));
      left: 50%;
      transform: translateX(-50%);
      background: #1e293b;
      border: 1px solid var(--neon-cyan);
      color: #fff;
      padding: 8px 14px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      z-index: 250;
      display: none;
      white-space: nowrap;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
    }

    .map-top-right {
      position: absolute;
      right: 9px;
      top: 9px;
      z-index: 4;
      display: flex;
      gap: 5px;
      align-items: center;
    }

    .pill-btn.skin-active {
      background: rgba(0, 240, 255, 0.18);
      border-color: var(--neon-cyan);
      color: var(--neon-cyan);
    }

    .slider-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 10px 0;
      background: #090d18;
      border: 1px solid var(--border);
      border-radius: 11px;
      padding: 10px 12px;
    }

    .slider-row {
      display: grid;
      grid-template-columns: 82px 1fr 44px;
      align-items: center;
      gap: 8px;
      font-size: 11.5px;
      color: var(--text-sub);
      font-weight: 700;
    }

    .slider-row input[type="range"] {
      width: 100%;
      accent-color: var(--neon-cyan);
      cursor: pointer;
    }

    .mode-seg {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
      background: #080b14;
      padding: 4px;
      border-radius: 10px;
      border: 1px solid var(--border);
      margin-bottom: 10px;
    }

    .mode-seg-btn {
      background: transparent;
      border: none;
      border-radius: 7px;
      padding: 7px 4px;
      font-size: 11px;
      font-weight: 800;
      color: var(--text-sub);
      cursor: pointer;
    }

    .mode-seg-btn.active {
      background: var(--neon-cyan-soft);
      color: var(--neon-cyan);
      border: 1px solid rgba(0, 240, 255, 0.45);
    }


    .lang-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 7px;
      margin: 10px 0 6px;
    }

    .lang-option-btn {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 9px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      cursor: pointer;
      text-align: left;
    }

    .lang-option-btn.active {
      background: var(--neon-cyan-soft);
      border-color: var(--neon-cyan);
      color: var(--neon-cyan);
    }

    .pad-seq, .map-frame, .platform-switch {
      direction: ltr;
    }


    /* =====================================================================
       v7 WEB PORTAL (PC WIDE SPLIT-SCREEN) & COMMUNITY BOARD STYLES
    ===================================================================== */
    .desktop-nav {
      display: none;
      gap: 6px;
      margin-top: 9px;
      flex-wrap: wrap;
    }

    .d-nav-btn {
      background: var(--bg-card);
      border: 1px solid var(--border);
      color: var(--text-sub);
      padding: 7px 13px;
      border-radius: 9px;
      font-size: 12.5px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: all 0.16s ease;
    }

    .d-nav-btn:hover {
      border-color: rgba(0, 240, 255, 0.5);
      color: var(--text-main);
    }

    .d-nav-btn.active {
      background: var(--neon-cyan-soft);
      border-color: var(--neon-cyan);
      color: var(--neon-cyan);
      box-shadow: 0 0 12px rgba(0, 240, 255, 0.16);
    }

    .bottom-nav {
      grid-template-columns: repeat(6, 1fr) !important;
    }

    .map-dock-col {
      display: none;
    }

    /* Community Feed & Post Cards */
    .comm-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .comm-post-list {
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .comm-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 13px;
      display: flex;
      flex-direction: column;
      gap: 7px;
      cursor: pointer;
      transition: border-color 0.15s ease, transform 0.12s ease;
    }

    .comm-card:hover {
      border-color: rgba(0, 240, 255, 0.55);
    }

    .comm-meta-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-wrap: wrap;
      font-size: 11px;
      color: var(--text-sub);
    }

    .comm-title {
      font-size: 14px;
      font-weight: 900;
      color: var(--text-main);
      line-height: 1.35;
    }

    .comm-excerpt {
      font-size: 12px;
      color: var(--text-sub);
      line-height: 1.48;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .comm-pin-attach {
      background: rgba(163, 230, 53, 0.1);
      border: 1px dashed rgba(163, 230, 53, 0.5);
      border-radius: 9px;
      padding: 7px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 11.5px;
    }

    .comm-foot-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-top: 4px;
      border-top: 1px solid rgba(41, 56, 92, 0.45);
      font-size: 11.5px;
      color: var(--text-sub);
    }

    .like-btn {
      background: rgba(255, 46, 147, 0.12);
      border: 1px solid rgba(255, 46, 147, 0.35);
      color: #ff7ab8;
      border-radius: 7px;
      padding: 4px 9px;
      font-size: 11.5px;
      font-weight: 800;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .like-btn.liked {
      background: var(--neon-pink);
      border-color: var(--neon-pink);
      color: #fff;
    }

    .comment-item {
      background: #0b1020;
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 8px 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .map-stage-wrap {
      display: flex;
      flex-direction: column;
      width: 100%;
      min-width: 0;
      gap: 8px;
      flex-shrink: 0;
    }


    /* v9 Anti-Overlap Polish Across Mobile & Multi-Language Views */
    .card-head {
      flex-wrap: wrap;
    }

    .bottom-nav .nav-btn {
      min-width: 0;
      padding: 0 2px;
      overflow: hidden;
      font-size: 10px;
    }

    .bottom-nav .nav-btn span:not(.nav-ico) {
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .comm-pin-attach {
      flex-wrap: wrap;
    }

    #pane-idcard .btn-row {
      flex-wrap: wrap;
    }

    @media (max-width: 639px) {
      #pane-idcard #downloadIdPngBtn {
        flex: 1 1 100%;
      }
      #pane-idcard #postIdShowcaseBtn,
      #pane-idcard #shareIdCardBtn {
        flex: 1 1 calc(50% - 4px);
      }
    }

    @media (min-width: 900px) {
      .brand-title {
        font-size: 15.5px;
      }
      .brand-badges-inline {
        display: inline-flex;
      }
      .mobile-status-strip {
        display: none;
      }
      .header-btns .pill-btn {
        padding: 6px 10px;
        font-size: 11.5px;
      }
    }

    /* PC / Tablet Landscape Wide Portal Layout (>= 980px) */
    @media (min-width: 980px) {
      .app-shell {
        max-width: 1420px;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        padding-bottom: 24px;
      }

      .top-header {
        padding: 12px 22px;
      }

      .header-top-grid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
      }

      .progress-wrap {
        margin-top: 0;
        min-width: 320px;
      }

      .desktop-nav {
        display: flex;
      }

      .bottom-nav {
        display: none !important;
      }

      .workspace {
        flex-direction: row;
        align-items: flex-start;
        gap: 0;
        background: #070b15;
      }



      .map-dock-col {
        display: flex;
        flex-direction: column;
        width: 54%;
        min-width: 480px;
        max-width: 54%;
        padding: 14px 16px 28px;
        gap: 10px;
        background: #070b15;
        position: sticky;
        top: 104px;
        max-height: none;
        overflow: visible;
      }



      .map-dock-col .map-frame {
        height: 460px;
        min-height: 400px;
      }

      .right-panes-col {
        flex: 1;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
        background: var(--bg-deep);
        border-left: 1px solid var(--border);
      }
      body.is-subpage .workspace {
        background: var(--bg-deep);
      }
      body.is-subpage .right-panes-col {
        border-left: none;
      }

      .tab-pane {
        padding: 14px 18px 36px;
      }
    }


    /* =====================================================================
       v10 GOOGLE ADSENSE SLOTS & EDITORIAL STRATEGY HUB STYLES
    ===================================================================== */
    .ad-unit-box {
      background: rgba(16, 22, 38, 0.72);
      border: 1px dashed rgba(41, 56, 92, 0.8);
      border-radius: 11px;
      padding: 6px 8px;
      text-align: center;
      min-height: 62px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .ad-unit-label {
      font-size: 9px;
      letter-spacing: 0.8px;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 3px;
    }

    .seo-guide-card {
      background: var(--bg-panel);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 14px;
      line-height: 1.65;
      color: var(--text-sub);
      font-size: 12.5px;
    }

    .seo-guide-card h1, .seo-guide-card h2 {
      font-size: 14.5px;
      color: var(--neon-cyan);
      margin-bottom: 8px;
      font-weight: 900;
    }

    .seo-guide-card h3 {
      font-size: 13px;
      color: #ff7ab8;
      margin: 12px 0 5px;
      font-weight: 800;
    }

    .seo-guide-card p {
      margin-bottom: 8px;
    }

    .seo-guide-list {
      padding-left: 16px;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .site-legal-footer {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
      padding: 8px 4px 10px;
      font-size: 11px;
      color: var(--text-muted);
      border-top: 1px solid rgba(41, 56, 92, 0.45);
      margin-top: 4px;
    }

    .site-legal-footer a {
      color: var(--neon-cyan);
      text-decoration: none;
      font-weight: 700;
    }


    html.is-app-mode .ad-unit-box,
    body.is-pwa-standalone .ad-unit-box {
      display: none !important;
    }


    /* =====================================================================
       v11 ACTIVE OBJECTIVES HUD (LEFT MAP BOTTOM MISSION TRACKER)
    ===================================================================== */
    .objectives-hud-card {
      background: linear-gradient(180deg, #101729 0%, #0b101d 100%);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 11px 12px;
      display: flex;
      flex-direction: column;
      gap: 9px;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    }

    .obj-head-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-wrap: wrap;
    }

    .obj-head-title {
      font-size: 13px;
      font-weight: 900;
      color: var(--text-main);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .obj-body-wrap {
      display: flex;
      flex-direction: column;
      gap: 9px;
    }

    .objectives-hud-card.collapsed .obj-body-wrap {
      display: none;
    }

    .obj-target-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .obj-target-item {
      background: var(--bg-card);
      border: 1px solid rgba(41, 56, 92, 0.85);
      border-left: 3px solid var(--neon-cyan);
      border-radius: 9px;
      padding: 7px 9px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      cursor: pointer;
      transition: border-color 0.15s ease, background 0.15s ease;
    }

    .obj-target-item:hover {
      border-color: var(--neon-cyan);
      background: rgba(0, 240, 255, 0.06);
    }

    .obj-target-item.pinned-target {
      border-left-color: var(--neon-amber);
      background: rgba(255, 184, 0, 0.06);
    }

    .obj-target-item.active-sel {
      border-color: var(--neon-pink);
    }

    .obj-cat-mini-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 5px;
    }
    @media (max-width: 410px) {
      .obj-cat-mini-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    .obj-cat-cell {
      background: #090e1a;
      border: 1px solid rgba(41, 56, 92, 0.7);
      border-radius: 8px;
      padding: 5px 7px;
      cursor: pointer;
      transition: border-color 0.15s ease;
    }

    .obj-cat-cell:hover, .obj-cat-cell.active {
      border-color: var(--neon-pink);
      background: rgba(255, 46, 147, 0.08);
    }

    .obj-mini-bar {
      height: 4px;
      background: #050811;
      border-radius: 999px;
      overflow: hidden;
      margin-top: 4px;
    }

    .obj-mini-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
      border-radius: 999px;
    }

    .obj-timer-strip {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 5px;
      padding-top: 4px;
      border-top: 1px solid rgba(41, 56, 92, 0.45);
    }

    .obj-timer-chip {
      background: #090e1a;
      border: 1px solid rgba(41, 56, 92, 0.75);
      border-radius: 8px;
      padding: 5px 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      cursor: pointer;
      font-size: 11px;
    }

    .obj-timer-chip:hover {
      border-color: var(--neon-cyan);
    }

    .pill-btn.target-pinned {
      background: rgba(255, 184, 0, 0.18);
      border-color: var(--neon-amber);
      color: var(--neon-amber);
    }


    @keyframes objCompleteSlideOut {
      0% { opacity: 1; transform: translateX(0); }
      100% { opacity: 0; transform: translateX(26px); }
    }
    .obj-target-item.completing {
      animation: objCompleteSlideOut 0.18s ease forwards;
      pointer-events: none;
    }


    /* =====================================================================
       v12 CROSS-CHANNEL VIRAL ENGINE (MOBILE WEB -> ANDROID APP BANNER)
    ===================================================================== */
    .mobile-app-viral-bar {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 7px 11px;
      background: linear-gradient(90deg, #131b33 0%, #1d1236 55%, #0d2238 100%);
      border-bottom: 1px solid rgba(0, 240, 255, 0.35);
      font-size: 11.5px;
      z-index: 48;
      flex-shrink: 0;
    }

    /* Show ONLY on Mobile/Tablet Web Browser (Hidden in Installed App & Hidden on PC >= 980px) */
    @media (max-width: 979px) {
      html.is-web-mode .mobile-app-viral-bar:not(.dismissed) {
        display: flex;
      }
    }

    html.is-app-mode .mobile-app-viral-bar {
      display: none !important;
    }

    .viral-bar-left {
      display: flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
      flex: 1;
      cursor: pointer;
    }

    .viral-bar-text {
      font-weight: 800;
      color: #f8fafc;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .viral-bar-actions {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-shrink: 0;
    }

    .viral-open-btn {
      background: linear-gradient(135deg, var(--neon-cyan), #0ea5e9);
      color: #06101e;
      border: none;
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 10.5px;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
    }

    .viral-close-btn {
      background: transparent;
      border: none;
      color: var(--text-sub);
      font-size: 13px;
      font-weight: 800;
      padding: 2px 4px;
      cursor: pointer;
      line-height: 1;
    }


    /* =====================================================================
       v19 INTEGRATED MASTER GUIDEBOOK (공략집 WIKI TAB) STYLES
    ===================================================================== */
    .bottom-nav.seven-tabs {
      grid-template-columns: repeat(7, 1fr) !important;
    }

    @media (max-width: 420px) {
      .bottom-nav.seven-tabs .nav-btn {
        font-size: 9.2px;
        gap: 2px;
      }
      .bottom-nav.seven-tabs .nav-ico {
        font-size: 15.5px;
      }
      .header-btns .pill-btn {
        padding: 5px 6.5px;
        font-size: 10.5px;
      }
    }

    .gb-chapter-card {
      background: linear-gradient(180deg, #121a2f 0%, #0d1323 100%);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 13px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .gb-chapter-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .gb-chapter-title {
      font-size: 13.5px;
      font-weight: 900;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .gb-step-list {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }

    .gb-step-item {
      background: var(--bg-card);
      border: 1px solid rgba(41, 56, 92, 0.85);
      border-left: 3px solid var(--neon-cyan);
      border-radius: 9px;
      padding: 9px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 9px;
    }

    .gb-code-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: rgba(255, 184, 0, 0.16);
      border: 1px solid rgba(255, 184, 0, 0.55);
      color: var(--neon-amber);
      border-radius: 6px;
      padding: 2px 7px;
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: 11.5px;
      font-weight: 900;
      cursor: pointer;
    }

    .gb-jump-btn {
      background: rgba(0, 240, 255, 0.14);
      border: 1px solid rgba(0, 240, 255, 0.48);
      color: var(--neon-cyan);
      border-radius: 8px;
      padding: 6px 9px;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .gb-jump-btn:hover {
      background: var(--neon-cyan);
      color: #06101e;
    }

    .gb-doc-links {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
      gap: 7px;
      margin-top: 4px;
    }

    .gb-doc-link {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 9px;
      padding: 9px 11px;
      font-size: 11.5px;
      font-weight: 800;
      color: var(--text-main);
      text-decoration: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }

    .gb-doc-link:hover {
      border-color: var(--neon-cyan);
      color: var(--neon-cyan);
    }

#mapCategoryBar,
    #mapRegionBar,
    #gbCatBar,
    #commCatBar,
    #specCatBar {
      display: flex !important;
      flex-wrap: wrap !important;
      width: 100% !important;
      min-width: 0 !important;
      overflow: visible !important;
      gap: 5px !important;
      padding-bottom: 2px !important;
    }

    #mapCategoryBar .chip,
    #mapRegionBar .chip {
      flex: 0 1 auto !important;
      max-width: 100% !important;
    }

    /* Prevent inner map top-left theme switcher and top-right buttons from colliding */
    .map-frame .map-theme-bar {
      max-width: calc(100% - 155px);
      flex-wrap: wrap;
    }

    @media (min-width: 980px) {
      body:not(.is-fullscreen-map) .map-dock-col {
        max-height: none !important;
        overflow: visible !important;
      }
      body:not(.is-fullscreen-map) .map-dock-col .map-frame:not(.expanded-map) {
        height: clamp(290px, calc(100dvh - 435px), 480px);
        min-height: 290px;
      }
      body:not(.is-fullscreen-map) .map-dock-col #mapStageBlock.app-filters-collapsed .map-frame:not(.expanded-map) {
        height: clamp(380px, calc(100dvh - 265px), 640px);
      }
      body:not(.is-fullscreen-map) .map-dock-col .map-frame.expanded-map {
        height: 76dvh !important;
        min-height: 560px !important;
      }
    }
    body.is-fullscreen-map .map-dock-col {
      position: static !important;
      max-height: none !important;
      overflow: visible !important;
    }
    body.is-fullscreen-map #mapStageBlock .map-frame {
      flex: 1 1 auto !important;
      height: auto !important;
      min-height: 0 !important;
    }

    /* Global Readability & Font Size Scaling (Default = 'large') */
    html, body {
      font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
      -webkit-font-smoothing: antialiased;
    }

    html[data-font-scale="large"] body { font-size: 15.5px !important; }
    html[data-font-scale="large"] .brand-title { font-size: 16.5px !important; }
    html[data-font-scale="large"] .brand-sub { font-size: 12px !important; color: #cbd5e1 !important; }
    html[data-font-scale="large"] .d-nav-btn { font-size: 13.5px !important; padding: 8px 14px !important; }
    html[data-font-scale="large"] .chip { font-size: 12px !important; padding: 5.5px 9.5px !important; color: #cbd5e1; }
    html[data-font-scale="large"] .opgg-mini-btn,
    html[data-font-scale="large"] .pill-btn { font-size: 12px !important; }
    html[data-font-scale="large"] .card-title,
    html[data-font-scale="large"] .gb-chapter-title { font-size: 15px !important; }
    html[data-font-scale="large"] .pin-row > div > div:nth-child(2) { font-size: 14px !important; line-height: 1.45 !important; }
    html[data-font-scale="large"] .pin-row > div > div:nth-child(3) { font-size: 12.5px !important; line-height: 1.5 !important; color: #cbd5e1 !important; }
    html[data-font-scale="large"] #selPinTitle { font-size: 14px !important; }
    html[data-font-scale="large"] #selPinHint { font-size: 12px !important; color: #cbd5e1 !important; }
    html[data-font-scale="large"] .search-input,
    html[data-font-scale="large"] .input-box { font-size: 14px !important; }
    html[data-font-scale="large"] .seo-guide-card { font-size: 14px !important; line-height: 1.72 !important; color: #cbd5e1 !important; }
    html[data-font-scale="large"] .seo-guide-card h1,
    html[data-font-scale="large"] .seo-guide-card h2 { font-size: 16.5px !important; }
    html[data-font-scale="large"] .seo-guide-card h3 { font-size: 14.5px !important; }
    html[data-font-scale="large"] .gb-doc-link { font-size: 13px !important; }
    html[data-font-scale="large"] .comm-title { font-size: 15.5px !important; }
    html[data-font-scale="large"] .comm-excerpt { font-size: 13.5px !important; color: #cbd5e1 !important; }

    html[data-font-scale="xlarge"] body { font-size: 17px !important; }
    html[data-font-scale="xlarge"] .brand-title { font-size: 18px !important; }
    html[data-font-scale="xlarge"] .brand-sub { font-size: 13px !important; color: #e2e8f0 !important; }
    html[data-font-scale="xlarge"] .d-nav-btn { font-size: 14.5px !important; padding: 9px 15px !important; }
    html[data-font-scale="xlarge"] .chip { font-size: 13px !important; padding: 6.5px 11px !important; color: #e2e8f0; }
    html[data-font-scale="xlarge"] .opgg-mini-btn,
    html[data-font-scale="xlarge"] .pill-btn { font-size: 13px !important; }
    html[data-font-scale="xlarge"] .card-title,
    html[data-font-scale="xlarge"] .gb-chapter-title { font-size: 16.5px !important; }
    html[data-font-scale="xlarge"] .pin-row > div > div:nth-child(2) { font-size: 15.5px !important; line-height: 1.5 !important; }
    html[data-font-scale="xlarge"] .pin-row > div > div:nth-child(3) { font-size: 13.8px !important; line-height: 1.55 !important; color: #e2e8f0 !important; }
    html[data-font-scale="xlarge"] #selPinTitle { font-size: 15.5px !important; }
    html[data-font-scale="xlarge"] #selPinHint { font-size: 13.5px !important; color: #e2e8f0 !important; }
    html[data-font-scale="xlarge"] .search-input,
    html[data-font-scale="xlarge"] .input-box { font-size: 15.5px !important; }
    html[data-font-scale="xlarge"] .seo-guide-card { font-size: 15.5px !important; line-height: 1.78 !important; color: #e2e8f0 !important; }
    html[data-font-scale="xlarge"] .seo-guide-card h1,
    html[data-font-scale="xlarge"] .seo-guide-card h2 { font-size: 18px !important; }
    html[data-font-scale="xlarge"] .seo-guide-card h3 { font-size: 16px !important; }
    html[data-font-scale="xlarge"] .gb-doc-link { font-size: 14px !important; }
    html[data-font-scale="xlarge"] .comm-title { font-size: 17px !important; }
    html[data-font-scale="xlarge"] .comm-excerpt { font-size: 14.5px !important; color: #e2e8f0 !important; }

    #lr-font-toggle {
      position: fixed;
      right: 16px;
      bottom: calc(74px + var(--safe-bottom));
      z-index: 95;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 13px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.94);
      border: 1.5px solid var(--neon-cyan);
      color: #f8fafc;
      font-size: 13.5px !important;
      font-weight: 900;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
      cursor: pointer;
      backdrop-filter: blur(8px);
    }
    @media (min-width: 980px) {
      #lr-font-toggle {
        bottom: 20px;
        right: 20px;
      }
    }
    #lr-font-toggle .lr-fbadge {
      background: var(--neon-cyan);
      color: #080b14;
      padding: 1px 7px;
      border-radius: 999px;
      font-size: 11.5px !important;
      font-weight: 900;
    }

/* =====================================================================
   v28 MULTI-PAGE APPLICATION (MPA) DEDICATED SUBPAGE LAYOUT & NAV LINKS
===================================================================== */
a.d-nav-btn,
a.nav-btn,
a.pill-btn {
  text-decoration: none !important;
}

body.is-subpage .tab-pane {
  display: flex !important;
}

@media (min-width: 980px) {
  body.is-subpage .app-shell {
    max-width: 1120px;
  }
  body.is-subpage .workspace {
    flex-direction: column;
    align-items: stretch;
  }
  body.is-subpage .right-panes-col {
    width: 100%;
  }
  body.is-subpage .tab-pane {
    padding: 20px 26px 44px;
    gap: 14px;
  }
  /* Crisp 2-Column Pro Grid on Wide Screens for Cheats & Equipment DB */
  body.is-subpage #cheatListContainer,
  body.is-subpage #specListContainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.is-subpage #timerListContainer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* =====================================================================
   v32 UNIFIED NON-CLIPPING MENUS, SMOOTH SCROLL & APP MAP-FIRST UI
===================================================================== */
.app-only-filter-btn {
  display: inline-flex;
  border-color: rgba(255, 184, 0, 0.5);
  color: var(--neon-amber);
}
.app-only-filter-btn.active {
  background: rgba(255, 184, 0, 0.18);
  border-color: var(--neon-amber);
  color: var(--neon-amber);
}

/* 1. Filter Chips ALWAYS Wrap Cleanly (NEVER clip off right edge in Web OR App!) */
#mapCategoryBar,
#mapRegionBar,
#gbCatBar,
#commCatBar,
#specCatBar {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: visible !important;
  gap: 5px !important;
}

/* Optional 1-tap [🎛️ 필터 접기] collapses chip rows cleanly when user wants bigger map */
#mapStageBlock.app-filters-collapsed #mapCategoryBar,
#mapStageBlock.app-filters-collapsed #mapRegionBar {
  display: none !important;
}

/* 2. Keep Inner Map HUD Buttons Crisp & Non-Overlapping at All Font Scales */
.map-frame .map-theme-bar {
  max-width: calc(100% - 148px) !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.map-frame .map-theme-bar::-webkit-scrollbar { display: none; }
.map-frame .map-theme-btn {
  font-size: 11px !important;
  padding: 4px 7px !important;
}
.map-frame .map-top-right .pill-btn {
  font-size: 11px !important;
  padding: 4px 8px !important;
}

/* 3. App Mode Simplification (No Scroll Lock! Smooth Scrolling Everywhere!) */
html.is-app-mode #editorialStrategyGuide,
html.is-app-mode .site-legal-footer,
html.is-app-mode .disclaimer-foot,
html.is-app-mode .brand-sub,
html.is-app-mode #objCategoryMiniGrid,
html.is-app-mode #objQuickTimerStrip {
  display: none !important;
}

html.is-app-mode .top-header {
  padding: 8px 12px !important;
}

html.is-app-mode .progress-wrap {
  margin-top: 5px;
  padding: 5px 9px;
}

html.is-app-mode .objectives-hud-card {
  padding: 8px 10px !important;
  gap: 6px !important;
}

@media (max-width: 979px) {
  .map-frame:not(.expanded-map) {
    height: 410px;
  }
  #mapStageBlock.app-filters-collapsed .map-frame:not(.expanded-map) {
    height: 490px;
  }
}

@media (min-width: 980px) {
  .bottom-nav {
    display: none !important;
  }
  .app-shell {
    padding-bottom: 24px !important;
  }
}

/* =====================================================================
   v33 TRUE MOBILE & DESKTOP FULLSCREEN MAP OVERLAY (90%+ MAP VIEWPORT)
===================================================================== */
body.is-fullscreen-map {
  overflow: hidden !important;
}

body.is-fullscreen-map #lr-font-toggle,
body.is-fullscreen-map .bottom-nav,
body.is-fullscreen-map .lr-global-bottom-nav,
body.is-fullscreen-map .top-header {
  display: none !important;
}

body.is-fullscreen-map #mapStageBlock {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  z-index: 9995 !important;
  background: #060913 !important;
  padding: calc(8px + var(--safe-top)) 10px calc(8px + var(--safe-bottom)) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
}

/* Auto-hide multi-row filter chips in Fullscreen unless user explicitly opens [🎛️ 필터] */
body.is-fullscreen-map #mapStageBlock:not(.fs-filters-open) #mapCategoryBar,
body.is-fullscreen-map #mapStageBlock:not(.fs-filters-open) #mapRegionBar {
  display: none !important;
}

/* Even when user opens [🎛️ 필터] inside Fullscreen, cap height so Map NEVER shrinks! */
body.is-fullscreen-map #mapStageBlock.fs-filters-open #mapCategoryBar,
body.is-fullscreen-map #mapStageBlock.fs-filters-open #mapRegionBar {
  max-height: 16dvh !important;
  overflow-y: auto !important;
  padding: 4px !important;
  background: rgba(16, 22, 38, 0.95);
  border: 1px solid var(--border);
  border-radius: 8px;
}

body.is-fullscreen-map #mapStageBlock .opgg-map-bar {
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 5px !important;
}

body.is-fullscreen-map #mapStageBlock .opgg-tool-group {
  flex-wrap: nowrap !important;
}

body.is-fullscreen-map #mapStageBlock #fullscreenMapBtn {
  background: var(--neon-pink) !important;
  border-color: var(--neon-pink) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  flex-shrink: 0 !important;
}

body.is-fullscreen-map #mapStageBlock .map-frame {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100% !important;
}

body.is-fullscreen-map #mapStageBlock #selectedPinBar {
  flex-shrink: 0 !important;
  padding: 7px 10px !important;
}

/* =====================================================================
   v35 ALL-IN-ONE 4-STAGE UPGRADE (MOBILE 360px + XLARGE + PC AUDITED)
===================================================================== */

/* Mobile 360px Header Anti-Overflow (beats [data-font-scale="xlarge"] specificity!) */
@media (max-width: 560px) {
  .header-btns {
    gap: 4px !important;
  }
  html .header-btns .pill-btn,
  html[data-font-scale="large"] .header-btns .pill-btn,
  html[data-font-scale="xlarge"] .header-btns .pill-btn {
    padding: 4.5px 6.5px !important;
    font-size: 10.5px !important;
  }
  #openGuidebookQuickBtn {
    display: none !important; /* Already Tab #2 in fixed mobile bottom-nav */
  }
}

/* 1. Shortest Farming Route Bar & Button */
.opgg-mini-btn.route-btn {
  border-color: rgba(16, 232, 150, 0.55);
  color: var(--neon-green);
}
.opgg-mini-btn.route-btn.active {
  background: rgba(16, 232, 150, 0.22);
  border-color: var(--neon-green);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 232, 150, 0.35);
}

.route-hud-strip {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.16) 0%, rgba(16, 232, 150, 0.14) 100%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  flex-shrink: 0;
}
.route-hud-strip.open {
  display: flex;
}
.route-hud-info {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
#routeNextPinTitle {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-step-pill {
  background: var(--neon-cyan);
  color: #080b14;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.route-hud-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .route-hud-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
body.is-fullscreen-map #mapStageBlock .route-hud-strip {
  padding: 6px 9px !important;
  gap: 6px !important;
}

/* 2. Smart Chapter Coach Banner inside Active Objectives */
.smart-coach-box {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.14) 0%, rgba(255, 46, 147, 0.12) 100%);
  border: 1px solid rgba(255, 184, 0, 0.48);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.smart-coach-left {
  min-width: 0;
  flex: 1 1 210px;
}
.smart-coach-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 900;
  color: var(--neon-amber);
  margin-bottom: 3px;
}
.smart-coach-title {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.38;
}
.smart-coach-desc {
  font-size: 11.5px;
  color: #cbd5e1;
  margin-top: 2px;
  line-height: 1.45;
}
.smart-coach-btn {
  background: linear-gradient(135deg, var(--neon-amber), #f97316);
  color: #080b14 !important;
  border: none;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .smart-coach-btn {
    width: 100%;
    text-align: center;
  }
}
html.is-app-mode .smart-coach-desc {
  display: none !important;
}
html.is-app-mode .smart-coach-box {
  padding: 7px 10px;
}

/* 3. Realtime Live LFG Party Badges & Status Controls */
.lfg-live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(16, 232, 150, 0.09);
  border: 1px solid rgba(16, 232, 150, 0.38);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 12px;
}
.lfg-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  display: inline-block;
  box-shadow: 0 0 8px var(--neon-green);
  animation: lrPulse 1.6s infinite ease-in-out;
}
@keyframes lrPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}
.lfg-slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}
.lfg-slot-badge.open {
  background: rgba(16, 232, 150, 0.16);
  border: 1px solid rgba(16, 232, 150, 0.55);
  color: var(--neon-green);
}
.lfg-slot-badge.closed {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #94a3b8;
}
.comm-card.lfg-expired {
  opacity: 0.62;
}
.lfg-form-box {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 8px;
}
.lfg-form-box.show {
  display: flex;
}

/* 4. Patch Notes & Map Diff Feed (/patches) + Unread Red Badge */
.patch-unread-dot {
  display: none;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  margin-left: 3px;
  line-height: 1.2;
}
.patch-unread-dot.show {
  display: inline-flex;
}

.patch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.patch-card.latest {
  border-color: rgba(0, 240, 255, 0.55);
  box-shadow: 0 6px 22px rgba(0, 240, 255, 0.08);
}
.patch-change-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #0b101d;
  border: 1px solid rgba(41, 56, 92, 0.65);
  border-left: 3px solid var(--neon-cyan);
  border-radius: 9px;
  padding: 9px 11px;
}
.patch-change-row.type-NEW { border-left-color: var(--neon-green); }
.patch-change-row.type-BALANCE { border-left-color: var(--neon-amber); }
.patch-change-row.type-LIVE { border-left-color: var(--neon-pink); }
.patch-change-row.type-MAP { border-left-color: var(--neon-cyan); }

/* =====================================================================
   v36 APP MODE: map-first layout (web mode is unchanged)
===================================================================== */
/* 4-tab bottom nav: 지도 · 공략 · 커뮤니티 · 더보기 */
html.is-app-mode .bottom-nav.app-four-tabs { grid-template-columns: repeat(4, 1fr) !important; }
html.is-app-mode .bottom-nav .app-nav-hidden { display: none !important; }
html.is-app-mode .bottom-nav.app-four-tabs .nav-btn { font-size: 11px; gap: 3px; }
html.is-app-mode .bottom-nav.app-four-tabs .nav-ico { font-size: 19px; }

/* Slim header: brand + patch + settings only, one-line progress */
html.is-app-mode .mobile-status-strip,
html.is-app-mode .brand-badges-inline,
html.is-app-mode #openGuidebookQuickBtn,
html.is-app-mode #openWritePostQuickBtn { display: none !important; }
html.is-app-mode #langToggleBtn {
  display: inline-flex !important;
  border-color: rgba(0, 240, 255, 0.5);
  color: var(--neon-cyan);
}
html.is-app-mode .top-header { padding: 6px 10px !important; }
html.is-app-mode .progress-wrap { margin-top: 4px !important; padding: 4px 8px !important; }
html.is-app-mode .progress-top { font-size: 11px !important; }
html.is-app-mode .progress-track { height: 4px !important; }

/* Map controls: when filters are folded keep only the essentials in ONE row */
html.is-app-mode #mapStageBlock.app-filters-collapsed #toggleAllPinsVisBtn,
html.is-app-mode #mapStageBlock.app-filters-collapsed #toggleFocusModeBtn,
html.is-app-mode #mapStageBlock.app-filters-collapsed #resetAllFiltersBtn { display: none !important; }
html.is-app-mode #mapStageBlock.app-filters-collapsed .opgg-map-bar { flex-wrap: nowrap; gap: 6px; }
html.is-app-mode #mapStageBlock.app-filters-collapsed .opgg-tool-group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html.is-app-mode #mapStageBlock.app-filters-collapsed .opgg-tool-group::-webkit-scrollbar { display: none; }
html.is-app-mode #mapStageBlock.app-filters-collapsed .opgg-mini-btn { white-space: nowrap; flex: 0 0 auto; }

/* Map fills the remaining screen between header and bottom nav */
@media (max-width: 979px) {
  html.is-app-mode body:not(.is-fullscreen-map) #mapStageBlock.app-filters-collapsed .map-frame:not(.expanded-map) {
    height: max(340px, calc(100dvh - 205px - var(--safe-bottom, 0px))) !important;
  }
}

/* More sheet */
.app-more-backdrop { position: fixed; inset: 0; z-index: 9000; background: rgba(4, 7, 14, 0.62); display: none; align-items: flex-end; justify-content: center; }
.app-more-backdrop.open { display: flex; }
body.app-more-open { overflow: hidden; }
.app-more-sheet { width: 100%; max-width: 520px; background: #0d1424; border: 1px solid var(--border, #29385c); border-bottom: none; border-radius: 18px 18px 0 0; padding: 8px 14px calc(16px + var(--safe-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45); animation: appMoreUp .18s ease-out; }
@keyframes appMoreUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.app-more-grip { width: 38px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); margin: 2px auto 8px; }
.app-more-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--text-main, #fff); font-size: 15px; }
.app-more-close { background: none; border: 1px solid var(--border, #29385c); color: var(--text-sub, #b8c2d8); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.app-more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.app-more-item { font-family: inherit; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 9px; padding: 12px 12px; border-radius: 11px; background: var(--bg-card, #121b30); border: 1px solid var(--border, #29385c); color: var(--text-main, #fff); text-decoration: none; font-size: 13.5px; font-weight: 800; }
.app-more-item.current { border-color: var(--neon-cyan, #00f0ff); color: var(--neon-cyan, #00f0ff); }
.app-more-ico { font-size: 18px; }
.app-more-disclaimer { margin-top: 12px; font-size: 10.5px; line-height: 1.45; color: var(--text-muted, #7d8aa8); text-align: center; }


#langToggleBtn {
  border-color: rgba(0, 240, 255, 0.48);
  color: var(--neon-cyan);
  font-weight: 900;
}

/* v45 bilingual static blocks: Korean for ko, English for every other language */
html:not([lang="ko"]) [data-lang="ko"] { display: none !important; }
html[lang="ko"] [data-lang="en"] { display: none !important; }
