/* ============================================================
   SYNAPSE — Industrial Ecology OS
   Full-screen heatmap + floating glassmorphic bentos
   ============================================================ */

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg: #000000;
  --glass-bg: rgba(6, 6, 6, 0.35);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.35);
  --glass-blur: blur(32px) saturate(1.5);

  --text-primary: #E8E8E8;
  --text-secondary: #9A9A9A;
  --text-muted: #555;

  --green: #00CC88;
  --orange: #FF9500;
  --red: #FF3B30;

  --font-ui: 'Urbanist', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Light theme overrides */
.theme-light {
  --bg: #b0c0ce;
  --glass-bg: rgba(210, 224, 238, 0.50);
  --glass-border: rgba(18, 55, 90, 0.10);
  --glass-shadow: 0 8px 32px rgba(15,40,70,0.14), 0 2px 8px rgba(15,40,70,0.08);

  --text-primary: #12334a;
  --text-secondary: #3a6380;
  --text-muted: #7199b0;
}
.theme-light body,
.theme-light .device-frame {
  background: var(--bg);
}
.theme-light .top-bar__right .icon-btn svg { stroke: #2a506e; }
.theme-light .settings-card { background: rgba(225,238,250,0.75); }
.theme-light .settings-card:hover { background: rgba(225,238,250,0.92); }
.theme-light .settings-overlay { background: rgba(176,192,206,0.55); }
.theme-light .splash { background: var(--bg); }
.theme-light .gauge-panel { background: rgba(230,240,250,0.92); border-color: rgba(18,55,90,0.10); }
.theme-light .gauge-panel__close { background: rgba(18,55,90,0.08); }
.theme-light .gauge-panel__close:hover { background: rgba(18,55,90,0.15); }
.theme-light .gauge-panel__problem { background: rgba(18,55,90,0.05); border-color: rgba(18,55,90,0.08); }
.theme-light .gauge-panel__input { background: rgba(18,55,90,0.06); border-color: rgba(18,55,90,0.12); color: var(--text-primary); }
.theme-light .gauge-panel__add-btn { background: rgba(18,55,90,0.07); color: var(--text-secondary); }
.theme-light .gauge-panel__count { background: rgba(18,55,90,0.07); }
.theme-light .bubble--red { background: rgba(255, 59, 48, 0.12); border-color: rgba(255, 59, 48, 0.18); }
.theme-light .bubble--orange { background: rgba(255, 149, 0, 0.12); border-color: rgba(255, 149, 0, 0.18); }
.theme-light .bubble--green { background: rgba(0, 204, 136, 0.12); border-color: rgba(0, 204, 136, 0.18); }
.theme-light .bubble { border-color: rgba(18,55,90,0.08); box-shadow: 0 2px 12px rgba(20,50,80,0.18); }
.theme-light .bubble--mini { background: rgba(230,240,250,0.88) !important; border-color: rgba(18,55,90,0.10) !important; }
.theme-light .bento { box-shadow: 0 4px 24px rgba(15,40,70,0.22), 0 1px 6px rgba(15,40,70,0.13); }
.theme-light .bubble.bubble--expanded { box-shadow: 0 4px 24px rgba(20,50,80,0.20); }
.theme-light .bubble.bubble--expanded .bubble-detail__name,
.theme-light .bubble.bubble--expanded .bubble-detail__since,
.theme-light .bubble.bubble--expanded .bubble-detail__cta,
.theme-light .bubble.bubble--expanded .bubble-detail__cta span {
  color: #e0e0e0;
}
.theme-light .bubble.bubble--expanded .bubble-detail__cta {
  background: rgba(255,255,255,0.08);
}
.theme-light .bubble.bubble--expanded .bubble-detail__cta:hover {
  background: rgba(255,255,255,0.14);
}
.theme-light .gauge-panel { box-shadow: 0 8px 32px rgba(20,50,80,0.20), 0 2px 8px rgba(20,50,80,0.12); }

html { font-size: 16px; }

body {
  font-family: var(--font-ui);
  background: #000;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ---- Device frame ---- */
.device-frame {
  width: 393px;
  height: 852px;
  border-radius: 44px;
  border: 2px solid #1A1A1A;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

/* ---- Canvas: fills entire frame ---- */
#heatmapCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- UI Layer on top ---- */
.ui-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 2;
}
.ui-layer > * { pointer-events: auto; }

/* ---- Glass card mixin ---- */
.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---- TOP BAR ---- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 8px;
  flex-shrink: 0;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-glyph { width: 26px; height: 26px; }

.logo-text {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn svg { width: 26px; height: 26px; }

/* ---- HEADER META ---- */
.header-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 22px 10px;
  flex-shrink: 0;
}

.header-meta__left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.meta-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.context-selector { cursor: pointer; }

.context-selector__title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chevron-icon {
  width: 13px;
  height: 8px;
  color: var(--text-secondary);
  margin-top: 1px;
  flex-shrink: 0;
}

.meta-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- SHARING BUTTON (under meta-tag) ---- */
.sharing-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  margin-left: -1px;
  padding: 6px 12px;
  border-radius: 0px 10px 10px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  width: 100%;
}
.sharing-btn:hover {
  background: rgba(255,255,255,0.09);
  transform: scale(1.02);
}
.sharing-btn__label {
  font-family: var(--font-mono);
  font-size: 0.50rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: left;
}
.sharing-btn__arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.header-meta__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-top: 4px;
}

