/* Геометрия раздела. Общие компоненты определяются в aart-ui. */
@layer aart-legacy {
/* Карточка товара: общие токены интерфейса, ограниченная высота галереи. */
.project-view .marketplaces-panel { width:100%; max-width:none; margin:0; padding:0 var(--workspace-gutter,24px) 32px; }
.marketplace-detail {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  overflow-wrap: anywhere;
}
.marketplace-result-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--line-soft); }
.mp-source-label { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.mp-platform-badge { display:inline-flex; align-items:center; font-size:10px; font-weight:700; letter-spacing:.8px; border:1px solid var(--line); border-radius:6px; padding:5px 8px; color:var(--purple); background:var(--surface-raised); }
.marketplace-status { font-size:12px; line-height:1.6; color:var(--muted); }
.marketplace-status.is-running { color:var(--purple); }
.marketplace-status.is-running::before { content:""; display:inline-block; width:6px; height:6px; margin-right:7px; background:var(--purple); border-radius:50%; }
.marketplace-status.is-limited { color:var(--text); }
.marketplace-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.marketplace-actions .button { min-height:36px; padding:7px 10px; font-size:12px; }
.marketplace-progress { margin-bottom:20px; }

/* Рамка и лента имеют одну высоту. Размер изображения не меняет компоновку. */
.mp-product-overview { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,1fr); align-items:start; gap:24px; }
.mp-product-gallery { --mp-gallery-height:clamp(340px,calc(100dvh - 320px),640px); display:grid; grid-template-columns:62px minmax(0,1fr); gap:12px; min-width:0; align-items:start; }
.mp-thumbnail-rail { display:flex; flex-direction:column; gap:9px; height:var(--mp-gallery-height); min-width:0; min-height:0; overflow-y:auto; overflow-x:hidden; padding:2px 6px 2px 2px; scrollbar-width:thin; scrollbar-color:var(--line) transparent; overscroll-behavior:contain; }
.mp-thumbnail { position:relative; display:block; flex:none; width:52px; height:70px; padding:3px; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:var(--surface); transition:border-color .15s,box-shadow .15s; }
.mp-thumbnail:hover { border-color:var(--purple); }
.mp-thumbnail.is-selected { border-color:var(--purple); box-shadow:0 0 0 1px var(--purple); }
.mp-thumbnail img { display:block; width:100%; height:100%; object-fit:contain; border-radius:4px; }
.mp-thumbnail-number { position:absolute; bottom:3px; right:3px; display:grid; place-items:center; min-width:17px; min-height:17px; padding:1px 3px; border:1px solid var(--line); border-radius:4px; background:var(--surface); color:var(--text); font-size:9px; }
.mp-thumbnail.is-selected .mp-thumbnail-number { border-color:var(--purple); color:var(--purple); }
.mp-thumbnail.is-unavailable { background:var(--canvas); border-style:dashed; }
.mp-thumbnail-placeholder { display:grid; place-items:center; height:100%; font-size:21px; color:var(--subtle); }
.mp-main-stage { display:grid; grid-template-rows:minmax(0,1fr) auto; min-width:0; min-height:0; height:var(--mp-gallery-height); overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--canvas); outline-offset:5px; }
.mp-main-visual { position:relative; display:grid; place-items:center; width:100%; height:100%; min-width:0; min-height:0; padding:12px; overflow:hidden; background:var(--canvas); }
.mp-main-visual>img { display:block; width:100%; height:100%; min-height:0; max-width:100%; max-height:100%; object-fit:contain; }
.mp-main-visual>p { position:absolute; max-width:85%; font-size:12px; text-align:center; color:var(--muted); line-height:1.7; }
.mp-image-loading { padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.mp-gallery-toolbar { display:grid; grid-template-columns:34px minmax(0,1fr) 34px auto; align-items:center; gap:8px; min-width:0; min-height:54px; padding:9px 10px; border-top:1px solid var(--line); background:var(--surface); }
.mp-round-button { display:inline-grid; place-items:center; width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); font-size:18px; }
.mp-round-button:hover:not(:disabled) { border-color:var(--purple); background:var(--surface-hover); color:var(--purple); }
.mp-round-button:disabled { opacity:.35; }
.mp-slide-counter { min-width:0; text-align:center; font-size:12px; line-height:1.4; color:var(--muted); font-variant-numeric:tabular-nums; }
.mp-expand { min-height:34px; padding:6px 8px; border:0; color:var(--purple); font-size:12px; }
.mp-main-visual.is-expandable { cursor:zoom-in; }
.mp-main-visual.is-expandable::after { content:"Увеличить"; position:absolute; bottom:18px; right:18px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); font-size:11px; opacity:0; transition:opacity .15s; pointer-events:none; }
.mp-main-visual.is-expandable:hover::after,.mp-main-visual.is-expandable:focus-visible::after { opacity:1; }
.mp-main-visual:focus-visible { outline:2px solid var(--purple); outline-offset:-4px; }

