:root {
  --shared-nav-yellow: #f8efb8;
  --shared-nav-yellow-deep: #eadc93;
  --shared-nav-green: #b7ff72;
  --shared-nav-green-deep: #89d24d;
  --shared-nav-ink: #3a2a22;
  --shared-nav-line: rgba(58, 42, 34, 0.16);
  --shared-nav-grid: rgba(122, 92, 78, 0.11);
  --shared-nav-shadow: 0 12px 30px rgba(58, 42, 34, 0.12);
}

body.has-shared-nav {
  --shared-nav-safe-top: max(14px, env(safe-area-inset-top));
}

.shared-floating-nav {
  position: fixed;
  top: calc(var(--shared-nav-safe-top) + 12px);
  left: 50%;
  z-index: 70;
  width: min(720px, calc(100vw - 56px));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px) scale(0.96) rotate(-0.45deg);
  transition:
    opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.shared-nav-pill-visible .shared-floating-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1) rotate(-0.25deg);
}

.shared-floating-nav__paper {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--shared-nav-line);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(var(--shared-nav-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--shared-nav-grid) 1px, transparent 1px),
    linear-gradient(180deg, var(--shared-nav-yellow) 0%, var(--shared-nav-yellow-deep) 100%);
  background-size: auto, 20px 20px, 20px 20px, auto;
  box-shadow: var(--shared-nav-shadow);
}

.shared-floating-nav__paper::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(58, 42, 34, 0.09);
  border-radius: 12px;
  pointer-events: none;
}

.shared-floating-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--shared-nav-ink);
}

.shared-floating-nav__brand img {
  width: 28px;
  height: 28px;
  display: block;
  flex: 0 0 auto;
}

.shared-floating-nav__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.shared-floating-nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--shared-nav-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shared-floating-nav__links a.is-cta {
  background: #a8174a;
  color: #fff8ef;
  box-shadow: 0 10px 20px rgba(168, 23, 74, 0.22);
}

.shared-floating-nav__links a:hover {
  transform: translateY(-1px) rotate(-1deg);
  background: rgba(255, 255, 255, 0.28);
}

.shared-floating-nav__links a.is-cta:hover {
  background: #8e0f3e;
  color: #fff8ef;
}

.shared-floating-nav__links a.is-active {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 6px 14px rgba(58, 42, 34, 0.08);
}

.shared-floating-nav__links a.is-cta.is-active {
  background: #a8174a;
  box-shadow: 0 10px 20px rgba(168, 23, 74, 0.24);
}

.shared-floating-nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 5px;
  height: 6px;
  background: rgba(168, 23, 74, 0.12);
  border-radius: 999px;
  transform: rotate(-1.6deg);
}

.shared-mobile-note-toggle {
  position: fixed;
  top: calc(var(--shared-nav-safe-top) + 8px);
  right: max(10px, env(safe-area-inset-right));
  z-index: 90;
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--shared-nav-ink);
  cursor: pointer;
  transform: rotate(-8deg);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shared-mobile-note-toggle::before {
  content: none;
}

.shared-mobile-note-toggle__sticker {
  position: absolute;
  left: 8px;
  top: 4px;
  font-size: 27px;
  line-height: 1;
  color: #4d392f;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 12px rgba(58, 42, 34, 0.12);
}

.shared-mobile-note-toggle__spark {
  position: absolute;
  right: 3px;
  bottom: 4px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: rgba(58, 42, 34, 0.78);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.shared-mobile-note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
  opacity: 0;
  pointer-events: none;
  background: rgba(252, 250, 244, 0.2);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition:
    opacity 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    backdrop-filter 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    -webkit-backdrop-filter 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shared-mobile-note-panel {
  position: fixed;
  top: calc(var(--shared-nav-safe-top) + 14px);
  right: 12px;
  z-index: 89;
  width: min(90vw, 360px);
  max-height: calc(100vh - var(--shared-nav-safe-top) - 28px);
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px) scale(0.92) rotate(-4deg);
  transform-origin: top right;
  transition:
    opacity 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shared-mobile-note-panel__paper {
  position: relative;
  min-height: min(72vh, 520px);
  padding: 22px 20px 24px;
  border: 1px solid rgba(58, 42, 34, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)) padding-box,
    linear-gradient(rgba(92, 122, 68, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 122, 68, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, #c7ff8a 0%, var(--shared-nav-green) 100%);
  background-size: auto, 20px 20px, 20px 20px, auto;
  box-shadow: 0 26px 60px rgba(58, 42, 34, 0.22);
}

.shared-mobile-note-panel__paper::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 24px;
  width: 92px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 246, 199, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 16px rgba(58, 42, 34, 0.08);
  transform: rotate(-7deg);
}

.shared-mobile-note-panel__paper::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(58, 42, 34, 0.14);
  border-radius: 16px;
  pointer-events: none;
}

