:root {
  --shell-rose-600: #e11d48;
  --shell-rose-500: #f43f5e;
  --shell-text: #171717;
  --shell-text-muted: #737373;
  --shell-surface: rgba(255, 255, 255, 0.78);
  --shell-border: rgba(255, 255, 255, 0.48);
}

html.dark {
  --shell-text: #f5f5f5;
  --shell-text-muted: #a3a3a3;
  --shell-surface: rgba(23, 23, 23, 0.72);
  --shell-border: rgba(64, 64, 64, 0.58);
}

body.shell-bottom-nav {
  padding-bottom: 0;
}

.secc-bottom-nav-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: none;
  justify-content: center;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.secc-bottom-nav-wrap.ready {
  opacity: 1;
  transform: translateY(0);
}

.secc-bottom-nav {
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 0.25rem;
  width: min(94vw, 560px);
  padding: 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--shell-border);
  background: var(--shell-surface);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.secc-bottom-nav a {
  min-height: 50px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  border-radius: 999px;
  color: var(--shell-text-muted);
  text-decoration: none;
  font-family: Inter, sans-serif;
  font-size: 0.59rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.secc-bottom-nav a svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.secc-bottom-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--shell-rose-600), var(--shell-rose-500));
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.35);
}

.secc-bottom-nav a:not(.active):hover {
  color: var(--shell-text);
  background: rgba(0, 0, 0, 0.04);
}

html.dark .secc-bottom-nav a:not(.active):hover {
  background: rgba(255, 255, 255, 0.08);
}

#pwa-install-btn {
  position: fixed;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 1201;
  border: 0;
  border-radius: 999px;
  padding: 0.56rem 0.82rem;
  color: #ffffff;
  background: linear-gradient(120deg, #be123c, #db2777);
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.3);
  font-family: Inter, sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

#pwa-install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.35);
}

html.app-offline #pwa-install-btn {
  opacity: 0.88;
}

@media (min-width: 1025px) {
  .secc-bottom-nav {
    width: min(520px, 92vw);
  }

  #pwa-install-btn {
    bottom: 18px;
  }
}

@media (max-width: 1024px) {
  body.shell-bottom-nav {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }

  .secc-bottom-nav-wrap {
    display: flex;
  }
}

/* Mobile menu: app-like glassmorphism */
.mobile-menu-overlay {
  background:
    radial-gradient(80% 62% at 22% 15%, rgba(225, 29, 72, 0.2), transparent 58%),
    radial-gradient(70% 55% at 82% 86%, rgba(236, 72, 153, 0.16), transparent 56%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.34)) !important;
  backdrop-filter: blur(24px) saturate(145%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(145%) !important;
}

html.dark .mobile-menu-overlay {
  background:
    radial-gradient(80% 62% at 22% 15%, rgba(225, 29, 72, 0.22), transparent 58%),
    radial-gradient(70% 55% at 82% 86%, rgba(217, 70, 239, 0.2), transparent 56%),
    linear-gradient(145deg, rgba(30, 30, 30, 0.86), rgba(20, 20, 20, 0.72)) !important;
}

.mobile-menu-overlay > div:first-child {
  margin: 12px 12px 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.52) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

html.dark .mobile-menu-overlay > div:first-child {
  border-color: rgba(82, 82, 82, 0.75) !important;
  background: rgba(30, 30, 30, 0.72) !important;
}

.mobile-menu-overlay > nav,
.mobile-menu-overlay nav {
  margin: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.44) !important;
  backdrop-filter: blur(16px) saturate(136%);
  -webkit-backdrop-filter: blur(16px) saturate(136%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 34px rgba(15, 23, 42, 0.14);
  padding: 1rem 1rem 1.2rem;
  gap: 0.9rem !important;
}

html.dark .mobile-menu-overlay > nav,
html.dark .mobile-menu-overlay nav {
  border-color: rgba(82, 82, 82, 0.75);
  background: rgba(22, 22, 22, 0.7) !important;
}

.mobile-menu-overlay nav > a,
.mobile-menu-overlay nav > button,
.mobile-menu-overlay nav > div > a {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
}

html.dark .mobile-menu-overlay nav > a,
html.dark .mobile-menu-overlay nav > button,
html.dark .mobile-menu-overlay nav > div > a {
  background: rgba(38, 38, 38, 0.72);
  border-color: rgba(64, 64, 64, 0.76);
}

.mobile-menu-overlay nav > div {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.mobile-menu-overlay nav > div > a {
  display: block;
}

.mobile-menu-overlay nav > div > button {
  margin-left: 0.4rem !important;
}

.mobile-menu-overlay nav > div > div {
  margin-top: 0.55rem !important;
  padding: 0.55rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

html.dark .mobile-menu-overlay nav > div > div {
  background: rgba(42, 42, 42, 0.72);
  border-color: rgba(64, 64, 64, 0.76);
}

.mobile-menu-overlay > div:last-child {
  margin: 0 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
}

html.dark .mobile-menu-overlay > div:last-child {
  border-color: rgba(64, 64, 64, 0.76);
  background: rgba(28, 28, 28, 0.72) !important;
}

/* Install prompt modal */
.secc-install-modal {
  position: fixed;
  inset: 0;
  z-index: 1305;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 8, 8, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.secc-install-modal.show {
  display: flex;
}

.secc-install-card {
  width: min(94vw, 430px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    radial-gradient(80% 62% at 20% 14%, rgba(225, 29, 72, 0.2), transparent 58%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72));
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.2);
  padding: 1.1rem 1.1rem 1rem;
  color: #171717;
}

html.dark .secc-install-card {
  border-color: rgba(82, 82, 82, 0.9);
  background:
    radial-gradient(80% 62% at 20% 14%, rgba(225, 29, 72, 0.28), transparent 58%),
    linear-gradient(155deg, rgba(26, 26, 26, 0.96), rgba(16, 16, 16, 0.9));
  color: #f5f5f5;
}

.secc-install-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.secc-install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.52);
  padding: 0.35rem 0.65rem;
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 600;
}

html.dark .secc-install-pill {
  border-color: rgba(64, 64, 64, 0.8);
  background: rgba(38, 38, 38, 0.76);
}

.secc-install-close {
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.56);
  color: inherit;
  cursor: pointer;
}

html.dark .secc-install-close {
  background: rgba(38, 38, 38, 0.76);
}

.secc-install-title {
  font-family: Spectral, serif;
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 0.45rem;
}

.secc-install-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(23, 23, 23, 0.86);
}

html.dark .secc-install-text {
  color: rgba(245, 245, 245, 0.88);
}

.secc-install-steps {
  margin: 0.8rem 0 0;
  padding-left: 1.05rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.secc-install-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.secc-install-primary,
.secc-install-secondary {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-size: 0.67rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 600;
}

.secc-install-primary {
  color: #fff;
  background: linear-gradient(118deg, #be123c, #db2777);
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.36);
}

.secc-install-secondary {
  color: inherit;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

html.dark .secc-install-secondary {
  background: rgba(38, 38, 38, 0.76);
  border-color: rgba(64, 64, 64, 0.8);
}