.location-card__label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
}

.location-card__name {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}

.location-card__time {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-secondary);
}

/* ---- BUBBLE LAYER (floating on heatmap) ---- */
.bubble-layer {
  flex: 1;
  position: relative;
  min-height: 0;
  pointer-events: none;
}

.bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px 16px 1px 16px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  pointer-events: auto;
  animation: bubbleFloat 4s ease-in-out infinite;
  transition: width 0.8s ease, height 0.8s ease, background 0.8s ease, border-color 0.8s ease, border-radius 0.8s ease, top 0.8s ease, left 0.8s ease, right 0.8s ease;
}

.bubble .bubble-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.8s ease, height 0.8s ease;
}

.bubble svg {
  width: 100%;
  height: 100%;
}

.bubble--red {
  background: rgba(255, 59, 48, 0.2);
  border-color: rgba(255, 59, 48, 0.25);
}

.bubble--orange {
  background: rgba(255, 149, 0, 0.2);
  border-color: rgba(255, 149, 0, 0.25);
}

.bubble--green {
  background: rgba(0, 204, 136, 0.2);
  border-color: rgba(0, 204, 136, 0.25);
}

/* Mini bubbles around mini heatmaps */
.bubble--mini {
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  opacity: 0;
  background: rgba(0,0,0,0.85) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  transition: opacity 0.6s ease 0.4s, top 0.15s linear, left 0.15s linear;
  pointer-events: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.bubble--mini .bubble-icon {
  width: 11px !important;
  height: 11px !important;
}
.bubble--mini.visible {
  opacity: 1;
  pointer-events: auto;
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---- BUBBLE EXPANDED OVERLAY ---- */
.bubble.bubble--expanded {
  width: 170px !important;
  height: auto !important;
  padding: 10px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  z-index: 100;
  animation: none;
  background: rgba(10,10,10,0.92) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
  border-radius: 14px !important;
  cursor: default;
}

.bubble.bubble--expanded .bubble-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

.bubble--expanded .bubble-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  opacity: 1;
  transition: opacity 0.25s ease 0.1s;
}

.bubble-detail__header {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.bubble-detail__name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}

.bubble-detail__pct {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  margin-left: auto;
}

.bubble-detail__bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  width: 100%;
  overflow: hidden;
}
.bubble-detail__bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.bubble-detail__since {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.bubble-detail__cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  padding: 5px 8px;
  margin-top: 2px;
  border: none;
  border-radius: 8px 8px 8px 2px;
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.44rem;
  text-transform: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}