/* Название, общие характеристики и следующий шаг. */
.mp-product-information { min-width:0; }
.mp-product-information>.section-kicker { font-size:9px; color:var(--subtle); }
.mp-product-title { margin:7px 0 16px; color:var(--text); font-size:20px; line-height:1.4; font-weight:650; letter-spacing:-.3px; overflow-wrap:anywhere; }
.mp-product-identity,.mp-product-facts,.marketplace-characteristics { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,1.25fr); gap:8px 18px; margin:0; font-size:13px; line-height:1.65; }
.mp-product-identity dt,.mp-product-facts dt,.marketplace-characteristics dt { color:var(--muted); }
.mp-product-identity dd,.mp-product-facts dd,.marketplace-characteristics dd { min-width:0; margin:0; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; }
.mp-product-identity { padding-bottom:18px; border-bottom:1px solid var(--line-soft); }
.mp-product-information .marketplace-stats { display:flex; flex-wrap:wrap; gap:5px 14px; padding:10px 12px; margin:14px 0; border:1px solid var(--line-soft); border-radius:9px; background:var(--surface-raised); color:var(--muted); font-size:12px; }
.mp-product-information h4 { margin:0 0 12px; color:var(--text); font-size:15px; font-weight:600; line-height:1.4; }
.mp-product-facts { gap:7px 16px; }
.mp-section-link { display:inline-block; margin-top:13px; padding-bottom:2px; border-bottom:1px solid var(--line); color:var(--purple); font-size:12px; }
.mp-section-link:hover { border-color:var(--purple); }
.mp-missing-data { color:var(--muted); font-size:13px; line-height:1.8; }
.mp-next-step { margin-top:18px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface-raised); }
.mp-next-step>.section-kicker { font-size:9px; letter-spacing:1.4px; color:var(--purple); }
.mp-next-step h4 { margin:8px 0; font-size:16px; }
.mp-next-step p { margin-bottom:14px; color:var(--muted); font-size:13px; line-height:1.7; }
.mp-next-step .button { width:100%; white-space:normal; }
.mp-product-information .marketplace-use form { grid-template-columns:1fr; gap:12px; }
.mp-product-information .marketplace-use form label { margin-bottom:6px; font-size:12px; color:var(--muted); }
.mp-product-information .marketplace-use form input { padding:10px 12px; background:var(--surface); font-size:13px; }
.mp-product-information .marketplace-use form .button { justify-self:stretch; width:100%; line-height:1.5; }
.mp-product-information .marketplace-use>.button+.button { margin:8px 0 0; }
.mp-product-information .marketplace-use>.button { width:100%; }

.mp-gallery-empty { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:300px; padding:32px 24px; border:1px dashed var(--line); border-radius:12px; background:var(--canvas); text-align:center; }
.mp-empty-symbol { margin-bottom:18px; color:var(--subtle); font-size:38px; line-height:1; }
.mp-gallery-empty h4,.mp-slide-unavailable h4 { margin:0 0 10px; color:var(--text); font-size:16px; font-weight:550; }
.mp-gallery-empty p,.mp-slide-unavailable p { max-width:330px; color:var(--muted); font-size:13px; line-height:1.8; }
.mp-slide-unavailable { display:flex; flex-direction:column; align-items:center; padding:20px; text-align:center; }
.mp-slide-unavailable small { margin-top:18px; color:var(--subtle); font-size:11px; }

