:root {
  --bg: #f7f4ee;
  --panel: #fffdf8;
  --ink: #1f2a2e;
  --muted: #6e7776;
  --line: #d9d3c7;
  --brand: #1f7a6b;
  --brand-soft: #dcefe9;
  --warn: #9d3c2f;
  --warn-soft: #f7e4df;
  --shadow: 0 18px 40px rgba(31, 42, 46, 0.08);
  --drawer-width: 620px;
  --sticky-top: 0px;
  --sticky-gap: 10px;
  --sticky-left: 20px;
  --sticky-width: calc(100vw - 40px);
  --sticky-toolbar-top: calc(var(--sticky-top) + 72px + var(--sticky-gap));
  --suggest-columns: 1;
  --suggest-overlay-width: min(var(--sticky-width), calc(100vw - 28px));
  --suggest-overlay-shift-x: 0px;
  --suggest-column-min: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(31, 122, 107, 0.14), transparent 30%),
    linear-gradient(180deg, #faf7f1 0%, var(--bg) 100%);
}

body.drawer-open {
  overflow: hidden;
}

.page {
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 20px 44px;
}

.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 3fr) minmax(0, 7fr);
  align-items: center;
  margin-bottom: 12px;
}

.search-shell {
  min-width: 0;
  position: relative;
}

.search-shell.has-open-suggest {
  z-index: 16;
  isolation: isolate;
}

.search-sticky-spacer {
  height: 0;
}

.auth-page {
  max-width: 1100px;
}

.auth-hero {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 16px;
}

.auth-copy {
  text-align: center;
}

.auth-copy .intro {
  margin: 0 auto;
}

.auth-panel {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel .search-row {
  align-items: center;
}

.auth-password-row input {
  flex: 1;
}

.auth-input-wrap {
  position: relative;
  width: 100%;
}

.auth-input-wrap input {
  width: 100%;
  padding-right: 48px;
}

.auth-input-wrap .auth-plain-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.auth-input-wrap .auth-plain-toggle:hover {
  background: rgba(31, 42, 46, 0.06);
  transform: translateY(-50%);
}

.auth-input-wrap .auth-plain-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-input-wrap .auth-plain-toggle .eye-closed {
  display: none;
}

.auth-input-wrap .auth-plain-toggle.is-visible .eye-open {
  display: none;
}

.auth-input-wrap .auth-plain-toggle.is-visible .eye-closed {
  display: block;
}

.auth-code-row input {
  flex: 1;
}

.auth-code-row button {
  min-width: 132px;
}

.auth-action-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .auth-panel {
    min-height: auto;
  }
}

