/* ============================================
   BetaX2 — White / Pink / Glass Theme
   ============================================ */

:root {
  --pink-50:  #fff5f9;
  --pink-100: #ffe4ef;
  --pink-200: #ffc8dc;
  --pink-300: #ffa3c4;
  --pink-400: #ff7aac;
  --pink-500: #ff4f93;
  --pink-600: #ec2f7c;
  --pink-700: #c41a63;

  --white: #ffffff;
  --bg:    #fff8fb;
  --ink:   #2a1722;
  --ink-2: #6a4f5d;
  --ink-3: #a68b97;

  --glass-bg:    rgba(255, 255, 255, 0.55);
  --glass-bg-2:  rgba(255, 255, 255, 0.35);
  --glass-brd:   rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 10px 30px rgba(236, 47, 124, 0.12),
                  0 2px 6px  rgba(236, 47, 124, 0.08);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --topbar-h:  72px;
  --bottomnav-h: 78px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --transition: 220ms var(--ease);

  --container: 1000px;
  --bg-image: url('../images/bg.jpg');
  --bg-image-blur: 3px;

  /* Custom component palettes (separate from --pink scale) */
  --user-grad-top: #ffe8f1;
  --user-grad-mid: #f39fc3;
  --user-grad-bot: #ff499b;

  --qa-grad-top: #ffb9d4;
  --qa-grad-mid: #f39fc3;
  --qa-grad-bot: #ff499b;
  --qa-emboss-dark: rgba(130, 34, 77, 0.2);

  --cats-grad-top: #ffb9d4;
  --cats-grad-mid: #f39fc3;
  --cats-grad-bot: #ff499b;
  --cats-emboss-dark: rgba(128, 30, 72, 0.18);

  --bottomnav-grad-top: rgba(255, 255, 255, 0.98);
  --bottomnav-grad-mid: rgba(255, 231, 241, 0.97);
  --bottomnav-grad-bot: rgba(245, 183, 208, 0.96);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Prompt', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 80% -10%, #ffd6e7 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 20%, #ffe9f2 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background image layer — set --bg-image on :root or body to activate */
/* e.g. document.documentElement.style.setProperty('--bg-image', "url('images/bg.jpg')") */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--bg-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--bg-image-blur, 0px));
  transform: scale(1.03);
  opacity: var(--bg-image-opacity, 0.8);
  pointer-events: none;
}

