/* Requested layout corrections, layered after the preserved design stylesheet. */
html body[data-view] .topbar .topbar-logo-copy > span {
  font-size: 25px !important;
  line-height: 1.1 !important;
}
/* Older tablet rules cap this button at 148px and clip the platform name. */
html body[data-view] .topbar .topbar-logo {
  flex: 0 0 auto !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
}
html body[data-view] .topbar .topbar-right { gap: 6px !important; flex: 0 0 auto !important; }
html body[data-view] .topbar .topbar-right .token-display {
  min-height: 32px !important; height: 32px !important; padding: 3px 5px !important;
  gap: 4px !important; font-size: 11px !important; min-width: 0 !important;
}
html body[data-view] .topbar .topbar-right .token-plus-btn {
  width: 24px !important; height: 24px !important; min-width: 24px !important;
  min-height: 24px !important; font-size: 17px !important; padding: 0 !important;
}
html body[data-view] .topbar .topbar-right .coin-icon { width: 18px !important; height: 18px !important; }
html body[data-view] .topbar .topbar-right .discord-btn {
  width: 30px !important; height: 30px !important; min-width: 30px !important;
  min-height: 30px !important; padding: 5px !important;
}
html body[data-view] .management-head-v251 {
  display: flex !important; align-items: center !important; flex-wrap: wrap !important;
  gap: 18px !important; height: auto !important; min-height: 0 !important;
}
html body[data-view] .management-identity-v251 { flex: 1 1 150px !important; min-width: 0 !important; }
html body[data-view] .management-command-v26 {
  display: grid !important; flex: 1 1 630px !important; width: auto !important;
  gap: 10px !important; align-items: stretch !important; min-width: 0 !important;
}
html body[data-view] .product-management-command-v26 {
  grid-template-columns: minmax(190px, 1.4fr) repeat(3, minmax(110px, 1fr)) !important;
}
html body[data-view] .file-management-command-v26 {
  grid-template-columns: repeat(2, minmax(110px, 1fr)) !important;
}
html body[data-view] .management-command-v26 > * {
  position: relative !important; inset: auto !important; transform: none !important;
  min-width: 0 !important; max-width: 100% !important; width: auto !important;
  margin: 0 !important; height: auto !important; min-height: 54px !important;
  white-space: normal !important;
}
html body[data-view] .management-shop-control-v26 {
  display: grid !important; grid-template-columns: minmax(0, 1fr) 48px !important;
  gap: 8px !important; overflow: visible !important; padding: 10px !important;
}
html body[data-view] .management-control-copy-v26 { min-width: 0 !important; }
html body[data-view] .management-control-copy-v26 > * { white-space: normal !important; }
html body[data-view] .management-shop-control-v26 .switch {
  position: relative !important; inset: auto !important; margin: 0 !important;
  box-sizing: border-box !important; flex: none !important; padding: 0 !important;
  width: 48px !important; min-width: 48px !important; max-width: 48px !important;
  height: 28px !important; min-height: 28px !important; transform: none !important;
  align-self: center !important; overflow: hidden !important;
}
html body[data-view] .management-shop-control-v26 .switch > input {
  position: absolute !important; inset: 0 !important; margin: 0 !important;
  width: 100% !important; height: 100% !important; opacity: 0 !important;
  cursor: pointer !important; z-index: 2 !important;
}
/* The span is the single knob; suppress the older span/pseudo-element track. */
html body[data-view] .management-shop-control-v26 .switch > span {
  box-sizing: border-box !important; position: absolute !important;
  inset: 3px auto auto 3px !important; margin: 0 !important; border: 0 !important;
  width: 20px !important; height: 20px !important; min-width: 20px !important;
  border-radius: 50% !important; background: #fff !important;
  transform: translateX(0) !important; transition: transform 170ms ease !important;
}
html body[data-view] .management-shop-control-v26 .switch > span::before,
html body[data-view] .management-shop-control-v26 .switch > span::after,
html body[data-view] .management-shop-control-v26 .switch::before,
html body[data-view] .management-shop-control-v26 .switch::after {
  content: none !important; display: none !important;
}
html body[data-view] .management-shop-control-v26 .switch > input:checked + span {
  transform: translateX(20px) !important;
}
html body[data-view] .management-shop-control-v26 .switch:has(input:focus-visible) {
  outline: 2px solid #1ff4c6 !important; outline-offset: 3px !important;
}
html body[data-view] .management-shop-control-v26 .switch:has(input:disabled) {
  opacity: 0.55 !important; cursor: wait !important;
}
html body[data-view="product-management"] .floating-add,
html body[data-view="file-management"] .floating-add {
  position: relative !important; inset: auto !important; float: none !important;
  transform: none !important; display: block !important; margin: 18px 0 0 auto !important;
  z-index: 1 !important;
}
html body[data-view="profile-settings"] .neo-settings-row:has(.policy-link) {
  display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}
