:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --panel: #151b27;
  --panel-raised: #1d2635;
  --panel-soft: #111722;
  --line: #293348;
  --text: #f5f6fb;
  --muted: #9aa6ba;
  --accent: #8b5cf6;
  --accent-bright: #a78bfa;
  --cyan: #34d5e8;
  --green: #37d6a0;
  --warning: #f4b94e;
  font-family: "Noto Sans Khmer", "Khmer OS Siemreap", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 50% -28%, rgba(99, 77, 186, .18), transparent 55%),
    #0a0e16;
  color: var(--text);
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 22, .8);
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  background: rgba(15, 20, 30, .94);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  filter: drop-shadow(0 5px 12px rgba(124, 92, 246, .2));
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .09em; }
.brand em { color: #b9a5ff; font-style: normal; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.header-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.language-toggle { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-soft); }
.language-toggle button { min-width: 34px; padding: 5px 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; transition: background .18s ease, color .18s ease; }
.language-toggle button.active { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(124, 92, 246, .25); }
.theme-toggle { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--panel-soft); color: var(--warning); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.theme-toggle:hover { border-color: var(--accent-bright); transform: rotate(-8deg); }
.theme-toggle svg { width: 17px; height: 17px; }

.preview-pill, .count-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(167, 139, 250, .2);
  border-radius: 999px;
  background: rgba(35, 31, 55, .72);
  color: #d2c7ff;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 99px;
  background: var(--warning);
  box-shadow: 0 0 10px rgba(244, 185, 78, .45);
}

.main-content { padding: 18px 17px 26px; }

.account-summary { margin: 0 0 14px; }
.summary-profile { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 14px; background: rgba(21, 27, 39, .94); box-shadow: 0 8px 20px rgba(0, 0, 0, .08); }
.summary-profile-link { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 8px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.summary-profile-link:hover .summary-identity strong { color: var(--accent-bright); }
.profile-chevron { width: 16px; height: 16px; flex: 0 0 auto; margin-left: auto; color: var(--muted); }
.summary-avatar { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
.summary-identity { display: grid; min-width: 0; gap: 2px; }
.summary-identity strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; transition: color .18s ease; }
.summary-identity small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.welcome-card {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 23px 21px;
  border: 1px solid rgba(167, 139, 250, .2);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 88% 12%, rgba(127, 91, 232, .35), transparent 35%),
    radial-gradient(ellipse at 20% 110%, rgba(25, 162, 181, .12), transparent 45%),
    linear-gradient(125deg, #211d39, #171d2d 64%, #162331);
  box-shadow: 0 17px 45px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.welcome-card::after {
  position: absolute;
  right: 12%;
  bottom: -98px;
  width: 230px;
  height: 165px;
  border: 1px solid rgba(194, 177, 255, .11);
  border-radius: 50%;
  content: "";
  transform: rotate(-25deg);
}

.welcome-copy {
  position: relative;
  z-index: 2;
  max-width: 72%;
  transition: opacity 0.2s ease;
}

.hero-kicker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c6b8ff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  max-width: 100%;
}

.hero-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9b7bff;
  box-shadow: 0 0 10px rgba(155, 123, 255, .9);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0;
}

.hero-indicators {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-dot.active {
  width: 16px;
  background: #a78bfa;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.8);
}

.hero-text-container {
  display: flex;
  flex-direction: column;
  min-height: 108px;
  justify-content: center;
}

.hero-animated-text {
  transition: opacity 0.32s ease, transform 0.32s ease;
  will-change: opacity, transform;
}

.hero-animated-text.text-switching {
  opacity: 0;
  transform: translateY(4px);
}

.welcome-card h1 {
  max-width: 330px;
  margin: 4px 0 6px;
  font-size: clamp(17px, 4.4vw, 22px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.welcome-card p {
  max-width: 320px;
  margin: 0 0 9px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.hero-badges-row.text-switching {
  opacity: 0;
  transform: translateY(4px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2.5px 7.5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  line-height: 1.4;
}

.hero-badge-feature {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.38);
  color: #c4b5fd;
  transition: all 0.3s ease;
}

.hero-badge-platform {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.hero-badge-price {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.32);
  color: #6ee7b7;
}

.hero-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.hero-action-btn:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.12);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.55);
}

.hero-action-btn:active {
  transform: translateY(0);
}

.hero-action-btn svg {
  width: 13px;
  height: 13px;
  transition: transform 0.18s ease;
}

.hero-action-btn:hover svg {
  transform: translateX(2.5px);
}

.hero-stat-compact {
  display: inline-flex;
  align-items: center;
  color: #94a3b8;
  font-size: 10.5px;
}

.hero-stat-counter strong {
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
}

.eyebrow { color: var(--cyan); font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.hero-art {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 195px;
  height: 195px;
  transform: translateY(-50%);
  perspective: 900px;
}

.hero-glow-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.45) 0%, rgba(99, 102, 241, 0.2) 50%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(20px);
  animation: heroPulse 3.5s ease-in-out infinite alternate;
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(197, 183, 255, 0.22);
}