.mp-product-sections { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line-soft); }
.mp-product-sections>section { min-width:0; scroll-margin-top:100px; }
.mp-product-sections h4 { margin:0 0 12px; color:var(--text); font-size:15px; font-weight:600; }
.mp-product-sections .marketplace-description { max-height:none; overflow:visible; color:var(--muted); font-size:13px; line-height:1.75; }
.mp-product-sections .marketplace-characteristics { gap:0; }
.marketplace-characteristics dt,.marketplace-characteristics dd { padding:10px; border-bottom:1px solid var(--line-soft); }
.marketplace-characteristics dt:nth-of-type(odd),.marketplace-characteristics dd:nth-of-type(odd) { background:var(--surface-raised); }
.marketplace-characteristics dt { border-radius:5px 0 0 5px; }
.marketplace-characteristics dd { border-radius:0 5px 5px 0; }
.mp-attribute-conflict { display:block; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.5; }
.mp-original-fields { margin-top:20px; padding-top:16px; border-top:1px solid var(--line-soft); }
.mp-original-fields summary { color:var(--purple); font-size:12px; line-height:1.7; list-style-position:inside; cursor:pointer; }
.mp-original-fields summary:hover { color:var(--primary-hover); }
.mp-original-fields summary:focus-visible { outline:2px solid var(--purple); outline-offset:4px; border-radius:3px; }
.mp-original-fields>p { margin:12px 0; color:var(--muted); font-size:12px; line-height:1.7; }
.mp-original-fields .marketplace-characteristics { font-size:12px; }
.mp-original-fields .marketplace-characteristics dd { color:var(--muted); }