.bubble-detail__cta:hover {
  background: rgba(255,255,255,0.13);
}
.bubble-detail__cta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Mini expanded */
.bubble--mini.bubble--expanded {
  width: 150px !important;
  padding: 8px;
  margin-left: 0 !important;
  margin-top: 0 !important;
  pointer-events: auto;
}

/* Open leftward for right-side bubbles */
.bubble.bubble--expand-left {
  transform-origin: top right;
  right: 0;
  left: auto !important;
  margin-left: auto;
}

/* ---- FLOATING ZONE NAMES ---- */
.zone-label {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-body);
  font-size: 0.5rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.6s ease 0.5s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}
.zone-label.visible {
  opacity: 1;
}
.zone-label--main {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
}

/* ---- BOTTOM SECTION ---- */
.bottom-section {
  flex-shrink: 0;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bento-row-top {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 8px;
}

.bento {
  border-radius: 18px;
  overflow: hidden;
}

/* Pointed corner variants (SMS-bubble style — truly sharp) */
.bento-peak-bl {
  border-radius: 18px 18px 18px 1px;
}
.bento-peak-br {
  border-radius: 18px 18px 1px 18px;
}
.bento-peak-tl {
  border-radius: 1px 18px 18px 18px;
}
.bento-peak-tr {
  border-radius: 18px 1px 18px 18px;
}

/* ---- BENTO STORE / SCALE TOGGLE ---- */
.bento--store {
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  align-self: end;
  min-height: 90px;
}
.bento--store:hover {
  background: rgba(255,255,255,0.04);
}

.scale-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.scale-toggle__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 1;
}

.scale-toggle__title {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.scale-toggle__sub {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  cursor: pointer;
  user-select: none;
  line-height: 1.2;
}

.toggle-active {
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.toggle-inactive {
  font-weight: 400;
  font-size: 0.58rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.toggle-sep {
  font-weight: 300;
  color: var(--text-muted);
  font-size: 0.55rem;
  margin: 0 1px;
}

.scale-toggle__icon {
  position: absolute;
  bottom: -48px;
  right: -48px;
  width: 110px;
  height: 110px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 0;
}

.toggle-dots {
  width: 100%;
  height: 100%;
}

/* ---- BENTO CHART WRAPPER + RESILIENCE SCORE ---- */
.bento-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

.resilience-score {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.7rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: -0.03em;
  line-height: 1;
  padding-right: 2px;
}

/* ---- BENTO CHART ---- */
.bento--chart {
  padding: 6px 8px 4px;
  min-height: 90px;
  max-height: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.chart-title {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-bottom: 2px;
  text-align: right;
}

.chart-canvas-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
}

#chartCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  flex-shrink: 0;
}

.chart-labels span {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-secondary);
  text-align: center;
  flex: 1;
  min-width: 0;
}

.chart-labels span.chart-label--future {
  color: rgba(255,255,255,0.07);
}
.theme-light .chart-labels span.chart-label--future {
  color: rgba(18,55,90,0.32);
}
.chart-labels span.chart-label--current {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---- BENTO GAUGES ---- */
.bento--gauges {
  padding: 5px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
}

.gauges-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin-bottom: 2px;
}

.gauges-title {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gauges-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px rgba(0,204,136,0.6);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.gauges-body {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex: 1;
  overflow: visible;
}

.gauges-row {
  display: flex;
  gap: 0;
  align-items: flex-end;
  flex: 1;
  justify-content: center;
  overflow: visible;
}

.gauge-pole + .gauge-pole {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.gauge-pole {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.gauge-pole-label {
  font-family: var(--font-mono);
  font-size: 0.44rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.gauge-pole-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
}

.gauges-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  flex: 1;
  min-width: 0;
  padding: 0 0 0 2px;
}

.gauges-explore-btn {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 14px 14px 14px 1px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 8px 5px 10px;
  gap: 4px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  position: relative;
}
.gauges-explore-btn:hover {
  background: rgba(255,255,255,0.09);
  transform: scale(1.02);
}
.gauges-explore-btn .btn-arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.gauges-explore-btn .btn-label {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: left;
}

.gauge-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 34px;
  flex: 0 0 34px;
  position: relative;
  cursor: pointer;
}

.gauge-arrow {
  width: 34px;
  height: 22px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
  flex-shrink: 0;
  animation: arrowFloat 2s ease-in-out infinite paused;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gauge-arrow-icon {
  width: 14px;
  height: 16px;
  background: #4ADE80;
  clip-path: polygon(50% 0%, 0% 55%, 30% 55%, 30% 100%, 70% 100%, 70% 55%, 100% 55%);
  filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.6));
}
.gauge-arrow.visible {
  opacity: 1;
  transform: translateY(0);
  animation-play-state: running;
  pointer-events: auto;
}
.gauge-arrow.dragging {
  animation-play-state: paused;
  transform: scale(1.4);
}
.gauge-arrow.dragging .gauge-arrow-icon {
  background: #fff;
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.8));
}
@keyframes arrowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---- SHARING NETWORK LINKS ---- */
.sharing-links-svg {
  transition: opacity 0.5s ease;
}
.sharing-link-flow {
  stroke-dasharray: 4 20;
  stroke-dashoffset: 0;
  animation: linkFlow 2.8s linear infinite;
}
@keyframes linkFlow {
  to { stroke-dashoffset: -48; }
}

