/* Marketplace search + filters: a faithful port of the approved mockups
   (mockups/use-cases-tutorials/index.html search block and search.html).
   Light theme only, near-monochrome; accent only on primary buttons and
   selected filters. Motion is transform/opacity only. Every class is
   prefixed ucm- so nothing leaks into the rest of the site. */

:root {
  --ucm-bg: oklch(100% 0 0);
  --ucm-muted: oklch(97.8% 0 0);
  --ucm-border: oklch(93.5% 0 0);
  --ucm-border-subtle: oklch(96.5% 0 0);
  --ucm-border-strong: oklch(82% 0 0);
  --ucm-text: oklch(15% 0 0);
  --ucm-text-2: oklch(46% 0 0);
  --ucm-text-3: oklch(59% 0 0);
  --ucm-brand: #5096b3;
  --ucm-accent: #2f7a99;
  --ucm-success: oklch(49% .19 150);
  --ucm-sel: color-mix(in oklab, var(--ucm-accent) 10%, var(--ucm-bg));
  --ucm-ring: color-mix(in oklab, var(--ucm-accent) 30%, transparent);
  --ucm-display: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ucm-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --ucm-r-ctl: 18px;
  --ucm-r-panel: 26px;
  --ucm-r-sheet: 34px;
  --ucm-r-media: 14px;
  --ucm-e-rest: 0 1px 2px oklch(0% 0 0 / .035);
  --ucm-e-raise: 0 6px 18px oklch(0% 0 0 / .065), 0 1px 3px oklch(0% 0 0 / .035);
  --ucm-e-float: 0 20px 48px oklch(0% 0 0 / .105), 0 3px 10px oklch(0% 0 0 / .045);
  --ucm-enter: cubic-bezier(.16, 1, .3, 1);
  --ucm-std: cubic-bezier(.22, 1, .36, 1);
  --ucm-exit: cubic-bezier(.7, 0, .84, 0);
  --ucm-spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.6%, 1.067 22.6%, 1.092 26%, 1.094 29.8%, 1.063 37.7%, 1.003 52.1%, .992 60%, 1.001 80%, 1);
}

.ucm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ucm-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ucm-ico.l { width: 20px; height: 20px; }
.ucm-num { font-variant-numeric: tabular-nums; }
/* Text/search inputs are excluded: their focus ring lives on the container (.ucm-sbar / .ucm-rsearch). */
.ucm-find button, .ucm-find input, .ucm button, .ucm input { box-sizing: border-box; font: inherit; color: inherit; letter-spacing: inherit; }

.ucm-find :focus-visible:not(input[type=search]):not(input[type=text]):not(input:not([type])), .ucm :focus-visible:not(input[type=search]):not(input[type=text]):not(input:not([type])) { outline: none; box-shadow: 0 0 0 3px var(--ucm-ring); }

