/* Atmaikya site chrome only. Namespaced so kundli/tool layouts stay intact. */
.ak-header,
.ak-footer,
.ak-drawer,
.ak-bottom-nav {
  --ak-warm-linen: #E6DDD0;
  --ak-limestone: #C9C4B8;
  --ak-stone: #586B54;
  --ak-olive: #7A7D5A;
  --ak-secondary: #51634d;
  --ak-studio: #F3F2ED;
  --ak-paper: #faf9f4;
  --ak-on: #1b1c19;
  --ak-serif: "Playfair Display", Georgia, serif;
  --ak-sans: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  --ak-radius-md: 0.25rem;
  --ak-radius-xl: 0.75rem;
  --ak-ease: cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
  font-family: var(--ak-sans);
}

.ak-header *,
.ak-footer *,
.ak-drawer *,
.ak-bottom-nav * {
  box-sizing: border-box;
}

body.ak-shell {
  /* JS syncHeaderOffset overwrites with the measured header box (includes safe-area). */
  --ak-header-h: 64px;
  --ak-tools-h: 0px;
  --ak-bottom-h: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-top: var(--ak-header-h);
  padding-bottom: 0;
}

body.ak-shell.ak-has-tools,
body.ak-shell:has(.top-nav-bar) {
  --ak-tools-h: 52px;
  padding-top: calc(var(--ak-header-h) + var(--ak-tools-h));
}

@media (min-width: 900px) {
  body.ak-shell.ak-has-tools:has(.top-nav-bar.ak-tools-ready),
  body.ak-shell:has(.top-nav-bar.ak-tools-ready) {
    --ak-tools-h: 92px;
  }
}

body.ak-shell.ak-drawer-open,
body.ak-shell.ak-tools-open {
  overflow: hidden;
}

body.ak-shell .astro-header,
body.ak-shell .top-strip,
body.ak-shell .mobile-hdr,
body.ak-shell header.desktop-nav,
body.ak-shell nav.desktop-nav,
body.ak-shell footer.astro-footer,
body.ak-shell footer.site-footer:not(.ak-footer),
body.ak-shell .nav-toggle,
body.ak-shell .mobile-nav-overlay,
body.ak-shell .mobile-nav-drawer,
body.ak-shell #astroMobileNav,
body.ak-shell .site-bottom-nav {
  display: none !important;
}

/* All secondary top bars (tool pills OR zodiac) sit flush under the fixed header */
body.ak-shell .top-nav-bar {
  position: fixed !important;
  top: var(--ak-header-h) !important;
  left: 0;
  right: 0;
  margin: 0 !important;
  z-index: 1150;
  animation: none !important;
  transform: none !important;
  filter: none !important;
}

body.ak-shell .top-nav-bar:not(.ak-tools-ready) {
  background: rgba(250, 249, 244, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 196, 184, 0.45);
  border-top: 0;
  padding: 0;
}

/* Scrollable pill / zodiac rail */
body.ak-shell .top-nav-bar .top-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px clamp(12px, 3vw, 24px);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

body.ak-shell .top-nav-bar .top-nav-inner::-webkit-scrollbar {
  display: none;
}

body.ak-shell .top-nav-bar .tn-pill,
body.ak-shell .top-nav-bar .zodiac-pill {
  scroll-snap-align: start;
  min-height: 40px;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  touch-action: manipulation;
}

.ak-rail {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
}

.ak-rail .top-nav-inner {
  max-width: none !important;
  margin: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.ak-rail::before,
.ak-rail::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ak-rail::before {
  left: 0;
  background: linear-gradient(90deg, rgba(250, 249, 244, 0.98), transparent);
}

.ak-rail::after {
  right: 0;
  background: linear-gradient(270deg, rgba(250, 249, 244, 0.98), transparent);
}

.ak-rail.is-start::before { opacity: 0; }
.ak-rail.is-end::after { opacity: 0; }

.ak-rail-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(201, 196, 184, 0.7);
  background: #fff;
  color: #586B54;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(88, 107, 84, 0.1);
  touch-action: manipulation;
}

