.site-nav .site-nav-create {
  border: 0;
  background: var(--color-primary-dark);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
}

.site-nav .site-nav-create:hover,
.site-nav .site-nav-create.is-active {
  background: #0b5c36;
  color: #ffffff;
}

.site-profile-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  margin-left: 5px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.site-profile-link:hover,
.site-profile-link.is-active {
  border-color: var(--color-primary);
  box-shadow: 0 7px 18px rgba(22, 138, 84, 0.16);
  transform: translateY(-1px);
}

.site-profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.site-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-tabbar {
  display: none;
}

.has-open-modal,
.has-open-modal body {
  overflow: hidden;
}

.app-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(13, 35, 24, 0.42);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.app-modal[hidden] {
  display: none !important;
}

.app-modal-panel {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 26px;
  border: 1px solid var(--color-line);
  border-radius: 26px;
  background: #ffffff;
  color: var(--color-ink);
  box-shadow: 0 24px 70px rgba(20, 54, 37, 0.24);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-modal-panel-wide {
  width: min(680px, 100%);
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.app-modal-header h2 {
  margin: 2px 0 0;
}

.app-modal-close {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-ink);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.app-modal-close:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  box-shadow: none;
  transform: none;
}

.install-modal-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
}

.install-modal-panel h2 {
  margin-top: 0;
}

.install-modal-panel p:not(.eyebrow) {
  color: var(--color-muted);
}

.create-menu-options {
  display: grid;
  gap: 12px;
}

.create-menu-option {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce9df;
  border-radius: 18px;
  background: #fbfefb;
  color: var(--color-ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.create-menu-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(22, 138, 84, 0.12);
}

.create-menu-option-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--color-primary-soft);
  font-size: 25px;
}

.create-menu-option strong,
.create-menu-option small {
  display: block;
}

.create-menu-option small {
  margin-top: 3px;
  color: var(--color-muted);
  line-height: 1.5;
}

@media (max-width: 680px) {
  :root {
    --mobile-tabbar-height: calc(76px + env(safe-area-inset-bottom));
  }

  body {
    padding-bottom: var(--mobile-tabbar-height);
  }

  .is-standalone body {
    padding-bottom: var(--mobile-tabbar-height);
  }

  .site-header .site-nav-link {
    display: none;
  }

  .site-header-inner {
    gap: 12px;
    align-items: center;
  }

  .site-nav {
    margin-left: auto;
    gap: 10px;
    padding: 4px;
    overflow: visible;
  }

  .site-profile-link {
    width: 44px;
    height: 44px;
    margin-left: 0;
  }

  .site-profile-link:hover,
  .site-profile-link.is-active {
    box-shadow: 0 0 0 4px rgba(22, 138, 84, 0.16);
    transform: none;
  }

  .site-install-button:hover {
    transform: none;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: var(--mobile-tabbar-height);
    min-height: var(--mobile-tabbar-height);
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(210, 224, 214, 0.94);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 30px rgba(24, 56, 39, 0.10);
    backdrop-filter: blur(18px);
  }

  .mobile-tab {
    min-width: 0;
    min-height: 56px;
    padding: 4px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #647067;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
  }

  .mobile-tab.is-active {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
  }

  .mobile-tab:hover {
    background: var(--color-primary-dark);
    color: #ffffff;
    box-shadow: none;
    transform: none;
  }

  .mobile-tab:hover .mobile-tab-icon {
    color: #ffffff;
  }

  .mobile-tab:hover .mobile-tab-plus {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: none;
  }

  .mobile-tab-icon {
    font-family: ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
    font-size: 22px;
    line-height: 1;
  }

  .mobile-tab-plus {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    margin-top: -10px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 6px 15px rgba(22, 138, 84, 0.27);
    color: #ffffff;
    font-size: 24px;
  }

  .app-modal-sheet-mobile {
    align-items: end;
    padding: 0;
  }

  .app-modal-panel-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 22px 18px max(22px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 26px 26px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .install-modal-panel {
    width: calc(100% - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    padding: 22px;
    border-radius: 24px;
    grid-template-columns: 1fr;
  }

  .floating-footer {
    z-index: 61;
    bottom: var(--mobile-tabbar-height);
    border-bottom: 0;
    background: #ffffff;
    box-shadow: 0 -8px 30px rgba(24, 56, 39, 0.10);
    backdrop-filter: none;
  }

  .has-floating-actions .mobile-tabbar {
    border-top-color: transparent;
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
  }

  .has-floating-footer {
    padding-bottom: calc(var(--mobile-tabbar-height) + 132px);
  }

  .fab {
    bottom: calc(var(--mobile-tabbar-height) + 18px);
  }

  .site-footer {
    margin-bottom: 0;
  }
}
