/* Account-wide model market; copied unchanged to every role host. */
.model-market { display: block; padding: 0 0 34px; color: var(--ink); background: #f8f8fa; font-size: 17px; line-height: 1.7; }
.model-market[hidden], .model-market [hidden] { display: none !important; }
.model-market-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px clamp(22px, 3.3vw, 42px); background: #fff; border-bottom: 1px solid #ebe8ed; }
.model-market-eyebrow { margin: 0 0 5px; color: #7d6479; font-size: 15px; font-weight: 750; letter-spacing: .06em; }
.model-market-intro h2 { margin: 0; color: #302832; font-size: 25px; font-weight: 760; line-height: 1.35; letter-spacing: -.025em; }
.model-market-intro p:last-child { margin: 7px 0 0; color: #746b77; font-size: 16px; line-height: 1.65; }
.model-market-intro > button { flex: 0 0 auto; min-height: 44px; padding-inline: 17px; background: #fff; }
.model-market-intro > button:disabled { opacity: .6; }
.model-market-disclosure { display: flex; align-items: flex-start; gap: 11px; margin: 20px clamp(22px, 3.3vw, 42px) 0; padding: 14px 16px; color: #605764; background: #f4f1f5; border: 1px solid #e8e1e9; border-radius: 13px; }
.model-market-disclosure-mark { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px; color: #6d5268; background: #e8dee9; border-radius: 50%; font-size: 15px; font-weight: 750; font-family: Georgia, serif; }
.model-market-disclosure p { margin: 0; font-size: 15px; line-height: 1.65; }
.model-market-disclosure strong { color: #443748; font-weight: 720; }
.model-market-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 22px clamp(22px, 3.3vw, 42px) 0; }
.model-market-tabs { display: inline-flex; gap: 3px; max-width: 100%; padding: 4px; background: #eeecf0; border: 1px solid #e6e2e8; border-radius: 12px; }
.model-market-tabs button { min-height: 42px; padding: 8px 17px; color: #6b616f; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 16px; font-weight: 680; line-height: 1.5; cursor: pointer; }
.model-market-tabs button:hover { color: #4c3749; }
.model-market-tabs button[aria-selected="true"] { color: #4d384a; background: #fff; border-color: #e2dce4; box-shadow: 0 2px 9px rgba(67, 45, 65, .07); }
.model-market-filter { display: flex; align-items: center; gap: 10px; margin: 0; }
.model-market-filter > span { flex: 0 0 auto; color: #736a76; font-size: 15px; font-weight: 650; }
.model-market-filter select { min-width: 168px; min-height: 44px; padding: 7px 35px 7px 12px; color: #3e3542; background: #fff; border: 1px solid #d8d1da; border-radius: 9px; font-size: 16px; }
.model-market-status { min-height: 25px; margin: 14px clamp(22px, 3.3vw, 42px) 12px; color: #776f7b; font-size: 15px; }
.model-market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 clamp(22px, 3.3vw, 42px); }
.model-market-grid[aria-busy="true"] { opacity: .68; }
.model-market-grid > .workspace-empty { grid-column: 1 / -1; margin: 0; padding: 40px 22px; text-align: center; color: #786f7b; background: #fff; border: 1px dashed #d7d0d9; border-radius: 15px; font-size: 16px; }
.model-market-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 22px; overflow: hidden; overflow-wrap: anywhere; background: #fff; border: 1px solid #e5e0e7; border-radius: 16px; box-shadow: 0 6px 22px rgba(48, 35, 51, .035); transition: border-color .16s, box-shadow .16s, transform .16s; }
.model-market-card:hover { border-color: #d2c7d4; box-shadow: 0 11px 30px rgba(49, 34, 52, .075); transform: translateY(-2px); }
.model-market-card.featured::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #7f5b79, #bd879a); content: ""; }
.model-market-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-bottom: 15px; color: #746a78; font-size: 15px; font-weight: 650; }
.model-market-card-head > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.model-ad-label, .model-own-label, .model-featured-label, .model-market-category { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border-radius: 999px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.model-ad-label { color: #8a5227; background: #fff0df; }
.model-own-label { color: #65475f; background: #f1e9f1; }
.model-featured-label { color: #6c4d67; background: #f7f1f6; }
.model-market-category { color: #6d6571; background: #f5f3f6; }
.model-market-card h3 { margin: 0 0 9px; color: #302733; font-size: 22px; font-weight: 730; line-height: 1.4; letter-spacing: -.018em; }
.model-market-card .model-market-summary { margin: 0; color: #69606d; font-size: 17px; line-height: 1.7; }
.model-market-card .model-market-footer { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-top: auto; padding-top: 22px; }
.model-market-advertiser { display: grid; gap: 1px; margin: 0; }
.model-market-advertiser span { color: #8a818d; font-size: 15px; }
.model-market-advertiser strong { color: #514657; font-size: 16px; font-weight: 670; }
.model-market-link { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; color: #62465e; font-size: 16px; font-weight: 700; text-decoration: none; }
.model-market-link:hover { color: #432d40; text-decoration: underline; text-underline-offset: 4px; }
.model-market-link[aria-disabled="true"] { color: #8b838e; }
.model-market-card .model-price { margin: 18px 0 0; color: #432d40; font-size: 31px; font-weight: 760; line-height: 1.2; font-variant-numeric: tabular-nums; }
.model-price small { display: block; margin-top: 5px; color: #7a717e; font-size: 15px; font-weight: 550; line-height: 1.5; }
.model-market-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; margin: 17px 0 0; padding: 16px 0 0; border-top: 1px solid #eeeaf0; }
.model-market-card dl div { min-width: 0; }
.model-market-card dt { margin: 0 0 2px; color: #817985; font-size: 15px; }
.model-market-card dd { margin: 0; color: #3d3341; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.model-market-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; }
.model-market-terms { color: #6b5669; font-size: 15px; text-decoration: none; text-underline-offset: 3px; }
.model-market-terms:hover { text-decoration: underline; }
.model-market-card .model-market-buy { flex: 0 0 auto; min-height: 44px; margin: 0; padding-inline: 17px; font-size: 16px; }
.model-market-card .model-market-buy:disabled { color: #7a717e; background: #f1eff2; border-color: #e5e0e7; }
.model-market-mine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 clamp(22px, 3.3vw, 42px); }
.model-market-collection { min-width: 0; padding: 21px; background: #fff; border: 1px solid #e5e0e7; border-radius: 16px; }
.model-market-collection h3 { margin: 0 0 11px; color: #342b37; font-size: 20px; font-weight: 720; }
.model-market-collection > p { margin: 0; color: #756d79; font-size: 16px; }
.model-market-row { display: grid; gap: 6px; padding: 15px 0; border-top: 1px solid #eeeaf0; font-size: 16px; }
.model-market-row:first-of-type { border-top: 0; }
.model-market-row strong { color: #352c39; font-size: 17px; font-weight: 700; line-height: 1.5; }
.model-market-row > span { color: #554b59; }
.model-market-row small { color: #7a717d; font-size: 15px; overflow-wrap: anywhere; }
.model-market-row button { justify-self: start; min-height: 42px; margin-top: 4px; padding: 7px 13px; color: #60445c; background: #fff; border: 1px solid #d6cbd8; border-radius: 9px; font-size: 16px; font-weight: 650; }
.model-market-row button:hover:not(:disabled) { background: #f8f3f8; }
.model-market-row button:disabled { opacity: .55; }
.model-market-usage { margin: 0; padding: 13px 0; border-top: 1px solid #eeeaf0; color: #554b59; font-size: 16px; overflow-wrap: anywhere; }
.model-market-usage:first-of-type { border-top: 0; }
.model-key-once { margin: 22px clamp(22px, 3.3vw, 42px) 0; padding: 20px; background: #fcf8fc; border: 1px solid #cdb9cd; border-radius: 14px; }
.model-key-once strong { font-size: 18px; }
.model-key-once p { margin: 5px 0 11px; font-size: 15px; }
.model-key-once code { display: block; margin-bottom: 14px; padding: 12px; overflow-wrap: anywhere; background: #fff; border: 1px solid #e7dfe8; border-radius: 9px; font-size: 16px; user-select: all; }
.model-market :focus-visible { outline: 3px solid rgba(132, 88, 118, .48); outline-offset: 3px; }
@media (max-width: 900px) {
  .model-market-grid, .model-market-mine { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  [data-portal=customer] .sidebar[aria-label="主导航"] nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-portal=customer] .sidebar nav .nav-item[data-mobile-label] { font-size: 0; }
  [data-portal=customer] .sidebar nav .nav-item[data-mobile-label]::after { content: attr(data-mobile-label); font-size: 15px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
}
@media (max-width: 650px) {
  .model-market { padding-bottom: 22px; }
  .model-market-intro { align-items: flex-start; flex-direction: column; gap: 14px; padding: 21px 19px; }
  .model-market-intro h2 { font-size: 23px; }
  .model-market-intro > button { width: 100%; }
  .model-market-disclosure, .model-market-controls, .model-market-grid, .model-market-mine, .model-key-once { margin-right: 17px; margin-left: 17px; }
  .model-market-controls { align-items: stretch; gap: 13px; }
  .model-market-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .model-market-tabs button { padding: 8px 4px; font-size: 15px; white-space: nowrap; }
  .model-market-filter { width: 100%; justify-content: space-between; }
  .model-market-filter select { width: min(62%, 260px); }
  .model-market-status { margin: 14px 17px 11px; }
  .model-market-card, .model-market-collection { padding: 19px; }
  .model-market-card dl { gap: 10px; }
  .model-market-actions { align-items: stretch; flex-direction: column; }
  .model-market-card .model-market-buy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .model-market-card { transition: none; }
  .model-market-card:hover { transform: none; }
}
/* Material 3 catalog: primary tabs, tonal cards, outlined controls and filled actions. */
body[data-portal] .model-market { padding: 0 0 30px; border: 0; background: transparent; box-shadow: none; color: var(--md-sys-color-on-surface); }
.model-market-intro { margin: 0 0 18px; padding: 28px clamp(22px,3.3vw,42px); border: 0; border-radius: 28px; background: var(--md-sys-color-primary-container); }
.model-market-eyebrow { color: var(--md-sys-color-on-primary-container); }
.model-market-intro h2 { color: var(--md-sys-color-on-primary-container); font-size: 28px; font-weight: 700; }
.model-market-intro p:last-child { color: var(--md-sys-color-on-primary-container); }
.model-market-intro > button { min-height: 48px; border-color: var(--md-sys-color-on-primary-container); color: var(--md-sys-color-on-primary-container); background: transparent; }
.model-market-disclosure { margin-top: 0; border: 0; border-radius: 16px; background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); }
.model-market-disclosure-mark { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); font-family: inherit; }
.model-market-disclosure strong { color: var(--md-sys-color-on-surface); }
.model-market-controls { align-items: end; margin-top: 24px; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.model-market-tabs { gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.model-market-tabs button { min-height: 52px; padding: 10px 22px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--md-sys-color-on-surface-variant); background: transparent; box-shadow: none; }
.model-market-tabs button:hover { color: var(--md-sys-color-primary); background: color-mix(in srgb,var(--md-sys-color-primary) 7%,transparent); }
.model-market-tabs button[aria-selected="true"] { border: 0; border-bottom: 3px solid var(--md-sys-color-primary); border-radius: 0; color: var(--md-sys-color-primary); background: transparent; box-shadow: none; }
.model-market-filter { margin-bottom: 6px; }
.model-market-filter > span { color: var(--md-sys-color-on-surface-variant); }
.model-market-filter select { min-height: 48px; border: 1px solid var(--md-sys-color-outline); border-radius: 4px; color: var(--md-sys-color-on-surface); background: transparent; }
.model-market-filter select:focus-visible { border-color: var(--md-sys-color-primary); outline: 2px solid var(--md-sys-color-primary); outline-offset: 1px; }
.model-market-status { color: var(--md-sys-color-on-surface-variant); }
.model-market-grid { gap: 16px; }
.model-market-card { padding: 24px; border: 0; border-radius: 20px; background: var(--md-sys-color-surface-container); box-shadow: none; transition: background .16s; }
.model-market-card:hover { border: 0; background: var(--md-sys-color-surface-container-high); box-shadow: none; transform: none; }
.model-market-card.featured { background: var(--md-sys-color-primary-container); }
.model-market-card.featured:hover { background: color-mix(in srgb,var(--md-sys-color-primary-container) 90%,var(--md-sys-color-primary)); }
.model-market-card.featured::before { content: none; }
.model-market-card h3 { color: var(--md-sys-color-on-surface); font-weight: 700; }
.model-market-card.featured h3,.model-market-card.featured .model-market-summary { color: var(--md-sys-color-on-primary-container); }
.model-market-card .model-market-summary { color: var(--md-sys-color-on-surface-variant); }
.model-featured-label,.model-own-label { color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); }
.model-market-category { color: var(--md-sys-color-on-surface-variant); background: var(--md-sys-color-surface-container-highest); }
.model-market-card.featured .model-market-category { background: color-mix(in srgb,var(--md-sys-color-primary-container) 70%,white); color: var(--md-sys-color-on-primary-container); }
.model-market-advertiser span,.model-market-card dt { color: var(--md-sys-color-on-surface-variant); }
.model-market-advertiser strong,.model-market-card dd { color: var(--md-sys-color-on-surface); }
.model-market-link { min-height: 40px; padding: 7px 16px; border-radius: 999px; color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); text-decoration: none; }
.model-market-link:hover { color: var(--md-sys-color-on-secondary-container); background: color-mix(in srgb,var(--md-sys-color-secondary-container) 88%,var(--md-sys-color-secondary)); text-decoration: none; }
.model-market-card.featured .model-market-link { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.model-market-card.featured .model-market-link:hover { background: color-mix(in srgb,var(--md-sys-color-primary) 88%,black); color: var(--md-sys-color-on-primary); }
.model-market-link[aria-disabled="true"] { background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface-variant); }
.model-market-card .model-price { color: var(--md-sys-color-primary); }
.model-market-card dl { border-top-color: var(--md-sys-color-outline-variant); }
.model-market-card .model-market-buy { min-height: 48px; color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); }
.model-market-collection { border: 0; border-radius: 20px; background: var(--md-sys-color-surface-container); }
.model-market-grid > .workspace-empty { border: 1px dashed var(--md-sys-color-outline); background: var(--md-sys-color-surface-container-low); }
.model-key-once { border-color: var(--md-sys-color-tertiary); background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
@media (max-width: 650px) {
  .model-market-intro { margin: 0 0 16px; padding: 24px 20px; border-radius: 24px; }
  .model-market-controls { align-items: stretch; gap: 10px; }
  .model-market-tabs { width: 100%; }
  .model-market-tabs button { min-height: 48px; padding-inline: 4px; }
  .model-market-filter { margin-bottom: 10px; }
  .model-market-card { padding: 20px; }
}
.model-image-gallery { position:relative; min-width:0; margin:0 0 20px; overflow:hidden; border-radius:14px; background:#f5f5f7; color:#333; }
.model-image-slides { aspect-ratio:16/10; position:relative; }
.model-image-slides figure { margin:0; position:absolute; inset:0; }
.model-image-slides figure[hidden] { display:none; }
.model-image-slides img,.model-image-slides a { width:100%; height:100%; display:block; object-fit:contain; }
.model-image-gallery--banner { grid-column:1/-1; margin:0; }
.model-image-gallery--banner .model-image-slides { aspect-ratio:3/1; max-height:340px; }
.model-image-gallery--banner img { object-fit:cover; }
.model-image-gallery figcaption { position:absolute; left:0; bottom:0; width:100%; padding:28px 24px 20px; font-size:22px; font-weight:600; color:white; background:linear-gradient(transparent,rgba(0,0,0,.65)); pointer-events:none; }
.model-image-navigation { position:absolute; right:12px; bottom:12px; display:flex; align-items:center; gap:12px; padding:4px; border-radius:24px; background:rgba(255,255,255,.95); color:#333; font-size:15px; }
.model-image-navigation button { width:36px; height:36px; min-height:36px; padding:0; border:0; border-radius:50%; font-size:24px; color:inherit; background:transparent; cursor:pointer; }
.model-image-navigation button:hover { background:#e8e8ed; }
.model-image-gallery--banner figcaption { padding-right:160px; }
.model-image-fallback { display:none; }
.model-image-slides [data-image-failed="true"] .model-image-fallback { display:grid; height:100%; place-items:center; color:#6e6e73; font-size:16px; }
@media (max-width:650px) { .model-image-gallery--banner .model-image-slides { aspect-ratio:16/9; } .model-image-gallery figcaption { font-size:18px; padding:20px 16px 62px; } }