.ak-rail-btn svg { width: 16px; height: 16px; }
.ak-rail-btn:disabled { opacity: 0.35; cursor: default; }
.ak-rail-btn--prev { left: 6px; }
.ak-rail-btn--next { right: 6px; }

@media (min-width: 900px) {
  .ak-rail-btn { display: inline-flex; }

  .ak-rail .top-nav-inner {
    padding-left: 44px !important;
    padding-right: 44px !important;
  }

  .ak-rail::before,
  .ak-rail::after {
    width: 40px;
  }
}

body.ak-shell .page-not-found {
  min-height: calc(100vh - var(--ak-header-h) - var(--ak-bottom-h, 72px));
  height: auto;
  padding-top: 48px;
  padding-bottom: 96px;
  box-sizing: border-box;
}

body.ak-shell .gd-app-install {
  bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}

.ak-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 64px);
  padding-right: clamp(16px, 4vw, 64px);
}

.ak-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 64px;
  height: 64px;
  padding-top: env(safe-area-inset-top, 0px);
  /* total occupied height = 64px content + safe-area (border-box would shrink content; use content-box for top inset) */
  box-sizing: content-box;
  z-index: 1200;
  background-color: rgba(250, 249, 244, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 196, 184, 0.4);
  box-shadow: 0 2px 12px rgba(88, 107, 84, 0.03);
  transition: box-shadow 0.35s var(--ak-ease);
}

.ak-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(88, 107, 84, 0.08);
}

.ak-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.ak-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.ak-brand img {
  height: clamp(36px, 8vw, 44px);
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}

.ak-desktop-nav {
  display: none;
  align-items: center;
  gap: 8px;
  background-color: rgba(230, 221, 208, 0.4);
  padding: 4px;
  border-radius: var(--ak-radius-xl);
  border: 1px solid rgba(201, 196, 184, 0.4);
}

@media (min-width: 768px) {
  .ak-desktop-nav {
    display: flex;
  }
}

.ak-nav-link {
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--ak-radius-xl);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ak-stone);
  transition: color 0.3s var(--ak-ease), background-color 0.3s var(--ak-ease);
}

.ak-nav-link:hover {
  color: var(--ak-olive);
  background-color: rgba(230, 221, 208, 0.3);
}

.ak-nav-link.is-active {
  background-color: var(--ak-olive);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ak-header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ak-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ak-menu-btn {
  background: none;
  border: none;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--ak-radius-md);
  color: var(--ak-olive);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.ak-menu-btn:hover {
  background-color: rgba(230, 221, 208, 0.6);
}

.ak-menu-btn svg {
  width: 24px;
  height: 24px;
}

.ak-footer {
  background-color: var(--ak-secondary);
  color: #ffffff;
  padding: 40px 0 calc(28px + var(--ak-bottom-h, 56px));
  margin-top: 0;
}

@media (min-width: 768px) {
  .ak-footer {
    padding: 56px 0 calc(40px + var(--ak-bottom-h, 56px));
  }
}

.ak-footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  text-align: center;
  justify-items: stretch;
}

/* Brand full-width; menus sit in a compact grid underneath on phones/tablets */
.ak-footer-brand {
  grid-column: 1 / -1;
}

.ak-footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 12px;
  width: 100%;
  align-items: start;
}

@media (max-width: 479px) {
  .ak-footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .ak-footer-cols .ak-footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .ak-footer-top {
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 32px;
    align-items: start;
  }

  .ak-footer-brand {
    grid-column: auto;
  }

  .ak-footer-cols {
    display: contents;
  }
}

.ak-footer-brand,
.ak-footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.ak-footer-brand {
  gap: 16px;
}

.ak-footer-logo {
  height: 56px;
  width: auto;
  max-width: min(220px, 70vw);
  object-fit: contain;
  display: block;
}

