:root{
    --ink: #1d1d1f;
    --ink-soft: #6e6e73;
    --line: rgba(0,0,0,0.08);
    --surface: #ffffff;
    --canvas: #fbfbfd;
    --space: #08090b;
    --accent: #ff5a36;
    --accent-soft: rgba(255,90,54,0.12);
    --green: #34c759;
    --green-soft: rgba(52,199,89,0.14);
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
  }
  *{ box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
  html,body{ margin:0; padding:0; font-family:var(--sans); color:var(--ink); background:var(--space); overflow:hidden; height:100%; }
  button{ font-family:var(--sans); }
  ::selection{ background: var(--accent-soft); }

  /* ---------- LANDING ---------- */
  #landing{
    position:fixed; inset:0; z-index:40;
    background: var(--space);
    display:flex; align-items:center; justify-content:center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
  }
  #landing.hidden{ opacity:0; visibility:hidden; pointer-events:none; }
  #landing .orb-wrap{
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    opacity:0.9;
  }
  #landing .orb{
    width: min(72vw, 560px); height: min(72vw, 560px);
    border-radius:50%;
    position:relative;
    overflow:hidden;
    background-color: #8a3a22;
    background-size: 220% 100%;
    background-repeat: repeat-x;
    box-shadow: 0 0 120px rgba(255,90,54,0.3);
    animation: rotateGlobe 26s linear infinite;
  }
  @keyframes rotateGlobe{ from{ background-position-x: 0%; } to{ background-position-x: -100%; } }
  #landing .orb::before{
    content:'';
    position:absolute; inset:0; border-radius:50%;
    background:
      radial-gradient(circle at 32% 28%, rgba(255,255,255,0.3), transparent 42%),
      radial-gradient(circle at 68% 78%, rgba(0,0,0,0.6), transparent 60%);
    mix-blend-mode: soft-light;
    pointer-events:none;
  }
  #landing .orb::after{
    content:'';
    position:absolute; inset:0; border-radius:50%;
    box-shadow: inset -30px -20px 70px rgba(0,0,0,0.65), inset 20px 15px 50px rgba(255,180,140,0.15);
    pointer-events:none;
  }
  @keyframes twinkle{ 0%,100%{ opacity:0.55; } 50%{ opacity:1; } }
  #stars{
    position:fixed; inset:0; z-index:0; pointer-events:none;
    background-image:
      radial-gradient(1.4px 1.4px at 15% 20%, rgba(255,255,255,0.9), transparent),
      radial-gradient(1px 1px at 40% 65%, rgba(255,255,255,0.7), transparent),
      radial-gradient(1.6px 1.6px at 70% 30%, rgba(255,255,255,0.85), transparent),
      radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1.2px 1.2px at 25% 85%, rgba(255,255,255,0.75), transparent),
      radial-gradient(1px 1px at 55% 10%, rgba(255,255,255,0.6), transparent),
      radial-gradient(1.3px 1.3px at 95% 50%, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 340px 340px;
    animation: twinkle 5s ease-in-out infinite;
  }
  #landing .veil{
    position:absolute; inset:0;
    background: radial-gradient(ellipse at center, rgba(8,9,11,0.2) 0%, rgba(8,9,11,0.88) 68%, rgba(8,9,11,0.97) 100%);
  }
  #landing .content{
    position:relative; z-index:2;
    max-width: 520px;
    text-align:center;
    padding: 32px;
    color: #f5f3f0;
  }
  .landing-logo{
    position:absolute; top: calc(56px + env(safe-area-inset-top)); left:50%;
    transform:translateX(-50%); z-index:3;
    height:140px; width:auto;
  }
  @media (max-width:400px){
    .landing-logo{ top: calc(44px + env(safe-area-inset-top)); height:114px; }
  }
  #landing .stat-line{
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    color: rgba(245,243,240,0.6);
    margin-bottom: 18px;
  }
  #landing .stat-line b{ color:#fff; font-weight:600; }
  #landing h1{
    font-size: clamp(30px, 6.4vw, 46px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
  }
  #landing p.sub{
    font-size: 16px;
    line-height:1.55;
    color: rgba(245,243,240,0.72);
    max-width: 40ch;
    margin: 0 auto 30px;
  }
  .btn-primary{
    background: var(--accent);
    color: #fff;
    border:none;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 26px;
    border-radius: 100px;
    cursor:pointer;
    box-shadow: 0 10px 30px rgba(255,90,54,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }
  .btn-primary:active{ transform: scale(0.96); }
  #landing .foot-note{
    margin-top: 18px;
    font-size: 12.5px;
    color: rgba(245,243,240,0.45);
  }

  /* ---------- APP / 3D GLOBE ---------- */
  #app{ position:fixed; inset:0; background:var(--space); }
  #glCanvas{
    position:fixed; inset:0; width:100%; height:100%; display:block;
    touch-action:none; cursor:grab; z-index:1;
  }
  #glCanvas.grabbing{ cursor:grabbing; }
  #hazeLayer{
    position:fixed; inset:-10%; z-index:2; pointer-events:none;
    background-image:
      radial-gradient(ellipse 220px 70px at 20% 30%, rgba(230,210,180,0.10), transparent 70%),
      radial-gradient(ellipse 260px 80px at 70% 60%, rgba(230,210,180,0.08), transparent 70%),
      radial-gradient(ellipse 200px 60px at 45% 85%, rgba(230,210,180,0.07), transparent 70%);
    background-repeat: repeat-x;
    background-size: 900px 100%;
    mix-blend-mode: screen;
    animation: driftDust 55s linear infinite;
  }
  @keyframes driftDust{ from{ background-position-x: 0px; } to{ background-position-x: -900px; } }
  #markerLayer{ position:fixed; inset:0; z-index:9; pointer-events:none; }

  .globe-label{
    position:absolute; left:0; top:0;
    transform: translate(-50%,-50%);
    pointer-events:auto;
    background: rgba(10,10,14,0.62);
    backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid rgba(90,209,255,0.35);
    border-radius: 100px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 600;
    color: #f2f0ec;
    white-space: nowrap;
    display:flex; align-items:center; gap:6px;
    cursor:pointer;
    transition: opacity 0.15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  }
  .globe-label.open-label{
    border-color: #ff5a36;
    background: linear-gradient(135deg, #ff5a36, #ff7a4d);
    color: #fff;
    box-shadow: 0 4px 18px rgba(255,90,54,0.55);
    font-weight: 700;
  }
  @media (max-width:400px){
    .globe-label{ font-size:11px; padding:6px 11px; }
  }

  .region-count{ opacity:0.85; font-weight:600; }

  .globe-plot{
    position:absolute; left:0; top:0;
    transform: translate(-50%,-50%);
    width:26px; height:26px;
    border-radius:50%;
    pointer-events:auto;
    background-color: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(90,209,255,0.5);
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    font-size:10px; overflow:hidden;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .globe-plot:hover{ background-color: rgba(90,209,255,0.35); border-color: rgba(90,209,255,0.95); }
  .globe-plot.claimed{
    background-color: rgba(52,199,89,0.25);
    border-color: rgba(120,255,150,0.95);
    box-shadow: 0 0 10px rgba(52,199,89,0.65);
  }
  .globe-plot.claimed.fading{
    background-color: rgba(180,150,80,0.2);
    border-color: rgba(210,180,110,0.65);
    box-shadow: none;
  }
  .globe-plot.has-photo{ background-size:cover; background-position:center; }

  .hud-corner{
    position:fixed; width:26px; height:26px; z-index:25; pointer-events:none;
    border-color: rgba(90,209,255,0.55);
    border-style: solid; border-width:0;
  }
  .hud-corner.tl{ top:14px; left:14px; border-top-width:2px; border-left-width:2px; }
  .hud-corner.tr{ top:14px; right:14px; border-top-width:2px; border-right-width:2px; }
  .hud-corner.bl{ bottom:14px; left:14px; border-bottom-width:2px; border-left-width:2px; }
  .hud-corner.br{ bottom:14px; right:14px; border-bottom-width:2px; border-right-width:2px; }

  /* ---------- FLOATING UI ---------- */
  .float-top{
    position:fixed; top:0; left:0; right:0; z-index:20;
    display:flex; align-items:center; justify-content:space-between;
    padding: calc(16px + env(safe-area-inset-top)) 18px 16px;
    pointer-events:none;
  }
  .pill{
    pointer-events:auto;
    background: rgba(10,10,14,0.55);
    backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid rgba(90,209,255,0.25);
    border-radius: 100px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #f2f0ec;
    display:flex; align-items:center; gap:7px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    cursor:pointer;
    white-space:nowrap;
  }
  .logo-img{ height:32px; width:auto; display:block; pointer-events:auto; }
  @media (max-width:400px){ .logo-img{ height:27px; } }
  .pill .dot{ width:6px; height:6px; border-radius:50%; background:var(--green); box-shadow: 0 0 6px var(--green); }
  .top-right-group{ display:flex; align-items:center; gap:8px; }

  @media (max-width:400px){
    .float-top{ padding: calc(12px + env(safe-area-inset-top)) 10px 12px; }
    .pill{ padding:7px 11px; font-size:11.5px; gap:5px; }
    .top-right-group{ gap:6px; }
  }

  .globe-plot.highlight{
    animation: myPlotPulse 1.1s ease-out 3;
    z-index:2;
  }
  @keyframes myPlotPulse{
    0%{ box-shadow: 0 0 0 0 rgba(90,209,255,0.9); }
    70%{ box-shadow: 0 0 0 16px rgba(90,209,255,0); }
    100%{ box-shadow: 0 0 0 0 rgba(90,209,255,0); }
  }

  .zoom-controls{
    position:fixed; right:16px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index:20;
    display:flex; flex-direction:column; gap:8px;
  }
  .zbtn{
    width:40px; height:40px; border-radius:50%;
    background: rgba(10,10,14,0.6);
    backdrop-filter: blur(16px);
    border:1px solid rgba(90,209,255,0.25); font-size:18px; font-weight:600; color:#f2f0ec;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
  }
  .zbtn .material-symbols-outlined{ font-size:22px; }
  .zbtn.active{
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(255,90,54,0.6);
  }
  .zbtn.explore-zbtn{
    background: linear-gradient(135deg, var(--accent), #ffb84d);
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(255,90,54,0.55);
  }

  /* ---------- SHEETS ---------- */
  .sheet-overlay{
    position:fixed; inset:0; z-index:50;
    background: rgba(8,9,11,0.45);
    display:none; align-items:flex-end; justify-content:center;
  }
  .sheet-overlay.open{ display:flex; }
  @media (min-width:640px){ .sheet-overlay{ align-items:center; } }
  .sheet{
    background: var(--surface);
    width:100%; max-width: 440px;
    max-height: 86vh; overflow-y:auto;
    border-radius: 24px 24px 0 0;
    padding: 26px 24px 28px;
  }
  @media (min-width:640px){ .sheet{ border-radius:24px; } }
  .sheet .eyebrow{
    font-family: var(--mono); font-size:11px; color: var(--accent); margin-bottom:6px; font-weight:500;
  }
  .sheet h2{ font-size:22px; font-weight:700; letter-spacing:-0.01em; margin:0 0 4px; }
  .sheet p.desc{ font-size:14px; color:var(--ink-soft); line-height:1.5; margin:0 0 18px; }
  .field-label{ font-size:12.5px; font-weight:600; color:var(--ink-soft); margin: 16px 0 7px; }
  .bio-label-row{ display:flex; justify-content:space-between; align-items:baseline; }
  .bio-label-row #bioCount{ font-weight:600; font-family:var(--mono); color:var(--ink-soft); }
  input[type=text], textarea{
    width:100%; border:1px solid var(--line); background:var(--canvas);
    border-radius:12px; padding:11px 13px; font-size:15px; font-family:var(--sans); color:var(--ink); resize:none;
  }
  input[type=text]:focus, textarea:focus{ outline:none; border-color:var(--accent); }
  .quick-row{ display:flex; gap:8px; flex-wrap:wrap; }

  .photo-picker{ display:flex; align-items:center; gap:14px; }
  .photo-circle{
    width:64px; height:64px; border-radius:50%;
    background:var(--canvas); border:1.5px dashed var(--line);
    background-size:cover; background-position:center;
    display:flex; align-items:center; justify-content:center;
    font-size:22px; color:var(--ink-soft); flex-shrink:0; overflow:hidden;
  }
  .photo-btns{ display:flex; gap:8px; flex-wrap:wrap; }
  .photo-btn{
    border:1px solid var(--line); background:var(--canvas); color:var(--ink);
    font-size:12.5px; font-weight:600; padding:9px 13px; border-radius:10px; cursor:pointer;
  }
  .photo-hint{ font-size:11.5px; color:var(--ink-soft); margin-top:6px; }

  .cert .badge.has-photo{ background-size:cover; background-position:center; font-size:0; }
  .progress-note{
    margin-top:14px; padding:11px 13px; background:var(--canvas); border-radius:12px;
    font-size:12.5px; color:var(--ink-soft); line-height:1.5;
  }
  .progress-note b{ color:var(--ink); }
  .sheet-actions{ display:flex; gap:10px; margin-top:22px; }
  .btn-ghost{
    flex:1; background:transparent; border:1px solid var(--line); color:var(--ink-soft);
    font-size:14px; font-weight:600; padding:12px; border-radius:12px; cursor:pointer;
  }
  .btn-solid{
    flex:1.4; background: var(--accent); border:none; color:#fff;
    font-size:14px; font-weight:700; padding:12px; border-radius:12px; cursor:pointer;
  }
  .btn-solid:disabled{ background:#d6d6d9; cursor:not-allowed; }
  .btn-danger{
    flex:1.4; background: #e5484d; border:none; color:#fff;
    font-size:14px; font-weight:700; padding:12px; border-radius:12px; cursor:pointer;
  }
  #confirmOverlay{ z-index:65; }
  #confirmSheet{ max-width:360px; border-radius:20px; padding:22px 22px 20px; }
  #confirmSheet p{ font-size:15px; color:var(--ink); line-height:1.5; margin:0; }

  /* ---------- NOTIFICATIONS / SIGNALS / CIRCLE ---------- */
  .btn-connected{ background: var(--green); }

  .circle-grid{ display:flex; gap:8px; margin:10px 0 4px; }
  .circle-slot{
    position:relative;
    flex:1; aspect-ratio:1; border-radius:12px; border:1.5px dashed var(--line);
    display:flex; align-items:center; justify-content:center; font-size:11px; color:var(--ink-soft);
    background-size:cover; background-position:center;
  }
  .circle-slot.filled{ border-style:solid; border-color:var(--green); background-color:var(--green-soft); }
  .circle-remove{
    position:absolute; top:-6px; right:-6px;
    width:20px; height:20px; border-radius:50%;
    background:#1a1a1a; color:#fff; border:2px solid #fff;
    font-size:11px; line-height:1; padding:0;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.35);
  }

  .empty-note.small{ padding:10px 0; }

  /* ---------- CERTIFICATE ---------- */
  .cert-overlay{
    position:fixed; inset:0; z-index:60;
    background: rgba(8,9,11,0.75);
    display:none; align-items:center; justify-content:center;
    padding: 20px;
  }
  .cert-overlay.open{ display:flex; }
  .cert{
    max-width: 360px; width:100%;
  }
  .cert-photo{
    position:relative;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow:hidden;
    background-size:cover; background-position:center 30%;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:26px;
    padding: 20px 20px 22px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  }
  .cert-photo::before{
    content:''; position:absolute; inset:0;
    background: linear-gradient(180deg, rgba(12,8,6,0.1) 0%, rgba(12,8,6,0.05) 30%, rgba(10,7,5,0.8) 72%, rgba(8,5,4,0.94) 100%);
  }
  .cert-wordmark{
    position:relative; z-index:1;
    height:64px; width:auto;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
  }
  .cert-main{ position:relative; z-index:1; text-align:center; width:100%; }
  .cert .badge{
    width:64px; height:64px; margin:0 auto 14px;
    border-radius:50%;
    background: var(--accent-soft);
    border: 2px solid rgba(255,255,255,0.85);
    display:flex; align-items:center; justify-content:center;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  }
  .cert .num{ font-family:var(--mono); font-size:12.5px; color:var(--accent); font-weight:700; margin-bottom:4px; text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
  .cert h3{ font-size:22px; font-weight:800; margin:0 0 4px; color:#fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
  .cert .region-name{ font-size:13.5px; color:rgba(255,255,255,0.75); margin-bottom:16px; }
  .cert .cert-grid{
    display:grid; grid-template-columns:1fr 1fr; gap:10px;
    background: rgba(10,10,14,0.55);
    backdrop-filter: blur(16px) saturate(1.6);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius:14px; padding:14px;
  }
  .cert .cert-grid div{ text-align:left; }
  .cert .cert-grid .k{ font-size:10.5px; color:rgba(255,255,255,0.6); font-family:var(--mono); }
  .cert .cert-grid .v{ font-size:13.5px; font-weight:700; color:#fff; }
  .cert-close-btn{ color:rgba(255,255,255,0.7); border-color:rgba(255,255,255,0.25); background:transparent; }

  #landAnim{
    position:fixed; inset:0; z-index:55; display:none;
    align-items:center; justify-content:center;
    background: rgba(8,9,11,0.55);
  }
  #landAnim.open{ display:flex; }
  #landAnim .capsule{ font-size:54px; animation: descend 1.1s cubic-bezier(.4,0,.2,1) forwards; }
  @keyframes descend{
    0%{ transform: translateY(-140px) scale(0.8); opacity:0; }
    70%{ transform: translateY(0) scale(1.05); opacity:1; }
    100%{ transform: translateY(0) scale(1); opacity:1; }
  }

  .toast{
    position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
    background: var(--ink); color:#fff; font-size:13px; font-weight:600;
    padding:10px 18px; border-radius:100px; z-index:70;
    opacity:0; pointer-events:none; transition:opacity 0.25s ease;
  }
  .toast.show{ opacity:1; }

  #feedPanel{
    position:fixed; top:0; right:-320px; bottom:0; width:300px; z-index:30;
    background: rgba(8,9,11,0.82);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(90,209,255,0.2);
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
    padding: 70px 18px 18px;
    overflow-y:auto;
    transition: right 0.3s ease;
    color:#f2f0ec;
  }
  #feedPanel.open{ right:0; }
  .feed-panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
  #feedPanel h3{ font-size:15px; margin:0; font-weight:700; color:#fff; }
  .feed-close{
    width:28px; height:28px; border-radius:50%; flex-shrink:0;
    background: rgba(255,255,255,0.08);
    border:1px solid rgba(90,209,255,0.25);
    color:#f2f0ec; font-size:13px; line-height:1;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
  }
  .feed-row{ display:flex; gap:9px; padding:9px 0; border-bottom:1px solid rgba(255,255,255,0.08); font-size:12.5px; }
  .feed-row:last-child{ border-bottom:none; }
  .feed-row .icon{ font-size:15px; }
  .feed-row .meta{ font-family:var(--mono); font-size:10px; color:rgba(90,209,255,0.8); }
  .empty-note{ font-size:12.5px; color:rgba(242,240,236,0.55); }
  .signout-link{
    display:block; width:100%; margin-top:22px;
    background:transparent; border:none;
    color:rgba(242,240,236,0.5); font-size:12.5px; font-weight:600;
    text-align:center; padding:10px; cursor:pointer;
  }
  .signout-link:active{ color:rgba(242,240,236,0.8); }

  /* ---------- MARS SIGNALS (feed stripe) ---------- */
  #signalsStripe{
    position:fixed; left:0; right:0; top:12vh; bottom:0; z-index:21;
    background: rgba(8,9,11,0.88);
    backdrop-filter: blur(20px) saturate(1.5);
    border-top: 1px solid rgba(90,209,255,0.2);
    border-radius: 20px 20px 0 0;
    padding: 14px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.35);
    display:flex; flex-direction:column;
    transform: translateY(100%);
    opacity:0;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
    pointer-events:none;
  }
  #signalsStripe.open{ transform:translateY(0); opacity:1; pointer-events:auto; }
  .stripe-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 16px 12px; border-bottom:1px solid rgba(255,255,255,0.1); flex-shrink:0; }
  .stripe-tabs{ display:flex; gap:5px; overflow-x:auto; }
  .stripe-tab{
    flex-shrink:0; background:transparent; border:1px solid rgba(255,255,255,0.14);
    color:rgba(242,240,236,0.65); font-size:12.5px; font-weight:600;
    padding:7px 13px; border-radius:100px; cursor:pointer; white-space:nowrap;
  }
  .stripe-tab.active{ background: var(--accent); border-color:var(--accent); color:#fff; }
  .stripe-actions{ display:flex; gap:8px; flex-shrink:0; }
  .stripe-icon-btn{
    width:32px; height:32px; border-radius:50%; flex-shrink:0;
    background: rgba(255,255,255,0.08); border:1px solid rgba(90,209,255,0.25);
    color:#f2f0ec; font-size:15px; line-height:1; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
  }
  .stripe-row{
    display:flex; flex-direction:column; overflow-y:auto; flex:1;
    -webkit-overflow-scrolling:touch;
  }
  .stripe-empty{ font-size:13px; color:rgba(242,240,236,0.5); padding:32px 16px; white-space:normal; text-align:center; }
  .signal-chip{
    flex-shrink:0; width:100%;
    border-bottom:1px solid rgba(255,255,255,0.08);
    padding:14px 16px; cursor:pointer; color:#f2f0ec;
  }
  .signal-chip:active{ background:rgba(255,255,255,0.04); }
  .signal-chip.fading{ opacity:0.55; }
  .chip-top{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
  .chip-avatar{
    width:32px; height:32px; border-radius:50%; flex-shrink:0;
    background: rgba(255,255,255,0.12) center/cover no-repeat;
    display:flex; align-items:center; justify-content:center; font-size:16px;
  }
  .chip-name{ font-size:13.5px; font-weight:600; color:rgba(242,240,236,0.9); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
  .chip-area{ font-size:13px; flex-shrink:0; }
  .chip-body{
    font-size:14.5px; line-height:1.45; color:#f2f0ec;
    margin:0 0 10px 40px;
    overflow-wrap:break-word;
  }
  .chip-foot{ display:flex; align-items:center; gap:12px; font-size:11.5px; color:rgba(242,240,236,0.6); font-family:var(--mono); margin-left:40px; }
  .chip-foot .chip-time{ margin-left:auto; }

  #signalDetailOverlay .desc{ font-size:16px; color:var(--ink); }
  .signal-vote-btn.active-signal{ background:var(--green-soft); border-color:var(--green); color:var(--ink); }
  .signal-vote-btn.active-noise{ background:rgba(229,72,77,0.12); border-color:#e5484d; color:var(--ink); }
  .area-chip.active{ background:var(--accent); border-color:var(--accent); color:#fff; }

  /* ---------- NINE BUILDING BLOCKS ---------- */
  .globe-building{
    position:absolute; left:0; top:0;
    transform: translate(-50%,-50%);
    width:34px; height:34px; border-radius:8px;
    pointer-events:auto; cursor:pointer;
    background: rgba(10,10,14,0.65);
    border: 2px solid rgba(255,255,255,0.5);
    display:flex; align-items:center; justify-content:center;
    font-size:16px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    transition: opacity 0.15s ease;
  }
  .globe-building.operational{ box-shadow: 0 0 14px rgba(52,199,89,0.65); }
  .globe-building .gb-progress{
    position:absolute; left:2px; right:2px; bottom:2px; height:3px; border-radius:100px;
    background:rgba(255,255,255,0.2); overflow:hidden;
  }
  .globe-building .gb-progress-fill{ height:100%; border-radius:100px; }

  .building-hero{
    margin:-26px -24px 16px; height:120px; border-radius:24px 24px 0 0;
    display:flex; align-items:center; justify-content:center; font-size:48px;
    position:relative; overflow:hidden;
    background-size:cover; background-position:center;
  }
  .building-hero::after{
    content:''; position:absolute; inset:0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 100%);
  }
  .building-close-btn{
    position:absolute; top:12px; right:12px; z-index:1;
    width:30px; height:30px; border-radius:50%;
    background:rgba(0,0,0,0.35); backdrop-filter:blur(6px);
    border:1px solid rgba(255,255,255,0.4); color:#fff;
    font-size:14px; line-height:1; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
  }
  .building-detail-header{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
  .building-detail-icon{
    width:48px; height:48px; border-radius:14px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center; font-size:24px;
  }
  .building-progress-track{ width:100%; height:8px; border-radius:100px; background:var(--line); overflow:hidden; margin:4px 0 8px; }
  .building-progress-fill{ height:100%; border-radius:100px; transition:width 0.3s ease; }
  .building-about-note{
    margin:14px 0; padding:11px 13px; background:var(--canvas); border-radius:12px;
    font-size:12.5px; color:var(--ink); line-height:1.5;
  }
  .building-about-note b{ display:block; font-size:13px; margin-bottom:3px; }
  .building-signals-preview{ margin:14px 0; max-height:280px; overflow-y:auto; }
  .building-signal-row{
    padding:9px 0; border-bottom:1px solid var(--line); font-size:12.5px; color:var(--ink);
  }
  .building-signal-row:last-child{ border-bottom:none; }
  .building-signal-row .bsr-meta{ font-size:10.5px; color:var(--ink-soft); font-family:var(--mono); margin-top:2px; }
  .btn-view-all{
    display:block; width:100%; background:transparent; border:1px solid var(--line); color:var(--ink);
    font-size:12.5px; font-weight:600; padding:10px; border-radius:10px; cursor:pointer; margin-top:8px;
  }
  .btn-view-all:disabled{ opacity:0.5; cursor:default; }
