@layer novaRefinement {
  /* Artwork and checkout share the palette applied by brand-config.js. */
  html.nvx-item-page { color-scheme: dark; scroll-padding-top: 24px; }
  html.nvx-item-page body.uc-body {
    --nvx-glass-edge: rgba(var(--brand-secondary-rgb, 220, 230, 255), .26);
    --nvx-ink: #f5f8fc;
    --nvx-muted: #c7d3df;
    background: radial-gradient(ellipse at 14% 12%, rgba(var(--brand-accent-rgb), .18), transparent 50%),
      radial-gradient(ellipse at 86% 70%, rgba(var(--brand-secondary-rgb), .08), transparent 55%), var(--portal-bg) !important;
    background-attachment: scroll !important;
    color: var(--nvx-ink) !important;
  }
  html.nvx-item-page .nvx-item-main { max-width: 1240px; padding-bottom: max(48px, env(safe-area-inset-bottom)); }
  html.nvx-item-page .nvx-showcase-shell {
    align-items: start;
    background: linear-gradient(135deg, rgba(var(--brand-accent-rgb), .09), rgba(255,255,255,.025)) !important;
    border-color: var(--nvx-glass-edge) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: inset 0 1px 0 #ffffff24, 0 24px 64px -32px #0009 !important;
  }
  html.nvx-item-page :is(.nvx-top-pill, .nvx-checkout-card.item-buy, .nvx-detail-card.item-detail) {
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 38%),
      linear-gradient(135deg, rgba(var(--brand-accent-rgb), .10), rgba(8,12,20,.55)) !important;
    border: 1px solid var(--nvx-glass-edge) !important;
    box-shadow: inset 0 1px 0 #ffffff38, inset 0 -1px 0 #ffffff0a, 0 16px 40px -24px #000a !important;
    backdrop-filter: blur(14px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(125%) !important;
    color: var(--nvx-ink) !important;
  }
  html.nvx-item-page .nvx-checkout-card.item-buy { border-radius: 20px !important; min-width: 0; }
  html.nvx-item-page .nvx-checkout-card h4 { font-size: clamp(19px, 1.8vw, 23px) !important; line-height: 1.5 !important; overflow-wrap: anywhere; text-wrap: balance; }
  html.nvx-item-page .nvx-living-stage { position: sticky; top: 24px; }
  html.nvx-item-page .nvx-art-aura { filter: none; opacity: .55; }
  html.nvx-item-page .nvx-living-art-img { mix-blend-mode: normal; }
  html.nvx-item-page .nvx-living-shader-canvas { z-index: 1; mix-blend-mode: normal; }
  html.nvx-item-page .nvx-brand-row { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8,12,20,.72); }
  html.nvx-item-page .nvx-brand-title { background: none !important; color: #eef5ff !important; letter-spacing: .12em; margin-right: -.12em; }
  html.nvx-item-page .nvx-checkout-card :is(.abacus .price, .badge-money, .qty-group input) { font-family: inherit !important; font-variant-numeric: tabular-nums; text-shadow: none !important; }
  html.nvx-item-page .nvx-checkout-card .abacus { background: rgba(var(--brand-accent-rgb), .14) !important; }
  html.nvx-item-page .nvx-checkout-card .abacus .price { color: #fff !important; font-size: 30px !important; line-height: 1.2 !important; }
  html.nvx-item-page .nvx-checkout-card .form-label { font-size: 14px !important; color: #e0e8ef !important; }
  html.nvx-item-page .nvx-checkout-card .form-control { min-height: 46px; font-size: 16px !important; background: #050b1359 !important; color: #f5f8fc !important; caret-color: var(--brand-accent); }
  html.nvx-item-page .nvx-checkout-card .form-control::placeholder { color: #aebdcc !important; opacity: 1; }
  html.nvx-item-page .nvx-checkout-card .sku { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; transition: border-color 160ms ease-out, background-color 160ms ease-out !important; }
  html.nvx-item-page .nvx-checkout-card .sku.is-primary { background: rgba(var(--brand-accent-rgb), .20) !important; border-color: var(--brand-accent) !important; box-shadow: inset 0 0 0 1px var(--brand-accent) !important; }
  html.nvx-item-page .nvx-checkout-card .qty-group { width: 168px !important; }
  html.nvx-item-page .nvx-checkout-card .qty-group button { min-width: 44px; min-height: 46px; touch-action: manipulation; }
  html.nvx-item-page .nvx-checkout-card .pay-list { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; }
  html.nvx-item-page .nvx-checkout-card .pay { min-height: 48px; background: linear-gradient(120deg, rgba(var(--brand-accent-rgb), .26), rgba(var(--brand-accent-rgb), .10)) !important; color: #fff !important; touch-action: manipulation; }
  html.nvx-item-page .nvx-detail-card .panel-body { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
  html.nvx-item-page .nvx-detail-card .panel-body :is(p,li,div) { color: #dce5ef !important; }
  html.nvx-item-page .nvx-detail-card .panel-body a { color: rgb(var(--brand-secondary-rgb)) !important; text-underline-offset: .2em; }
  html.nvx-item-page :is(button,a,input,select,textarea):focus-visible { outline: 2px solid rgb(var(--brand-secondary-rgb)) !important; outline-offset: 3px; }
  html.nvx-item-page :is(a,button) { touch-action: manipulation; -webkit-tap-highlight-color: rgba(var(--brand-accent-rgb), .20); }
  html.nvx-item-page ::selection { background: rgba(var(--brand-accent-rgb), .4); color: #fff; }
  html.nvx-item-page .nvx-top-actions { gap: 16px; }
  html.nvx-item-page .nvx-top-actions a { display: inline-flex; align-items: center; min-height: 44px; }
  .nvx-motion-toggle, .nova-motion-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 12px; color: #e7eef9; border: 1px solid #ffffff36; border-radius: 12px; background: #14203080; cursor: pointer; touch-action: manipulation; }
  .nvx-motion-toggle:hover, .nova-motion-toggle:hover { background: #ffffff24; }
  .nvx-motion-toggle:disabled { opacity: .6; cursor: default; }
  .nvx-motion-paused :is(.nvx-art-aura,.nova-meteor) { animation-play-state: paused !important; }
  html.nvx-item-page .nvx-portal-rule { width: min(220px,52vw); transform: scaleX(0); transition: transform 420ms var(--nvx-ease); }
  html.nvx-item-page .nvx-portal-overlay.phase-in .nvx-portal-rule { transform: scaleX(1); }
  html.nvx-item-page .nvx-portal-kicker { transition: opacity 180ms ease-out; letter-spacing: .16em; }
  html.nvx-item-page .nvx-portal-overlay.phase-in .nvx-portal-kicker { letter-spacing: .16em; }
  html.nvx-item-page .nvx-portal-overlay { pointer-events: none !important; }
  /* The test artwork stays visible when motion is reduced or WebGL is unavailable. */
  html.nvx-item-page body[data-detail-brand="test"] .nvx-art-img-wrap { display: grid !important; }
  html.nvx-item-page body[data-detail-brand="test"] .nvx-lihenyan-video-bg { opacity: .58; }
  html.nvx-item-page body[data-detail-brand="test"] .nvx-living-art-img { border-radius: 16px; mask-image: none; -webkit-mask-image: none; object-fit: contain; }
  html.nvx-item-page .nvx-skip-link { position: fixed; left: 16px; top: 12px; z-index: 100001; transform: translateY(-160%); padding: 12px 16px; border-radius: 10px; background: #101b28; color: #fff; }
  html.nvx-item-page .nvx-skip-link:focus { transform: none; }
  /* Catalog uses stills from the same artwork, without additional WebGL contexts. */
  body.uc-body #pjax-container .item-list .acg-thumb.nova-product-art { background: #050a12 !important; aspect-ratio: 1.35 !important; }
  body.uc-body #pjax-container .item-list .acg-thumb.nova-product-art::before,
  body.uc-body #pjax-container .item-list .acg-thumb.nova-product-art::after { content: none !important; }
  body.uc-body #pjax-container .item-list .nova-product-art > img { display: block !important; position: static !important; width: 100% !important; height: 100% !important; object-fit: contain !important; aspect-ratio: 1.35; border-radius: inherit; }
  body.uc-body #pjax-container .item-list .goods-title { overflow-wrap: anywhere; }
  body.uc-body #pjax-container .item-list .price { font-variant-numeric: tabular-nums; }
  body.uc-body .nova-motion-toggle { position: absolute; z-index: 4; right: 20px; bottom: 16px; background: #151323a6; color: #f3edff; }
  body.uc-body .nova-hero-paused .nova-meteor { animation-play-state: paused !important; }
  body.uc-body .nv8-hero .nv8-eyebrow { display: none !important; }
  @media (hover: hover) and (pointer: fine) {
    html.nvx-item-page .nvx-checkout-card .pay:hover { transform: translateY(-1px); border-color: var(--brand-accent) !important; box-shadow: 0 6px 16px -8px #0008 !important; }
  }
  @media (max-width: 980px) {
    html.nvx-item-page .nvx-living-stage { position: relative; top: auto; height: 340px; }
    html.nvx-item-page .nvx-showcase-shell { gap: 16px; }
  }
  @media (max-width: 640px) {
    html.nvx-item-page .nvx-item-main { padding-inline: 12px; }
    html.nvx-item-page .nvx-top-pill { height: auto; min-height: 56px; gap: 8px; padding: 4px 12px; }
    html.nvx-item-page .nvx-top-brand { gap: 6px; font-size: 14px; }
    html.nvx-item-page .nvx-top-actions { gap: 10px; }
    html.nvx-item-page .nvx-top-actions a { font-size: 12px; }
    html.nvx-item-page .nvx-motion-toggle { padding: 4px 8px; font-size: 11px; }
    html.nvx-item-page .nvx-showcase-shell { padding: 12px; border-radius: 20px; }
    html.nvx-item-page .nvx-living-stage { height: 290px; }
    html.nvx-item-page .nvx-art-img-wrap { width: min(270px,88%); margin-top: -16px; }
    html.nvx-item-page .nvx-checkout-card.item-buy { padding: 20px 16px !important; }
    html.nvx-item-page :is(.nvx-top-pill,.nvx-checkout-card.item-buy,.nvx-detail-card.item-detail) { backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important; }
    html.nvx-item-page .nvx-checkout-card .captcha-group { max-width: 100%; }
    html.nvx-item-page .nvx-checkout-card .captcha-input { min-width: 0; }
    html.nvx-item-page .nvx-detail-card .panel-body { padding: 16px !important; }
    body.uc-body .nv8-hero.nv8-home { min-height: 390px !important; }
    body.uc-body .nv8-hero.nv8-home h1 { font-size: clamp(24px,6vw,32px) !important; line-height: 1.4 !important; }
    body.uc-body .nv8-hero .nv8-hero-description { font-size: 14px !important; line-height: 1.65 !important; max-width: 54% !important; }
    body.uc-body .nv8-hero .nv8-benefits span { font-size: 11px !important; }
    body.uc-body .nv8-hero .nv8-cta { min-height: 44px !important; font-size: 12px !important; }
  }
  @media (max-width: 359px) {
    html.nvx-item-page .nvx-top-pill { flex-wrap: wrap; }
    html.nvx-item-page .nvx-top-actions { width: 100%; justify-content: space-between; }
    html.nvx-item-page .nvx-checkout-card.item-buy { padding: 16px 12px !important; }
  }
  @media (hover: none) { html.nvx-item-page .nvx-checkout-card .pay:hover { transform: none; } }
  @media (prefers-reduced-motion: reduce) {
    html.nvx-item-page .nvx-portal-overlay { display: none !important; }
    html.nvx-item-page :is(.nvx-checkout-card,.nvx-living-stage,.nvx-detail-card) { animation: none !important; transform: none !important; opacity: 1 !important; }
    body.uc-body :is(.nova-meteor,.nova-home-stage *) { animation: none !important; transition: none !important; }
  }
}