html body[data-view="profile-settings"] .neo-settings-row .policy-link,
html body[data-view="profile-settings"] .legal-set-shortcuts-v251 {
  display: flex !important; position: relative !important; inset: auto !important;
  opacity: 1 !important; visibility: visible !important; width: 100% !important;
  height: auto !important; min-height: 44px !important;
}
html body[data-view="profile-settings"] .neo-settings-row:has(.policy-link) > .neo-settings-icon { display: none !important; }
html body .policy-document-v273 { max-height: 60vh; overflow-y: auto; }
html body .policy-library-row-v273 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
html body .policy-library-row-v273 > div:last-child { display: flex; gap: 8px; }
/* Contact settings use the full header width without a status badge. */
html body .seller-contact-shell-v249 .seller-contact-head-v249 {
  display: block !important; width: 100% !important; min-width: 0 !important;
  padding-right: 0 !important;
}
html body .seller-contact-shell-v249 .seller-contact-head-v249 > div {
  width: 100% !important; min-width: 0 !important;
}
html body .seller-contact-shell-v249 .seller-contact-head-v249 .modal-title {
  box-sizing: border-box !important; width: 100% !important;
  margin: 4px 0 8px !important; padding: 0 38px 0 0 !important;
  font-size: clamp(14px, 4.8vw, 24px) !important; line-height: 1.2 !important;
  white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important;
}
html body .seller-contact-shell-v249 .seller-contact-head-v249 .modal-desc {
  width: 100% !important; max-width: none !important; margin-right: 0 !important;
}
@media (max-width: 900px) {
  html body[data-view] .product-management-command-v26,
  html body[data-view] .file-management-command-v26 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body[data-view] .management-shop-control-v26 { grid-column: 1 / -1 !important; }
}
@media (max-width: 480px) {
  html body[data-view] .topbar .topbar-logo-copy > span { font-size: clamp(14px, calc(12.5vw - 25px), 20px) !important; }
  html body[data-view] .topbar { gap: 6px !important; padding-inline: 10px !important; }
  html body[data-view] .topbar .topbar-right { gap: 3px !important; }
  html body[data-view] .management-command-v26 { grid-template-columns: minmax(0, 1fr) !important; }
  html body[data-view] .management-command-v26 > * { grid-column: auto !important; }
}

html body[data-view] .topbar .topbar-token-pill { height:32px!important;min-height:32px!important;padding:3px 5px!important;gap:4px!important;min-width:0!important; }
html body[data-view] .topbar .topbar-token-value { font-size:11px!important; }
html body[data-view] .topbar .topbar-token-plus { width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;font-size:17px!important; }
html body[data-view] .topbar .token-coin { width:18px!important;height:18px!important; }
html body[data-view] .topbar .topbar-discord { width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;padding:5px!important; }
html body[data-view] .topbar .topbar-logo-copy .logo-studio,
html body[data-view] .topbar .topbar-logo-copy .logo-market { font-size:inherit!important; }