.hero-copy h1 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 2.4vw, 38px);
  line-height: 1.08;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.intro {
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.search-panel,
.results {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(217, 211, 199, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.search-panel {
  padding: 18px;
  position: relative;
}

.search-panel.has-open-suggest {
  z-index: 20;
}

.hero .hero-copy {
  min-width: 0;
}

.hero .search-panel {
  width: 100%;
  padding: 14px 16px;
  border-radius: 20px;
}

.hero .search-row {
  gap: 10px;
}

.hero .search-row input {
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 12px;
}

.hero .search-row button {
  min-width: 100px;
  height: 46px;
  border-radius: 12px;
}

.hero .platform-block {
  margin-top: 10px;
  gap: 10px;
}

.hero .platform-picker {
  gap: 8px;
}

.hero .platform-button {
  padding: 8px 14px;
  font-size: 12px;
}

.search-label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-row input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 16px;
  background: #fff;
}

.search-row button,
.pagination button {
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.search-row button {
  min-width: 110px;
  height: 52px;
}

.platform-block {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.platform-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.platform-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.platform-button:hover {
  transform: translateY(-1px);
}

.platform-button.is-active {
  border-color: rgba(31, 122, 107, 0.35);
  background: var(--brand-soft);
  color: var(--brand);
}

.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 24;
  display: none;
  width: var(--suggest-overlay-width);
  max-width: none;
  max-height: min(58vh, 520px);
  overflow-x: auto;
  overflow-y: auto;
  padding: 10px 12px 12px;
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 36px rgba(31, 42, 46, 0.16);
  backdrop-filter: blur(10px);
  transform: translateX(var(--suggest-overlay-shift-x));
  overscroll-behavior: contain;
}

.search-suggest.is-open {
  display: block;
}

.search-suggest.is-panel-mode {
  overflow-x: hidden;
}

.search-suggest-grid {
  display: grid;
  grid-template-columns: repeat(var(--suggest-columns), minmax(var(--suggest-column-min), 1fr));
  gap: 10px 14px;
  min-width: 100%;
  align-items: start;
}

.search-suggest-panel {
  display: grid;
  gap: 10px;
}

.search-suggest-panel-section {
  display: grid;
  gap: 6px;
}

.search-suggest-panel-section + .search-suggest-panel-section {
  padding-top: 10px;
  border-top: 1px solid rgba(217, 211, 199, 0.72);
}

.search-suggest-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.search-suggest-panel-head strong {
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
}

.search-suggest-panel-list {
  display: grid;
  gap: 3px;
}

.search-suggest-panel-item {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  padding: 6px 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  text-align: left;
}

.search-suggest-panel-item:hover {
  background: rgba(31, 122, 107, 0.08);
}

.search-suggest-panel-keyword {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
}

.search-suggest-panel-count {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
}

.search-suggest-panel-empty {
  padding: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.search-suggest-column {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.search-suggest-head {
  --suggest-head-accent: var(--ink);
  --suggest-head-border: rgba(217, 211, 199, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--suggest-head-border);
}

.search-suggest-head strong {
  font-size: 12px;
  line-height: 1.2;
  color: var(--suggest-head-accent);
}

.search-suggest-meta {
  color: var(--suggest-head-accent);
  opacity: 0.76;
  font-size: 11px;
  white-space: nowrap;
}

.search-suggest-head.is-mmm {
  --suggest-head-accent: #1f7a6b;
  --suggest-head-border: rgba(31, 122, 107, 0.22);
}

.search-suggest-head.is-lichi {
  --suggest-head-accent: #c66a1a;
  --suggest-head-border: rgba(198, 106, 26, 0.24);
}

.search-suggest-head.is-yae {
  --suggest-head-accent: #6d3fc8;
  --suggest-head-border: rgba(109, 63, 200, 0.22);
}

.search-suggest-head.is-chida {
  --suggest-head-accent: #c62828;
  --suggest-head-border: rgba(198, 40, 40, 0.22);
}

.search-suggest-head.is-qch {
  --suggest-head-accent: #0369a1;
  --suggest-head-border: rgba(3, 105, 161, 0.22);
}

.search-suggest-head.is-eky {
  --suggest-head-accent: #b42318;
  --suggest-head-border: rgba(180, 35, 24, 0.22);
}

.search-suggest-list {
  display: grid;
  gap: 4px;
}

.search-suggest-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 4px 0;
}

.search-suggest-fill {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.search-suggest-fill svg {
  width: 15px;
  height: 15px;
}

.search-suggest-fill:hover {
  transform: translateY(-1px);
  background: rgba(31, 122, 107, 0.1);
}

.search-suggest-trigger {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.search-suggest-trigger:hover {
  color: var(--brand);
}

.search-suggest-state {
  min-height: 68px;
  padding: 10px 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.search-suggest-state.is-error {
  color: var(--warn);
}

.search-panel.is-sticky {
  position: fixed;
  top: var(--sticky-top);
  left: var(--sticky-left);
  z-index: 18;
  width: var(--sticky-width);
  max-width: none;
  padding: 12px 14px 14px;
  border-radius: 20px;
  border: 1px solid rgba(217, 211, 199, 0.92);
  box-shadow: 0 12px 28px rgba(31, 42, 46, 0.12);
  background: rgba(255, 253, 248, 0.98);
}

.search-panel.is-sticky.has-open-suggest {
  z-index: 22;
}

.search-panel.is-sticky .search-row {
  gap: 8px;
  min-width: 0;
}

.search-panel.is-sticky .search-row input {
  height: 42px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 14px;
}

.search-panel.is-sticky .search-row button {
  min-width: 88px;
  height: 42px;
  border-radius: 11px;
  font-size: 14px;
}

.search-panel.is-sticky .platform-block {
  margin-top: 10px;
  gap: 8px;
}

.search-panel.is-sticky .platform-picker {
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.search-panel.is-sticky .platform-picker::-webkit-scrollbar {
  display: none;
}

.search-panel.is-sticky .platform-button {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 7px 12px;
  font-size: 12px;
}

.search-row button:hover,
.pagination button:hover {
  transform: translateY(-1px);
}

.search-row button:disabled,
.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.results {
  padding: 14px 18px 18px;
}

.status {
  min-height: 0;
  margin-bottom: 6px;
  color: var(--muted);
}

.status.error {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  color: var(--warn);
}

.status.loading {
  color: var(--brand);
  font-weight: 600;
}

.source-summary {
  display: none;
}

.summary-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.summary-card-compact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
}

.summary-compact-title {
  color: var(--ink);
  font-size: 13px;
  line-height: 1;
}

.summary-compact-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.summary-compact-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #faf8f2;
}

.summary-compact-value strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
}

.summary-compact-value em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}

.summary-card h2 {
  margin: 0;
  font-size: 16px;
}

.summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4efe5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-card.error {
  border-color: #efc9c0;
  background: #fff6f4;
}

.summary-card.active {
  border-color: rgba(31, 122, 107, 0.45);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 107, 0.14);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.summary-stat {
  padding: 10px 12px;
  border: 1px solid #efe9dc;
  border-radius: 14px;
  background: #faf8f2;
}

.summary-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.summary-error-text {
  margin-top: 0;
  color: var(--warn);
  font-size: 12px;
  line-height: 1.3;
}

.table-tools {
  margin-bottom: 8px;
}

.table-tools-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-group {
  justify-content: flex-end;
  margin-left: auto;
}

.view-group {
  justify-content: flex-end;
  margin-left: 14px;
  flex-wrap: nowrap;
}

.filter-label {
  color: var(--muted);
  font-size: 13px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.filter-button:hover {
  transform: translateY(-1px);
}

.filter-button.is-active {
  border-color: rgba(31, 122, 107, 0.35);
  background: var(--brand-soft);
  color: var(--brand);
}

.view-toggle-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.view-toggle-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.product-list.is-list-view {
  grid-template-columns: 1fr;
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(31, 42, 46, 0.05);
}

.product-thumb {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f1e8 100%);
  border: 1px solid #efe9dc;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-thumb.is-clickable {
  cursor: pointer;
}

.product-thumb-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.product-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  min-width: 0;
}

.product-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  word-break: break-word;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3.2em;
}

.product-name.is-clickable {
  cursor: pointer;
}

.keyword-highlight {
  background: #fff1a8;
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

.product-meta {
  display: grid;
  gap: 10px;
}

.product-meta-line {
  margin: 0;
  display: grid;
  gap: 4px;
}

.product-meta-line span {
  color: var(--muted);
  font-size: 13px;
}

.product-meta-line strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.product-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-top: auto;
}

.product-list-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(31, 42, 46, 0.04);
}

.product-list-thumb {
  position: relative;
  width: 92px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f1e8 100%);
  border: 1px solid #efe9dc;
}