/* ============ GLOBAL FALLING SAKURA ============ */
.petal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 20;
}
.petal span {
  position: absolute;
  top: -8vh;
  left: 0;
  display: block;
  width: 16px;
  height: 11px;
  border-radius: 200px 10px 200px 200px;
  background: linear-gradient(to bottom, #faaca8, #ddd6f3);
  transform: skewX(30deg);
  opacity: .86;
  will-change: transform, opacity;
  animation: fallingSakura1 12s linear infinite;
}

.petal span:nth-of-type(3n+2) {
  animation-name: fallingSakura2;
}
.petal span:nth-of-type(3n+1) {
  animation-name: fallingSakura3;
}

.petal span:nth-of-type(2n+2) {
  background: linear-gradient(to right, #fffbd5, #f15f79);
}
.petal span:nth-of-type(3n+1) {
  background: linear-gradient(to right, #dd5e89, #f7bb97);
}
.petal span:nth-of-type(3n+2) {
  border-radius: 20px 1px;
}
.petal span:nth-of-type(3n+3) {
  transform: skewX(30deg) rotateX(-180deg);
}
.petal span:nth-of-type(4n+3) {
  width: 10px;
  height: 10px;
  box-shadow: 1px 1px 6px rgba(252, 123, 209, .45);
}
.petal span:nth-of-type(5n+2) {
  width: 12px;
  height: 12px;
  box-shadow: 1.5px 1.5px 8px rgba(252, 123, 209, .48);
}

.petal span:nth-of-type(1) { left: 2vw; animation-delay: -2.1s; }
.petal span:nth-of-type(2) { left: 8vw; animation-delay: -6.2s; }
.petal span:nth-of-type(3) { left: 14vw; animation-delay: -1.4s; }
.petal span:nth-of-type(4) { left: 20vw; animation-delay: -8.1s; }
.petal span:nth-of-type(5) { left: 27vw; animation-delay: -3.6s; }
.petal span:nth-of-type(6) { left: 33vw; animation-delay: -9.3s; }
.petal span:nth-of-type(7) { left: 39vw; animation-delay: -5.2s; }
.petal span:nth-of-type(8) { left: 45vw; animation-delay: -0.7s; }
.petal span:nth-of-type(9) { left: 51vw; animation-delay: -7.4s; }
.petal span:nth-of-type(10) { left: 57vw; animation-delay: -4.8s; }
.petal span:nth-of-type(11) { left: 63vw; animation-delay: -10.2s; }
.petal span:nth-of-type(12) { left: 69vw; animation-delay: -2.7s; }
.petal span:nth-of-type(13) { left: 75vw; animation-delay: -8.8s; }
.petal span:nth-of-type(14) { left: 81vw; animation-delay: -5.9s; }
.petal span:nth-of-type(15) { left: 87vw; animation-delay: -1.1s; }
.petal span:nth-of-type(16) { left: 93vw; animation-delay: -6.9s; }
.petal span:nth-of-type(17) { left: 97vw; animation-delay: -3.3s; }
.petal span:nth-of-type(18) { left: 6vw; animation-delay: -11.1s; }
.petal span:nth-of-type(19) { left: 24vw; animation-delay: -7.9s; }
.petal span:nth-of-type(20) { left: 84vw; animation-delay: -4.2s; }

.petal span:nth-of-type(3n+2) { animation-duration: 14s; }
.petal span:nth-of-type(4n+2) { animation-duration: 11s; }

@keyframes fallingSakura1 {
  0% {
    transform: translate3d(0, 0, 0) rotateX(0deg) skewX(30deg);
    opacity: .9;
  }
  100% {
    transform: translate3d(24vw, 108vh, 0) rotateX(-290deg) skewX(30deg);
    opacity: .2;
  }
}
@keyframes fallingSakura2 {
  0% {
    transform: translate3d(0, 0, 0) rotateX(-20deg) skewX(30deg);
    opacity: .88;
  }
  100% {
    transform: translate3d(12vw, 108vh, 0) rotateX(-70deg) skewX(30deg);
    opacity: .18;
  }
}
@keyframes fallingSakura3 {
  0% {
    transform: translate3d(0, 0, 0) rotateX(90deg) skewX(30deg);
    opacity: .9;
  }
  100% {
    transform: translate3d(28vw, 108vh, 0) rotateX(290deg) skewX(30deg);
    opacity: .12;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petal {
    display: none;
  }
}

@media (max-width: 768px) {
  .petal span:nth-of-type(5n),
  .petal span:nth-of-type(7n) {
    display: none;
  }
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ============ GLASS UTILITY ============ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}

/* ============ TOPBAR (PC) ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, #fd4e84 0%, transparent 100%);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);

}
.topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(236,47,124,.2));
}
.brand--center { margin: 0 auto; }

.mainnav {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.mainnav__item {
  position: relative;
  padding: 10px 18px;
  font-weight: 500;
  font-size: 16px;
  color: rgba(255,255,255,.82);
  transition: color var(--transition);
}
.mainnav__item::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity var(--transition), transform var(--transition);
}
.mainnav__item:hover { color: #fff; }
.mainnav__item:hover::after { opacity: .6; transform: scaleX(1); }
.mainnav__item.is-active { color: #fff; font-weight: 600; }
.mainnav__item.is-active::after { opacity: 1; transform: scaleX(1); }
.mainnav__indicator { display: none; }

.topbar__right { display: flex; align-items: center; gap: 12px; }
.btn-ghost {
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: #fff;
  box-shadow: 0 8px 18px rgba(236,47,124,.28);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-ghost:hover { transform: translateY(-1px); box-shadow: 0 12px 22px rgba(236,47,124,.34); }
.btn-ghost:active { transform: translateY(0); }

/* ============ LANGUAGE SWITCHER ============ */
.lang-switcher {
  position: relative;
}
.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 102px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 14px rgba(236, 47, 124, 0.14);
  color: var(--ink-2);
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.lang-switcher__trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(236, 47, 124, 0.2);
  border-color: rgba(255, 122, 172, 0.7);
}
.lang-switcher__flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.lang-switcher__code {
  font-size: 13px;
  letter-spacing: 0.4px;
  line-height: 1;
}
.lang-switcher__caret {
  margin-left: auto;
  font-size: 11px;
  line-height: 1;
  transition: transform var(--transition);
}
.lang-switcher.is-open .lang-switcher__caret { transform: rotate(180deg); }

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 152px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 12px 24px rgba(236, 47, 124, 0.15);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.lang-switcher.is-open .lang-switcher__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
  text-align: left;
  transition: background var(--transition), color var(--transition);
}
.lang-option img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.lang-option:hover {
  background: rgba(255, 122, 172, 0.16);
  color: var(--pink-700);
}
.lang-option.is-active {
  background: rgba(255, 122, 172, 0.2);
  color: var(--pink-700);
}

/* ============ MOBILE TOPBAR ============ */
.mobile-topbar {
  display: none;
  position: relative;
  padding: 14px 16px 6px;
  text-align: center;
  background: linear-gradient(to bottom, #fd4e84 0%, transparent 100%);
}
.mobile-topbar .brand__logo { height: 44px; margin: 0 auto; }

.mobile-menu-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(255,255,255,.78);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 6px 14px rgba(236,47,124,.14);
}
.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--pink-700);
}