/* Dialogs and feedback belong above the fixed navigation at every viewport. */
html body {
  --mokou-layer-dialog: 2000;
  --mokou-layer-legal: 2100;
  --mokou-layer-feedback: 2200;
}
html body .modal-overlay,
html body .legal-overlay {
  --mokou-overlay-gap: clamp(8px, 2vmin, 18px);
  --mokou-overlay-top: max(var(--mokou-overlay-gap), env(safe-area-inset-top, 0px));
  --mokou-overlay-bottom: max(var(--mokou-overlay-gap), env(safe-area-inset-bottom, 0px));
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--mokou-layer-dialog) !important;
  box-sizing: border-box !important;
  padding: var(--mokou-overlay-top)
    max(var(--mokou-overlay-gap), env(safe-area-inset-right, 0px))
    var(--mokou-overlay-bottom)
    max(var(--mokou-overlay-gap), env(safe-area-inset-left, 0px)) !important;
}
html body .legal-overlay {
  z-index: var(--mokou-layer-legal) !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}
html body .modal-overlay .modal,
html body .legal-overlay .legal-reader {
  box-sizing: border-box !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: min(760px, 100%) !important;
  max-height: calc(100vh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom)) !important;
  max-height: calc(100dvh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
html body .legal-overlay .legal-reader {
  max-height: min(820px, calc(100vh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom))) !important;
  max-height: min(820px, calc(100dvh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom))) !important;
}
html body .toast-v273,
html body .toast-root-v176 {
  z-index: var(--mokou-layer-feedback) !important;
}
@media (max-height: 480px) {
  /* On short landscape screens, let the entire document and actions scroll. */
  html body .legal-reader .legal-action-dock,
  html body .legal-reader > footer {
    position: static !important;
    inset: auto !important;
  }
}
/* File SKU configurations remain editable before output upload. */
#fileListingV188 .matrix-output-mode-v20261008 { display:flex; flex-direction:column; gap:6px; min-width:0; }
#fileListingV188 .matrix-output-mode-v20261008 select { width:100%; min-height:42px; background:#0d171e; color:#edf4f7; border:1px solid #2b3c47; border-radius:10px; padding:8px 12px; }
#fileListingV188 .sku-manual-output-v20261008 { padding:16px; border-top:1px solid #283943; min-width:0; }
#fileListingV188 .sku-manual-output-v20261008 .dropzone { width:100%; box-sizing:border-box; cursor:pointer; }
#fileListingV188 .sku-manual-output-v20261008 .asset-list { margin-top:10px; }
#fileListingV188 .sku-manual-output-v20261008 .asset-meta { min-width:0; overflow-wrap:anywhere; }
#fileListingV188 .sku-card { scroll-margin-top:calc(var(--topbar-height,72px) + 16px); }
@media (max-width:760px) {
  #fileListingV188 .matrix-top { flex-wrap:wrap; gap:12px; }
  #fileListingV188 .matrix-output-mode-v20261008 { flex:1 1 160px; }
  #fileListingV188 .sku-manual-output-v20261008 { padding:12px; }
}