/* ---- DRAG-TO-SHARE ---- */
.bubble--drop-target {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5), 0 0 12px rgba(74, 222, 128, 0.25);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  transform: scale(1.35) !important;
  z-index: 5 !important;
}
.bubble--drop-invalid {
  opacity: 0.15 !important;
  transition: opacity 0.25s ease;
}
.bubble--drop-hover {
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.9), 0 0 20px rgba(74, 222, 128, 0.5);
  transform: scale(1.6) !important;
}
.sharing-drag-active .bubble-layer {
  z-index: 100;
}

/* Overlay for drag-to-share: SVG above everything */
.drag-overlay-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: visible;
}
.sharing-links-svg.drag-elevated {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

/* Dim bento boxes during drag */
.bottom-section.drag-dimmed .bento-row-top {
  opacity: 0.2;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.bubble--new-share {
  animation: bubblePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes bubblePopIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- SHOP MODE: Stacked user-created bubbles ---- */
.bubble--shop-stack {
  transition: top 0.45s ease, left 0.45s ease, width 0.3s ease, height 0.3s ease;
  z-index: 20;
  background: rgba(20, 20, 20, 0.92) !important;
  border-color: rgba(255,255,255,0.10) !important;
  border-radius: 12px 12px 12px 1px !important;
}
.bubble--shop-stack .bubble-icon {
  width: 18px !important;
  height: 18px !important;
}
.share-shop-label {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  pointer-events: none;
  z-index: 20;
  transition: top 0.45s ease, left 0.45s ease, opacity 0.4s ease;
  height: 38px;
}
.share-shop-label-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.share-shop-arrow-svg {
  width: 100%;
  height: 8px;
  color: rgba(255,255,255,0.25);
}
.share-shop-stores {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.share-shop-store-name {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.2;
}

.gauge-bar-wrap {
  width: 100%;
  height: 68px;
  border-radius: 6px 6px 6px 1px;
  background: transparent;
  overflow: hidden;
  position: relative;
}

.sand-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gauge-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.gauge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gauge-name {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 420px) {
  .device-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }
}

::-webkit-scrollbar { width: 0; height: 0; }

/* ============================================================
   SPLASH — Pixelation Reveal S Logo
   ============================================================ */
.splash {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 44px;
  overflow: hidden;
}
.splash.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
#splashCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   SETTINGS OVERLAY
   ============================================================ */
.settings-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  backdrop-filter: blur(28px) saturate(1.2);
  border-radius: 44px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 18px 40px;
}
.settings-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  height: 100%;
}

.settings-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-col--left .settings-card { border-radius: 16px 16px 0 16px; }
.settings-col--right .settings-card { border-radius: 16px 16px 16px 0; }
.settings-col--right {
  margin-top: 40px;
}

.settings-card {
  background: rgba(0,0,0,0.85);
  border: none;
  border-radius: 16px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
  color: var(--text-primary);
  flex: 1;
  justify-content: center;
}
.settings-card:hover {
  background: rgba(20,20,20,0.95);
  transform: scale(1.02);
}
.settings-card svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-primary);
  flex-shrink: 0;
}
.settings-card span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.settings-card--half {
  padding: 12px 14px;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.settings-card--half svg {
  width: 18px;
  height: 18px;
}
.settings-card--half span {
  font-size: 0.65rem;
}

.settings-card--danger {
  border: none;
}
.settings-card--danger svg {
  stroke: var(--red);
}
.settings-card--danger span {
  color: var(--red);
}

/* Theme selector inside settings card */
.settings-card--theme {
  gap: 8px;
}
.settings-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-card__head svg {
  width: 22px; height: 22px;
  stroke: var(--text-primary);
  flex-shrink: 0;
}
.settings-card__head span {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}
.theme-eco {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 600;
  color: var(--green);
  margin-left: auto;
  letter-spacing: 0.02em;
  transition: opacity 0.3s;
}
.theme-eco--hidden { opacity: 0; pointer-events: none; }
.theme-selector {
  display: flex;
  gap: 6px;
}
.theme-selector__opt {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: color 0.3s, background 0.3s;
  user-select: none;
}
.theme-selector__opt--active[data-theme="dark"] {
  color: #fff;
  background: rgba(255,255,255,0.10);
}
.theme-selector__opt--active[data-theme="light"] {
  color: #12334a;
  background: rgba(230,240,250,0.88);
}

/* ============================================================
   MARKETPLACE / ESPACE DE PARTAGE
   ============================================================ */
.marketplace-overlay {
  position: absolute;
  inset: 0;
  z-index: 85;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
  backdrop-filter: blur(32px) saturate(1.3);
  border-radius: 44px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 24px;
  overflow: hidden;
}
.marketplace-overlay--open {
  opacity: 1;
  pointer-events: auto;
}
.theme-light .marketplace-overlay {
  background: rgba(176,192,206,0.65);
}

/* Top bar */
.mp-topbar {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: 10px;
}
.mp-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.62rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 14px;
  white-space: nowrap;
}
.mp-btn:hover { background: rgba(255,255,255,0.12); transform: scale(1.02); }
.mp-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.mp-btn--back { padding: 10px 18px; }
.mp-btn--back svg { width: 18px; height: 18px; }
.mp-btn--filter { flex: 1; justify-content: center; }
.mp-btn--filter svg { width: 14px; height: 14px; }
.mp-btn--future { flex: 1; justify-content: center; }