/* Buttons */
.ucm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; text-decoration: none; transition: transform 120ms var(--ucm-std), background-color 160ms var(--ucm-std), box-shadow 160ms var(--ucm-std); }
.ucm-btn:active { transform: scale(.97); }
.ucm-btn.p { background: var(--ucm-accent); color: #fff; }
.ucm-btn.p:hover { background: color-mix(in oklab, var(--ucm-accent) 88%, black); color: #fff; }
.ucm-btn.g { background: var(--ucm-bg); color: var(--ucm-text); box-shadow: inset 0 0 0 1px var(--ucm-border-strong); }
.ucm-btn.g:hover { background: var(--ucm-muted); }
.ucm-btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.ucm-link { border: 0; background: none; color: var(--ucm-accent); cursor: pointer; padding: 4px 0; font-weight: 500; font-size: 13px; text-decoration: none; }
.ucm-link:hover { text-decoration: underline; }
.ucm-link[aria-disabled=true] { color: var(--ucm-text-3); pointer-events: none; }

/* ---------- Main page search bar + popover (index.html mockup) ---------- */
.uct .find.ucm-x-find h2 span { font-size: 20px; }
.ucm-find { position: relative; max-width: 760px; margin: 0 auto; text-align: left; font-family: var(--ucm-body); color: var(--ucm-text); }
.ucm-sbar { position: relative; display: flex; align-items: center; gap: 4px; height: 64px; padding: 0 8px 0 22px; border-radius: 999px; background: var(--ucm-muted); box-shadow: var(--ucm-e-raise); transition: box-shadow 160ms var(--ucm-std), background-color 160ms var(--ucm-std); }
.ucm-sbar:focus-within { background: var(--ucm-bg); box-shadow: 0 0 0 4px var(--ucm-ring), var(--ucm-e-raise); }
.ucm-sbar > .ucm-ico { color: var(--ucm-text-3); }
.ucm-sbar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; box-shadow: none; -webkit-appearance: none; appearance: none; background: transparent; font-size: 18px; padding: 0 8px; color: var(--ucm-text); }
.ucm-sbar input::placeholder { color: var(--ucm-text-3); }
.ucm-sbar input::-webkit-search-decoration, .ucm-sbar input::-webkit-search-cancel-button, .ucm-sbar input::-webkit-search-results-button, .ucm-sbar input::-webkit-search-results-decoration { -webkit-appearance: none; display: none; }
.ucm-sep { width: 1px; height: 24px; background: var(--ucm-border); margin: 0 6px; }
.ucm-fbtn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ucm-muted); color: var(--ucm-text); cursor: pointer; font-weight: 500; font-size: 15px; transition: background-color 160ms var(--ucm-std), transform 120ms var(--ucm-std); }
.ucm-fbtn:hover { background: var(--ucm-border); }
.ucm-fbtn:active { transform: scale(.97); }
.ucm-fbtn[aria-expanded=true] { background: var(--ucm-text); color: var(--ucm-bg); }
.ucm-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ucm-accent); color: #fff; font-size: 11px; display: none; place-items: center; }
.ucm-badge.on { display: grid; }
.ucm-go { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--ucm-accent); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform 120ms var(--ucm-std); }
.ucm-go:active { transform: scale(.94); }
.ucm-find #uct-sugg { top: 74px; }

.ucm-pop { position: absolute; z-index: 21; top: 76px; right: 0; width: min(560px, 100%); background: var(--ucm-bg); border-radius: var(--ucm-r-panel); box-shadow: inset 0 0 0 1px var(--ucm-border), var(--ucm-e-float); padding: 8px; transform-origin: calc(100% - 140px) -10px; opacity: 0; transform: scale(.96) translateY(-6px); pointer-events: none; visibility: hidden; transition: opacity 160ms var(--ucm-exit), transform 160ms var(--ucm-exit), visibility 0s linear 160ms; }
.ucm-pop.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 240ms var(--ucm-enter), transform 480ms var(--ucm-enter), visibility 0s; }
.ucm-pop-in { padding: 16px 16px 4px; max-height: min(62vh, 560px); overflow: auto; }
.ucm-pgroup { padding: 0 0 18px; margin: 0; border: 0; min-width: 0; }
.ucm-pgroup legend, .ucm-pgroup h4 { padding: 0; margin: 0 0 10px; font: 500 12px/1 var(--ucm-body); color: var(--ucm-text-3); text-transform: uppercase; letter-spacing: .06em; }
.ucm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ucm-chip { position: relative; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--ucm-bg); box-shadow: inset 0 0 0 1px var(--ucm-border-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ucm-text); transition: background-color 120ms var(--ucm-std), box-shadow 120ms var(--ucm-std), transform 120ms var(--ucm-std); }
.ucm-chip:hover { background: var(--ucm-muted); }
.ucm-chip:active { transform: scale(.97); }
.ucm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ucm-chip .ucm-ico { display: none; }
.ucm-chip:has(input:checked) { background: var(--ucm-sel); box-shadow: inset 0 0 0 1.5px var(--ucm-accent); color: var(--ucm-accent); font-weight: 500; }
.ucm-chip:has(input:checked) .ucm-ico { display: block; }
.ucm-chip:has(input:focus-visible) { box-shadow: inset 0 0 0 1.5px var(--ucm-accent), 0 0 0 3px var(--ucm-ring); }
.ucm-chip small { color: var(--ucm-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ucm-chip:has(input:checked) small { color: inherit; }
.ucm-chip.zero:not(:has(input:checked)) { opacity: .45; }
.ucm-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 8px 16px; border-top: 1px solid var(--ucm-border-subtle); }
.ucm-pop-foot .ucm-btn { height: 40px; padding: 0 18px; font-variant-numeric: tabular-nums; }
.ucm-pop-foot [data-ucm-pop-apply] { gap: 4px; }
.uct .find .ucm-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 18px; color: var(--ucm-text-3); font-size: 13px; }
.uct .find .ucm-popular button, .uct .find .ucm-popular a { border: 0; background: none; margin: 0; color: var(--ucm-text-2); padding: 4px 8px; border-radius: 8px; font-size: 13px; text-decoration: none; }
.uct .find .ucm-popular button:hover { color: var(--ucm-text); background: var(--ucm-muted); }
.uct .find .ucm-popular a:hover { color: var(--ucm-text); background: var(--ucm-muted); }

