body.bubble-body { background:#0b0d10; color:#f4f6fa; }
.bubble-page { width:100%; max-width:2200px; margin:0 auto; padding:16px 14px 28px; }
.bubble-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:0 2px 14px; }
.bubble-eyebrow { margin:0 0 5px; color:#7f91ff; font-size:9px; font-weight:850; letter-spacing:1.7px; }
.bubble-heading h1 { margin:0; font-size:25px; line-height:1.15; letter-spacing:-.7px; }
.bubble-description { margin:5px 0 0; max-width:760px; color:#8e98a8; font-size:11px; line-height:1.5; }
.bubble-heading-right { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.bubble-live { display:inline-flex; align-items:center; gap:8px; color:#9da6b5; font-size:11px; white-space:nowrap; }
.bubble-live span { width:7px; height:7px; border-radius:50%; background:#20c879; box-shadow:0 0 10px #20c879; }
.bubble-refresh { height:35px; padding:0 13px; border:1px solid #303846; border-radius:8px; background:#171c25; color:#f5f6f8; font-size:11px; font-weight:750; cursor:pointer; }
.bubble-refresh:hover { background:#242c39; }
.bubble-refresh:disabled { opacity:.6; cursor:wait; }
.bubble-toolbar { display:flex; align-items:center; gap:13px; padding:9px 10px; border:1px solid #282e38; border-radius:13px; background:#151920; box-shadow:0 8px 24px rgba(0,0,0,.15); }
.bubble-timeframes { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.bubble-timeframes button { min-width:42px; height:38px; padding:0 10px; border:1px solid transparent; border-radius:9px; background:transparent; color:#8e98a8; font-size:12px; font-weight:800; cursor:pointer; transition:all .15s ease; }
.bubble-timeframes button:hover { background:#252d3a; color:#fff; }
.bubble-timeframes button.selected { background:#27a96f; border-color:#42d28d; color:#fff; box-shadow:0 0 0 3px rgba(54,125,255,.22),0 0 0 5px rgba(54,125,255,.12); }
.bubble-search-wrap { height:38px; min-width:180px; max-width:390px; flex:1; display:flex; align-items:center; gap:9px; padding:0 12px; border:1px solid #333b49; border-radius:9px; background:#0e1219; color:#a2adbd; }
.bubble-search-wrap:focus-within { border-color:#6078ef; box-shadow:0 0 0 3px rgba(96,120,239,.13); }
.bubble-search-wrap span { font-size:20px; line-height:1; }
.bubble-search-wrap input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:#f5f6f8; font:inherit; font-size:12px; }
.bubble-search-wrap input::placeholder { color:#778192; }
.bubble-count-wrap { display:flex; align-items:center; gap:8px; color:#8e98a8; font-size:11px; white-space:nowrap; }
.bubble-count-wrap select { height:38px; padding:0 11px; border:1px solid #333b49; border-radius:9px; background:#0e1219; color:#f5f6f8; font:inherit; font-size:12px; }
.bubble-legend { display:flex; align-items:center; gap:17px; padding:10px 4px 10px; color:#9ba4b3; font-size:11px; }
.bubble-legend span:not(.bubble-updated) { display:inline-flex; align-items:center; gap:7px; }
.legend-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.legend-dot.gain { background:#28c879; }.legend-dot.loss { background:#ed555b; }
.bubble-history-hint { color:#8290a5; font-size:10px; }
.bubble-updated { margin-left:auto; color:#778394; font-size:10px; white-space:nowrap; }
.bubble-chart-shell { position:relative; width:100%; height:calc(100vh - 245px); min-height:520px; max-height:1000px; overflow:hidden; border:1px solid #252c36; border-radius:16px; background:#0b0d10; box-shadow:0 12px 34px rgba(0,0,0,.2); }
#bubbleCanvas { display:block; width:100%; height:100%; cursor:crosshair; touch-action:pan-y; }
.bubble-loading { position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:11px; background:#0b0d10; color:#f4f6fa; }
.bubble-loading[hidden] { display:none; }
.bubble-loading small { color:#8791a1; font-size:12px; }
.loading-orbit { width:34px; height:34px; border:3px solid #293344; border-top-color:#37c982; border-radius:50%; animation:bubble-spin .8s linear infinite; }
@keyframes bubble-spin { to { transform:rotate(360deg); } }
.bubble-tooltip { position:absolute; z-index:5; display:none; min-width:170px; max-width:230px; padding:12px 14px; border:1px solid #394457; border-radius:10px; background:rgba(17,22,31,.97); color:#f5f6f8; box-shadow:0 12px 35px #0009; pointer-events:none; font-size:11px; line-height:1.65; }
.bubble-tooltip strong { display:block; font-size:14px; margin-bottom:4px; }
.bubble-tooltip .tip-muted { color:#a3adbc; }.bubble-tooltip .tip-up { color:#2dd68a; font-weight:800; }.bubble-tooltip .tip-down { color:#ff6269; font-weight:800; }
.bubble-error { position:absolute; inset:0; z-index:4; display:grid; place-items:center; padding:25px; color:#ff9299; text-align:center; background:#0b0d10; font-size:13px; }
.bubble-error[hidden] { display:none; }
.bubble-footnote { margin:10px 2px 0; color:#748091; font-size:9px; line-height:1.6; }
@media(max-width:1050px) {
  .bubble-toolbar { flex-wrap:wrap; }
  .bubble-timeframes { width:100%; justify-content:space-between; }
  .bubble-timeframes button { flex:1; }
  .bubble-search-wrap { max-width:none; }
  .bubble-chart-shell { height:calc(100vh - 285px); }
}
@media(max-width:650px) {
  .bubble-page { padding:12px 8px 20px; }
  .bubble-heading { align-items:flex-start; flex-direction:column; gap:9px; }
  .bubble-heading h1 { font-size:22px; }
  .bubble-heading-right { width:100%; justify-content:space-between; }
  .bubble-toolbar { gap:8px; padding:8px; }
  .bubble-timeframes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
  .bubble-timeframes button { min-width:0; width:100%; height:35px; padding:0 3px; }
  .bubble-search-wrap { min-width:100px; max-width:none; }
  .bubble-count-wrap { gap:5px; }
  .bubble-count-wrap select { padding:0 6px; }
  .bubble-legend { flex-wrap:wrap; gap:8px 12px; }
  .bubble-history-hint,.bubble-updated { width:100%; margin-left:0; white-space:normal; }
  .bubble-chart-shell { height:66vh; min-height:430px; }
  .bubble-footnote { font-size:9px; }
}

/* Continuous live animation status */
.bubble-live span { animation:bubble-live-pulse 1.2s ease-in-out infinite; }
@keyframes bubble-live-pulse {
  0%,100% { opacity:1; box-shadow:0 0 5px #20c879,0 0 11px #20c87966; transform:scale(1); }
  50% { opacity:.65; box-shadow:0 0 2px #20c879; transform:scale(.82); }
}
.bubble-chart-shell { contain:layout paint; }
#bubbleCanvas { will-change:contents; }

/* Percentage-move visualization polish */
.bubble-chart-shell {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(31,53,48,.24), transparent 58%),
    radial-gradient(ellipse at 12% 12%, rgba(32,92,62,.09), transparent 35%),
    #090c10;
  border-color:#303846;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 18px 48px rgba(0,0,0,.32);
}
.bubble-legend { padding-top:12px; padding-bottom:12px; }
.bubble-history-hint { color:#aab5c5; }
.bubble-footnote { color:#8793a5; }


/* =========================================================
   NAFALOGY BUBBLE — MOBILE-FIRST RESPONSIVE REFINEMENT
   ========================================================= */
.bubble-page {
  width:100%;
  max-width:1900px;
  margin:0 auto;
  padding:clamp(14px,2.2vw,30px) clamp(12px,2vw,28px) 34px;
  box-sizing:border-box;
}
.bubble-heading { min-width:0; }
.bubble-heading > div:first-child { min-width:0; }
.bubble-description { max-width:720px; }
.bubble-toolbar { min-width:0; }
.bubble-search-wrap { min-width:0; }
.bubble-count-wrap { flex-shrink:0; }
.bubble-chart-shell { width:100%; min-width:0; }

/* Tablet */
@media (max-width: 900px) {
  .bubble-page { padding:20px 16px 30px; }
  .bubble-heading { align-items:flex-start; }
  .bubble-heading h1 { font-size:28px; }
  .bubble-toolbar { flex-wrap:wrap; gap:10px; }
  .bubble-timeframes { flex:1 1 100%; width:100%; }
  .bubble-timeframes button { flex:1 1 0; }
  .bubble-search-wrap { flex:1 1 220px; max-width:none; }
  .bubble-count-wrap { flex:0 0 auto; }
  .bubble-chart-shell { height: min(68vh, 680px); min-height:430px; }
}

/* Phones */
@media (max-width: 600px) {
  .bubble-page {
    padding:14px 10px 24px;
  }
  .bubble-heading {
    display:flex;
    flex-direction:column;
    gap:11px;
    margin-bottom:15px;
  }
  .bubble-eyebrow {
    font-size:9px;
    letter-spacing:1.35px;
    margin-bottom:6px;
  }
  .bubble-heading h1 {
    font-size:24px;
    letter-spacing:-.55px;
  }
  .bubble-description {
    margin-top:6px;
    font-size:11px;
    line-height:1.45;
  }
  .bubble-heading-right {
    width:100%;
    justify-content:space-between;
    gap:8px;
  }
  .bubble-live { font-size:10px; }
  .bubble-refresh {
    height:34px;
    padding:0 11px;
    font-size:11px;
  }
  .bubble-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:9px;
    padding:9px;
    border-radius:11px;
  }
  .bubble-timeframes {
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:5px;
    width:100%;
  }
  .bubble-timeframes button {
    min-width:0;
    width:100%;
    height:34px;
    padding:0 3px;
    border-radius:7px;
    font-size:11px;
  }
  .bubble-search-wrap {
    grid-column:1;
    width:100%;
    max-width:none;
    min-width:0;
    height:36px;
    padding:0 9px;
    gap:6px;
  }
  .bubble-search-wrap span { font-size:19px; }
  .bubble-search-wrap input { font-size:11px; }
  .bubble-count-wrap {
    grid-column:2;
    gap:5px;
    font-size:10px;
  }
  .bubble-count-wrap select {
    max-width:88px;
    height:36px;
    padding:0 6px;
    font-size:10px;
  }
  .bubble-legend {
    display:flex;
    flex-wrap:wrap;
    gap:8px 12px;
    padding:10px 2px;
    font-size:10px;
  }
  .bubble-legend span:not(.bubble-updated) { gap:5px; }
  .legend-dot { width:7px; height:7px; }
  .bubble-updated {
    width:100%;
    margin:0;
    font-size:9px;
    line-height:1.35;
  }
  .bubble-chart-shell {
    height: min(68svh, 620px);
    height: min(68vh, 620px);
    min-height:390px;
    border-radius:10px;
  }
  .bubble-tooltip {
    min-width:145px;
    max-width:190px;
    padding:9px 10px;
    font-size:10px;
  }
  .bubble-tooltip strong { font-size:12px; }
  .bubble-footnote {
    margin:10px 2px 0;
    font-size:9px;
    line-height:1.5;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .bubble-page { padding-left:7px; padding-right:7px; }
  .bubble-heading h1 { font-size:22px; }
  .bubble-timeframes button { font-size:10px; height:32px; }
  .bubble-chart-shell {
    height:64vh;
    min-height:350px;
  }
  .bubble-count-wrap > span { display:none; }
  .bubble-count-wrap select { max-width:82px; }
}

/* Landscape phone: preserve a useful chart viewport */
@media (max-width: 900px) and (orientation: landscape) {
  .bubble-chart-shell { height:72vh; min-height:300px; }
}

/* Prevent page-level horizontal scrolling on narrow devices */
html, body, .bubble-body { max-width:100%; overflow-x:hidden; }

/* CryptoBubbles.net on-demand embed */
.bubble-external-page .bubble-heading { margin-bottom:16px; }
.bubble-source-link { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.bubble-source-notice { display:flex; flex-direction:column; gap:4px; margin:0 0 12px; padding:12px 15px; border:1px solid #293344; border-radius:12px; background:#141a24; color:#aab5c5; font-size:12px; line-height:1.5; }
.bubble-source-notice strong { color:#f4f6fa; font-size:13px; }
.bubble-embed-shell { position:relative; width:100%; min-height:620px; height:calc(100vh - 275px); max-height:1100px; overflow:hidden; border:1px solid #293344; border-radius:15px; background:#0b0d10; }
.bubble-embed-placeholder { min-height:620px; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; text-align:center; color:#f4f6fa; }
.bubble-embed-placeholder[hidden], .bubble-external-frame[hidden] { display:none; }
.bubble-embed-mark { width:54px; height:54px; display:grid; place-items:center; border-radius:50%; background:#183c30; color:#40d997; font-size:35px; }
.bubble-embed-placeholder h2 { margin:0; font-size:22px; }
.bubble-embed-placeholder p { max-width:480px; margin:0; color:#98a4b5; font-size:13px; line-height:1.6; }
.bubble-embed-placeholder small { color:#748091; font-size:11px; }
.bubble-load-button { min-height:42px; padding:0 20px; border:0; border-radius:9px; background:#22a66c; color:#fff; font-size:13px; font-weight:800; cursor:pointer; }
.bubble-load-button:hover { background:#29bd7c; }
.bubble-external-frame { display:block; width:100%; height:100%; min-height:620px; border:0; background:#0b0d10; }
@media(max-width:700px) {
  .bubble-external-page .bubble-heading { align-items:flex-start; flex-direction:column; }
  .bubble-external-page .bubble-heading-right { width:100%; }
  .bubble-external-page .bubble-source-link { width:100%; }
  .bubble-embed-shell, .bubble-embed-placeholder, .bubble-external-frame { min-height:70vh; height:70vh; }
  .bubble-embed-placeholder { padding:18px; }
}


/* Larger full-screen market map with room for prominent animated bubbles */
.bubble-page { max-width:none; width:100%; padding:12px clamp(10px,1.2vw,22px) 20px; }
.bubble-chart-shell {
  height:calc(100vh - 205px);
  min-height:650px;
  max-height:none;
  border-radius:10px;
  border:1px solid #242a31;
  background:#101010;
}
#bubbleCanvas { width:100%; height:100%; display:block; }
.bubble-heading { margin-bottom:10px; }
.bubble-toolbar { padding:7px 9px; }
.bubble-legend { padding-top:7px; padding-bottom:7px; }
@media (max-width:900px) {
  .bubble-chart-shell { height:calc(100vh - 270px); min-height:560px; }
}
@media (max-width:600px) {
  .bubble-page { padding:10px 7px 16px; }
  .bubble-chart-shell { height:76vh; min-height:520px; max-height:none; }
}
@media (prefers-reduced-motion:reduce) {
  .bubble-live span { animation:none; }
}

/* Nafalogy market map: compact exchange-style toolbar + full-viewport chart */
.bubble-body { background:#101010 !important; }
.bubble-page { width:100%; max-width:none; margin:0; padding:0 0 8px; }
.bubble-topbar { display:flex; align-items:center; gap:0; min-height:62px; padding:0 12px; margin:0; border:0; border-bottom:1px solid #303030; border-radius:0; background:#171717; box-shadow:none; }
.bubble-brand { display:flex; align-items:center; gap:12px; min-width:245px; height:62px; padding-right:22px; border-right:1px solid #333; color:#f4f4f4; letter-spacing:2px; font-size:17px; white-space:nowrap; }
.brand-mark { width:38px; height:38px; display:block; position:relative; }
.brand-mark i { position:absolute; width:14px; height:14px; border-radius:50%; background:#61d33b; }
.brand-mark i:nth-child(1){left:12px;top:0;background:#f04452}.brand-mark i:nth-child(2){left:22px;top:10px}.brand-mark i:nth-child(3){left:12px;top:21px}.brand-mark i:nth-child(4){left:1px;top:12px}.brand-mark i:nth-child(5){left:13px;top:12px;background:#91d94a}
.bubble-timeframes { display:flex; align-items:center; justify-content:flex-start; gap:7px; flex:1; padding:0 16px; border:0; background:transparent; }
.bubble-timeframes button { min-width:52px; height:42px; border:0; border-radius:5px; background:transparent; color:#55bd83; font-size:14px; font-weight:700; text-transform:uppercase; }
.bubble-timeframes button.selected { background:#35ae72; color:#07140d; }
.bubble-search-wrap { height:44px; max-width:230px; min-width:140px; margin:0 12px; padding:0 12px; border:0; border-left:1px solid #333; border-radius:0; background:transparent; }
.bubble-search-wrap input { color:#eee; font-size:13px; }
.bubble-count-wrap { height:44px; padding:0 12px; border-left:1px solid #333; color:#eee; }
.bubble-count-wrap select { border:0; background:#171717; color:#eee; font-size:13px; }
.bubble-refresh { width:48px; height:44px; margin-left:8px; border:0; border-left:1px solid #333; border-radius:0; background:transparent; color:#e6e6e6; font-size:24px; }
.bubble-statusline { display:flex; align-items:center; justify-content:space-between; height:28px; padding:0 14px; background:#141414; color:#8f969e; font-size:10px; letter-spacing:.3px; }
.bubble-live { display:flex; align-items:center; gap:7px; }
.bubble-chart-shell { width:100%; height:calc(100vh - 178px); min-height:560px; max-height:none; margin:0; border:0; border-radius:0; background:#101010; box-shadow:none; }
#bubbleCanvas { width:100%; height:100%; display:block; }
.bubble-loading { background:#101010; }
.bubble-loading strong { color:#ddd; }
.bubble-loading small { color:#8b929b; }
.bubble-error { background:#101010; }
@media(max-width:800px){
 .bubble-topbar { min-height:auto; flex-wrap:wrap; padding:7px 8px; gap:4px; }
 .bubble-brand { min-width:0; width:100%; height:38px; border:0; padding:0 4px; font-size:14px; }
 .brand-mark { transform:scale(.8); transform-origin:left center; width:32px; }
 .bubble-timeframes { order:2; flex:1 1 100%; padding:4px 0; gap:3px; }
 .bubble-timeframes button { min-width:0; flex:1; height:35px; font-size:11px; }
 .bubble-search-wrap { order:3; flex:1; max-width:none; margin:0; height:36px; border-left:0; border:1px solid #333; border-radius:6px; }
 .bubble-count-wrap { order:4; height:36px; padding:0 5px; border-left:0; }
 .bubble-refresh { order:5; width:38px; height:36px; margin:0; border-left:0; }
 .bubble-chart-shell { height:calc(100vh - 190px); min-height:440px; }
}
@media(max-width:430px){ .bubble-chart-shell { height:calc(100vh - 205px); min-height:390px; } }


/* Clean, balanced market-map presentation */
.bubble-page{max-width:none;padding:10px 12px 18px}
.bubble-heading{display:none!important}
.bubble-toolbar{border:1px solid #252d38;background:#10151d;border-radius:12px;box-shadow:0 8px 28px #0003;padding:9px 12px;gap:12px}
.bubble-brand{min-width:150px;letter-spacing:1px}
.bubble-timeframes button{border-radius:8px;transition:background .18s ease,transform .18s ease}
.bubble-timeframes button:hover{transform:translateY(-1px)}
.bubble-timeframes button.selected{background:#20b978;color:#07150e;box-shadow:0 4px 14px #20b97835}
.bubble-statusline{display:flex;align-items:center;gap:12px;min-height:30px;padding:3px 4px;color:#8794a5;font-size:11px}
.bubble-chart-shell{height:calc(100vh - 205px);min-height:560px;border:1px solid #27313d;border-radius:13px;overflow:hidden;background:#090d12;box-shadow:0 16px 44px #0005}
#bubbleCanvas{display:block;width:100%;height:100%;touch-action:pan-y}
.bubble-tooltip{backdrop-filter:blur(12px)}
@media(max-width:900px){.bubble-chart-shell{height:calc(100vh - 250px);min-height:480px}}
@media(max-width:600px){.bubble-page{padding:8px 7px 14px}.bubble-toolbar{border-radius:10px;padding:8px;gap:7px}.bubble-brand{min-width:0}.bubble-statusline{font-size:9px;gap:7px;flex-wrap:wrap}.bubble-chart-shell{height:70vh;min-height:430px;border-radius:9px}}