.mobile-sidebar {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
}
.mobile-sidebar__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 9, 20, .44);
  opacity: 0;
  transition: opacity var(--transition);
}
.mobile-sidebar__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(82vw, 330px);
  padding: 16px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,240,247,.95));
  border-right: 1px solid rgba(255,255,255,.84);
  box-shadow: 14px 0 30px rgba(236,47,124,.2);
  transform: translateX(-104%);
  transition: transform var(--transition);
}
.mobile-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
}
.mobile-sidebar__logo {
  height: 34px;
  width: auto;
}
.mobile-sidebar__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.85);
  background: rgba(255,255,255,.8);
  color: var(--ink-2);
  font-size: 24px;
  line-height: 1;
}
.mobile-sidebar__links {
  display: grid;
  gap: 6px;
}
.mobile-sidebar__links a {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.82);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.mobile-sidebar__links a:hover {
  transform: translateX(2px);
  background: rgba(255,122,172,.18);
  color: var(--pink-700);
}
.mobile-sidebar__links a.is-active {
  color: #fff;
  background: linear-gradient(180deg, #f4a6c7 0%, #ea7eb0 100%);
  box-shadow: 0 10px 20px rgba(236,47,124,.16);
}

body.sidebar-open { overflow: hidden; }
.mobile-sidebar.is-open {
  pointer-events: auto;
}
.mobile-sidebar.is-open .mobile-sidebar__backdrop {
  opacity: 1;
}
.mobile-sidebar.is-open .mobile-sidebar__panel {
  transform: translateX(0);
}

/* ============ PAGE LAYOUT ============ */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.page-bottom-spacer { height: 20px; }

/* ============ PUBLIC TOPBAR ============ */
.public-topbar {
  position: sticky;
  top: 0;
  z-index: 110;
  background: linear-gradient(to bottom, #fd4e84 0%, transparent 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.public-topbar__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.public-topbar__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}
.public-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}
.public-nav a {
  position: relative;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  color: rgba(255,255,255,.82);
  transition: color var(--transition);
}
.public-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity var(--transition), transform var(--transition);
}
.public-nav a:hover {
  color: #fff;
}
.public-nav a:hover::after {
  opacity: .6;
  transform: scaleX(1);
}
.public-nav a.is-active {
  color: #fff;
  font-weight: 600;
}
.public-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.public-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.public-auth a {
  height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.public-auth__register {
  color: #fff;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.68);
}
.public-auth__login {
  color: var(--pink-700);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.92);
}

/* ============ BANNER SLIDER ============ */
.banner {
  position: relative;
  overflow: hidden;
  background: transparent;
}
.banner__viewport {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.banner__viewport.is-dragging { cursor: grabbing; }
.banner__track {
  display: flex;
  will-change: transform;
  transition: transform 500ms var(--ease);
}
.banner__track.no-anim { transition: none; }
.banner__slide {
  flex: 0 0 calc(100% / var(--banner-per-view, 1));
  min-width: calc(100% / var(--banner-per-view, 1));
  padding-right: 6px;
}
.banner__slide:last-child {
  padding-right: 0;
}
.banner__slide img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  object-fit: cover;
  border-radius: var(--radius-sm);
  /*background: linear-gradient(135deg, var(--pink-100), var(--pink-200));*/
}
.banner__bullets {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.banner__bullet {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.9);
  transition: width var(--transition), background var(--transition);
  cursor: pointer;
}
.banner__bullet.is-active {
  width: 26px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--pink-400), var(--pink-600));
}