/* Модальное окно оригинала сохраняет навигацию, размер и фокус. */
.mp-viewer-open { overflow:hidden; }
.mp-lightbox { position:fixed; inset:18px; width:min(1160px,calc(100vw - 36px)); height:min(1000px,calc(100dvh - 36px)); max-width:none; max-height:none; margin:auto; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--text); box-shadow:0 24px 80px color-mix(in srgb,var(--text) 18%,transparent); }
.mp-lightbox[open] { display:flex; flex-direction:column; }
.mp-lightbox::backdrop { background:color-mix(in srgb,var(--text) 58%,transparent); backdrop-filter:blur(7px); }
.mp-lightbox-toolbar { display:flex; align-items:center; flex:none; gap:20px; padding:16px 20px; border-bottom:1px solid var(--line-soft); }
.mp-lightbox-heading { min-width:0; flex:1; }
.mp-lightbox-heading h2 { margin:0 0 4px; overflow:hidden; color:var(--text); font-size:15px; font-weight:550; line-height:1.5; letter-spacing:0; text-overflow:ellipsis; white-space:nowrap; }
.mp-lightbox-counter { display:block; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.mp-lightbox-close,.mp-lightbox-arrow { display:grid; place-items:center; flex:none; width:44px; height:44px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); cursor:pointer; }
.mp-lightbox-close { font-size:29px; line-height:1; }
.mp-lightbox-arrow { position:absolute; top:50%; z-index:1; transform:translateY(-50%); font-size:24px; }
.mp-lightbox-arrow.is-previous { left:14px; }
.mp-lightbox-arrow.is-next { right:14px; }
.mp-lightbox-close:hover,.mp-lightbox-arrow:hover:not(:disabled) { border-color:var(--purple); background:var(--surface-hover); color:var(--purple); }
.mp-lightbox-arrow:disabled { opacity:.3; cursor:default; }
.mp-lightbox :is(button,a):focus-visible { outline:2px solid var(--purple); outline-offset:3px; }
.mp-lightbox-stage { position:relative; display:flex; flex:1; min-height:0; background:var(--canvas); }
.mp-lightbox-body { position:relative; display:grid; place-items:center; flex:1; min-width:0; min-height:0; margin:12px 70px; overflow:hidden; touch-action:pan-y pinch-zoom; }
.mp-lightbox-body img { width:100%; height:100%; min-height:0; object-fit:contain; }
.mp-lightbox-body p { position:absolute; max-width:330px; margin:16px; padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); font-size:13px; line-height:1.7; text-align:center; }
.mp-lightbox-thumbnails { display:flex; justify-content:safe center; flex:none; gap:9px; padding:10px 20px; overflow-x:auto; border-top:1px solid var(--line-soft); background:var(--surface); scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
.mp-lightbox-thumbnail { position:relative; display:block; flex:none; width:42px; height:56px; padding:2px; overflow:hidden; border:1px solid var(--line); border-radius:6px; background:var(--surface); cursor:pointer; }
.mp-lightbox-thumbnail img { width:100%; height:100%; object-fit:contain; }
.mp-lightbox-thumbnail span { position:absolute; right:1px; bottom:1px; padding:1px 4px; border-radius:3px; background:var(--surface); color:var(--text); font-size:10px; }
.mp-lightbox-thumbnail[aria-pressed="true"] { border-color:var(--purple); box-shadow:0 0 0 1px var(--purple); }
.mp-lightbox-thumbnail.is-unavailable { border-style:dashed; }
.mp-lightbox-footer { display:flex; align-items:center; justify-content:space-between; flex:none; gap:16px; padding:12px 20px; border-top:1px solid var(--line-soft); }
.mp-lightbox-help { color:var(--subtle); font-size:11px; }
.mp-lightbox-footer .button { min-height:38px; padding:8px 14px; font-size:12px; }

.marketplaces-panel .mp-view-heading { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:16px; margin:0 0 12px; }
.mp-view-heading>div { min-width:0; }
.marketplaces-panel .mp-view-heading>.button { flex:none; min-height:36px; padding:8px 12px; font-size:12px; }
.marketplaces-panel .mp-view-heading h2 { margin:5px 0 0; font-size:22px; line-height:1.35; letter-spacing:-.4px; }
.marketplaces-panel .mp-view-heading p { margin:7px 0 0; max-width:760px; font-size:13px; line-height:1.65; }
.marketplaces-panel .mp-view-heading .section-kicker { font-size:10px; }
.marketplaces-panel.has-snapshot .mp-view-heading h2 { margin:0; font-size:18px; }
.marketplaces-panel.has-snapshot .mp-view-heading .section-kicker { display:none; }
.marketplaces-panel .marketplace-history { display:flex; flex-direction:row; align-items:end; gap:12px; margin:0; }
.marketplaces-panel .marketplace-history>div { flex:1; min-width:0; }
.marketplaces-panel .marketplace-history label { display:block; margin:0 0 6px; font-size:11px; color:var(--muted); }
.workspace .marketplaces-panel .marketplace-history select { min-height:40px; width:100%; padding:8px 32px 8px 12px; font-size:13px; text-overflow:ellipsis; }
.marketplaces-panel .marketplace-history>.button { min-height:40px; padding:8px 10px; font-size:12px; }
.marketplaces-panel .mp-source-header { display:flex; flex-direction:row; align-items:center; gap:12px 20px; }
.mp-source-context { flex:1; min-width:0; }
.mp-source-single { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; font-size:12px; line-height:1.5; }
.mp-source-identity { min-width:0; overflow-wrap:anywhere; }
.mp-source-date { color:var(--muted); font-size:11px; }
.mp-source-state { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; margin-top:5px; }
.mp-source-state:empty { display:none; }
.mp-source-actions { display:flex; flex:none; align-items:center; gap:8px; }
.workspace .mp-source-header .mp-refresh-button { display:inline-flex; justify-content:center; align-items:center; width:36px; min-width:36px; min-height:36px; padding:8px; }
.mp-refresh-button .icon { width:16px; height:16px; }
.mp-refresh-button[aria-busy=true] { color:var(--primary); }
.mp-source-header #mp-source-links { gap:6px; }
.marketplaces-panel.has-snapshot .marketplace-detail { margin-top:0; }
.marketplaces-panel.has-snapshot #mp-acquisition:not([hidden]) { margin-top:16px; padding:0 0 20px; border-bottom:1px solid var(--line-soft); }

/* Инструкции импорта используют те же поверхности; содержание задаёт приложение. */
.mp-browser-import-help { margin-top:18px; padding:13px 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-raised); }
.mp-browser-import-help summary { color:var(--purple); font-size:13px; line-height:1.7; list-style-position:inside; cursor:pointer; }
.mp-browser-import-help summary:focus-visible { outline:2px solid var(--purple); outline-offset:4px; border-radius:3px; }
.mp-browser-import-content { color:var(--muted); font-size:13px; line-height:1.8; }
.mp-browser-import-content>p { margin:12px 0; }
.mp-browser-import-content ol { margin:12px 0 18px; padding-left:22px; }
.mp-browser-import-content li { margin:5px 0; padding-left:3px; }
.mp-browser-import-links { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.mp-browser-import-links .button { min-height:38px; font-size:12px; }
.mp-browser-import-card { margin:0 0 24px; padding:20px 24px; border:1px solid var(--line); border-radius:12px; background:var(--surface-raised); }
.mp-browser-import-card h3 { margin:0; color:var(--text); font-size:18px; font-weight:550; line-height:1.5; }
.mp-browser-origin { padding-left:12px; border-left:1px solid var(--line); color:var(--subtle); font-size:11px; }
.mp-browser-provenance { max-width:800px; margin:-8px 0 22px; color:var(--muted); font-size:12px; line-height:1.8; }
.mp-browser-provenance summary { width:fit-content; cursor:pointer; color:var(--muted); }
.mp-browser-provenance summary:focus-visible { outline:2px solid var(--purple); outline-offset:3px; border-radius:3px; }
.mp-browser-provenance p { margin:8px 0 0; }

/* Ограничение источника — компактное продолжение без пустой карточки. */
.mp-import-empty { padding:18px 0; color:var(--text); }
.mp-import-empty h3 { margin:0 0 10px; font-size:20px; line-height:1.4; font-weight:600; }
.mp-import-empty p { max-width:720px; margin:0 0 14px; color:var(--muted); font-size:14px; line-height:1.75; }
.mp-import-technical { margin-top:18px; padding-top:14px; border-top:1px solid var(--line-soft); color:var(--muted); font-size:12px; line-height:1.7; }
.mp-import-technical summary { color:var(--subtle); cursor:pointer; }
.mp-import-technical[open] summary { margin-bottom:10px; }
.mp-browser-import-card>p { max-width:780px; margin:10px 0 16px; color:var(--muted); font-size:13px; line-height:1.8; }
.mp-browser-import-card>details { margin-top:15px; color:var(--muted); font-size:13px; line-height:1.8; }
.mp-browser-import-card>details summary { color:var(--purple); cursor:pointer; }

/* ПК: изображение 3:4 занимает рамку целиком, управление вынесено под него. */
@media (min-width:1101px) {
  .mp-product-overview {
    --mp-gallery-height:clamp(320px,calc(100dvh - 380px),560px);
    --mp-toolbar-height:52px;
    grid-template-columns:minmax(0,min(46%,calc((var(--mp-gallery-height) - var(--mp-toolbar-height) - 2px) * .75 + 76px))) minmax(0,1fr);
  }
  .mp-product-gallery { align-items:stretch; }
  .mp-thumbnail-rail { height:0; min-height:100%; padding:2px; scrollbar-width:none; }
  .mp-thumbnail-rail::-webkit-scrollbar { display:none; }
  .mp-thumbnail:focus-visible { outline:2px solid var(--purple); outline-offset:-2px; }
  .mp-main-stage { height:auto; grid-template-rows:auto auto; align-self:start; }
  .mp-main-visual { height:auto; aspect-ratio:3 / 4; padding:0; }
  .mp-main-visual>img { position:absolute; inset:0; }
  .mp-gallery-toolbar { grid-template-columns:30px minmax(0,1fr) 30px auto; align-content:center; gap:6px; height:var(--mp-toolbar-height); min-height:var(--mp-toolbar-height); padding:8px; }
  .mp-gallery-toolbar .mp-round-button { width:30px; height:30px; }
  .mp-gallery-toolbar .mp-expand { min-height:30px; padding:4px 6px; font-size:11px; }
}

@media (max-width:1100px) {
  .mp-product-overview { grid-template-columns:minmax(0,1fr); gap:24px; }
  .mp-product-gallery { width:100%; max-width:680px; margin:auto; }
  .mp-product-sections { grid-template-columns:1fr; gap:26px; }
  .mp-product-information .marketplace-use form { grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); }
  .marketplace-result-heading { flex-direction:row; flex-wrap:wrap; }
}
@media (max-width:600px) {
  .marketplace-detail { padding:16px 12px; border-radius:12px; }
  .marketplace-result-heading { gap:10px; margin-bottom:12px; padding-bottom:12px; }
  .marketplace-actions { gap:5px; }
  .marketplaces-panel .marketplace-actions .button { min-height:38px; padding:6px 8px; font-size:11px; }
  .mp-source-label { gap:8px; }
  .mp-platform-badge { font-size:9px; }
  .mp-product-overview { gap:24px; }
  .mp-product-gallery { --mp-gallery-height:clamp(320px,calc(100dvh - 260px),520px); grid-template-columns:minmax(0,1fr); gap:10px; }
  .mp-thumbnail-rail { order:2; flex-direction:row; height:76px; overflow-x:auto; overflow-y:hidden; padding:2px 2px 4px; }
  .mp-thumbnail { width:48px; height:64px; }
  .mp-main-visual { padding:8px; }
  .mp-gallery-toolbar { grid-template-columns:34px minmax(0,1fr) 34px; padding:8px; gap:6px; }
  .mp-expand { grid-column:1/-1; min-height:32px; padding:4px 6px; }
  .mp-product-title { margin-bottom:14px; font-size:18px; }
  .mp-product-identity,.mp-product-facts { gap:8px 12px; }
  .mp-next-step { padding:16px; }
  .mp-product-information .marketplace-use form { grid-template-columns:1fr; }
  .mp-product-information .marketplace-use form input { font-size:16px; }
  .mp-product-sections { gap:24px; margin-top:26px; padding-top:24px; }
  .mp-product-sections>section { scroll-margin-top:85px; }
  .mp-product-sections .marketplace-characteristics { grid-template-columns:minmax(95px,.9fr) minmax(0,1.1fr); }
  .marketplace-characteristics dt,.marketplace-characteristics dd { padding:9px 7px; }
  .mp-gallery-empty { min-height:260px; padding:28px 18px; }
  .mp-lightbox { inset:0; width:100vw; height:100dvh; border:0; border-radius:0; }
  .mp-lightbox-toolbar { gap:12px; padding:12px 14px; padding-top:max(12px,env(safe-area-inset-top)); }
  .mp-lightbox-heading h2 { font-size:13px; }
  .mp-lightbox-body { margin:8px 0; }
  .mp-lightbox-arrow.is-previous { left:8px; }
  .mp-lightbox-arrow.is-next { right:8px; }
  .mp-lightbox-thumbnails { padding:10px 14px; }
  .mp-lightbox-footer { padding:10px 14px; padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .mp-lightbox-help { display:none; }
  .mp-lightbox-footer .button { width:100%; min-height:44px; }
  .marketplaces-panel .mp-view-heading { align-items:center; gap:10px; }
  .marketplaces-panel .mp-view-heading>.button { max-width:160px; min-height:36px; padding:7px 9px; font-size:11px; white-space:normal; }
  .marketplaces-panel .marketplace-history { gap:8px; margin:0; }
  .marketplaces-panel .marketplace-history>div { flex:1; }
  .marketplaces-panel .marketplace-history>.button { width:36px; min-width:36px; height:40px; padding:0; font-size:0; }
  .marketplaces-panel .marketplace-history>.button::before { content:'↻'; font-size:21px; }
  .marketplaces-panel .mp-source-header { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:start; gap:10px 8px; }
  .mp-source-header .mp-source-actions { display:contents; }
  .mp-source-header .mp-source-context { grid-column:1; grid-row:1; }
  .workspace .mp-source-header .mp-refresh-button { grid-column:2; grid-row:1; width:44px; min-width:44px; min-height:44px; }
  .mp-source-header #mp-source-links { grid-column:1/-1; grid-row:2; }
  .mp-source-header #mp-source-links:empty { display:none; }
  .workspace .mp-source-header #mp-source-links .button { min-height:44px; }
  .workspace .marketplaces-panel .mp-source-header .marketplace-history select { min-height:44px; }
  .marketplaces-panel.has-snapshot .mp-view-heading h2 { font-size:17px; }
  .mp-browser-import-card { padding:17px; }
  .mp-browser-import-card h3 { font-size:17px; }
  .mp-browser-import-links { align-items:stretch; flex-direction:column; gap:6px; }
  .mp-browser-import-links .button { white-space:normal; }
  .mp-browser-origin { font-size:10px; }
  .mp-browser-provenance { margin-top:0; }
}
@media (prefers-reduced-motion:reduce) {
  .mp-thumbnail,.mp-main-visual::after { transition:none; }
}
}
