:root {
  color-scheme: light;
  --gold: #bfa15a;
  --leaf: #4a9a7b;
  --rose: #df8aa0;
  --ink: #263530;
  --muted: #6f837d;
  --line: #d7e8df;
  --paper: rgba(252, 255, 251, 0.94);
  --bg: #eef9f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.95) 0 12px, transparent 13px),
    radial-gradient(circle at 82% 12%, rgba(190, 236, 219, 0.7) 0 18px, transparent 19px),
    radial-gradient(circle at 88% 72%, rgba(255, 255, 255, 0.72) 0 22px, transparent 23px),
    radial-gradient(circle at 20% 82%, rgba(197, 235, 255, 0.62) 0 20px, transparent 21px),
    linear-gradient(160deg, #f8fffb 0%, #e8f7f1 48%, #f8faee 100%);
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 34px rgba(45, 98, 80, 0.12);
  position: relative;
  padding-bottom: 24px;
  backdrop-filter: blur(10px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: linear-gradient(180deg, #e4f7ed, #f8f5d9);
  font-weight: 800;
  overflow: hidden;
}

.topbar .back {
  position: absolute;
  left: 12px;
  z-index: 7;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
}

.ticker {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.ticker span {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  animation: ticker 14s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

.login {
  min-height: 100vh;
  padding: 40px 24px;
  background:
    linear-gradient(180deg, rgba(246, 95, 124, 0.18), rgba(244, 165, 28, 0.12)),
    url("https://images.unsplash.com/photo-1576092768241-dec231879fc3?auto=format&fit=crop&w=900&q=80") center/cover;
}

.login-panel {
  margin-top: 12vh;
  padding: 24px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.brand {
  margin: 0 0 4px;
  font-size: 34px;
  letter-spacing: 0;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-weight: 700;
}

.field input,
.field textarea,
.field select,
.search-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  background: #fff;
  outline-color: var(--gold);
}

.primary,
.secondary,
.mini,
.danger {
  border-radius: 6px;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 800;
}

.primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #58ac8c, #347b65);
}

.secondary {
  color: var(--leaf);
  background: #edf7f2;
}

.danger {
  color: #fff;
  background: var(--rose);
}

.mini {
  min-height: 30px;
  padding: 0 10px;
  color: #fff;
  background: var(--gold);
  font-size: 13px;
}

.switch-line {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.content {
  padding: 8px;
}

.search-tools {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 8px;
}

.filter-toggle {
  min-height: 32px;
}

.filter-panel {
  margin-bottom: 10px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.filters select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 8px;
  background: #fff;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 16px;
  font-weight: 900;
}

.feature-strip {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  scroll-behavior: smooth;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.feature-strip::-webkit-scrollbar {
  display: none;
}

.feature-strip.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.feature-track {
  display: flex;
  gap: 8px;
  width: max-content;
  padding: 8px;
  animation: none;
}

.feature-item {
  position: relative;
  width: 132px;
  height: 92px;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border-radius: 6px;
  color: #fff;
  background: #1d2a22;
}

.feature-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.feature-item span,
.feature-item strong {
  position: absolute;
  left: 8px;
  right: 8px;
  z-index: 1;
  text-align: left;
}

.feature-item span {
  top: 7px;
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: #875900;
  background: #fff1cf;
  font-size: 11px;
  font-weight: 900;
}

.feature-item strong {
  bottom: 8px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.48);
}

@keyframes featureScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.tea-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}

.tea-main {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 7px;
  padding: 7px;
}

.tea-info {
  min-width: 0;
  padding-right: 56px;
}

.tea-img-wrap {
  width: 82px;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f7f2e9;
  overflow: hidden;
}

.tea-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tea-name {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0 0 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.tag {
  padding: 3px 6px;
  border-radius: 5px;
  color: #875900;
  background: #fff1cf;
  font-size: 11px;
  font-weight: 800;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-top: 1px dashed var(--gold);
}

.hot {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #cf2f40;
  font-weight: 900;
  font-size: 12px;
}

.action-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-group .mini,
.action-group .secondary {
  min-height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10px;
}

.tabbar {
  position: fixed;
  left: auto;
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 44px;
  height: auto;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 8px 5px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  z-index: 35;
  overflow: visible;
  box-shadow: 0 10px 26px rgba(61, 118, 95, 0.18);
}

.tabbar.is-hidden {
  opacity: 0.78;
  transform: translate(44px, -50%);
}

.tab-handle {
  position: absolute;
  left: -18px;
  top: 50%;
  width: 20px;
  height: 52px;
  transform: translateY(-50%);
  border-radius: 999px 0 0 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--leaf);
  box-shadow: -4px 8px 18px rgba(61, 118, 95, 0.14);
  font-size: 18px;
  font-weight: 900;
}

.tab-action {
  background: rgba(255, 255, 255, 0.9);
  color: #789087;
  font-weight: 800;
  font-size: 10px;
  line-height: 1.05;
  min-height: 66px;
  width: 32px;
  padding: 7px 0;
  border-radius: 999px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.tabbar.is-hidden .tab-action {
  opacity: 0;
  pointer-events: none;
}

.tabbar .active {
  background: linear-gradient(180deg, #e7fff2, #f9f6d2);
  color: var(--leaf);
}

.ai-float {
  position: fixed;
  left: calc(100vw - 66px);
  top: calc(100vh - 120px);
  display: block;
  margin: 0;
  z-index: 40;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #f3fff9, #70c6a7 38%, #3b8a6f);
  box-shadow: 0 10px 24px rgba(53, 128, 100, 0.28);
  cursor: grab;
  font-size: 13px;
  font-weight: 900;
  touch-action: none;
  user-select: none;
}

.ai-float.dragging {
  cursor: grabbing;
  transform: scale(1.05);
  box-shadow: 0 14px 30px rgba(53, 128, 100, 0.34);
}


.profile-hero {
  min-height: 210px;
  background: url("https://images.unsplash.com/photo-1515823064-d6e0c04616a7?auto=format&fit=crop&w=900&q=80") center/cover;
}

.profile-card {
  margin: -52px 14px 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.points-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recharge-btn {
  min-height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  color: #7a4a00;
  background: linear-gradient(180deg, #ffe08a, #f4a51c);
  box-shadow: 0 4px 12px rgba(175, 105, 10, 0.2);
}

.invite-link {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.menu {
  margin: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.menu button:last-child {
  border-bottom: 0;
}

.detail-media {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.nav-card {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.detail-img,
.detail-video {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f2e9;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 18px;
}

.detail-gallery img {
  width: 100%;
  max-height: 520px;
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f2e9;
}

.detail-body {
  padding: 16px;
}

.detail-head {
  position: relative;
  padding-top: 4px;
}

.info-text {
  white-space: pre-wrap;
  line-height: 1.65;
}

.comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.tea-code {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  background: #fff;
}

.detail-head .tea-code {
  position: static;
  display: inline-flex;
  margin-bottom: 8px;
}

.tea-code.diamond {
  color: #174c27;
  background: linear-gradient(135deg, #e7f8cf, #6fbf4a);
}

.tea-name.diamond {
  color: #174c27;
  background: linear-gradient(135deg, #e7f8cf, #6fbf4a);
}

.tea-code.gold {
  color: #875900;
  background: linear-gradient(135deg, #fff3bf, #f4a51c);
}

.tea-name.gold {
  color: #875900;
  background: linear-gradient(135deg, #fff3bf, #f4a51c);
}

.tea-code.purple {
  color: #fff;
  background: linear-gradient(135deg, #9a63ff, #5a2bbf);
}

.tea-name.purple {
  color: #fff;
  background: linear-gradient(135deg, #9a63ff, #5a2bbf);
}

.tea-code.pink {
  color: #8d1742;
  background: linear-gradient(135deg, #ffd6e5, #f65f9a);
}

.tea-name.pink {
  color: #8d1742;
  background: linear-gradient(135deg, #ffd6e5, #f65f9a);
}

.review-btn {
  color: #fff;
  background: linear-gradient(135deg, #9a63ff, #6327c9);
}

.dealer-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dealer-row .tea-code {
  position: static;
  margin-right: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.42);
}

.voice-modal {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  place-items: start center;
  padding: max(12px, env(safe-area-inset-top)) 14px 14px;
  overflow: hidden;
}

.modal-card {
  width: min(520px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
}

.modal-actions,
.support-head,
.support-send {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-card {
  max-width: 440px;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  padding: 16px;
  overscroll-behavior: contain;
  box-shadow: 0 18px 42px rgba(38, 92, 74, 0.22);
  background:
    radial-gradient(circle at 18% 15%, rgba(232, 255, 246, 0.95) 0 22px, transparent 23px),
    radial-gradient(circle at 85% 20%, rgba(226, 245, 255, 0.78) 0 28px, transparent 29px),
    #fff;
}

.voice-head h3 {
  margin: 0 0 5px;
  font-size: 20px;
  color: #245c4b;
}

.voice-head .muted {
  margin: 0;
  line-height: 1.45;
  font-size: 12px;
}

.voice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 10px;
}

.voice-btn,
.voice-close {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(38, 92, 74, 0.13);
}

.voice-record {
  background: linear-gradient(135deg, #3fb985, #20785d);
}

.voice-search {
  background: linear-gradient(135deg, #4aaee8, #266fac);
}

.voice-query {
  background: linear-gradient(135deg, #f4b64b, #cc7828);
}

.voice-smart {
  background: linear-gradient(135deg, #9b72ff, #6b43c8);
}

.voice-close {
  width: 100%;
  margin-top: 10px;
  color: #6b6a63;
  background: #f1efe8;
  box-shadow: none;
}

.ai-filters {
  grid-template-columns: 1fr;
  margin: 10px 0;
}

.voice-card .field {
  margin: 10px 0;
}

.voice-card input,
.voice-card select {
  min-height: 42px;
  border-radius: 8px;
}

.muted {
  color: var(--muted);
}

.chat-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f5;
}

.chat {
  max-width: 82%;
  padding: 9px;
  border-radius: 8px;
  background: #fff;
}

.chat.admin {
  justify-self: start;
  border: 1px solid #d7eadf;
}

.chat.member {
  justify-self: end;
  border: 1px solid #ffe0ab;
}

.chat p {
  margin: 6px 0;
}

.chat img,
.chat video {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 6px;
}

.chat-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 8px;
}

.chat-actions button {
  min-height: 26px;
  padding: 0 8px;
  color: var(--leaf);
  background: #e8f3ed;
  font-size: 12px;
}

.welcome-modal {
  backdrop-filter: blur(4px);
  place-items: start center;
  padding-top: 58px;
}

.welcome-card {
  position: relative;
  width: min(420px, 100%);
  overflow: hidden;
  padding: 28px 22px 22px;
  border-radius: 8px;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
}

.welcome-card.vip {
  background: linear-gradient(135deg, #ff9f35, #ff5a1d);
}

.welcome-card.svip {
  background: linear-gradient(135deg, #b87333, #6f3f1e);
}

.welcome-card.ssvip {
  color: #1f2730;
  background: linear-gradient(135deg, #f6f8fb, #aab4c1);
}

.welcome-card.sssvip {
  color: #5c3500;
  background: linear-gradient(135deg, #fff1a8, #d89412);
}

.welcome-card.blackgold {
  background: linear-gradient(135deg, #101010, #2a2011 55%, #d8a641);
}

.welcome-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.welcome-flash span {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  animation: welcomePulse 1.8s ease-out infinite;
}

.welcome-flash span:nth-child(2) {
  animation-delay: 0.45s;
}

.welcome-flash span:nth-child(3) {
  animation-delay: 0.9s;
}

.welcome-core {
  position: relative;
  z-index: 1;
  padding: 30px 0;
}

.welcome-core small {
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.8;
}

.welcome-core h2 {
  margin: 8px 0;
  font-size: 34px;
}

.welcome-card .primary {
  position: relative;
  z-index: 1;
  min-width: 160px;
  color: #1c1c1c;
  background: #fff;
}

@keyframes welcomePulse {
  0% {
    transform: scale(0.72);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.support-send {
  margin-top: 10px;
  flex-wrap: wrap;
}

.support-send input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--leaf);
  background: #e8f3ed;
  font-weight: 800;
}

.upload-btn input {
  display: none;
}

@media (max-width: 380px) {
  .tea-main {
    grid-template-columns: 76px 1fr;
  }

  .tea-img-wrap {
    width: 76px;
  }

  .tea-info {
    padding-right: 52px;
  }

  .card-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
