/* Search Bar Widget — Guitar Wood Palette (đồng nhất toàn site) */
.vg-search-bar { max-width: 600px; margin: 20px auto; display: flex; align-items: center; background: var(--surface, #fff); border-radius: 50px; padding: 5px; box-shadow: 0 4px 15px rgba(75,46,17,.18); border: 1px solid var(--border, hsl(40,40%,88%)); }
.vg-search-bar input { flex: 1; min-width: 0; border: none; box-shadow: none; padding: 10px 10px 10px 20px; font-size: 16px; background: transparent; outline: none; border-radius: 50px; color: var(--foreground, hsl(25,40%,12%)); }
.vg-search-bar input::placeholder { color: hsl(25,14%,60%); }
.vg-search-bar .btn-mic { background: transparent; border: 1px solid var(--border, hsl(40,40%,88%)); color: hsl(25,18%,48%); border-radius: 50px; padding: 8px 12px; font-size: 18px; cursor: pointer; transition: all 0.2s; margin-right: 10px; display: flex; align-items: center; justify-content: center; }
.vg-search-bar .btn-mic:hover, .vg-search-bar .btn-mic.recording { color: #dc3545; border-color: #dc3545; background: #fff5f5; }
.vg-search-bar .btn-search { background: linear-gradient(135deg, hsl(36,96%,53%), hsl(32,91%,46%)); color: #fff; border: none; border-radius: 50px; padding: 10px 25px; font-weight: 700; cursor: pointer; font-size: 16px; transition: background 0.2s, box-shadow 0.2s; box-shadow: 0 3px 12px rgba(200,100,0,.3); }
.vg-search-bar .btn-search:hover { background: linear-gradient(135deg, hsl(32,91%,46%), hsl(28,88%,40%)); box-shadow: 0 5px 16px rgba(200,100,0,.4); }

/* Tips Sidebar Widget */
.vg-search-tips { background: var(--surface, #fff); border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); border: 1px solid var(--border, hsl(40,40%,88%)); }
.vg-search-tips-header { color: var(--wood-700, hsl(27,50%,32%)); font-weight: 700; margin-bottom: 15px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.vg-search-tips-item { margin-bottom: 15px; }
.vg-search-tips-item:last-child { margin-bottom: 0; }
.vg-search-tips-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--foreground, hsl(25,40%,12%)); }
.vg-search-tips-desc { font-size: 13px; color: hsl(25,18%,48%); margin-bottom: 4px; line-height: 1.5; }
.vg-search-tips-example { font-size: 13px; color: hsl(25,14%,60%); font-style: italic; }

/* Site Footer Widgets — nền gỗ tối, điểm nhấn amber */
.vg-site-footer { background: linear-gradient(180deg, hsl(25,50%,10%) 0%, hsl(25,55%,14%) 100%); color: hsl(38,30%,90%); padding: 40px 16px 20px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin-top: 40px;}
.vg-site-footer .wrap { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 768px) { .vg-site-footer .wrap { grid-template-columns: 1fr 1fr; } }
.vg-footer-section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: hsl(33,40%,70%); font-weight: 700; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,.09); padding-bottom: 8px; }
.vg-footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; margin: 0; }
.vg-footer-links li a { color: hsl(36,25%,82%); text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.vg-footer-links li a:hover { color: hsl(36,96%,53%); }
.vg-footer-links li i { font-style: normal; color: hsl(32,42%,58%); width: 16px; text-align: center;}

.vg-footer-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.vg-footer-genres a { display: inline-block; padding: 6px 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; color: hsl(36,25%,82%); text-decoration: none; font-size: 13px; transition: all 0.2s; }
.vg-footer-genres a:hover { background: rgba(255,255,255,.14); color: #fff; border-color: hsla(36,96%,53%,.5); }

.vg-footer-az { max-width: 1000px; margin: 20px auto 0; border-top: 1px solid rgba(255,255,255,.09); padding-top: 20px; }
.vg-footer-az-row { display: flex; align-items: center; margin-bottom: 12px; gap: 15px; flex-wrap: wrap; }
.vg-footer-az-label { font-size: 13px; font-weight: 700; color: hsl(33,40%,70%); min-width: 70px; text-transform: uppercase; }
.vg-footer-az-scroll { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.vg-footer-az-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: hsl(36,25%,82%); text-decoration: none; font-size: 12px; font-weight: 600; transition: all 0.2s; }
.vg-footer-az-btn.btn-all { width: auto; padding: 0 10px; }
.vg-footer-az-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: hsla(36,96%,53%,.5); }

.vg-footer-copyright { text-align: center; color: hsl(30,15%,58%); font-size: 13px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); line-height: 1.6; max-width: 1000px; margin-left: auto; margin-right: auto;}
.vg-footer-copyright a { color: hsl(36,96%,53%); text-decoration: none; font-weight: 600; }

/* Social Share Bar — cuối bài, mobile-first (48px touch target) */
.vg-share { margin: 26px 0 6px; text-align: center; }
.vg-share__label { font-size: 14px; font-weight: 700; color: hsl(25,18%,48%); margin-bottom: 12px; letter-spacing: .2px; }
.vg-share__row { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.vg-share__btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; text-decoration: none; flex-shrink: 0; transition: transform .15s ease, box-shadow .15s ease; }
.vg-share__btn svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.vg-share__btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.vg-share__btn:active { transform: translateY(0); }
.vg-share__btn:focus-visible { outline: 2px solid hsl(28,88%,40%); outline-offset: 2px; }
.vg-share__btn--facebook { background: #1877f2; }
.vg-share__btn--zalo { background: #0068ff; }
.vg-share__btn--telegram { background: #229ed9; }
.vg-share__btn--x { background: #0f1419; }
@media (max-width: 480px) { .vg-share__row { gap: 10px; } .vg-share__btn { width: 46px; height: 46px; } }
body.dark-mode .vg-share__label { color: hsl(30, 18%, 55%); }
@media print { .vg-share { display: none !important; } }

/* ═══════════ PWA install UX (vg-pwa.js) — 2026-09-25 ═══════════
   Modal theo PWA_BEST_PRACTICES.md mục 9: max-height + body cuộn.
   Banner/toast dính mép màn hình → cộng env(safe-area-inset-*) mục 8. */
.vg-a2hs-banner.hide, .vg-a2hs-overlay.hide { display: none; }
.vg-a2hs-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90000;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: hsl(25, 55%, 14%); color: hsl(42, 60%, 97%);
  box-shadow: 0 8px 24px rgba(18, 10, 5, .45);
}
.vg-a2hs-banner img { border-radius: 9px; flex-shrink: 0; }
.vg-a2hs-banner__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.vg-a2hs-banner__text strong { font-size: 14.5px; line-height: 1.3; }
.vg-a2hs-banner__text span { font-size: 12.5px; opacity: .8; line-height: 1.35; }
.vg-a2hs-banner__btn {
  flex-shrink: 0; border: 0; cursor: pointer;
  background: hsl(28, 88%, 40%); color: #fff;
  font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 999px;
}
.vg-a2hs-banner__x {
  flex-shrink: 0; border: 0; cursor: pointer; background: transparent;
  color: hsl(42, 38%, 82%); font-size: 15px; padding: 6px; line-height: 1;
}
.vg-a2hs-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(18, 10, 5, .85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vg-a2hs-modal {
  display: flex; flex-direction: column;
  width: 100%; max-width: 420px; max-height: 90vh; /* BẮT BUỘC mục 9 */
  overflow: hidden; border-radius: 16px;
  background: hsl(42, 60%, 97%); color: hsl(25, 30%, 18%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
}
.vg-a2hs-modal__header { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid hsl(36, 38%, 82%); }
.vg-a2hs-modal__header img { border-radius: 10px; flex-shrink: 0; }
.vg-a2hs-modal__title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.vg-a2hs-modal__title strong { font-size: 16px; }
.vg-a2hs-modal__title span { font-size: 12.5px; color: hsl(25, 18%, 40%); line-height: 1.35; }
.vg-a2hs-modal__body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; font-size: 14.5px; } /* BẮT BUỘC mục 9 */
.vg-a2hs-modal__body p { margin: 0 0 12px; }
.vg-a2hs-cta {
  display: block; width: 100%; border: 0; cursor: pointer;
  background: hsl(28, 88%, 40%); color: #fff;
  font-size: 15px; font-weight: 700; padding: 13px; border-radius: 12px;
}
.vg-a2hs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.vg-a2hs-steps li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.vg-a2hs-step-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: hsl(27, 50%, 32%); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; margin-top: 1px;
}
.vg-a2hs-step-icon { display: inline-block; margin-left: 4px; font-size: 15px; }
.vg-a2hs-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  z-index: 100001; padding: 10px 18px; border-radius: 999px;
  background: hsl(25, 55%, 14%); color: hsl(42, 60%, 97%);
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.vg-a2hs-toast--show { opacity: 1; transform: translate(-50%, 0); }
body.vg-a2hs-open { overflow: hidden; }
body.dark-mode .vg-a2hs-banner, body.dark-mode .vg-a2hs-toast { background: hsl(25, 40%, 10%); }
body.dark-mode .vg-a2hs-modal { background: hsl(25, 25%, 13%); color: hsl(38, 38%, 84%); }
body.dark-mode .vg-a2hs-modal__header { border-bottom-color: hsl(25, 22%, 24%); }
body.dark-mode .vg-a2hs-modal__title span { color: hsl(30, 15%, 60%); }

/* ── Standalone safe-area (mục 8): chỉ áp dụng khi chạy như app đã cài —
   browser thường thì env() = 0. html.vg-standalone = fallback iOS cũ. ── */
@media (display-mode: standalone), (display-mode: minimal-ui) {
  .site-header { padding-top: env(safe-area-inset-top, 0px); }
  .vg-a2hs-banner { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .vg-a2hs-toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}
html.vg-standalone .site-header { padding-top: env(safe-area-inset-top, 0px); }
html.vg-standalone .vg-a2hs-banner { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
html.vg-standalone .vg-a2hs-toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
@media print { .vg-a2hs-banner, .vg-a2hs-overlay, .vg-a2hs-toast { display: none !important; } }