.theme-light .mp-btn {
  border-color: rgba(18,55,90,0.12);
  background: rgba(225,238,250,0.5);
}
.theme-light .mp-btn:hover { background: rgba(225,238,250,0.8); }

/* Filter panel */
.mp-filter-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 2px;
  flex-shrink: 0;
}
.mp-filter-panel--open {
  max-height: 200px;
  padding: 6px 2px 10px;
}
.mp-filter-section { margin-bottom: 8px; }
.mp-filter-title {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 6px;
}
.mp-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mp-filter-chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 5px 10px;
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-filter-chip svg { width: 13px; height: 13px; flex-shrink: 0; }
.mp-filter-chip--active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.22);
  color: var(--text-primary);
}
.theme-light .mp-filter-chip {
  border-color: rgba(18,55,90,0.10);
  background: rgba(225,238,250,0.4);
}
.theme-light .mp-filter-chip--active {
  background: rgba(225,238,250,0.75);
  border-color: rgba(18,55,90,0.20);
}
.mp-sort-chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 5px 10px;
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mp-sort-chip--active {
  background: rgba(255,255,255,0.14);
  color: var(--text-primary);
}
.mp-filter-sort { display: flex; gap: 6px; }
.theme-light .mp-sort-chip {
  border-color: rgba(18,55,90,0.10);
  background: rgba(225,238,250,0.4);
}
.theme-light .mp-sort-chip--active {
  background: rgba(225,238,250,0.75);
}

