/* ================= THANH CÔNG CỤ DƯỚI: PHONG CÁCH PHỐ CHỢ (thiết kế riêng) ================= */
.toolbar {
  position: relative;
  padding: 16px 10px 9px;
  border-top: 0;
  background:
    /* vân gỗ */
    repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 23px, rgba(255,255,255,0.04) 23px 25px, transparent 25px 61px),
    /* các tấm ván ngang */
    repeating-linear-gradient(180deg, #8a5a2e 0 30px, #7a4c24 30px 32px, #865628 32px 62px, #6f4320 62px 64px),
    #7a4c24;
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.12), 0 -6px 18px rgba(0,0,0,0.3);
}
/* Mái bạt sọc đỏ – trắng viền lượn sóng phía trên */
.toolbar::before {
  content: '';
  position: absolute; left: 0; right: 0; top: -10px; height: 16px;
  background: repeating-linear-gradient(90deg, #e03131 0 26px, #fff5f5 26px 52px);
  border-top: 2.5px solid #4a2c12;
  -webkit-mask: radial-gradient(13px 9px at 13px 7px, #000 98%, transparent) 0 0 / 26px 16px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 7px no-repeat;
          mask: radial-gradient(13px 9px at 13px 7px, #000 98%, transparent) 0 0 / 26px 16px repeat-x,
                linear-gradient(#000, #000) 0 0 / 100% 7px no-repeat;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.25));
  pointer-events: none;
  z-index: 1;
}
/* Thanh gỗ viền trên */
.toolbar::after {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(180deg, #5c3a1a, #3e2610);
  pointer-events: none;
}

.toolbar-top { gap: 10px; margin-bottom: 9px; align-items: stretch; }

/* Bảng tên khu phố: tấm gỗ sơn treo */
.district-bar { gap: 6px; }
.dist-btn {
  position: relative;
  font-size: 12px;
  padding: 5px 12px 5px 10px;
  color: #4a2c12;
  background: linear-gradient(180deg, #fff3d6, #f3d9a4);
  border: 2.5px solid #4a2c12;
  border-radius: 7px;
  text-shadow: none;
  box-shadow: inset 0 -3px 0 rgba(139, 90, 43, 0.25), 0 3px 0 #3e2610;
}
.dist-btn::before, .dist-btn::after { /* đinh đồng */
  content: '';
  position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe8a3, #b07d3a);
  box-shadow: 0 0 0 1px #4a2c12;
}
.dist-btn::before { left: 3px; }
.dist-btn::after { right: 3px; }
.dist-btn.active {
  color: #ffe066;
  background: linear-gradient(180deg, #ff6b6b, #c92a2a);
  text-shadow: 0 1px 0 rgba(0,0,0,0.45);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 3px 0 #3e2610, 0 0 0 2px #ffd43b;
}
.dist-btn.locked {
  color: #7a6a58;
  background: linear-gradient(180deg, #e9e1d3, #cfc3ad);
  filter: none;
  opacity: 1;
}
.dist-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Loa phường: bảng đèn LED */
.loa-ticker {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 4px;
  background:
    radial-gradient(circle, rgba(255, 212, 59, 0.07) 1px, transparent 1.5px) 0 0 / 4px 4px,
    linear-gradient(180deg, #17120d, #241a12);
  border: 3px solid #4a2c12;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #8a5a2e, inset 0 3px 10px rgba(0,0,0,0.7), 0 3px 0 #3e2610;
}
.loa-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: radial-gradient(circle at 35% 30%, #ffe8a3, #e0a030 60%, #9a6516);
  border: 2px solid #4a2c12;
  border-radius: 50%;
  animation: loa-pulse 2.4s ease-in-out infinite;
}
@keyframes loa-pulse { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.15) rotate(-8deg); } 16% { transform: scale(1); } }
.ticker-track span, #loa-ticker-text {
  color: #ffd43b;
  font-weight: 800;
  letter-spacing: .3px;
  text-shadow: 0 0 6px rgba(255, 196, 0, 0.75), 0 0 1px #ffe066;
}

/* Nút chức năng: biển hiệu sơn màu + huy hiệu tròn nổi phía trên */
.dock-bar { grid-template-columns: repeat(13, 1fr); gap: 7px; padding-top: 12px; }
.dock-btn {
  padding: 22px 4px 6px;
  border: 2.5px solid #3e2610;
  border-radius: 12px 12px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0) 45%),
    linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.18), 0 4px 0 #3e2610, 0 7px 10px rgba(0,0,0,0.3);
  overflow: visible;
}
.dock-btn::before { display: none; }
.dock-icon {
  position: absolute;
  top: -15px; left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #ffffff, #fff4dc 55%, #f0d9a8);
  border: 2.5px solid #3e2610;
  border-radius: 50%;
  box-shadow: inset 0 -3px 0 rgba(139, 90, 43, 0.25), 0 3px 0 rgba(62, 38, 16, 0.6);
  filter: none;
  transition: transform .18s cubic-bezier(.2,1.6,.4,1);
}
.dock-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 #3e2610, 1px 0 0 #3e2610, -1px 0 0 #3e2610, 0 -1px 0 #3e2610, 0 2px 2px rgba(0,0,0,0.35);
}
.dock-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.07);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.18), 0 7px 0 #3e2610, 0 12px 16px rgba(0,0,0,0.35);
}
.dock-btn:hover .dock-icon { animation: none; transform: translateX(-50%) translateY(-4px) scale(1.12) rotate(-6deg); }
.dock-btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.18), 0 2px 0 #3e2610; }
.dock-btn .badge-count { top: -12px; right: -6px; z-index: 2; border-color: #fff3d6; }
.dock-btn:focus-visible { outline: 3px solid #ffe066; outline-offset: 3px; }

@media (min-height: 820px) {
  .dock-btn { padding: 25px 4px 7px; }
  .dock-icon { width: 42px; height: 42px; font-size: 24px; top: -17px; }
  .dock-label { font-size: 13px; }
}
@media (max-width: 1300px) {
  .dock-bar { grid-template-columns: repeat(7, 1fr); row-gap: 22px; }
}
@media (max-width: 760px) {
  .dock-bar { grid-template-columns: repeat(5, 1fr); }
  .dist-btn { font-size: 11px; padding: 4px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .loa-icon { animation: none; }
}
