.logo-pro { color: #f59e0b; font-size: 11px; font-weight: 700; }

.subtitle {
  font-size: 10px;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.toggle-btn {
  flex: 1;
  min-width: 0;
  height: 24px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

/* Summary bar */
.summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.summary-label {
  color: #64748b;
}

.summary-value {
  font-weight: 700;
}

.heatmap-card {
  background: #0f172a;
}

.tile-rect.tile-rare {
  stroke: #fbbf24;
  stroke-width: 2;
}

.tile:hover .tile-rect.tile-rare {
  stroke: #fcd34d;
}


.tile:hover .tile-rect.tile-rare,
.tile.active .tile-rect.tile-rare {
  stroke: #fcd34d;
}


/* Bottom panels */
.bottom-panels {
  flex: 0 0 auto;
  border-top: 1px solid #1f2a3d;
  background: #0f172a;
}

.legend-bar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 10px;
  color: #94a3b8;
  border-bottom: 1px solid #1f2a3d;
}

.legend-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}

.bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
}

.legend-title {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
}

.legend-rare-info {
  margin-left: 8px;
  font-size: 10px;
  color: #fbbf24;
  font-weight: 700;
}

.mode-info {
  font-size: 10px;
  color: #94a3b8;
}

.journal-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  border: 1px solid #22314a;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  color: #94a3b8;
}

.journal-btn:hover {
  background: #1e293b;
  color: #e5e7eb;
}