/* Future needs panel */
.mp-future-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px;
  flex-shrink: 0;
}
.mp-future-panel--open {
  max-height: 300px;
  padding: 6px 2px 12px;
}
.mp-future-title {
  font-family: var(--font-mono);
  font-size: 0.44rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mp-future-select,
.mp-future-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.58rem;
  outline: none;
  transition: border-color 0.2s;
}
.mp-future-select:focus,
.mp-future-input:focus {
  border-color: var(--green);
}
.theme-light .mp-future-select,
.theme-light .mp-future-input {
  background: rgba(225,238,250,0.5);
  border-color: rgba(18,55,90,0.12);
}
.mp-future-submit {
  background: var(--green);
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.mp-future-submit:hover { opacity: 0.85; }

/* Posts container */
.mp-posts {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}
.mp-posts::-webkit-scrollbar { width: 3px; }
.mp-posts::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

/* Post card — spike top-left corner */
.mp-post {
  background: rgba(10,10,10,0.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 18px 18px 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

/* + create button */
.mp-btn--create {
  width: 42px;
  height: 42px;
  padding: 0;
  flex: none;
  border-radius: 12px;
}
.mp-btn--create svg { width: 20px; height: 20px; }

/* Create panel */
.mp-create-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px;
  flex-shrink: 0;
}
.mp-create-panel--open {
  max-height: 350px;
  padding: 6px 2px 12px;
}
.mp-urgency-row { display: flex; flex-direction: column; gap: 5px; }
.mp-urgency-chips { display: flex; gap: 5px; flex-wrap: wrap; }

/* Urgency badge in post */
.mp-post__urgency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.38rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  width: fit-content;
}
.mp-post__urgency--asap {
  color: var(--red);
  background: rgba(255,59,48,0.12);
}
.mp-post__urgency--tomorrow {
  color: var(--orange);
  background: rgba(255,149,0,0.12);
}
.mp-post__urgency--week {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
}

/* Available resources list */
.mp-avail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mp-avail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(0,204,136,0.08);
  border: 1px solid rgba(0,204,136,0.15);
}
.mp-avail-item svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex-shrink: 0;
}
.mp-avail-item__label {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--green);
  flex: 1;
}
.mp-avail-item__status {
  font-family: var(--font-mono);
  font-size: 0.40rem;
  color: var(--text-muted);
}
.mp-post:hover { transform: scale(1.008); }
.theme-light .mp-post {
  background: rgba(225,238,250,0.82);
  border-color: rgba(18,55,90,0.10);
}

.mp-post__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bubble icon in post */
.mp-post__bubble {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid;
}
.mp-post__bubble svg {
  width: 20px;
  height: 20px;
}
.mp-post__bubble--red {
  background: rgba(255,59,48,0.18);
  border-color: rgba(255,59,48,0.28);
  color: var(--red);
}
.mp-post__bubble--orange {
  background: rgba(255,149,0,0.18);
  border-color: rgba(255,149,0,0.28);
  color: var(--orange);
}
.mp-post__bubble--green {
  background: rgba(0,204,136,0.18);
  border-color: rgba(0,204,136,0.28);
  color: var(--green);
}