/* ---------- Results page (search.html mockup) ---------- */
.ucm { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 40px; max-width: none; margin: 0; padding: 24px 24px 96px; font: 400 14px/1.4 var(--ucm-body); letter-spacing: -.01em; color: var(--ucm-text); background: var(--ucm-bg); -webkit-font-smoothing: antialiased; }
.ucm a { color: inherit; text-decoration: none; }
.ucm-rail { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px); overflow: auto; padding: 2px 6px 24px 2px; scrollbar-width: thin; }
.ucm-filter-handle, .ucm-rail-close { display: none; }
.ucm-rsearch { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; border-radius: var(--ucm-r-ctl); background: var(--ucm-muted); transition: box-shadow 160ms var(--ucm-std), background-color 160ms var(--ucm-std); }
.ucm-rsearch:focus-within { background: var(--ucm-bg); box-shadow: 0 0 0 4px var(--ucm-ring); }
.ucm-rsearch > .ucm-ico { color: var(--ucm-text-3); }
.ucm-rsearch input { flex: 1; min-width: 0; border: 0; outline: 0; box-shadow: none; -webkit-appearance: none; appearance: none; background: transparent; height: 100%; font-size: 14px; }
.ucm-rsearch input::-webkit-search-decoration, .ucm-rsearch input::-webkit-search-cancel-button, .ucm-rsearch input::-webkit-search-results-button, .ucm-rsearch input::-webkit-search-results-decoration { -webkit-appearance: none; display: none; }
.ucm-x { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: none; color: var(--ucm-text-3); display: grid; place-items: center; cursor: pointer; }
.ucm-x:hover { background: var(--ucm-muted); color: var(--ucm-text); }
.ucm-x[hidden] { display: none; }
.ucm-railhead { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 4px; }
.ucm-railhead h3 { margin: 0; font: 500 15px/1 var(--ucm-display); letter-spacing: -.02em; }
.ucm-railhead .ucm-link { color: var(--ucm-accent); }
.ucm-facet { border: 0; border-top: 1px solid var(--ucm-border-subtle); margin: 0; padding: 14px 0 10px; min-width: 0; }
.ucm-facet:first-child { border-top: 0; }
.ucm-facet > button { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: none; padding: 2px 0 8px; cursor: pointer; font-weight: 500; color: var(--ucm-text); }
.ucm-facet > button .ucm-ico { color: var(--ucm-text-3); transition: transform 240ms var(--ucm-std); }
.ucm-facet.shut > button .ucm-ico { transform: rotate(-90deg); }
.ucm-opts { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 240ms var(--ucm-std); }
.ucm-facet.shut .ucm-opts { grid-template-rows: 0fr; }
.ucm-opts > div { overflow: hidden; }
.ucm-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px; margin: 0 -6px; border-radius: 10px; cursor: pointer; color: var(--ucm-text-2); }
.ucm-opt-wrap { display: flex; align-items: center; gap: 5px; }
.ucm-opt-wrap[hidden] { display: none; }
.ucm-opt-wrap .ucm-opt { flex: 1; }
.ucm-facet-link { color: var(--ucm-text-3); text-decoration: none; padding: 4px; }
.ucm-opt:hover { background: var(--ucm-muted); color: var(--ucm-text); }
.ucm-opt[hidden] { display: none; }
.ucm-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ucm-box { width: 18px; height: 18px; flex: none; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--ucm-border-strong); display: grid; place-items: center; color: #fff; transition: background-color 120ms var(--ucm-std), box-shadow 120ms var(--ucm-std); }
.ucm-box svg { width: 12px; height: 12px; stroke-width: 2.2; opacity: 0; transform: scale(.6); transition: opacity 120ms var(--ucm-std), transform 240ms var(--ucm-spring); }
.ucm-opt input:checked + .ucm-box { background: var(--ucm-accent); box-shadow: none; }
.ucm-opt input:checked + .ucm-box svg { opacity: 1; transform: none; }
.ucm-opt input:focus-visible + .ucm-box { box-shadow: inset 0 0 0 1.5px var(--ucm-accent), 0 0 0 3px var(--ucm-ring); }
.ucm-opt input:checked ~ .ucm-lbl { color: var(--ucm-text); font-weight: 500; }
.ucm-lbl { flex: 1; }
.ucm-cnt { color: var(--ucm-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.ucm-opt.zero { opacity: .45; }
.ucm-more { border: 0; background: none; color: var(--ucm-text-2); cursor: pointer; padding: 6px 0; font-size: 13px; }
.ucm-more:hover { color: var(--ucm-text); }
.ucm-apply { margin-top: 16px; width: 100%; }
.ucm-js .ucm-apply { display: none; }

.ucm-main { min-width: 0; }
.ucm-mfilter { display: none; }
.ucm-rhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 16px; }
.ucm-rhead h1 { margin: 0; font: 600 28px/1.1 var(--ucm-display); letter-spacing: -.03em; color: var(--ucm-text); }
.ucm-rhead p { margin: 6px 0 0; color: var(--ucm-text-2); }
.ucm-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.ucm-sort { position: relative; }
.ucm-sort-btn { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; border: 0; border-radius: 999px; background: var(--ucm-bg); box-shadow: inset 0 0 0 1px var(--ucm-border-strong); cursor: pointer; }
.ucm-sort-btn span { color: var(--ucm-text-3); }
.ucm-sort-btn b { font-weight: 500; }
.ucm-menu { position: absolute; right: 0; top: 42px; z-index: 15; width: 220px; padding: 6px; background: var(--ucm-bg); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--ucm-border), var(--ucm-e-float); list-style: none; margin: 0; }
.ucm-menu[hidden] { display: none; }
.ucm-menu a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.ucm-menu a:hover, .ucm-menu a:focus-visible { background: var(--ucm-muted); }
.ucm-menu a[aria-checked=true] { font-weight: 500; }
.ucm-menu .ucm-ico { opacity: 0; color: var(--ucm-accent); }
.ucm-menu a[aria-checked=true] .ucm-ico { opacity: 1; }
.ucm-seg { position: relative; display: flex; padding: 3px; border-radius: 999px; background: var(--ucm-muted); }
.ucm-seg button { position: relative; z-index: 1; width: 34px; height: 30px; border: 0; background: none; border-radius: 999px; display: grid; place-items: center; color: var(--ucm-text-3); cursor: pointer; transition: color 160ms var(--ucm-std); }
.ucm-seg button[aria-pressed=true] { color: var(--ucm-text); }
.ucm-seg .ucm-thumb { position: absolute; top: 3px; left: 3px; width: 34px; height: 30px; border-radius: 999px; background: var(--ucm-bg); box-shadow: var(--ucm-e-rest), inset 0 0 0 1px var(--ucm-border); transition: transform 240ms var(--ucm-std); }
.ucm-seg.g .ucm-thumb { transform: translateX(34px); }
.ucm-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--ucm-border); }
.ucm-active:empty { padding: 0; }
.ucm-pill { height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ucm-muted); font-size: 13px; animation: ucm-in 240ms var(--ucm-enter) both; }
.ucm-pill > span { color: var(--ucm-text-3); }
.ucm-pill a { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--ucm-text-2); }
.ucm-pill a:hover { background: var(--ucm-border); color: var(--ucm-text); }
.ucm-pill .ucm-ico { width: 12px; height: 12px; }

