/* Shared bottom tab bar for home / flash / saved / me */
:root {
  --app-ink: #141414;
  --app-mute-2: rgba(20, 20, 20, 0.42);
  --app-frost: rgba(255, 255, 255, 0.12);
  --app-line-2: rgba(255, 255, 255, 0.22);
  --app-shadow-pop:
    0 8px 28px -16px rgba(20, 20, 20, 0.12),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.4);
  --app-grad-accent: linear-gradient(135deg, #e11d48 0%, #be123c 55%, #9f1239 100%);
  --app-shadow-accent: 0 8px 18px -8px rgba(190, 18, 60, 0.42);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav {
  position: fixed;
  bottom: calc(12px + var(--safe-bottom, var(--app-safe-bottom)));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 452px;
  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 7px 12px;
  /* Hard-coded glass — ignore page --frost so bar stays truly transparent */
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 999px;
  box-shadow:
    0 8px 28px -16px rgba(20, 20, 20, 0.12),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(36px) saturate(1.85) !important;
  -webkit-backdrop-filter: blur(36px) saturate(1.85) !important;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 48px;
  border: 0;
  background: transparent;
  color: var(--mute-2, var(--app-mute-2));
  font-family: Syne, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.nav-item[aria-current="page"] {
  color: #be123c;
  font-weight: 700;
}

.nav-item__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: inherit;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-item__icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-item[aria-current="page"] .nav-item__icon {
  background: var(--grad-accent, var(--app-grad-accent));
  color: #fff;
  box-shadow: var(--shadow-accent, var(--app-shadow-accent));
}

/* Shared 1:1 spot cards (景点 tab) */
.sq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sq-card {
  position: relative;
  display: block;
  border-radius: var(--r-md, 16px);
  overflow: hidden;
  background: var(--line-2, #eceae6);
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(20, 20, 20, 0.06));
  color: inherit;
  text-decoration: none;
}
.sq-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.sq-card:active img { transform: scale(1.04); }
.sq-card__scrim {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
}
.sq-card__kind {
  margin: 0 0 5px;
  font: 600 11px/1.2 Syne, system-ui, sans-serif;
  letter-spacing: 0.06em;
  opacity: 0.9;
}
.sq-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sq-card__rate {
  margin: 6px 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  font: 600 13px/1.2 Syne, system-ui, sans-serif;
}
.sq-card__score { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sq-card__reviews { font-size: 12px; font-weight: 600; opacity: 0.88; white-space: nowrap; }
.sq-card__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3f3f46;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}
.sq-card__fav::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  grid-area: 1 / 1;
}
.sq-card__fav-icon {
  width: 17px;
  height: 17px;
  display: block;
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
}
.sq-card__fav[aria-pressed="true"] { color: #be123c; }
.sq-card__fav .ic-heart-fill,
.sq-card__fav .ic-bm-fill { display: none; fill: currentColor; stroke: none; }
.sq-card__fav[aria-pressed="true"] .ic-heart-line,
.sq-card__fav[aria-pressed="true"] .ic-bm-line { display: none; }
.sq-card__fav[aria-pressed="true"] .ic-heart-fill,
.sq-card__fav[aria-pressed="true"] .ic-bm-fill { display: block; }
/* Custom check (not native checkbox — avoids OS blue accent) */
.sq-card__check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.25);
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  z-index: 2;
  cursor: pointer;
  box-sizing: border-box;
}
.sq-card__check.is-on,
.sq-card__check[aria-pressed="true"] {
  background: #be123c;
  border-color: #be123c;
  box-shadow: inset 0 0 0 4px #fff;
}
.sq-card.is-selecting .sq-card__fav { display: none; }

/* Secondary-page navpill (mirror WeChat capsule): ‹ back | logo home */
.zsl-navpill {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow: 0 4px 14px -6px rgba(20, 20, 20, 0.35);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  overflow: hidden;
}
.zsl-navpill__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 100%;
  color: var(--ink, #141414);
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.zsl-navpill__btn:active {
  background: rgba(20, 20, 20, 0.06);
}
.zsl-navpill__icon {
  margin-top: -2px;
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}
.zsl-navpill__divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.12);
}
.zsl-navpill__logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
html.zsl-has-navpill .topbar {
  display: none !important;
}
html.zsl-has-navpill .bottom-nav {
  display: none !important;
}
html.zsl-has-navpill .fav-fab {
  top: calc(10px + env(safe-area-inset-top, 0px)) !important;
}

@media (prefers-reduced-motion: reduce) {
  .nav-item { transition: none; }
  .sq-card img { transition: none; }
}