@media (min-width: 768px) {
  .ak-footer-logo {
    height: 64px;
    max-width: none;
  }
}

.ak-footer-desc {
  font-size: 14px;
  font-weight: 500;
  color: rgba(243, 242, 237, 0.88);
  max-width: 384px;
  line-height: 1.65;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .ak-footer-desc {
    font-size: 16px;
    line-height: 1.7;
  }
}

.ak-footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}

.ak-footer-social {
  color: rgba(243, 242, 237, 0.85);
  text-decoration: none;
  transition: color 0.3s;
  touch-action: manipulation;
}

.ak-footer-social:hover {
  color: #ffffff;
}

.ak-footer-social svg {
  width: 22px;
  height: 22px;
  display: block;
}

.ak-footer-title {
  font-family: var(--ak-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  border-bottom: 1px solid rgba(243, 242, 237, 0.18);
  padding-bottom: 8px;
  margin: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .ak-footer-title {
    font-size: 18px;
    padding-bottom: 10px;
  }
}

.ak-footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ak-footer-link {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(243, 242, 237, 0.88);
  text-decoration: none;
  transition: color 0.3s;
  touch-action: manipulation;
  padding: 2px 0;
}

@media (min-width: 768px) {
  .ak-footer-link {
    font-size: 16px;
  }
}

.ak-footer-link:hover {
  color: #ffffff;
}

.ak-footer-bottom {
  border-top: 1px solid rgba(243, 242, 237, 0.1);
  padding-top: 24px;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(243, 242, 237, 0.75);
  text-align: center;
}

@media (min-width: 768px) {
  .ak-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-top: 32px;
    margin-top: 40px;
    font-size: 14px;
    gap: 16px;
  }
}

.ak-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.ak-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.ak-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(48, 49, 46, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.ak-drawer.is-open .ak-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ak-drawer-frame {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(448px, 100%);
  display: flex;
}

.ak-drawer-panel {
  width: 100%;
  height: 100%;
  background-color: var(--ak-studio);
  color: var(--ak-on);
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 30px 60px -15px rgba(1, 20, 37, 0.15);
  border-left: 1px solid var(--ak-limestone);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s;
}

.ak-drawer.is-open .ak-drawer-panel {
  transform: translateX(0);
}

.ak-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(201, 196, 184, 0.5);
  padding-bottom: 16px;
}

.ak-drawer-logo {
  height: 36px;
  width: auto;
  max-width: none;
  object-fit: contain;
  display: block;
}

.ak-drawer-close {
  background: none;
  border: none;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--ak-radius-md);
  color: var(--ak-stone);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-drawer-close:hover {
  background-color: var(--ak-warm-linen);
}

.ak-drawer-close svg {
  width: 20px;
  height: 20px;
}

.ak-drawer-body {
  flex: 1;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ak-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ak-drawer-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(88, 107, 84, 0.5);
}

.ak-portals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ak-portal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--ak-radius-md);
  background-color: rgba(230, 221, 208, 0.3);
  border: 1px solid rgba(201, 196, 184, 0.4);
  text-decoration: none;
  transition: background-color 0.3s;
}

.ak-portal:hover {
  background-color: rgba(230, 221, 208, 0.6);
}

.ak-portal svg {
  width: 16px;
  height: 16px;
  color: var(--ak-olive);
  flex-shrink: 0;
}

.ak-portal span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ak-stone);
}

.ak-chamber {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--ak-radius-md);
  text-decoration: none;
  transition: background-color 0.3s;
}

.ak-chamber:hover {
  background-color: rgba(230, 221, 208, 0.5);
}

.ak-chamber svg {
  width: 20px;
  height: 20px;
  color: var(--ak-olive);
  flex-shrink: 0;
}

.ak-chamber-name {
  font-family: var(--ak-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--ak-stone);
}

.ak-chamber-desc {
  font-size: 13px;
  font-weight: 500;
  color: var(--ak-stone);
}