.shared-mobile-note-panel__header,
.shared-mobile-note-panel__nav,
.shared-mobile-note-panel__footer {
  position: relative;
  z-index: 1;
}

.shared-mobile-note-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.shared-mobile-note-panel__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--shared-nav-ink);
}

.shared-mobile-note-panel__brand img {
  width: 34px;
  height: 34px;
}

.shared-mobile-note-panel__title {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shared-mobile-note-panel__title .dot {
  color: #a8174a;
}

.shared-mobile-note-panel__subtitle {
  display: block;
  margin-top: 2px;
  font-family: "Caveat", cursive;
  font-size: 23px;
  color: rgba(58, 42, 34, 0.76);
  transform: rotate(-2deg);
}

.shared-mobile-note-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(58, 42, 34, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--shared-nav-ink);
  font-size: 18px;
  cursor: pointer;
}

.shared-mobile-note-panel__nav {
  display: grid;
  gap: 10px;
}

.shared-mobile-note-panel__link {
  display: grid;
  gap: 4px;
  padding: 14px 14px 15px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--shared-nav-ink);
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(58, 42, 34, 0.08);
  box-shadow: 0 8px 20px rgba(58, 42, 34, 0.08);
  transition:
    transform 160ms ease,
    background 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.shared-mobile-note-panel__link:hover,
.shared-mobile-note-panel__link:focus-visible {
  transform: translateY(-1px) rotate(-1deg);
  background: rgba(255, 255, 255, 0.44);
}

.shared-mobile-note-panel__link.is-active {
  background: rgba(255, 255, 255, 0.6);
}

.shared-mobile-note-panel__link-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.shared-mobile-note-panel__link-note {
  font-family: "Caveat", cursive;
  font-size: 22px;
  color: rgba(58, 42, 34, 0.72);
}

.shared-mobile-note-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.shared-mobile-note-panel__footer-note {
  font-family: "Caveat", cursive;
  font-size: 24px;
  color: rgba(58, 42, 34, 0.78);
  transform: rotate(-1deg);
}

.shared-mobile-note-panel__footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #3a2a22;
  color: #fcfaf4;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.shared-mobile-note-panel__footer-chip span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f7ea8d;
}

body.shared-mobile-note-open {
  overflow: hidden;
}

body.shared-mobile-note-open .shared-mobile-note-backdrop {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body.shared-mobile-note-open .shared-mobile-note-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1) rotate(-1.25deg);
}

body.shared-mobile-note-open .shared-mobile-note-toggle {
  transform: rotate(352deg) scale(0.98);
}

@media (max-width: 900px) {
  .shared-floating-nav {
    display: none;
  }

  .shared-mobile-note-toggle {
    display: inline-flex;
  }

  body.has-shared-nav .nav,
  body.has-shared-nav .top-nav,
  body.has-shared-nav .topbar {
    padding-right: 76px;
  }

  body.has-shared-nav .nav-links {
    display: none !important;
  }

  body.has-shared-nav .nav-cta {
    display: none !important;
  }

  body.has-shared-nav .brand-copy {
    max-width: 220px !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
}

@media (max-width: 560px) {
  .shared-mobile-note-toggle {
    top: calc(var(--shared-nav-safe-top) + 6px);
    right: max(6px, env(safe-area-inset-right));
    width: 40px;
    height: 40px;
  }

  .shared-mobile-note-toggle__sticker {
    left: 7px;
    top: 5px;
    font-size: 24px;
  }

  .shared-mobile-note-toggle__spark {
    right: 2px;
    bottom: 5px;
    font-size: 16px;
  }

  body.has-shared-nav .nav,
  body.has-shared-nav .top-nav,
  body.has-shared-nav .topbar {
    padding-right: 68px;
  }

  body.has-shared-nav .brand-copy {
    max-width: 176px !important;
  }
}

@media (min-width: 901px) {
  .shared-mobile-note-toggle,
  .shared-mobile-note-backdrop,
  .shared-mobile-note-panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shared-floating-nav,
  .shared-mobile-note-backdrop,
  .shared-mobile-note-panel,
  .shared-mobile-note-toggle,
  .shared-floating-nav__links a,
  .shared-floating-nav__cta,
  .shared-mobile-note-panel__link {
    transition: none !important;
  }
}
