:root {
  color-scheme: dark;
  --page: 16, 24, 23;          /* #101817 墨黑 */
  --paper: 28, 41, 38;         /* #1C2926 松烟 */
  --jade: 134, 181, 162;       /* #86B5A2 浅青 */
  --gold: 229, 207, 165;       /* #E5CFA5 淡金 */
  --ink: 242, 241, 233;        /* #F2F1E9 月白 */
  --muted: 167, 186, 178;      /* #A7BAB2 次要文字 */
  --on-jade: 16, 24, 23;
  --jade-text: #86b5a2;
  --line: rgba(213, 217, 198, .16);
  --glint: rgba(244, 239, 217, .09);
  --shadow: rgba(0, 0, 0, .22);
  --glass: rgb(var(--paper));
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 主题变量也作用于挂载在应用外的菜单和弹窗。 */
:root, [class*="v-theme--"] {
  --v-theme-background: var(--page);
  --v-theme-surface: var(--paper);
  --v-theme-on-background: var(--ink);
  --v-theme-on-surface: var(--ink);
  --v-theme-primary: var(--jade);
  --v-theme-on-primary: var(--on-jade);
  --v-border-color: var(--ink);
}
html, body, #app, .v-application.v-application {
  background-color: rgb(var(--page));
  color: rgb(var(--ink));
  font-family: var(--sans);
}
:where(.v-application, .v-overlay-container, .v-dialog, .v-menu__content)
  :is(button, input, select, textarea, .v-btn) { font-family: var(--sans); }
:is(.v-application, .v-overlay__content, .v-dialog)
  :is(h1, h2, h3, .v-card-title, .v-card__title, .v-toolbar-title, .v-toolbar__title) {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-weight: 600;
  line-height: 1.4;
}
:is(.v-card-title, .v-card__title) { white-space: normal; overflow-wrap: anywhere; }
:is(.v-card-subtitle, .v-card__subtitle, .v-list-item-subtitle, .v-list-item__subtitle) {
  color: rgb(var(--muted)) !important;
  opacity: 1;
}

/* 普通商品卡只保留一圈细边与浅影。 */
.v-card.v-card, .filter-bar {
  min-width: 0;
  background: rgba(var(--paper), .94);
  color: rgb(var(--ink));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: inset 0 1px var(--glint), 0 3px 12px var(--shadow);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(12px, 2vw, 24px);
}
.product-grid > * { min-width: 0; }