.orbit-one {
  inset: 10px;
  transform: rotate(-28deg) scaleY(0.62);
  animation: orbitSpin 22s linear infinite;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.orbit-two {
  inset: 22px 4px;
  transform: rotate(38deg) scaleY(0.62);
  animation: orbitSpinRev 28s linear infinite;
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
}

.orbit-particle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.particle-one {
  background: #c084fc;
  box-shadow: 0 0 8px #c084fc, 0 0 14px rgba(192, 132, 252, 0.85);
}

.particle-two {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.85);
}

.hero-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(76, 29, 149, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 35px rgba(109, 40, 217, 0.5), 0 0 25px rgba(147, 51, 234, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%);
  animation: heroLevitate 4.5s ease-in-out infinite;
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.hero-core-logo {
  position: absolute;
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  opacity: 0;
  transform: scale(0.65) rotate(-14deg);
  transition: opacity 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.hero-core-logo.active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  pointer-events: auto;
}

.hero-core-logo.leaving {
  opacity: 0;
  transform: scale(1.18) rotate(14deg);
}

.hero-core-sheen {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  animation: sheenSlide 5s ease-in-out infinite;
  pointer-events: none;
}

.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.float-badge svg {
  width: 17px;
  height: 17px;
}

.float-one {
  top: 14px;
  left: 24px;
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.4);
  box-shadow: 0 8px 20px rgba(192, 132, 252, 0.25);
  animation: floatBob1 4s ease-in-out infinite;
}

.float-two {
  top: 50px;
  right: 8px;
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
  animation: floatBob2 4.6s ease-in-out infinite;
}

.float-three {
  right: 32px;
  bottom: 12px;
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.25);
  animation: floatBob3 3.8s ease-in-out infinite;
}

@keyframes heroLevitate {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0px) rotate(-3deg);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-9px) rotate(3deg);
  }
}

@keyframes logoBreath {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes heroPulse {
  0% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg) scaleY(0.62);
  }
  to {
    transform: rotate(360deg) scaleY(0.62);
  }
}

@keyframes orbitSpinRev {
  from {
    transform: rotate(360deg) scaleY(0.62);
  }
  to {
    transform: rotate(0deg) scaleY(0.62);
  }
}

@keyframes floatBob1 {
  0%, 100% {
    transform: translateY(0px) rotate(-6deg);
  }
  50% {
    transform: translateY(-7px) rotate(4deg);
  }
}

@keyframes floatBob2 {
  0%, 100% {
    transform: translateY(0px) rotate(6deg);
  }
  50% {
    transform: translateY(-8px) rotate(-4deg);
  }
}

@keyframes floatBob3 {
  0%, 100% {
    transform: translateY(0px) rotate(-4deg);
  }
  50% {
    transform: translateY(-6px) rotate(8deg);
  }
}

@keyframes sheenSlide {
  0%, 10% {
    transform: translate(-100%, -100%);
  }
  50%, 100% {
    transform: translate(100%, 100%);
  }
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 14px 0 28px;
  padding: 12px 14px;
  border: 1px solid rgba(52, 213, 232, .15);
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(23, 43, 55, .78), rgba(24, 31, 45, .68));
  color: #c7d2e1;
}