/* ============ QUICK ACTIONS ============ */
.quick-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 44px;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--qa-grad-top) 0%, var(--qa-grad-mid) 52%, var(--qa-grad-bot) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.55),
    inset 0 -3px 8px var(--qa-emboss-dark),
    0 10px 20px rgba(236,47,124,.3);
  transition: transform var(--transition), box-shadow var(--transition);
}
.qa-btn::before {
  content: '';
  position: absolute;
  top: -140%;
  left: -38%;
  width: 42%;
  height: 300%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.46), rgba(255,255,255,0));
  transform: rotate(18deg);
  animation: qaGlossSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}
.qa-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(236,47,124,.34); }
.qa-btn:active { transform: translateY(0); }
.qa-btn__icon { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.qa-btn__label { font-size: 17px; font-weight: 600; }

.qa-btn--image {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.qa-btn--image::before {
  content: none;
}
.qa-btn--image:hover {
  box-shadow: none;
}
.qa-btn__image {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  object-fit: contain;
}

@keyframes qaGlossSweep {
  0% { left: -45%; opacity: 0; }
  18% { opacity: 1; }
  42% { left: 115%; opacity: 0; }
  100% { left: 115%; opacity: 0; }
}

/* ============ USER BAR ============ */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--user-grad-top) 0%, var(--user-grad-mid) 46%, var(--user-grad-bot) 100%);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: 0 10px 22px rgba(236,47,124,.24);
}
.user-bar__left { display: flex; align-items: center; gap: 14px; }
.user-bar__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-200), var(--pink-400));
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(236,47,124,.2);
  filter: drop-shadow(0 0 0 #fff);
}
.user-bar__name { font-weight: 600; font-size: 15px; color: #7c2d52; }
.user-bar__id { font-size: 12px; color: #7c2d52; }

.user-bar__right { display: flex; align-items: center; gap: 14px; }
.user-bar__balance {
  text-align: right;
  line-height: 1.2;
}
.user-bar__balance-label { font-size: 12px; color: rgba(255,255,255,.86); display: block; }
.user-bar__balance-value { font-weight: 700; color: #fff; font-size: 16px; }

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,.22);
  border: 0px solid var(--pink-200);
  transition: background var(--transition), transform var(--transition);
}
.logout-btn img { width: 16px; height: 16px; }
.logout-btn:hover { background: rgba(255,255,255,.34); transform: translateY(-1px); }

/* ============ CATEGORY BUTTONS (ICON ONLY) ============ */
.cats {
  position: relative;
  display: flex;
  justify-content: center;
}
.cats__scroll {
  display: flex;
  gap: 10px;
  justify-content: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 8px 8px;
  scroll-padding-inline: 8px;
  scrollbar-width: none;
}
.cats__scroll.is-overflowing {
  width: 100%;
  justify-content: flex-start;
}
.cats__scroll::-webkit-scrollbar { display: none; }
.cats__scroll.is-scrolling { scrollbar-width: thin; scrollbar-color: var(--pink-300) transparent; }
.cats__scroll.is-scrolling::-webkit-scrollbar { display: block; height: 4px; }
.cats__scroll.is-scrolling::-webkit-scrollbar-thumb { background: var(--pink-300); border-radius: 3px; }

.cats__arrow {
  display: none;
  position: absolute;
  top: calc(50% - 4px);
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
  box-shadow: 0 6px 14px rgba(236, 47, 124, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  z-index: 2;
}
.cats__arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--pink-700);
  border-bottom: 2px solid var(--pink-700);
}
.cats__arrow--left { left: 2px; }
.cats__arrow--left::before { transform: translate(-35%, -50%) rotate(135deg); }
.cats__arrow--right { right: 2px; }
.cats__arrow--right::before { transform: translate(-65%, -50%) rotate(-45deg); }
.cats.can-scroll-left .cats__arrow--left,
.cats.can-scroll-right .cats__arrow--right {
  opacity: 1;
  pointer-events: auto;
}
.cats__arrow:hover {
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 10px 18px rgba(236, 47, 124, 0.22);
}