/* 上沿的窄高光勾出玻璃厚度。缺少模糊支持时使用实底。 */
:is(.v-app-bar.v-toolbar, .v-navigation-drawer.v-navigation-drawer,
    .v-dialog > .v-card, .v-dialog .v-overlay__content > .v-card,
    .v-menu__content > .v-list, .v-menu .v-overlay__content > .v-list,
    .v-card.account-summary, .v-card.login-card, .login-page .v-card) {
  background: linear-gradient(155deg, var(--glint), transparent 38%), var(--glass);
  color: rgb(var(--ink));
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  backdrop-filter: blur(20px) saturate(115%);
  box-shadow: inset 0 1px var(--glint), 0 6px 24px var(--shadow);
}
.v-app-bar.v-toolbar { border-bottom: 1px solid var(--line); }
.v-navigation-drawer .v-list { background: transparent; color: inherit; }
:is(.v-dialog, .v-overlay__content) > .v-card { border-radius: 20px; }
:is(.v-overlay__scrim, .v-overlay .v-overlay__scrim) { background: #101817; }
:is(.v-btn.v-btn, .v-field.v-field, .v-text-field--outlined fieldset) { border-radius: 11px; }
.v-btn.v-btn { text-transform: none; letter-spacing: normal; }
.v-application .v-btn.primary, .v-btn.bg-primary {
  background-color: rgb(var(--jade)) !important;
  color: rgb(var(--on-jade)) !important;
}
:is(.v-list-item--active, .v-tab--selected, .v-tab--active, .v-chip--selected) {
  color: var(--jade-text) !important;
}
:is(.v-tabs-slider, .v-tab__slider) { background-color: rgb(var(--gold)); }
.v-field.v-field, .v-text-field--solo > .v-input__control > .v-input__slot {
  background-color: rgba(var(--paper), .86);
  color: rgb(var(--ink));
  border-radius: 11px;
}
.v-application :focus-visible, .v-overlay__content :focus-visible {
  outline: 2px solid var(--jade-text);
  outline-offset: 2px;
}

/* 交易数量、余额和价格使用等宽数字，便于逐行比较。 */
:is(.v-table.v-table, .v-data-table.v-data-table) {
  max-width: 100%;
  background-color: rgb(var(--paper));
  color: rgb(var(--ink));
  font-variant-numeric: tabular-nums;
}
:is(.v-table, .v-data-table) thead th {
  background-color: rgb(var(--paper));
  color: rgb(var(--muted));
}
:is(.v-table__wrapper, .v-data-table__wrapper) { max-width: 100%; overflow-x: auto; }
:is(.product-price, .market-price, .account-balance) {
  color: var(--jade-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
:is(.v-main, .v-main__wrap, .v-container, .v-card-text, .v-card__text) { min-width: 0; }
:is(.v-card-text, .v-card__text, .v-data-table td) { overflow-wrap: anywhere; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass: rgba(var(--paper), .80); }
}
@media (max-width: 600px) {
  .v-main .v-row, .v-main .row { margin-inline: 0; }
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 12px; }
  .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
  .filter-bar > * { min-width: 0; max-width: 100%; }
  .v-dialog:not(.v-dialog--fullscreen) .v-overlay__content, .v-dialog:not(.v-overlay):not(.v-dialog--fullscreen) {
    max-width: calc(100% - 24px);
    margin-inline: 12px;
  }
  .v-card-actions, .v-card__actions { flex-wrap: wrap; row-gap: 6px; }
  .v-toolbar__content :is(.v-toolbar-title, .v-toolbar__title) { min-width: 0; }
}
/* ============================================================
   云栖对齐补丁（部署侧追加）
   作用：把上面的通用规则落到商城真实组件类名，并恢复玻璃卡质感。
   ============================================================ */

/* 1) 卡片材质统一：半透明磨砂 + 细边 + 轻影 */
#app .glass-card, .glass-card, .border-card, .summary-card, .market-item,
.community-card, .event-card, .feature-card, .join-card, .quick-card, .server-panel,
.auction-stat, .price-summary-panel, .price-trend-panel, .price-preview-panel,
.inventory-browser-card, .product-icon-surface {
  min-width: 0;
  background: rgba(var(--paper), .82) !important;
  color: rgb(var(--ink)) !important;
  border: 1px solid var(--line) !important;
  border-radius: 18px;
  box-shadow: inset 0 1px var(--glint), 0 6px 24px var(--shadow) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

/* 2) 筛选栏（真实类名 app-filter-bar） */
.app-filter-bar {
  min-width: 0;
  background: rgba(var(--paper), .92);
  color: rgb(var(--ink));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: inset 0 1px var(--glint), 0 3px 12px var(--shadow);
}
.app-filter-bar__title, .app-filter-bar__heading {
  color: rgb(var(--ink));
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-weight: 600;
}
.app-filter-bar__subtitle { color: rgb(var(--muted)); }

/* 3) 价格 / 数值：青瓷色 + 等宽数字 */
.product-price-value, .product-price-label, .auction-stat {
  color: var(--jade-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.product-price-label { color: rgb(var(--muted)); font-weight: 500; }

/* 4) 各类网格容器的间距与换行 */
.detail-grid, .summary-grid, .filter-grid, .inventory-stage__grid, .bid-quick-grid {
  gap: clamp(12px, 2vw, 24px);
}
.detail-grid > *, .summary-grid > *, .filter-grid > *,
.inventory-stage__grid > *, .bid-quick-grid > * { min-width: 0; }

@media (max-width: 600px) {
  .app-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
  .app-filter-bar > * { min-width: 0; max-width: 100%; }
}