.notice-icon { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; margin-top: 1px; border: 1px solid rgba(52, 213, 232, .42); border-radius: 50%; color: var(--cyan); font-size: 11px; font-weight: 800; }
.notice p { margin: 0; font-size: 10px; line-height: 1.8; }
.notice strong { color: #eff3fa; font-size: 11px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.02em; }
.count-pill { padding: 6px 9px; color: var(--muted); }

.search-box {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(115deg, #151b28, #131925);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.search-box svg { width: 19px; height: 19px; flex: 0 0 auto; color: #8c9ab0; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search-box input::placeholder { color: #77849b; }
.search-box kbd { padding: 2px 6px; border: 1px solid #354055; border-radius: 5px; color: #8290a6; font-size: 10px; }

.category-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 14px -1px 16px;
  padding: 1px 1px 5px;
  scrollbar-width: none;
}
.category-list::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #171d2a;
  color: #c4cde0;
  cursor: pointer;
  font-size: 10px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.category-chip:hover { border-color: #62528c; }
.category-chip.active { border-color: transparent; background: linear-gradient(100deg, #8b5cf6, #7052e6); color: white; font-weight: 700; }

.product-list { display: grid; gap: 12px; }

.product-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  padding: 14px;
  border: 1px solid #283246;
  border-radius: 17px;
  background: linear-gradient(125deg, rgba(25, 32, 46, .98), rgba(18, 24, 36, .99));
  box-shadow: 0 9px 25px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .025);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.product-card:hover { border-color: #3a4560; box-shadow: 0 13px 30px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .035); transform: translateY(-1px); }

.product-icon, .dialog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: linear-gradient(145deg, var(--icon-bg, rgba(139, 92, 246, .15)), rgba(25, 31, 47, .7));
  color: var(--icon-color, #bca7ff);
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.product-logo { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }

.product-info { min-width: 0; }
.product-category { display: block; margin-bottom: 4px; color: var(--icon-color, var(--cyan)); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.product-info h3 { display: -webkit-box; overflow: hidden; margin: 0; font-size: 12px; line-height: 1.5; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-info p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: #8e9bb0; font-size: 9px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }

.product-meta { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .055); }
.platform-label, .availability { display: inline-flex; align-items: center; gap: 6px; color: #95a1b5; font-size: 9px; }
.starting-price { display: inline-flex; min-height: 23px; flex: 0 0 auto; align-items: center; padding: 3px 8px; border: 1px solid rgba(55, 214, 160, .2); border-radius: 999px; background: rgba(55, 214, 160, .08); color: #42d9bd; font-size: 9px; font-weight: 750; white-space: nowrap; }
.platform-dot { width: 6px; height: 6px; border-radius: 2px; background: #7b8eff; box-shadow: 0 0 8px rgba(123, 142, 255, .42); }
.availability { flex: 0 0 auto; color: #bdadff; white-space: nowrap; }
.availability .status-dot { width: 6px; height: 6px; background: #a78bfa; box-shadow: 0 0 8px rgba(167, 139, 250, .4); }

.detail-button {
  display: inline-flex;
  min-width: 70px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(167, 139, 250, .27);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(139, 92, 246, .21), rgba(94, 72, 168, .16));
  color: #ded5ff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  transition: background .18s ease, border-color .18s ease;
}
.detail-button svg { width: 14px; height: 14px; }
.detail-button:hover { border-color: rgba(167, 139, 250, .55); background: rgba(139, 92, 246, .3); }

.empty-state { padding: 34px 14px; text-align: center; color: var(--muted); }
.empty-state > span { display: block; margin-bottom: 6px; color: #9f8ae7; font-size: 28px; }
.empty-state strong { color: #e2e7f0; font-size: 13px; }
.empty-state p { margin: 7px 0 0; font-size: 11px; }

.bottom-nav {
  position: fixed;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 560px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, .07);
  border-bottom: 0;
  border-radius: 19px 19px 0 0;
  background: rgba(20, 26, 38, .97);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  min-height: 52px;
  justify-items: center;
  gap: 4px;
  padding: 4px 2px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: #8793a8;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-item small { font-size: 9px; }
.nav-item.active { color: var(--cyan); }
.nav-item.active svg { filter: drop-shadow(0 0 8px rgba(52, 213, 232, .35)); }

.product-dialog {
  width: min(92vw, 410px);
  padding: 20px;
  border: 1px solid #374259;
  border-radius: 20px;
  background: #171e2b;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.product-dialog::backdrop { background: rgba(4, 7, 12, .76); backdrop-filter: blur(4px); }
.dialog-close-row { display: flex; justify-content: end; margin: -8px -8px 10px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #202a39; color: #dce3ef; cursor: pointer; font-size: 20px; }
.dialog-icon { width: 54px; height: 54px; margin-bottom: 16px; font-size: 24px; }
.product-dialog h2 { margin: 6px 0 8px; font-size: 18px; }
.dialog-description { color: #aeb9cc; font-size: 12px; line-height: 1.8; }
.dialog-plan { display: grid; gap: 7px; margin-top: 16px; }
.dialog-plan-label { color: #cbd2df; font-size: 11px; font-weight: 700; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plan-option { display: grid; gap: 4px; min-height: 73px; padding: 10px 12px; border: 1px solid #374259; border-radius: 12px; background: #202a39; color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.plan-option span { color: #aeb9cc; font-size: 10px; }
.plan-option strong { color: #39d3bb; font-size: 14px; }
.plan-option small { color: #8793a8; font-size: 9px; }
.plan-option.selected { border-color: #8b5cf6; background: linear-gradient(145deg, rgba(139, 92, 246, .22), rgba(34, 42, 59, .95)); box-shadow: 0 0 0 1px rgba(139, 92, 246, .12); }
.plan-option:hover { transform: translateY(-1px); }
.plan-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.plan-unavailable { grid-column: 1 / -1; margin: 0; padding: 12px; color: #8793a8; font-size: 11px; }
.dialog-price-note { margin: 0; color: #8793a8; font-size: 10px; line-height: 1.6; }
.terms-consent { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.terms-consent label { display: flex; min-width: 0; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 10px; line-height: 1.6; cursor: pointer; }
.terms-consent input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--accent); }
.terms-link { flex: 0 0 auto; padding: 2px 0; border: 0; background: transparent; color: var(--accent-bright); cursor: pointer; font-size: 10px; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.terms-dialog { max-height: min(82vh, 680px); overflow-y: auto; }
.terms-dialog h2 { margin-top: 4px; }
.terms-list { display: grid; gap: 11px; margin: 16px 0 20px; padding-left: 20px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.terms-close { width: 100%; }
.dialog-status { display: flex; align-items: center; gap: 8px; margin: 18px 0 14px; color: #cbd2df; font-size: 11px; }
.primary-button { width: 100%; padding: 11px; border: 0; border-radius: 12px; background: #394154; color: #aeb7c8; font-size: 12px; font-weight: 700; }
.primary-button:not(:disabled) { background: linear-gradient(110deg, #8b5cf6, #7052e6); color: #fff; cursor: pointer; box-shadow: 0 7px 18px rgba(112, 82, 230, .24); }
.primary-button:not(:disabled):hover { filter: brightness(1.08); }
.primary-button:disabled { cursor: not-allowed; opacity: .82; }

.toast {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: min(90vw, 440px);
  padding: 10px 14px;
  border: 1px solid #374259;
  border-radius: 12px;
  background: #252e3e;
  color: #e7ebf4;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translate(50%, 0); }

@media (min-width: 560px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100dvh - 44px); border: 1px solid rgba(255, 255, 255, .06); border-radius: 22px; overflow: clip; }
  .bottom-nav { bottom: 22px; border-radius: 0 0 22px 22px; }
}

@media (max-width: 600px) {
  .welcome-card {
    min-height: 205px;
    padding: 16px 14px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
  }

  .welcome-copy {
    max-width: calc(100% - 136px);
    width: 100%;
    position: relative;
    z-index: 2;
  }

  /* Keep full 3D art with all float badges, orbits, and logo completely visible! */
  .hero-art {
    position: absolute;
    top: 50%;
    right: 2px;
    width: 195px;
    height: 195px;
    transform: translateY(-50%) scale(0.75);
    transform-origin: right center;
    opacity: 1;
    pointer-events: none;
    z-index: 1;
  }

  /* Make sure all 3 floating badges stay visible, sharp, and properly scaled */
  .float-badge {
    display: flex !important;
  }

  .hero-kicker-bar {
    margin-bottom: 5px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .hero-kicker {
    font-size: 8.5px;
    letter-spacing: .06em;
  }

  .hero-indicators {
    gap: 3px;
  }

  .hero-dot {
    width: 5px;
    height: 5px;
  }

  .hero-dot.active {
    width: 13px;
  }

  .welcome-card h1 {
    font-size: clamp(15px, 4.3vw, 18px);
    font-weight: 800;
    line-height: 1.25;
    margin: 2px 0 5px;
    letter-spacing: -.02em;
  }

  .welcome-card p {
    font-size: 10.5px;
    line-height: 1.5;
    margin: 0 0 8px;
    -webkit-line-clamp: 2;
  }

  .hero-badges-row {
    gap: 4px;
    margin-bottom: 10px;
  }

  .hero-badge {
    font-size: 8.5px;
    padding: 2px 6px;
    border-radius: 5px;
  }

  .hero-action-bar {
    gap: 8px;
    margin-top: 2px;
  }

  .hero-action-btn {
    padding: 7px 13px;
    font-size: 11px;
    border-radius: 9px;
  }

  .hero-stat-compact {
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .main-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .welcome-card {
    min-height: 195px;
    padding: 14px 12px;
    border-radius: 17px;
  }

  .welcome-copy {
    max-width: calc(100% - 120px);
  }

  .hero-art {
    right: -2px;
    transform: translateY(-50%) scale(0.66);
    transform-origin: right center;
  }

  .welcome-card h1 {
    font-size: 14px;
  }

  .welcome-card p {
    font-size: 10px;
    line-height: 1.45;
  }

  .hero-badges-row {
    gap: 3px;
  }

  .hero-badge {
    font-size: 8px;
    padding: 1.5px 5px;
  }

  .hero-action-btn {
    padding: 6.5px 11px;
    font-size: 10.5px;
  }

  .hero-stat-compact {
    font-size: 9.5px;
  }

  .product-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px;
  }

  .product-icon {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .detail-button {
    min-width: 55px;
    padding: 7px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f9;
  --panel: #ffffff;
  --panel-raised: #f7f8fc;
  --panel-soft: #f0f2f8;
  --line: #dce1ec;
  --text: #1d2433;
  --muted: #707b8e;
  --accent: #7650e8;
  --accent-bright: #8b68f1;
  --cyan: #168da3;
  --green: #118966;
  --warning: #b77a0b;
  background: var(--bg);
}

html[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 50% -28%, rgba(128, 103, 222, .12), transparent 55%),
    #f2f4f9;
  color: var(--text);
}

html[data-theme="light"] .app-shell { background: rgba(255, 255, 255, .82); }
html[data-theme="light"] .topbar { border-bottom-color: rgba(37, 49, 72, .1); background: rgba(249, 250, 253, .94); }
html[data-theme="light"] .brand em { color: #7552d9; }
html[data-theme="light"] .language-toggle,
html[data-theme="light"] .theme-toggle { background: #fff; }
html[data-theme="light"] .preview-pill,
html[data-theme="light"] .count-pill { border-color: rgba(118, 80, 232, .18); background: #f2efff; color: #6950be; }

html[data-theme="light"] .welcome-card {
  border-color: rgba(118, 80, 232, .2);
  background:
    radial-gradient(ellipse at 88% 12%, rgba(166, 145, 247, .25), transparent 35%),
    radial-gradient(ellipse at 20% 110%, rgba(25, 162, 181, .1), transparent 45%),
    linear-gradient(125deg, #f1edff, #f7f7fc 64%, #edf7f9);
  box-shadow: 0 17px 38px rgba(50, 52, 84, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-theme="light"] .welcome-card::after { border-color: rgba(118, 80, 232, .12); }
html[data-theme="light"] .hero-kicker { color: #7054cc; }
html[data-theme="light"] .hero-kicker-dot { background: #8061e8; }
html[data-theme="light"] .welcome-card h1 { color: #20243a; white-space: pre-line; }
html[data-theme="light"] .welcome-card p { color: #59647b; }
html[data-theme="light"] .hero-stats strong { color: #262b42; }
html[data-theme="light"] .hero-stats small { color: #69748a; }
html[data-theme="light"] .hero-stats i { background: rgba(67, 73, 109, .2); }
html[data-theme="light"] .hero-orbit { border-color: rgba(110, 87, 187, .2); }
html[data-theme="light"] .float-icon { border-color: rgba(111, 100, 151, .16); background: rgba(255, 255, 255, .9); box-shadow: 0 8px 18px rgba(56, 50, 93, .1); color: #7358c5; }

html[data-theme="light"] .notice { border-color: rgba(22, 141, 163, .2); background: linear-gradient(100deg, #e9f8f8, #f0f6fa); color: #4e6172; }
html[data-theme="light"] .notice strong { color: #263b4a; }
html[data-theme="light"] .section-heading h2 { color: #202738; }
html[data-theme="light"] .search-box { background: #fff; box-shadow: 0 4px 14px rgba(33, 45, 68, .04); }
html[data-theme="light"] .search-box input::placeholder { color: #8993a5; }
html[data-theme="light"] .search-box kbd { border-color: #dce1ec; color: #778196; }
html[data-theme="light"] .category-chip { background: #fff; color: #5d687c; }
html[data-theme="light"] .category-chip:hover { border-color: #a897e2; }

html[data-theme="light"] .product-card { border-color: #e1e5ee; background: linear-gradient(125deg, #fff, #fafbfe); box-shadow: 0 8px 22px rgba(35, 45, 68, .06), inset 0 1px 0 #fff; }
html[data-theme="light"] .product-card:hover { border-color: #c8c0e9; box-shadow: 0 12px 26px rgba(43, 47, 78, .1); }
html[data-theme="light"] .product-icon,
html[data-theme="light"] .dialog-icon { border-color: rgba(79, 70, 120, .1); background: linear-gradient(145deg, var(--icon-bg, rgba(139, 92, 246, .15)), rgba(255, 255, 255, .92)); }
html[data-theme="light"] .product-info h3 { color: #252c3d; }
html[data-theme="light"] .product-info p { color: #778196; }
html[data-theme="light"] .summary-profile { border-color: #e1e5ee; background: #fff; box-shadow: 0 8px 22px rgba(35, 45, 68, .05); color: #667187; }
html[data-theme="light"] .product-meta { border-top-color: rgba(48, 58, 79, .1); }
html[data-theme="light"] .starting-price { border-color: rgba(22, 141, 128, .18); background: rgba(22, 141, 128, .07); color: #168d80; }
html[data-theme="light"] .platform-label,
html[data-theme="light"] .availability { color: #68758a; }
html[data-theme="light"] .availability .status-dot { background: #8c6cdb; }
html[data-theme="light"] .detail-button { border-color: rgba(118, 80, 232, .23); background: #f2efff; color: #694bc9; }
html[data-theme="light"] .detail-button:hover { border-color: rgba(118, 80, 232, .48); background: #e9e3ff; }
html[data-theme="light"] .empty-state strong { color: #30394d; }

html[data-theme="light"] .bottom-nav { border-color: rgba(44, 55, 77, .12); background: rgba(255, 255, 255, .97); box-shadow: 0 -9px 26px rgba(35, 45, 68, .1); }
html[data-theme="light"] .nav-item { color: #818a9b; }
html[data-theme="light"] .nav-item.active { color: #168da3; }
html[data-theme="light"] .product-dialog { border-color: #e0e4ed; background: #fff; color: #20283a; box-shadow: 0 24px 80px rgba(22, 31, 50, .24); }
html[data-theme="light"] .product-dialog::backdrop { background: rgba(30, 39, 57, .38); }
html[data-theme="light"] .icon-button { background: #f2f4f8; color: #455066; }
html[data-theme="light"] .dialog-description { color: #69758a; }
html[data-theme="light"] .dialog-plan-label { color: #59657a; }
html[data-theme="light"] .plan-option { border-color: #dfe3ed; background: #f8f9fc; color: #20283a; }
html[data-theme="light"] .plan-option span { color: #69758a; }
html[data-theme="light"] .plan-option strong { color: #168d80; }
html[data-theme="light"] .plan-option.selected { border-color: #8b5cf6; background: #f2edff; }
html[data-theme="light"] .plan-option small { color: #788398; }
html[data-theme="light"] .dialog-price-note { color: #788398; }
html[data-theme="light"] .dialog-status { color: #59657a; }
html[data-theme="light"] .primary-button { background: #e9ebf1; color: #737d90; }
html[data-theme="light"] .primary-button:not(:disabled) { background: linear-gradient(110deg, #8b5cf6, #7052e6); color: #fff; }
html[data-theme="light"] .toast { border-color: #d7dce7; background: #fff; color: #30394b; box-shadow: 0 8px 25px rgba(31, 41, 60, .12); }

@media (max-width: 390px) {
  .topbar { gap: 8px; padding-right: 12px; padding-left: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 12px; }
  .brand small { max-width: 142px; font-size: 9px; }
  .header-controls { gap: 5px; }
  .language-toggle button { min-width: 30px; padding-right: 6px; padding-left: 6px; font-size: 9px; }
  .theme-toggle { width: 31px; height: 31px; }
}

@media (min-width: 900px) {
  body { padding: 22px 26px; }
  .app-shell {
    display: grid;
    width: min(100%, 1320px);
    min-height: calc(100dvh - 44px);
    grid-template-columns: 210px minmax(0, 1fr);
    grid-template-rows: 78px minmax(0, 1fr);
    padding-bottom: 0;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 25px;
    overflow: clip;
  }
  .topbar { grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: 14px 26px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 11px; }
  .main-content { grid-column: 2; grid-row: 2; min-width: 0; padding: 30px clamp(24px, 3.3vw, 46px) 48px; }
  .bottom-nav {
    position: sticky;
    top: 78px;
    right: auto;
    bottom: auto;
    left: auto;
    display: grid;
    width: auto;
    height: fit-content;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    align-self: start;
    align-content: start;
    gap: 5px;
    margin: 0;
    padding: 26px 13px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .07);
    border-radius: 0;
    background: rgba(12, 17, 26, .28);
    box-shadow: none;
    backdrop-filter: none;
  }
  .nav-item { display: flex; min-height: 46px; align-items: center; justify-content: flex-start; gap: 12px; padding: 8px 12px; border-radius: 12px; text-align: left; }
  .nav-item svg { width: 19px; height: 19px; flex: 0 0 auto; }
  .nav-item small { font-size: 11px; }
  .nav-item.active { background: rgba(139, 92, 246, .14); }
  .welcome-card { min-height: 278px; padding: 34px 38px; border-radius: 24px; }
  .welcome-copy { max-width: 66%; }
  .welcome-card h1 { max-width: 520px; margin-top: 13px; font-size: clamp(28px, 3vw, 37px); line-height: 1.32; }
  .welcome-card p { max-width: 430px; font-size: 13px; }
  .hero-stats { margin-top: 24px; }
  .hero-art { right: 22px; width: 245px; height: 245px; }
  .hero-core { width: 86px; height: 86px; border-radius: 28px; }
  .hero-core-logo { width: 60px; height: 60px; }
  .float-badge { width: 44px; height: 44px; border-radius: 14px; }
  .float-badge svg { width: 22px; height: 22px; }
  .notice { margin: 18px 0 36px; padding: 15px 17px; }
  .notice p { font-size: 11px; }
  .section-heading h2 { font-size: 24px; }
  .search-box { max-width: 760px; }
  .category-list { margin-top: 16px; margin-bottom: 20px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .product-card { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; padding: 16px; }
  .product-icon { width: 50px; height: 50px; border-radius: 15px; }
  .product-info h3 { font-size: 12px; }
  .product-meta { grid-column: 1 / -1; }
  html[data-theme="light"] .bottom-nav { border-right-color: rgba(44, 55, 77, .12); background: rgba(248, 249, 253, .72); }
}

@media (min-width: 1260px) {
  .app-shell { grid-template-columns: 225px minmax(0, 1fr); }
  .main-content { padding-right: 48px; padding-left: 48px; }
  .product-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-card { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 9px; padding: 15px; }
  .product-icon { width: 48px; height: 48px; }
  .detail-button { min-width: 64px; }
}

.secondary-view { min-height: 56vh; }
.page-heading { margin: 2px 0 22px; }
.page-heading h1 { margin: 7px 0 5px; font-size: clamp(23px, 5vw, 30px); letter-spacing: -.025em; }
.page-heading p { max-width: 650px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty-panel,
.profile-card,
.settings-card { border: 1px solid var(--line); border-radius: 19px; background: var(--panel); box-shadow: 0 10px 28px rgba(0, 0, 0, .08); }
.empty-panel { display: grid; max-width: 650px; justify-items: center; margin: 36px auto 0; padding: 32px 24px; text-align: center; }
.empty-panel-icon { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 15px; border: 1px solid rgba(139, 92, 246, .22); border-radius: 18px; background: rgba(139, 92, 246, .12); color: var(--accent-bright); }
.empty-panel-icon svg { width: 27px; height: 27px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-panel h2 { margin: 0; font-size: 17px; }
.empty-panel p { max-width: 470px; margin: 9px 0 19px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.return-button { min-height: 40px; padding: 9px 15px; border: 1px solid rgba(167, 139, 250, .38); border-radius: 12px; background: linear-gradient(110deg, #8b5cf6, #7052e6); color: #fff; cursor: pointer; font-size: 11px; font-weight: 750; transition: filter .18s ease, transform .18s ease; }
.return-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.profile-avatar { position: relative; display: grid; width: 52px; height: 52px; flex: 0 0 auto; overflow: hidden; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 17px; background: linear-gradient(145deg, #a24cff, #5b34d2); box-shadow: 0 7px 20px rgba(108, 73, 221, .24); color: #fff; font-size: 22px; font-weight: 800; }
.profile-avatar-initial { display: grid; width: 100%; height: 100%; place-items: center; }
.profile-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.profile-details { min-width: 0; flex: 1; }
.profile-details h2 { overflow: hidden; margin: 0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.profile-details p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.profile-badge { padding: 6px 9px; border: 1px solid rgba(139, 92, 246, .22); border-radius: 999px; background: rgba(139, 92, 246, .1); color: var(--accent-bright); font-size: 9px; font-weight: 700; white-space: nowrap; }
.account-notice { margin: 13px 0 22px; padding: 12px 14px; border: 1px solid rgba(52, 213, 232, .18); border-radius: 13px; background: rgba(52, 213, 232, .07); color: var(--muted); font-size: 10px; line-height: 1.8; }
.settings-card { padding: 17px 18px; }
.settings-card > h2 { margin: 0 0 6px; font-size: 14px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid rgba(130, 145, 170, .14); }
.settings-row > span { display: grid; gap: 3px; }
.settings-row strong { font-size: 11px; }
.settings-row small { color: var(--muted); font-size: 9px; }
.settings-action { min-width: 74px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); color: var(--text); cursor: pointer; font-size: 10px; font-weight: 700; }
.settings-action:hover { border-color: var(--accent-bright); }
.faq-list { display: grid; gap: 10px; }
.faq-item { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.faq-item summary { position: relative; padding: 15px 42px 15px 16px; cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; top: 50%; right: 16px; color: var(--muted); content: "+"; font-size: 18px; font-weight: 400; transform: translateY(-52%); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 16px 15px; color: var(--muted); font-size: 10px; line-height: 1.8; }

.record-list { display: grid; max-width: 820px; gap: 12px; }
.record-card { padding: 16px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 8px 22px rgba(0, 0, 0, .07); }
.record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.record-heading h2 { margin: 0; font-size: 13px; line-height: 1.6; }
.record-status { flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(55, 214, 160, .22); border-radius: 999px; background: rgba(55, 214, 160, .09); color: var(--green); font-size: 9px; font-weight: 750; }
.record-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

@media (min-width: 900px) {
  .secondary-view { max-width: 1000px; margin: 0 auto; }
  .page-heading { margin-bottom: 28px; }
  .page-heading h1 { font-size: 32px; }
  .empty-panel { margin-top: 48px; padding: 42px 34px; }
  .empty-panel h2 { font-size: 20px; }
  .empty-panel p { font-size: 12px; }
  .profile-card { padding: 22px; }
  .settings-card { max-width: 700px; margin-top: 16px; padding: 20px 22px; }
  .faq-list { max-width: 850px; gap: 12px; }
  .faq-item summary { padding: 17px 46px 17px 18px; font-size: 12px; }
  .faq-item p { padding: 0 18px 17px; font-size: 11px; }
}

@media (max-width: 390px) {
  .summary-profile { gap: 5px; padding: 6px; }
  .summary-avatar { width: 30px; height: 30px; }
  .summary-profile-link { gap: 6px; }
  .profile-card { gap: 10px; padding: 13px; }
  .profile-avatar { width: 44px; height: 44px; border-radius: 14px; }
  .profile-badge { max-width: 88px; overflow: hidden; padding: 5px 7px; text-overflow: ellipsis; }
  .empty-panel { margin-top: 24px; padding: 25px 16px; }
}

.summary-profile-link:focus-visible,
.nav-item:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.nav-item { min-width: 0; }
.nav-item small { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) {
  .main-content { padding-right: 12px; padding-left: 12px; }
  .bottom-nav { padding-right: 5px; padding-left: 5px; }
  .nav-item small { font-size: 7px; }
}

/* Payment Method Selector */
.payment-method-group {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.payment-method-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.method-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  gap: 2px;
}
.method-option:hover {
  border-color: var(--accent-bright);
}
.method-option.active {
  border-color: #e51e2b;
  background: rgba(229, 30, 43, 0.08);
  box-shadow: 0 0 0 1px #e51e2b;
}
.method-badge {
  font-size: 11px;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 4px;
}
.method-desc {
  font-size: 8.5px;
  color: var(--muted);
}
.method-option.active .method-desc {
  color: var(--text);
}

/* KHQR Dialog & Card */
.khqr-dialog {
  max-width: 420px;
}
.khqr-card {
  margin-top: 10px;
  border-radius: 18px;
  background: #ffffff;
  color: #1a1a1a;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.khqr-header {
  background: #e51e2b;
  color: #ffffff;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.khqr-logo-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.khqr-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
}
.khqr-subbrand {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.5);
}
.khqr-merchant {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.khqr-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}
.khqr-currency {
  font-size: 16px;
  font-weight: 700;
}
.khqr-amount {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.5px;
}
.khqr-currency-label {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
  margin-left: 2px;
}
.khqr-qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: #ffffff;
  min-height: 240px;
}
.khqr-qr-image {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 8px;
}
.khqr-qr-loading {
  font-size: 12px;
  color: #666;
  font-weight: 600;
}
.khqr-info-box {
  background: #f8f9fa;
  border-top: 1px dashed #dce0e5;
  padding: 12px 16px;
  display: grid;
  gap: 8px;
  font-size: 11px;
  color: #333333;
}
.khqr-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.khqr-info-label {
  color: #6c757d;
  font-size: 10px;
}
.khqr-bill-number {
  font-family: monospace;
  font-size: 13px;
  font-weight: 750;
  color: #0f141e;
  letter-spacing: 0.5px;
}
.khqr-account-id {
  font-size: 11px;
  font-weight: 600;
  color: #0f141e;
}
.copy-button {
  padding: 3px 8px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #ffffff;
  color: #495057;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.copy-button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}
.khqr-instructions {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.khqr-instructions h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
}
.khqr-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.khqr-note {
  margin: 8px 0 0;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--cyan);
  font-weight: 600;
}
.khqr-actions {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.khqr-actions-top {
  margin-top: 12px;
  margin-bottom: 2px;
}

.khqr-upload-wrapper {
  display: grid;
  gap: 6px;
}

.khqr-upload-btn {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #a78bfa !important;
  border: 1px dashed rgba(139, 92, 246, 0.5) !important;
  font-weight: 700 !important;
  padding: 10px 14px !important;
}

.khqr-upload-btn:hover {
  background: rgba(139, 92, 246, 0.25) !important;
}

.khqr-slip-status {
  font-size: 11.5px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-weight: 650;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.khqr-bot-chat-btn {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  font-weight: 650 !important;
}

.khqr-timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin: 10px auto 4px;
}

.khqr-paid-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: 0.3px;
}

.khqr-paid-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.success-dialog {
  text-align: center;
}

.success-icon {
  font-size: 42px;
  margin-bottom: 8px;
}

.success-key-box {
  background: var(--panel-soft);
  border: 1.5px dashed var(--cyan);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  display: grid;
  gap: 6px;
}

.key-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
}

.key-display-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.key-display-row code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 750;
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.8px;
  user-select: all;
}

.primary-copy {
  background: var(--cyan) !important;
  color: #041018 !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

.success-instructions {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.receipt-note {
  margin-top: 6px;
  font-size: 10px;
  color: #10b981;
  font-weight: 600;
}

.license-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 14px;
}

.license-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-product-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.license-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.license-product-badge h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.license-meta-sub {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.license-status-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.license-status-chip.active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.license-status-chip.inactive {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.license-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--panel-soft);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.license-info-cell {
  display: grid;
  gap: 3px;
}

.license-info-cell span {
  font-size: 9.5px;
  color: var(--muted);
}

.license-info-cell strong {
  font-size: 11px;
  color: var(--text);
  font-weight: 650;
}

.license-key-container {
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px dashed var(--cyan);
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.license-key-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.license-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.license-code {
  font-family: monospace;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.25);
  padding: 5px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  user-select: all;
  word-break: break-all;
}

.license-bot-notice {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.license-bot-notice span {
  font-size: 10.5px;
  color: var(--muted);
}

.license-bot-link-btn {
  font-size: 10.5px !important;
  padding: 6px 12px !important;
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

.license-bottom-help {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.license-bottom-help code {
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Enhanced Orders Card Styling */
.order-card-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 14px;
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-product-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-product-badge h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.order-meta-date {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.order-status-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

.order-status-chip.paid {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.order-status-chip.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.order-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--panel-soft);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.order-info-cell {
  display: grid;
  gap: 3px;
}

.order-info-cell span {
  font-size: 9.5px;
  color: var(--muted);
}

.order-info-cell strong {
  font-size: 11px;
  color: var(--text);
  font-weight: 650;
}

.order-card-actions {
  display: flex;
  gap: 8px;
}