.product-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-list-thumb.is-clickable {
  cursor: pointer;
}

.product-list-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.product-list-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-list-name {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}

.product-list-name.is-clickable {
  cursor: pointer;
}

.product-list-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-list-fact {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #faf8f2;
}

.product-list-fact span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.product-list-fact strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.product-list-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 168px;
}

.product-list-price-box {
  display: grid;
  gap: 4px;
  justify-items: end;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #eef7f4 0%, #ffffff 100%);
  border: 1px solid #d9ebe5;
}

.product-list-price-value {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
}

.product-list-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px;
}

.product-list-actions .action-button {
  width: auto;
  min-width: 96px;
}

.product-price-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef7f4 0%, #ffffff 100%);
  border: 1px solid #d9ebe5;
}

.product-price-label {
  color: var(--muted);
  font-size: 13px;
}

.product-price-value {
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
}

.product-market-price {
  color: var(--muted);
  font-size: 13px;
  text-decoration: line-through;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf8f4;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.stock-pill.is-out {
  background: #fff3ef;
  color: var(--warn);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid #efe9dc;
  font-size: 14px;
}

thead th {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.sortable-header {
  padding: 0;
}

.sort-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.sort-button:hover {
  color: var(--ink);
}

.sort-button.is-active {
  color: var(--brand);
}

.sort-indicator {
  color: inherit;
  font-size: 12px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(220, 239, 233, 0.25);
}

.source-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5f1e8;
  color: #8c6a34;
  font-size: 12px;
  font-weight: 700;
}

.source-tag.is-mmm {
  background: #e6f6f1;
  color: #1f7a6b;
}

.source-tag.is-lichi {
  background: #fff1e6;
  color: #c66a1a;
}

.source-tag.is-yae {
  background: #f1e8ff;
  color: #6d3fc8;
}

.source-tag.is-chida {
  background: #ffebee;
  color: #c62828;
}

.source-tag.is-qch {
  background: rgba(56, 189, 248, 0.22);
  color: #0369a1;
}

.source-tag.is-eky {
  background: rgba(248, 113, 113, 0.14);
  color: #b42318;
}

.price {
  font-weight: 700;
  color: var(--brand);
}

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

.action-cell {
  width: 120px;
}

.action-button,
.retry-button,
.drawer-close {
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.action-button,
.retry-button {
  padding: 10px 14px;
  border-radius: 12px;
  background: #eef7f4;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.action-button {
  width: 100%;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-button-secondary {
  background: #f2edf9;
  color: #6d3fc8;
}

.action-button:hover,
.retry-button:hover,
.drawer-close:hover {
  transform: translateY(-1px);
}

.action-button:disabled,
.retry-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  min-height: 40px;
}

.pagination button {
  height: 40px;
  padding: 0 16px;
}

.pagination span {
  color: var(--muted);
  font-size: 14px;
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 14;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.fab-button {
  min-width: 98px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(217, 211, 199, 0.9);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(31, 42, 46, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fab-button:hover {
  transform: translateY(-1px);
}

.fab-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.fab-top {
  opacity: 0;
  pointer-events: none;
}

.fab-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.fab-service {
  background: linear-gradient(180deg, #eef7f4 0%, #ffffff 100%);
  color: var(--brand);
}

.fab-member {
  background: linear-gradient(180deg, #f1f0ff 0%, #ffffff 100%);
  color: #4b4bb5;
}

.fab-member.is-active {
  border-color: rgba(75, 75, 181, 0.25);
  box-shadow: 0 12px 28px rgba(75, 75, 181, 0.16);
}

.account-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.account-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.account-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 55vw;
  min-width: 0;
  max-width: 1100px;
  height: 100vh;
  padding: 24px;
  background: rgba(255, 253, 248, 0.99);
  border-left: 1px solid rgba(217, 211, 199, 0.9);
  box-shadow: -24px 0 48px rgba(31, 42, 46, 0.14);
  backdrop-filter: blur(12px);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-drawer.is-open {
  transform: translateX(0);
}

.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-header-copy h2 {
  margin: 4px 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

.account-eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.account-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-header-button,
.account-primary-button,
.account-disabled-button,
.account-link-button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.account-header-button,
.account-link-button {
  background: #f2ece1;
  color: var(--ink);
}

.account-header-button.is-secondary {
  background: #eef7f4;
  color: var(--brand);
}

.account-primary-button {
  background: var(--brand);
  color: #fff;
}

.account-disabled-button {
  background: #efe9dc;
  color: var(--muted);
  cursor: not-allowed;
}

.account-header-button:hover,
.account-primary-button:hover,
.account-link-button:hover {
  transform: translateY(-1px);
}

.account-body {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.account-section {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(217, 211, 199, 0.88);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
}

.account-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.account-section-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.account-section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.account-section-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.account-section-header .account-section-hint {
  margin: 0;
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-profile-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #efe9dc;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #faf8f2 100%);
}

.account-bind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.account-bind-copy {
  display: grid;
  gap: 4px;
}

.account-bind-copy strong {
  font-size: 15px;
  color: var(--ink);
}

.account-bind-copy span {
  color: var(--muted);
  font-size: 13px;
}

.account-info-card,
.account-recharge-card,
.account-membership-strip > div {
  padding: 14px;
  border: 1px solid #efe9dc;
  border-radius: 16px;
  background: #faf8f2;
}

.account-info-card span,
.account-membership-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.account-info-card strong,
.account-membership-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.account-card-stack {
  display: grid;
  gap: 12px;
}

.account-card-stack.is-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #efe9dc;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #faf8f2 100%);
}

.account-action-card {
  align-content: start;
  min-height: 208px;
}

.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.account-card-head h4,
.account-recharge-card h4 {
  margin: 0;
  font-size: 16px;
}

.account-card-head span,
.account-recharge-card p,
.account-verify-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.account-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.account-field {
  display: grid;
  gap: 8px;
}

.account-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.account-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
}

.account-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  justify-content: flex-end;
}

.account-actions-row.is-start {
  justify-content: flex-start;
}

.account-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef7f4;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

.account-feedback.is-error {
  background: var(--warn-soft);
  color: var(--warn);
}

.account-verify-block {
  display: grid;
  gap: 10px;
}

.account-membership-strip,
.account-recharge-grid {
  display: grid;
  gap: 12px;
}

.account-membership-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-recharge-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-recharge-card.is-single-entry {
  align-items: center;
  padding: 18px;
}

.account-empty {
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.account-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.account-dialog-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.account-dialog {
  width: min(680px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.99);
  box-shadow: 0 24px 56px rgba(31, 42, 46, 0.22);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}

.account-dialog.is-open {
  transform: translateY(0) scale(1);
}

.account-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.account-dialog-copy h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.account-dialog-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.account-dialog-close {
  border: 0;
  border-radius: 12px;
  background: #f2ece1;
  color: var(--ink);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.account-dialog-body,
.account-dialog-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.account-dialog-stack.is-profile-edit {
  gap: 14px;
}

.account-dialog-card {
  gap: 14px;
}

.account-dialog-card .account-card-head span {
  flex: 1 1 220px;
}

.account-wechat-shell {
  display: grid;
  gap: 14px;
}

.account-wechat-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(217, 211, 199, 0.92);
  background: linear-gradient(180deg, #fffdf8 0%, #faf8f2 100%);
}

.account-wechat-qrcode {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.account-wechat-qrcode > .account-empty {
  width: min(320px, 100%);
}

.account-wechat-tip {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.account-wechat-actions {
  justify-content: center;
}

.vip-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vip-price-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff4dc 0%, #f8fbff 100%);
  border: 1px solid rgba(217, 211, 199, 0.92);
}

.vip-price-banner strong {
  font-size: 24px;
  line-height: 1.2;
}

.vip-price-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.vip-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.vip-package-option {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.vip-package-option:hover {
  transform: translateY(-1px);
}

.vip-package-option.is-active {
  border-color: rgba(31, 122, 107, 0.38);
  background: rgba(220, 239, 233, 0.72);
}

.vip-package-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vip-package-option strong {
  font-size: 18px;
  line-height: 1.35;
}

.vip-package-option span {
  color: var(--muted);
  font-size: 13px;
}

.vip-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vip-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vip-channel-button {
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.vip-channel-button.is-active {
  border-color: rgba(26, 130, 106, 0.28);
  background: #eef7f4;
  color: var(--brand);
}

.vip-order-shell {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.vip-qr-panel,
.vip-order-info {
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.vip-qr-panel img {
  width: 100%;
  display: block;
  border-radius: 14px;
  background: #faf8f2;
}

.vip-qr-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.vip-order-info {
  display: grid;
  gap: 10px;
}

.vip-order-info.is-wide {
  grid-column: 1 / -1;
}

.vip-order-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(217, 211, 199, 0.6);
}

.vip-order-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.vip-order-row span {
  color: var(--muted);
  font-size: 13px;
}

.vip-order-row strong {
  text-align: right;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

.drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 60vw;
  min-width: var(--drawer-width);
  max-width: 1280px;
  height: 100vh;
  padding: 28px;
  background: rgba(255, 253, 248, 0.98);
  border-left: 1px solid rgba(217, 211, 199, 0.9);
  box-shadow: -24px 0 48px rgba(31, 42, 46, 0.14);
  backdrop-filter: blur(12px);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.drawer-brand {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.drawer-close {
  padding: 10px 14px;
  border-radius: 12px;
  background: #f2ece1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.drawer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.drawer-buy {
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: #f2edf9;
  color: #6d3fc8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.drawer-buy:hover {
  transform: translateY(-1px);
}

.drawer-buy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  display: grid;
  gap: 18px;
}

.drawer-placeholder,
.drawer-panel,
.drawer-error,
.drawer-empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  line-height: 1.7;
}

.drawer-panel.loading {
  color: var(--brand);
  font-weight: 600;
}

.drawer-error {
  background: #fff6f4;
  border-color: #efc9c0;
  color: var(--warn);
}

.drawer-error p {
  margin: 0 0 14px;
}

.drawer-spec-table {
  height: min(54vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.drawer-media {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  width: min(420px, 100%);
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.drawer-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.drawer-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.drawer-section {
  display: grid;
  gap: 12px;
}

.drawer-overview {
  display: grid;
  grid-template-columns: 520px minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.drawer-overview.is-single {
  grid-template-columns: 1fr;
}

.drawer-overview-side {
  display: grid;
  max-height: 420px;
  height: 420px;
  min-height: 0;
}

.drawer-overview-side-scroll {
  display: grid;
  gap: 12px;
  grid-template-rows: 6fr 4fr;
  height: 100%;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
}

.detail-tag-block {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.detail-tag-block .drawer-section-title {
  flex: 0 0 auto;
}

.detail-tag-block .detail-tags {
  min-height: 0;
  overflow-y: auto;
  align-content: flex-start;
}

.is-promotion-block {
  min-height: 0;
}

.is-highlight-block {
  min-height: 0;
}

.drawer-overview-primary {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 520px;
  max-width: 100%;
}

.drawer-gallery-rail {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0;
  align-content: start;
}

.drawer-gallery-thumb {
  border: 1px solid #efe9dc;
  border-radius: 12px;
  background: #fff;
  width: 88px;
  height: 88px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.drawer-gallery-thumb.is-active {
  border-color: #6fa8e8;
  box-shadow: inset 0 0 0 1px #6fa8e8;
}

.drawer-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.drawer-overview-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 42, 46, 0.04);
}

.drawer-overview-wide {
  grid-column: 1 / -1;
}

.drawer-section-title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-chip.is-promotion {
  background: #fff0e8;
  color: #b24d22;
}

.detail-chip.is-highlight {
  background: #eef7f4;
  color: var(--brand);
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-info-card {
  padding: 10px 12px;
  border: 1px solid #efe9dc;
  border-radius: 14px;
  background: #fcfaf5;
}

.detail-info-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.detail-info-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.detail-info-link {
  color: #1677d8 !important;
  cursor: default;
  text-decoration: underline !important;
}

.detail-info-link:hover {
  color: #0f5fb0 !important;
}

.detail-info-link[title] {
  cursor: pointer;
}

.detail-info-link-anchor {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 70;
}

.cert-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cert-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(900px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  transform: translate(-50%, -46%);
  opacity: 0;
  pointer-events: none;
  z-index: 75;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 22px 48px rgba(31, 42, 46, 0.18);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.cert-modal.is-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.cert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cert-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.cert-modal-close {
  border: 0;
  border-radius: 10px;
  background: #f2ece1;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.cert-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cert-modal-download {
  border: 0;
  border-radius: 10px;
  background: #e8f1ff;
  color: #145fb5;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.cert-modal-download:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cert-modal-image {
  border: 1px solid #efe9dc;
  border-radius: 14px;
  background: #fff;
  min-height: min(56vh, 560px);
  padding: 14px;
}

.cert-modal-image img {
  width: 100%;
  height: min(52vh, 520px);
  object-fit: contain;
  display: block;
}

.cert-modal-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-modal-thumb {
  border: 1px solid #efe9dc;
  border-radius: 10px;
  background: #fff;
  width: 82px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.cert-modal-thumb.is-active {
  border-color: #6fa8e8;
  box-shadow: inset 0 0 0 1px #6fa8e8;
}

.cert-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-message-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app-message-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.app-message-dialog {
  width: min(400px, 100%);
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px rgba(31, 42, 46, 0.18);
}

.app-message-title {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.app-message-text {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}

.app-message-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app-message-action,
.app-message-ok {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
}

.app-message-action {
  background: var(--brand);
  color: #fff;
}

.app-message-secondary {
  background: #f2ece1;
  color: var(--ink);
}

.app-message-action:hover,
.app-message-ok:hover,
.app-message-secondary:hover {
  transform: translateY(-1px);
}

.app-message-ok {
  background: var(--brand);
  color: #fff;
}

.app-message-ok.app-message-secondary {
  background: #f2ece1;
  color: var(--ink);
}

.drawer-spec-table table {
  width: 100%;
  table-layout: fixed;
}

.drawer-spec-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fffdf8;
}

.drawer-spec-table th,
.drawer-spec-table td {
  vertical-align: top;
}

.drawer-spec-table th:first-child,
.drawer-spec-table td:first-child {
  width: 58%;
  word-break: break-word;
}

.drawer-spec-table th:nth-child(2),
.drawer-spec-table td:nth-child(2) {
  width: 21%;
}

.drawer-spec-table td:last-child,
.drawer-spec-table th:last-child {
  white-space: nowrap;
  width: 21%;
}

@media (max-width: 1500px) {
  .product-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  .page {
    max-width: 1240px;
  }

  .product-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .search-panel.is-sticky {
    padding: 10px 16px 12px;
  }

  .search-panel.is-sticky .platform-picker {
    justify-content: flex-start;
  }

  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-list-item {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
  }

  .product-list-thumb {
    width: 76px;
  }

  .product-list-side {
    grid-column: 1 / -1;
    justify-items: stretch;
    min-width: 0;
  }

  .product-list-price-box {
    justify-items: start;
  }

  .detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-info-grid,
  .account-membership-strip,
  .account-card-stack.is-compact,
  .vip-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 24px 14px 40px;
  }

  .results,
  .search-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .hero .search-panel {
    padding: 16px;
  }

  .search-panel.is-sticky {
    padding: 10px 14px 12px;
    border-radius: 18px;
  }

  .search-panel.is-sticky .platform-picker {
    flex-wrap: wrap;
    gap: 6px;
    overflow-x: visible;
  }

  .search-suggest {
    max-height: min(54vh, 420px);
    padding: 10px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row button {
    width: 100%;
  }

  .source-summary {
    gap: 8px;
  }

  .summary-stats {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .pagination {
    justify-content: space-between;
  }

  .table-tools-bar {
    padding: 10px 12px;
  }

  .filter-group {
    align-items: flex-start;
  }

  .sort-group,
  .view-group {
    margin-left: 0;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-thumb {
    aspect-ratio: 1 / 1;
  }

  .product-thumb-placeholder {
    min-height: 0;
  }

  .product-side {
    padding: 0;
  }

  .product-list-item {
    padding: 12px;
    gap: 12px;
  }

  .product-list-name {
    font-size: 15px;
  }

  .product-list-meta {
    gap: 8px;
  }

  .product-list-fact {
    width: 100%;
    justify-content: space-between;
  }

  .product-list-side {
    gap: 8px;
  }

  .product-list-actions {
    grid-template-columns: 1fr 1fr;
  }

  .product-list-actions .action-button {
    width: 100%;
    min-width: 0;
  }

  .drawer-overview {
    grid-template-columns: 1fr;
  }

  .drawer-overview-side {
    max-height: none;
    height: auto;
  }

  .drawer-overview-side-scroll {
    grid-template-rows: none;
    height: auto;
    overflow: visible;
  }

  .detail-tag-block .detail-tags {
    overflow: visible;
  }

  .drawer-overview-primary {
    flex-direction: column;
  }

  .drawer-gallery-rail {
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .drawer-gallery-thumb {
    width: 100%;
    height: 72px;
  }

  .drawer-media {
    height: 320px;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .cert-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .cert-modal-image {
    min-height: 320px;
  }

  .detail-drawer {
    width: 100vw;
    min-width: 0;
    padding: 18px;
  }

  .account-drawer {
    width: 100vw;
    min-width: 0;
    max-width: none;
    padding: 18px;
  }

  .account-dialog-overlay {
    padding: 12px;
  }

  .account-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .drawer-header {
    flex-direction: column;
  }

  .account-header {
    flex-direction: column;
  }

  .account-dialog-header {
    flex-direction: column;
  }

  .account-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .drawer-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .account-header-actions,
  .account-actions-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .vip-channel-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vip-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vip-package-grid {
    grid-template-columns: 1fr;
  }

  .vip-order-shell {
    grid-template-columns: 1fr;
  }

  .drawer-close,
  .drawer-buy {
    width: 100%;
  }

  .account-header-button,
  .account-primary-button,
  .account-link-button,
  .account-disabled-button,
  .vip-channel-button {
    width: 100%;
    text-align: center;
  }

  .account-recharge-card {
    flex-direction: column;
  }

  .floating-actions {
    right: 10px;
    bottom: 12px;
    gap: 8px;
  }

  .fab-button {
    min-width: 86px;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .fab-icon {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
  }
}