.ak-disclaimer {
  padding: 14px;
  border-radius: var(--ak-radius-md);
  background-color: #ffffff;
  border: 1px solid rgba(201, 196, 184, 0.5);
}

.ak-disclaimer h4 {
  font-family: var(--ak-serif);
  font-weight: 700;
  font-size: 12px;
  color: var(--ak-olive);
  margin: 0 0 4px;
}

.ak-disclaimer p {
  font-size: 11px;
  color: var(--ak-stone);
  line-height: 1.6;
  margin: 0;
}

.ak-drawer-footer {
  border-top: 1px solid rgba(201, 196, 184, 0.5);
  padding-top: 20px;
  text-align: center;
}

.ak-drawer-copy {
  font-size: 14px;
  font-weight: 500;
  color: rgba(88, 107, 84, 0.7);
  margin-bottom: 8px;
}

.ak-drawer-legal {
  font-size: 13px;
  color: rgba(88, 107, 84, 0.65);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ak-drawer-legal a {
  color: rgba(88, 107, 84, 0.5);
  text-decoration: none;
}

.ak-drawer-legal a:hover {
  color: var(--ak-olive);
  text-decoration: underline;
}

.ak-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex !important;
  justify-content: center;
  align-items: stretch;
  gap: clamp(8px, 4vw, 40px);
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 12px;
  min-height: 56px;
  height: var(--ak-bottom-h, calc(56px + env(safe-area-inset-bottom, 0px)));
  background-color: rgba(250, 249, 244, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201, 196, 184, 0.5);
  box-shadow: 0 -4px 16px rgba(88, 107, 84, 0.08);
  z-index: 1250;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: none;
  border-radius: 0;
}

.ak-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ak-stone);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  gap: 2px;
  height: 100%;
  min-width: 64px;
  flex: 0 0 auto;
  max-width: none;
  padding: 6px 12px;
  transition: color 0.3s;
}

@media (min-width: 768px) {
  .ak-bottom-item {
    min-width: 72px;
    font-size: 12px;
    padding: 6px 16px;
  }
}

/* Hide browser-extension / leftover promo chrome */
.bis_register,
.bis-register,
[class*="bis_register"],
.gd-android-app-promo,
#gdAndroidAppPromo {
  display: none !important;
}

.ak-bottom-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.ak-bottom-item:hover,
.ak-bottom-item.is-active {
  color: var(--ak-olive);
}

/* ---- Tool sections nav (replaces endless pill scroll) ---- */
body.ak-shell .top-nav-bar.ak-tools-ready {
  position: fixed !important;
  top: var(--ak-header-h) !important;
  left: 0;
  right: 0;
  margin: 0 !important;
  z-index: 1150;
  background: rgba(250, 249, 244, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 196, 184, 0.45);
  border-top: 0;
  padding: 0 !important;
  /* height follows .ak-tools-bar — never bind to --ak-tools-h (avoids measure loop) */
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  animation: none !important;
  transform: none !important;
  filter: none !important;
  box-shadow: none;
  overflow: visible;
}

body.ak-shell .top-nav-bar.ak-tools-ready > .top-nav-inner {
  display: none !important;
}

.ak-tools-ui {
  width: 100%;
  height: auto;
  min-height: 0;
}

.ak-tools-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px clamp(12px, 3vw, 24px);
  min-height: 0;
  height: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.ak-tools-current {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ak-tools-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(88, 107, 84, 0.55);
  line-height: 1.2;
}

.ak-tools-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(15px, 2.4vw, 18px);
  font-weight: 700;
  color: #51634d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.ak-tools-browse {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid rgba(201, 196, 184, 0.75);
  border-radius: 999px;
  background: #fff;
  color: #586B54;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(88, 107, 84, 0.08);
  touch-action: manipulation;
}

.ak-tools-browse:hover {
  background: rgba(230, 221, 208, 0.5);
  color: #7A7D5A;
}