/* Media tile: video poster, photo, or a clean text-only tile. */
.ucm-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--ucm-r-media); background: var(--ucm-muted); box-shadow: inset 0 0 0 1px var(--ucm-border-subtle); cursor: pointer; }
.ucm-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 480ms var(--ucm-enter); }
.ucm-media:hover img { transform: scale(1.025); }
.ucm-media.txt { display: grid; place-items: center; padding: 16px 20px; text-align: center; }
.ucm-media.txt b { font: 500 19px/1.2 var(--ucm-display); letter-spacing: -.02em; color: var(--ucm-text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; transition: color 160ms var(--ucm-std); }
.ucm-media.txt:hover b { color: var(--ucm-text); }
.ucm-tag { position: absolute; bottom: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 500; transition: opacity 160ms var(--ucm-std); }
.ucm-tag.dur { background: oklch(15% 0 0 / .82); color: #fff; }
.ucm-tag.ph { background: oklch(100% 0 0 / .94); color: var(--ucm-text); box-shadow: var(--ucm-e-rest); }
.ucm-tag.ph .ucm-ico { width: 13px; height: 13px; }
.ucm-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: oklch(100% 0 0 / .35); opacity: 0; transition: opacity 160ms var(--ucm-std); }
.ucm-prog i { display: block; height: 100%; background: var(--ucm-brand); transform: scaleX(0); transform-origin: left; }
.ucm-media.vid:hover .ucm-prog { opacity: 1; }
.ucm-media.vid:hover .ucm-prog i { transform: scaleX(1); transition: transform 4s linear; }
.ucm-media.vid:hover .ucm-tag.dur { opacity: 0; }

/* List rows */
.ucm-list { list-style: none; margin: 0; padding: 0; }
.ucm-row { display: grid; grid-template-columns: 304px minmax(0, 1fr) 184px; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ucm-border-subtle); animation: ucm-in 480ms var(--ucm-enter) both; animation-delay: calc(var(--i, 0) * 40ms); }
.ucm-body { min-width: 0; }
.ucm-name { display: flex; align-items: center; gap: 8px; color: var(--ucm-text-3); font-size: 13px; margin-bottom: 4px; min-width: 0; }
.ucm-name b { color: var(--ucm-text); font-weight: 500; font-size: 14px; white-space: nowrap; }
.ucm-name a { color: inherit; text-decoration: none; }
.ucm-name a:hover { text-decoration: underline; }
.ucm-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucm-row h2 { margin: 0 0 6px; font: 500 18px/1.25 var(--ucm-display); letter-spacing: -.02em; color: var(--ucm-text); }
.ucm-row h2 a:hover { color: var(--ucm-accent); }
.ucm-desc { margin: 0 0 12px; color: var(--ucm-text-2); max-width: 62ch; }
.ucm-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ucm-text-2); font-size: 13px; }
.ucm-facts span { display: inline-flex; align-items: center; gap: 6px; }
.ucm-facts .ucm-ico { color: var(--ucm-text-3); }
.ucm-facts .ok, .ucm-facts .ok .ucm-ico { color: var(--ucm-success); }
.ucm-buy { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-left: 24px; border-left: 1px solid var(--ucm-border-subtle); }
.ucm-price { font: 600 22px/1 var(--ucm-display); letter-spacing: -.03em; margin-bottom: 4px; }
.ucm-price small { font: 400 13px var(--ucm-body); color: var(--ucm-text-3); letter-spacing: -.01em; }
.ucm-price.free { color: var(--ucm-success); }
.ucm-buy .ucm-btn { width: 100%; }
.ucm-av { display: none; grid-row: 1 / span 3; width: 36px; height: 36px; border-radius: 50%; background: var(--ucm-sel); color: var(--ucm-accent); place-items: center; font: 500 14px var(--ucm-display); }
.ucm-gprice { display: none; font-weight: 500; color: var(--ucm-text); }

