

#fn-ham-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  background: linear-gradient(180deg, #1c1c2e 0%, #0e0e1a 100%);
  border-top: 1px solid #2a2a44;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  user-select: none;
  transition: transform 0.3s ease;
}

#fn-ham-bar.ham-collapsed {
  transform: translateY(calc(100% - 28px));
}


#ham-tab {
  position: absolute;
  top: -24px; left: 50%;
  transform: translateX(-50%);
  background: #1c1c2e;
  border: 1px solid #2a2a44;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 3px 16px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  color: #9992a0;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

#ham-tab .tab-led {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #1a0a00;
  transition: all 0.2s ease;
}
#ham-tab .tab-led.rx-active {
  background: #00ff44;
  box-shadow: 0 0 4px #00ff44;
  animation: hamBlink 1s ease-in-out infinite;
}
#ham-tab .tab-arrow { transition: transform 0.3s ease; }
#fn-ham-bar.ham-collapsed #ham-tab .tab-arrow { transform: scaleY(-1); }

@keyframes hamBlink {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}


#ham-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 72px;
  padding: 0 12px;
  overflow: hidden;
}


.ham-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 12px;
  border-right: 1px solid #1a1a2e;
  min-width: 90px;
}
.ham-brand-name { font-size: 9px; color: #ffb347; letter-spacing: 0.2em; }
.ham-brand-model { font-size: 7px; color: #5a5a7a; letter-spacing: 0.1em; margin-top: 2px; }


.ham-freq-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-right: 1px solid #1a1a2e;
  min-width: 130px;
}
.ham-freq-num {
  font-size: 20px;
  color: #00ff44;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0,255,68,0.5);
  line-height: 1;
  background: #030a06;
  padding: 3px 8px;
  border: 1px solid #0a1a0a;
  border-radius: 2px;
  min-width: 110px;
  text-align: center;
}
.ham-freq-label { font-size: 7px; color: #2a6a2a; letter-spacing: 0.15em; margin-top: 3px; }


.ham-vu-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  border-right: 1px solid #1a1a2e;
}
.ham-vu-row { display: flex; gap: 2px; }
.ham-vu-seg {
  width: 5px; height: 10px;
  border-radius: 1px;
  background: #0a1a0a;
  transition: background 0.06s ease;
}


.ham-dial-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-right: 1px solid #1a1a2e;
  gap: 4px;
}
.ham-dial-label { font-size: 7px; color: #5a5a7a; letter-spacing: 0.12em; }
#hamDialCanvas {
  cursor: grab;
  border-radius: 50%;
  display: block;
}
#hamDialCanvas:active { cursor: grabbing; }


.ham-np-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  border-right: 1px solid #1a1a2e;
  min-width: 0;
  overflow: hidden;
}
.ham-np-label { font-size: 7px; color: #5a5a7a; letter-spacing: 0.15em; margin-bottom: 3px; }
.ham-np-title {
  font-size: 10px;
  color: #00f5d4;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 6px rgba(0,245,212,0.3);
}
.ham-np-sub { font-size: 8px; color: #5a5a7a; letter-spacing: 0.08em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


#ham-station-popup {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  background: #0c0c1e;
  border: 1px solid #2a2a44;
  border-radius: 4px 4px 0 0;
  display: none;
  flex-direction: column;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.8);
  max-height: 280px;
}
#ham-station-popup.popup-open { display: flex; }

.popup-header {
  padding: 6px 10px;
  border-bottom: 1px solid #1a1a2e;
  font-size: 7px;
  color: #ffb347;
  letter-spacing: 0.2em;
  display: flex;
  justify-content: space-between;
}

.popup-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a44 transparent;
}
.popup-scroll::-webkit-scrollbar { width: 3px; }
.popup-scroll::-webkit-scrollbar-thumb { background: #2a2a44; }

.popup-station {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid #0a0a18;
  cursor: pointer;
  gap: 8px;
  transition: background 0.1s ease;
}
.popup-station:hover { background: #0f0f22; }
.popup-station.ps-active { background: #0a1a14; }

.ps-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #2a2a3e;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.popup-station.ps-active .ps-dot {
  background: #10b981;
  box-shadow: 0 0 4px #10b981;
}

.ps-info { flex: 1; min-width: 0; }
.ps-name { font-size: 9px; color: #e8e4d8; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-meta { font-size: 7px; color: #5a5a7a; letter-spacing: 0.06em; margin-top: 1px; }
.ps-freq { font-size: 9px; color: #5a5a7a; letter-spacing: 0.1em; flex-shrink: 0; }
.popup-station.ps-active .ps-freq { color: #00f5d4; }

.ps-locked { opacity: 0.35; cursor: not-allowed; }
.ps-locked .ps-name::after { content: ' · LOCKED'; color: #ff3ea5; }


.ham-transport {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  border-right: 1px solid #1a1a2e;
}
.ham-btn-row { display: flex; gap: 4px; }
.ham-btn {
  background: #0e0e1e;
  border: 1px solid #2a2a44;
  border-radius: 2px;
  color: #9992a0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  padding: 4px 6px;
  cursor: pointer;
  transition: all 0.1s ease;
  white-space: nowrap;
}
.ham-btn:hover { background: #181828; border-color: #3a3a5e; color: #e8e4d8; }
.ham-btn:active { transform: translateY(1px); }
.ham-btn.hb-active { background: #0a1a14; border-color: #10b981; color: #10b981; }
.ham-btn.hb-stations { color: #ffb347; border-color: #3a2a14; }
.ham-btn.hb-stations.popup-open { background: #1a1000; border-color: #ffb347; }


.ham-leds {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 12px;
}
.ham-led-row { display: flex; align-items: center; gap: 5px; }
.ham-led-lbl { font-size: 7px; color: #3a3a5a; letter-spacing: 0.1em; width: 24px; text-align: right; }
.ham-led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #0a0a15;
  border: 1px solid #0a0a15;
  transition: all 0.15s ease;
}
.ham-led.led-green { background: #00ff44; box-shadow: 0 0 4px #00ff44; }
.ham-led.led-amber { background: #ffb347; box-shadow: 0 0 4px #ffb347; }
.ham-led.led-blink { animation: hamBlink 1s ease-in-out infinite; }


#ham-whodini-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(90deg, #030f09, #050f0c);
  border-top: 1px solid #0d2a1e;
  font-size: 8px;
  color: #00f5d4;
  letter-spacing: 0.12em;
}
#ham-whodini-banner.banner-visible { display: flex; }
.banner-pulse {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #00f5d4;
  box-shadow: 0 0 5px #00f5d4;
  flex-shrink: 0;
  animation: hamBlink 2s ease-in-out infinite;
}


body { padding-bottom: 80px !important; }
body.ham-with-banner { padding-bottom: 100px !important; }