.ak-tools-browse:focus-visible {
  outline: 2px solid #7A7D5A;
  outline-offset: 2px;
}

.ak-tools-browse svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ak-tools-browse-label {
  display: inline;
}

@media (max-width: 479px) {
  .ak-tools-browse-label {
    font-size: 11px;
  }
}

.ak-tools-cats {
  display: none;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  min-width: 0;
}

.ak-tools-cats::-webkit-scrollbar {
  display: none;
}

.ak-tools-cat {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border: 1px solid transparent;
  background: rgba(230, 221, 208, 0.4);
  color: #586B54;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
}

.ak-tools-cat.is-active {
  background: #7A7D5A;
  color: #fff;
}

/* Desktop: title | category chips | browse — single clean row */
@media (min-width: 900px) {
  body.ak-shell.ak-has-tools:has(.top-nav-bar.ak-tools-ready),
  body.ak-shell:has(.top-nav-bar.ak-tools-ready) {
    --ak-tools-h: 64px;
  }

  .ak-tools-bar {
    gap: 14px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .ak-tools-current {
    flex: 0 1 auto;
    max-width: 200px;
  }

  .ak-tools-cats {
    display: flex;
    flex: 1 1 auto;
    order: 0;
    width: auto;
  }

  .ak-tools-browse {
    order: 2;
    border-radius: 0.75rem;
  }
}

.ak-tools-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
  visibility: hidden;
}

.ak-tools-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}

.ak-tools-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 49, 46, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ak-tools-sheet.is-open .ak-tools-backdrop {
  opacity: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ak-tools-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 720px);
  background: #faf9f4;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(201, 196, 184, 0.55);
  box-shadow: 0 -18px 40px rgba(1, 20, 37, 0.14);
  display: flex;
  flex-direction: column;
  transform: translateY(110%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ak-tools-sheet.is-open .ak-tools-panel {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .ak-tools-panel {
    left: auto;
    right: clamp(16px, 4vw, 48px);
    bottom: auto;
    top: calc(var(--ak-header-h) + var(--ak-tools-h) + 10px);
    width: min(420px, calc(100vw - 32px));
    max-height: min(70vh, 640px);
    border-radius: 16px;
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .ak-tools-sheet.is-open .ak-tools-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.ak-tools-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}

.ak-tools-panel-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #51634d;
}

.ak-tools-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(230, 221, 208, 0.55);
  color: #586B54;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}

.ak-tools-close:hover {
  background: rgba(230, 221, 208, 0.9);
}

.ak-tools-close svg {
  width: 18px;
  height: 18px;
}

.ak-tools-search-wrap {
  position: relative;
  padding: 8px 16px 12px;
}

.ak-tools-search-wrap > svg {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-40%);
  width: 16px;
  height: 16px;
  color: rgba(88, 107, 84, 0.55);
  pointer-events: none;
}

.ak-tools-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(201, 196, 184, 0.75);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px 0 40px;
  font-size: 15px;
  font-weight: 600;
  color: #1b1c19;
  box-sizing: border-box;
  outline: none;
}

.ak-tools-search:focus {
  outline: 2px solid rgba(122, 125, 90, 0.45);
  border-color: #7A7D5A;
}

.ak-tools-list {
  overflow-y: auto;
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.ak-tools-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(88, 107, 84, 0.55);
  margin: 0 0 6px 4px;
}

.ak-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ak-tools-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 0.5rem;
  border: 1px solid rgba(201, 196, 184, 0.55);
  background: rgba(230, 221, 208, 0.28);
  color: #586B54;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.ak-tools-link:hover {
  background: rgba(230, 221, 208, 0.55);
}

.ak-tools-link.is-active {
  background: #7A7D5A;
  border-color: #7A7D5A;
  color: #fff;
}

.ak-tools-empty {
  text-align: center;
  color: #6f7766;
  font-size: 13px;
  padding: 24px 12px;
}