/* Grid view (YouTube-style cards from the same markup) */
.ucm-list.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 36px 20px; padding-top: 24px; }
.ucm-list.grid .ucm-row { display: block; padding: 0; border: 0; }
.ucm-list.grid .ucm-buy, .ucm-list.grid .ucm-desc, .ucm-list.grid .ucm-facts .x, .ucm-list.grid .ucm-name .x { display: none; }
.ucm-list.grid .ucm-media-text { display: flex; }
.ucm-list.grid .ucm-body { display: grid; grid-template-columns: 36px 1fr; gap: 4px 12px; padding-top: 12px; }
.ucm-list.grid .ucm-av { display: grid; }
.ucm-list.grid .ucm-name { grid-column: 2; grid-row: 2; margin: 0; }
.ucm-list.grid .ucm-title[data-same-name="true"] { display: none; }
.ucm-list.grid h2 { grid-column: 2; grid-row: 1; font-size: 15px; margin: 0; }
.ucm-list.grid .ucm-facts { grid-column: 2; font-size: 12px; }
.ucm-list.grid .ucm-facts:empty { display: none; }
.ucm-list.grid .ucm-gprice { display: inline; }
.ucm-list.grid .ucm-media.txt b { display: -webkit-box; }

/* Empty + skeleton */
.ucm-empty { padding: 72px 0; text-align: center; color: var(--ucm-text-2); }
.ucm-empty p { margin: 0 0 14px; }
.ucm-empty[hidden] { display: none; }
.ucm-skel { background: linear-gradient(90deg, var(--ucm-muted), var(--ucm-border-subtle), var(--ucm-muted)); background-size: 200% 100%; animation: ucm-sh 1.1s linear infinite; border-radius: 8px; }
.ucm-skelrow { display: grid; grid-template-columns: 304px 1fr 184px; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ucm-border-subtle); list-style: none; }
.ucm-skel.media { aspect-ratio: 16 / 9; border-radius: 14px; }
.ucm-skel.l1 { height: 12px; width: 30%; margin-bottom: 10px; }
.ucm-skel.l2 { height: 18px; width: 70%; margin-bottom: 12px; }
.ucm-skel.l3 { height: 12px; width: 90%; margin-bottom: 6px; }
.ucm-skel.l4 { height: 12px; width: 60%; }
.ucm-skel.b1 { height: 22px; width: 50%; margin-bottom: 12px; }
.ucm-skel.b2 { height: 36px; border-radius: 999px; }