.cat-btn {
  flex: 0 0 auto;
  width: 66px;
  height: 58px;
  background: rgba(255,255,255,.42);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255,255,255,.78);
  padding: 0;
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  opacity: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 8px 14px rgba(236,47,124,.12);
  transition: opacity var(--transition), transform var(--transition), filter var(--transition), box-shadow var(--transition);
}
.cat-btn:hover { opacity: 0.92; transform: translateY(-2px); }
.cat-btn.is-active {
  background: linear-gradient(180deg, var(--cats-grad-top) 0%, var(--cats-grad-mid) 52%, var(--cats-grad-bot) 100%);
  border-color: rgba(255,255,255,.68);
  opacity: 1;
  filter: none;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.5),
    inset 0 -3px 8px var(--cats-emboss-dark),
    0 8px 14px rgba(236,47,124,.24);
}
.cat-btn.is-active .cat-btn__icon { transform: scale(1.1); }
.cat-btn__icon {
  width: 62px;
  height: 62px;
  margin-top: -10px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition);
}

/* ============ PROVIDERS GRID ============ */
.providers__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.providers__title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(90deg, var(--pink-600), var(--pink-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.providers__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.provider-card {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fadeInUp 380ms var(--ease) both;
}
.provider-card:hover { transform: translateY(-4px); box-shadow: 0 18px 30px rgba(236,47,124,.2); }
.provider-card img {
  width: 100%; height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(236,47,124,.18));
}
.provider-card__name { font-size: 14px; font-weight: 500; color: var(--ink); }

/* Index page provider grid follows home landing column density */
body[data-page='home'] .providers__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
body[data-page='home'] .provider-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  box-shadow: none;
  transition: none;
  animation: none;
}
body[data-page='home'] .provider-card:hover {
  transform: none;
  box-shadow: none;
}
body[data-page='home'] .provider-card__name {
  display: none;
}