/* The delivery city picker keeps the address form intact underneath it. */
html body .address-city-trigger-v20261008 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; text-align: left; cursor: pointer;
}
html body .address-city-trigger-v20261008 > span:first-child {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html body .address-city-trigger-v20261008:disabled { cursor: default; opacity: .65; }
html body .address-city-overlay-v20261008 {
  z-index: 2050 !important; display: grid !important; place-items: center !important;
  grid-template-columns: minmax(0, 1fr) !important;
  overflow: hidden !important; background: rgba(0, 0, 0, .75);
}
html body .modal-overlay .address-city-popup-v20261008 {
  display: flex !important; flex-direction: column !important; gap: 10px;
  width: min(560px, 100%) !important;
  height: min(640px, calc(100vh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom)));
  height: min(640px, calc(100dvh - var(--mokou-overlay-top) - var(--mokou-overlay-bottom)));
  padding: clamp(14px, 3vw, 24px) !important; margin: 0 !important;
  color: #edf4f7; background: #0c141d; border: 1px solid #30404c; border-radius: 18px;
  overflow: hidden !important;
}
html body .address-city-head-v20261008 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
}
html body .address-city-head-v20261008 h2 {
  margin: 0; font-size: clamp(18px, 5vw, 24px); line-height: 1.25; min-width: 0;
}
html body .address-city-close-v20261008 {
  width: 40px; height: 40px; min-width: 40px; padding: 0; flex: none;
  background: #18232c; color: #edf4f7; border: 1px solid #354550; border-radius: 50%;
  font-size: 26px; line-height: 1; cursor: pointer;
}
html body .address-city-popup-v20261008 .modal-desc {
  margin: 0; flex: none; font-size: 13px; line-height: 1.4;
}
html body .address-city-search-v20261008 { font-size: 13px; flex: none; }
html body #addressCitySearchV20261008 {
  min-width: 0; min-height: 44px; width: 100%; font-size: 16px; flex: none;
}
html body .address-city-count-v20261008 { margin: 0; color: #a7b9c5; font-size: 12px; flex: none; }
html body .address-city-results-v20261008 {
  display: flex; flex-direction: column; gap: 6px; min-height: 0; flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
html body .address-city-option-v20261008 {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 44px; flex: none; padding: 12px;
  color: #edf4f7; background: #121e27; border: 1px solid #2b3c47; border-radius: 10px;
  font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
html body .address-city-option-v20261008[aria-pressed="true"] {
  border-color: #f5a400; background: #2b2515;
}
html body .address-city-option-v20261008:focus-visible,
html body .address-city-close-v20261008:focus-visible,
html body .address-city-trigger-v20261008:focus-visible {
  outline: 2px solid #f5a400; outline-offset: 2px;
}
html body .address-city-empty-v20261008 { padding: 12px; margin: 0; color: #a7b9c5; }

/* Payment step status stays under its label on narrow screens. */
@media (max-width: 900px) {
  html body[data-view="lianlian-pending"] .lianlian-step-v177 small {
    grid-column: 2 / -1;
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: break-word;
  }
}


/* Keep listing information and filters readable at every card width. */
html body .market-results-summary-v20261011 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  width: 100%; min-width: 0; margin: 14px 0 12px; color: #aebdc8;
}
html body .market-results-summary-v20261011 .ref-count-label {
  display: block !important; width: auto !important; max-width: 100%;
  white-space: normal !important; overflow-wrap: anywhere;
  font-size: 13px !important; line-height: 1.5; text-align: left;
}
html body .active-filter-row { flex-wrap: wrap; max-width: 100%; gap: 8px; }
html body .active-filter-chip { white-space: normal; overflow-wrap: anywhere; }
html body .shared-adaptive-card-v256 .ref-card-title {
  display: block !important; margin: 0; color: #edf4f7; font-size: 18px;
  line-height: 1.35; overflow-wrap: anywhere;
}
html body .shared-adaptive-card-v256 .market-card-description {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; margin: 6px 0 10px; font-size: 13px; line-height: 1.5;
  color: #aebdc8; overflow-wrap: anywhere;
}
html body .shared-adaptive-card-v256 .favorite-action {
  z-index: 5; min-width: 44px !important; min-height: 44px !important; cursor: pointer;
  pointer-events: auto; touch-action: manipulation;
}
html body .shared-adaptive-card-v256 .favorite-action.active,
html body .detail-media-action-v2417[aria-pressed="true"] { color: #ff6b8a; }
html body .shared-adaptive-card-v256 .favorite-action:focus-visible {
  outline: 2px solid #f5a400; outline-offset: 3px;
}
html body .shared-adaptive-card-v256 .favorite-action:disabled { cursor: wait; opacity: .7; }
/* Older card rules force white SVGs, including after a favorite is saved. */
html body[data-view] :is(#mpGrid, #mfGrid, #favGrid, .seller-card-grid-v165) .shared-adaptive-card-v256.market-card-v241 .ref-card-title {
  font-size: 18px !important; line-height: 1.35 !important;
}
html body[data-view] :is(#mpGrid, #mfGrid, #favGrid, .seller-card-grid-v165) .shared-adaptive-card-v256.market-card-v241 button.favorite-action {
  width: 44px !important; height: 44px !important;
  min-width: 44px !important; min-height: 44px !important;
}
html body[data-view] :is(#mpGrid, #mfGrid, #favGrid, .seller-card-grid-v165) .shared-adaptive-card-v256.market-card-v241 button.favorite-action[aria-pressed="true"],
html body[data-view] .detail-media-action-v2417[aria-pressed="true"] {
  color: #ff6b8a !important;
}
html body[data-view] :is(#mpGrid, #mfGrid, #favGrid, .seller-card-grid-v165) .shared-adaptive-card-v256.market-card-v241 button.favorite-action[aria-pressed="true"] svg,
html body[data-view] .detail-media-action-v2417[aria-pressed="true"] svg {
  color: #ff6b8a !important; fill: #ff6b8a !important; stroke: #ff6b8a !important;
}
html body[data-view] :is(#mpGrid, #mfGrid, #favGrid, .seller-card-grid-v165) .shared-adaptive-card-v256.market-card-v241 button.favorite-action[aria-pressed="false"] svg,
html body[data-view] .detail-media-action-v2417[aria-pressed="false"] svg {
  fill: none !important;
}
html body .market-grid > .empty-state-v176 { grid-column: 1 / -1; }
html body [data-shipping-address-index]:disabled { opacity: .65; cursor: not-allowed; }

/* Routine controls: keep a full touch target without a rectangular frame. */
html body[data-view] button.detail-media-action-v2417[data-ui-action="openDetailFavoriteV2417"],
html body[data-view] button.market-filter-icon-v2411 {
  background: transparent !important; border: 0 !important; box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border-radius: 0 !important; min-width: 44px; min-height: 44px;
}
html body[data-view] button.detail-media-action-v2417[data-ui-action="openDetailFavoriteV2417"] svg {
  color: #edf4f7 !important; stroke: #edf4f7 !important; fill: none !important;
}
html body[data-view] button.detail-media-action-v2417[data-ui-action="openDetailFavoriteV2417"][aria-pressed="true"] svg {
  fill: #ef4444 !important;
}
html body[data-view] button.detail-media-action-v2417[data-ui-action="openDetailFavoriteV2417"]:focus-visible,
html body[data-view] button.market-filter-icon-v2411:focus-visible { outline: none !important; }
html body[data-view] button.detail-media-action-v2417[data-ui-action="openDetailFavoriteV2417"]:focus-visible svg,
html body[data-view] button.market-filter-icon-v2411:focus-visible svg { filter: drop-shadow(0 0 3px #f5a400); }

/* Product and File details share the standard 4:3 media frame. */
html body[data-view] .behavior-gallery.detail-gallery-card-v2411 { min-height: 0 !important; height: auto !important; }
html body[data-view] .detail-gallery-media-v2411 {
  position: relative; width: 100% !important; aspect-ratio: 4 / 3;
  height: auto !important; min-height: 0 !important; max-height: none !important;
}
html body[data-view] .detail-gallery-media-v2411 .detail-preview-stage-v2415 {
  width: 100% !important; height: 100% !important; min-height: 0 !important;
  max-height: none !important; aspect-ratio: 4 / 3; box-sizing: border-box;
}
html body[data-view] .detail-gallery-media-v2411 .detail-gallery-image-v2513 {
  width: 100% !important; height: 100% !important; object-fit: contain !important;
}
html body .address-card-name-v20261011 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
html body .default-address-badge-v20261011 {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px;
  border: 1px solid #52613b; border-radius: 20px; background: #202b1a;
  color: #d4e4ac; font-size: 12px; font-weight: 600; white-space: nowrap;
}
html body #kycErrorText, html body #saveMessage { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