.ucm-filter-scrim { position: fixed; inset: 0; z-index: 140; background: oklch(15% 0 0 / .18); opacity: 0; pointer-events: none; transition: opacity 240ms var(--ucm-std); }
.ucm-filter-scrim.open { opacity: 1; pointer-events: auto; }

@keyframes ucm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ucm-sh { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .ucm-row { grid-template-columns: 240px minmax(0, 1fr); }
  .ucm-buy { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 0; border: 0; }
  .ucm-buy .ucm-btn { width: auto; }
  .ucm-price { margin: 0 8px 0 0; }
  .ucm-skelrow { grid-template-columns: 240px 1fr; }
  .ucm-skelrow > :last-child { display: none; }
}
@media (max-width: 860px) {
  .ucm { grid-template-columns: 1fr; gap: 0; padding: 16px 24px 80px; }
  .ucm-rail { position: fixed; inset: auto 0 0 0; top: auto; z-index: 141; max-height: 86vh; background: var(--ucm-bg); border-radius: var(--ucm-r-sheet) var(--ucm-r-sheet) 0 0; box-shadow: var(--ucm-e-float); padding: 12px 20px 32px; transform: translateY(105%); visibility: hidden; transition: transform 240ms var(--ucm-exit), visibility 0s linear 240ms; }
  .ucm-rail.open { transform: none; visibility: visible; transition: transform 480ms var(--ucm-enter), visibility 0s; }
  .ucm-filter-handle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .ucm-filter-handle b { font: 500 16px/1 var(--ucm-display); }
  .ucm-mfilter { display: flex; gap: 8px; margin-bottom: 16px; }
  .ucm-mfilter .ucm-btn { flex: 1; }
  .ucm-rhead { flex-direction: column; align-items: flex-start; }
  .ucm-rhead h1 { font-size: 22px; }
}
@media (max-width: 640px) {
  .ucm-sbar { height: 56px; padding-left: 16px; }
  .ucm-sbar input { font-size: 16px; }
  .ucm-fbtn .t, .ucm-sep { display: none; }
  .ucm-fbtn { padding: 0 12px; height: 42px; }
  .ucm-go { width: 42px; height: 42px; }
  .ucm-find #uct-sugg { top: 64px; }
  .ucm-pop { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; border-radius: var(--ucm-r-sheet) var(--ucm-r-sheet) 0 0; transform: translateY(24px); }
  .ucm-pop-in { max-height: 62vh; }
  .ucm-row { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
  .ucm-buy { grid-column: 1; }
  .ucm-list.grid { grid-template-columns: 1fr; }
  .ucm-tools { width: 100%; }
  .ucm-sort { flex: 1; }
  .ucm-sort-btn { width: 100%; justify-content: space-between; }
  .ucm-skelrow { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ucm *, .ucm-find *, .ucm-filter-scrim, .ucm-rail, .ucm-pop {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-property: opacity, visibility !important;
    transition-duration: 120ms !important;
  }
  .ucm-media:hover img { transform: none; }
}