/* Source info */
.mp-post__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mp-post__shop {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.mp-post__meta {
  font-family: var(--font-mono);
  font-size: 0.40rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Help indicator */
.mp-post__help {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.mp-post__help-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}
.mp-post__help-dot--can-help {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0,204,136,0.5);
}
.mp-post__help-label {
  font-family: var(--font-mono);
  font-size: 0.34rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Message button */
.mp-post__msg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  color: var(--text-primary);
}
.mp-post__msg:hover { background: rgba(255,255,255,0.12); }
.mp-post__msg svg { width: 20px; height: 20px; }
.theme-light .mp-post__msg {
  border-color: rgba(18,55,90,0.12);
  background: rgba(225,238,250,0.5);
}

/* Description row */
.mp-post__desc {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 7px 10px;
  font-family: var(--font-ui);
  font-size: 0.52rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.theme-light .mp-post__desc {
  background: rgba(225,238,250,0.4);
  border-color: rgba(18,55,90,0.08);
}

/* Future post badge */
.mp-post--future {
  border-left: 3px solid var(--green);
}
.mp-post__future-badge {
  font-family: var(--font-mono);
  font-size: 0.38rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   DASHBOARD INTRO ANIMATION
   ============================================================ */
.dashboard-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

.intro-fade {
  animation: introFadeIn 0.7s ease forwards;
}

@keyframes introFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   GAUGE PANEL OVERLAY
   ============================================================ */
.gauge-panel {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 200;
  background: rgba(8,8,8,0.94);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.7), 0 2px 12px rgba(0,0,0,0.4);
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  max-height: 380px;
  overflow: hidden;
}
.gauge-panel--open {
  opacity: 1;
  transform: translateY(0);
}

.gauge-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gauge-panel__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.gauge-panel__icon svg {
  width: 100%;
  height: 100%;
}
.gauge-panel__title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.gauge-panel__pct {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}
.gauge-panel__close {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.2s;
  flex-shrink: 0;
  margin-left: 4px;
}
.gauge-panel__close:hover {
  background: rgba(255,255,255,0.12);
}
.gauge-panel__close svg {
  width: 14px;
  height: 14px;
}

.gauge-panel__bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  width: 100%;
  overflow: hidden;
}
.gauge-panel__bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.gauge-panel__section-title {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gauge-panel__count {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

.gauge-panel__problems {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

.gauge-panel__empty {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
}

.gauge-panel__problem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}
.gauge-panel__prob-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gauge-panel__prob-label {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gauge-panel__prob-date {
  font-family: var(--font-mono);
  font-size: 0.40rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.gauge-panel__prob-del {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 59, 48, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--red);
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
.gauge-panel__prob-del:hover {
  background: rgba(255, 59, 48, 0.25);
  transform: scale(1.1);
}
.gauge-panel__prob-del svg {
  width: 13px;
  height: 13px;
}

.gauge-panel__add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}
.gauge-panel__input {
  flex: 1;
  height: 32px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0 10px;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.gauge-panel__input::placeholder {
  color: var(--text-muted);
}
.gauge-panel__input:focus {
  border-color: rgba(255,255,255,0.18);
}
.gauge-panel__add-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.gauge-panel__add-btn:hover:not(:disabled) {
  background: rgba(0, 204, 136, 0.2);
  color: var(--green);
  transform: scale(1.08);
}
.gauge-panel__add-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.gauge-panel__add-btn svg {
  width: 16px;
  height: 16px;
}

/* Resolve button in bubble overlay (green accent) */
.bubble-detail__resolve {
  background: rgba(255, 59, 48, 0.10) !important;
  color: var(--red) !important;
}
.bubble-detail__resolve:hover {
  background: rgba(255, 59, 48, 0.22) !important;
}