.journal-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: #3b82f6;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.journal-badge:empty, .journal-badge[data-count="0"] {
  display: none;
}

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.97);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Journal overlay */
.journal-empty {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.journal-clear-btn {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.journal-clear-btn:hover {
  background: rgba(239,68,68,0.15);
}

/* Notif overlay */
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #1f2a3d;
}

.notif-title {
  font-size: 14px;
  font-weight: 700;
}

.notif-body {
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.notif-section {
  margin-bottom: 12px;
}

.notif-section-title {
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: #cbd5e1;
}

.notif-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: #cbd5e1;
  cursor: pointer;
}

.notif-check input {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.notif-input {
  width: 60px;
  height: 28px;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #1e293b;
  color: #e5e7eb;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.notif-save-btn {
  width: 100%;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.notif-save-btn:hover {
  background: #2563eb;
}

/* Disclaimer overlay */
.disclaimer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.disclaimer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.disclaimer-content::-webkit-scrollbar {
  width: 4px;
}
.disclaimer-content::-webkit-scrollbar-track {
  background: transparent;
}
.disclaimer-content::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

.disclaimer-content {
  width: 92%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(135deg, #0f172a 0%, #1a1f35 100%);
  border: 1px solid #2a3a5a;
  border-radius: 16px;
  padding: 28px 28px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.disclaimer-logo {
  width: 200px;
  height: auto;
  margin-bottom: 10px;
  display: inline-block;
}


.disclaimer-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 5px;
  margin-bottom: 22px;
}

.disclaimer-body {
  text-align: left;
}

.disclaimer-block {
  margin-bottom: 14px;
}

.disclaimer-block-title {
  font-size: 12px;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.disclaimer-text {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.62;
}

.disclaimer-text br {
  content: '';
  display: block;
  margin-top: 4px;
}

.disclaimer-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 32px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.disclaimer-btn:hover {
  background: #2563eb;
}

/* Help overlay */
.help-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.help-section {
  margin-bottom: 16px;
}

.help-line {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 4px;
}

.help-line:last-child {
  margin-bottom: 0;
}

.help-line .hl {
  color: #f59e0b;
  font-weight: 700;
}

.help-line .hp {
  color: #4ade80;
  font-weight: 700;
}

.help-line .hn {
  color: #f87171;
  font-weight: 700;
}

.help-line .hb {
  color: #60a5fa;
  font-weight: 700;
}

.help-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.help-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #94a3b8;
  padding: 3px 8px;
  background: #111827;
  border-radius: 6px;
  border: 1px solid #1f2a3d;
}

.help-legend-item .hl-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.help-legend-item .hl-line {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.help-author {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1f2a3d;
  font-size: 11px;
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

.help-author .ha-name {
  color: #94a3b8;
  font-weight: 700;
}

/* Help visual improvements */
.help-tip, .help-warn, .help-info {
  padding: 8px 10px;
  border-radius: 8px;
  margin: 6px 0;
  font-size: 11px;
  line-height: 1.5;
  border-left: 3px solid;
}
.help-tip { background: rgba(74,222,128,0.08); border-color: #4ade80; color: #bbf7d0; }
.help-warn { background: rgba(251,191,36,0.08); border-color: #fbbf24; color: #fde68a; }
.help-info { background: rgba(96,165,250,0.08); border-color: #60a5fa; color: #bfdbfe; }
.help-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin: 0 2px;
}
.help-tag.green { background: rgba(74,222,128,0.15); color: #4ade80; }
.help-tag.red { background: rgba(248,113,113,0.15); color: #f87171; }
.help-tag.amber { background: rgba(251,191,36,0.15); color: #fbbf24; }
.help-tag.blue { background: rgba(96,165,250,0.15); color: #60a5fa; }
.help-tag.purple { background: rgba(192,132,252,0.15); color: #c084fc; }
.help-section-title .hl-icon { margin-right: 6px; }
.help-code {
  background: #1e293b;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: #e2e8f0;
}

/* Focus mode */
.focus-btn {
  height: 24px;
  min-width: 24px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 0 8px;
}

.focus-btn:hover {
  background: #1e293b;
  color: #e5e7eb;
}

.focus-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Summary button */
.summary-btn {
  height: 24px;
  min-width: 24px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.summary-btn:hover {
  background: #1e293b;
  color: #e5e7eb;
}

.summary-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Summary table panel */
.summary-table-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 0;
}

.summary-table-wrap.open {
  max-height: 400px;
  opacity: 1;
  overflow-y: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 6px;
  border: 1px solid #1f2a3d;
  border-radius: 8px;
  overflow: hidden;
}

.summary-table th {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 5px 6px;
  text-align: center;
  background: #111827;
  border-bottom: 1px solid #1f2a3d;
}

.summary-table th:first-child {
  text-align: left;
}

.summary-table td {
  padding: 4px 6px;
  text-align: center;
  border-bottom: 1px solid #1a2332;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.summary-table td:first-child {
  text-align: left;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-table tr:hover td {
  background: rgba(255,255,255,0.03);
}

.summary-table .st-up {
  color: #4ade80;
}

.summary-table .st-down {
  color: #f87171;
}

.summary-table .st-neutral {
  color: #94a3b8;
}

.summary-table .st-highlight {
  color: #fbbf24;
  font-weight: 700;
}

.summary-table .st-muted {
  color: #64748b;
  font-size: 10px;
}

/* Pulse border animations */
@keyframes pulse-red {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.2; }
}

@keyframes pulse-blue {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.2; }
}

.tile-pulse-red {
  stroke: #ef4444;
  stroke-width: 4;
  animation: pulse-red 1.5s ease-in-out infinite;
}

.tile-pulse-blue {
  stroke: #3b82f6;
  stroke-width: 4;
  animation: pulse-blue 1.5s ease-in-out infinite;
}

/* Flash animation on update */
@keyframes tile-flash {
  0% { filter: brightness(1); }
  15% { filter: brightness(1.7); }
  40% { filter: brightness(1.1); }
  100% { filter: brightness(1); }
}

.tile-flash .tile-rect {
  animation: tile-flash 2s ease-out;
}

/* Pulse orange for liq spike */
@keyframes pulse-orange {
  0%, 100% { stroke: #f97316; stroke-width: 4; opacity: 1; }
  50% { stroke: #f97316; stroke-width: 2; opacity: 0.5; }
}

.tile-pulse-orange {
  animation: pulse-orange 2s ease-in-out infinite;
}

/* Pattern icon badge */
.tile-pattern-icon {
  pointer-events: none;
}

.tile-pattern-bg {
  fill: rgba(0,0,0,0.5);
  stroke: none;
}

/* ×N badge */
.tile-badge {
  pointer-events: none;
  font-weight: 800;
  fill: #f59e0b;
}

/* Mobile */
@media (max-width: 520px) {
  .topbar {
    padding: 8px;
  }
  .toggle-btn {
    font-size: 9px;
    height: 22px;
  }
  .title {
    font-size: 16px;
  }
}

.signal-detail-close {
  width: 28px;
  height: 28px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signal-detail-close:hover {
  background: #1e293b;
}