@media (min-width: 901px) {
  body[data-page='home'] .providers__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ BOTTOM NAV ============ */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  height: calc(92px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.bottomnav__bar {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 460px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  height: 62px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  pointer-events: auto;
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,.75);
  /* Notch: circle center at 50% horiz, 22px from bar top */
  background:
    radial-gradient(circle at 50% 22px, transparent 48px, rgba(255,255,255,.9) 49px),
    linear-gradient(180deg, var(--bottomnav-grad-top) 0%, var(--bottomnav-grad-mid) 46%, var(--bottomnav-grad-bot) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 -2px 20px rgba(236,47,124,.1), 0 4px 16px rgba(236,47,124,.08);
}
.bottomnav__center-gap {
  flex: 0 0 104px;
}
.bottomnav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--transition);
}
.bottomnav__link img { width: 24px; height: 24px; object-fit: contain; }
.bottomnav__link:hover { color: var(--pink-600); }
.bottomnav__link.is-active { color: var(--pink-700); }

.bottomnav__home {
  position: absolute;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
}
.bottomnav__home-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  transition: transform var(--transition);
}
.bottomnav__home-circle img { width: 92px; height: 92px; object-fit: contain; }
.bottomnav__home:hover .bottomnav__home-circle { transform: translateY(-3px); }
.bottomnav__home-label { display: none; }

body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }

/* ============ GENERIC PAGE CONTENT ============ */
.content-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}
.content-card h1 {
  margin-top: 0;
  font-size: 28px;
  background: linear-gradient(90deg, var(--pink-600), var(--pink-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.content-card p { color: var(--ink-2); line-height: 1.7; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .providers__grid { grid-template-columns: repeat(4, 1fr); }
  body[data-page='home'] .providers__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .mobile-topbar { display: block; }
  .mobile-menu-btn { display: inline-flex; }

  .public-topbar__inner {
    height: 64px;
    padding: 0 12px;
  }
  .public-topbar__logo {
    height: 34px;
  }
  .public-nav {
    display: none;
  }
  .public-auth {
    gap: 6px;
  }
  .public-auth a {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .page { padding: 12px 14px 24px; gap: 6px; }

  .quick-actions { gap: 10px; }
  .qa-btn { flex: 1; justify-content: center; padding: 14px 16px; }
  .qa-btn__label { font-size: 15px; }
  .qa-btn--image {
    padding: 0;
  }
  .qa-btn__image {
    max-width: 100%;
  }

  .user-bar { flex-direction: row; padding: 12px; }
  .user-bar__balance-label { font-size: 11px; }
  .user-bar__balance-value { font-size: 14px; }
  .logout-btn span { display: none; }
  .logout-btn { padding: 8px; }
  .logout-btn img { width: 18px; height: 18px; }

  .providers__grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .provider-card { padding: 0px; }
  .provider-card img { width: 100%; height: auto; }
  .provider-card__name { font-size: 12px; }


  .bottomnav__link { font-size: 10px; }
  .bottomnav__link img { width: 28px; height: 28px; }
  .bottomnav__home-circle { width: 76px; height: 76px; }
  .bottomnav__home-circle img { width: 84px; height: 84px; }
  .bottomnav__center-gap { flex: 0 0 92px; }
  /* Recalculate notch for 72px home: center at 62-36=26px from bar top */
  .cat-btn {
    width: 60px;
    height: 52px;
    border-radius: 14px;
  }
  .cat-btn__icon {
    width: 56px;
    height: 56px;
    margin-top: -8px;
  }

  .bottomnav__bar {
    background:
      radial-gradient(circle at 50% 26px, transparent 44px, rgba(255,255,255,.9) 45px),
      linear-gradient(180deg, var(--bottomnav-grad-top) 0%, var(--bottomnav-grad-mid) 48%, var(--bottomnav-grad-bot) 100%);
    border-radius: 36px;
    left: 8px;
    right: 8px;
    width: auto;
    transform: none;
  }
}

@media (max-width: 420px) {
  .providers__grid { grid-template-columns: repeat(2, 1fr); }
  body[data-page='home'] .providers__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-btn {
    width: 56px;
    height: 48px;
  }
  .cat-btn__icon {
    width: 52px;
    height: 52px;
    margin-top: -7px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
