/* UI-003 · engineering stylesheet. Load after styles.css.
   Shared contract: docs/ui/round3/结构约定.md · original assets: assets/catalog/ */
:root {
  --bg:#101112;
  --surface:#191b1e;
  --surface-hi:#24272b;
  --text:#f4f3ef;
  --muted:#a6aaaF;
  --line:#ffffff16;
  --accent:#f0698c;
  --accent-strong:#a92850;
  --accent-soft:#ffb6c9;
  --accent-tint:#f0698c14;
  --lavender:#b9afd1;
  /* Legacy names are retained, mapped to focus colors, not purple fills. */
  --purple:var(--accent);
  --light:var(--accent-soft);
  --catalog-top:calc(50px + env(safe-area-inset-top,0px));
  --catalog-bottom:calc(112px + env(safe-area-inset-bottom,0px));
}
.product-body {background:#090a0b;}
.phone,.media-layer video {background:var(--bg);}
.route-panel {background:var(--bg);}
.route-top {background:#101112f5;}
.route-top button {color:#c6c8cc;}
.route-panel p {color:var(--muted);}
.route-panel .eyebrow,.eyebrow {color:#9c9fa5;}
.route-note {color:#93989e!important;}
.vignette {background:linear-gradient(180deg,#05060785,transparent 26%,transparent 50%,#05060799 80%,#050607ee);}
.bottom-nav {background:linear-gradient(180deg,#101112f2,#101112);border-top:1px solid #ffffff0a;}
.bottom-nav button {color:#a8adb3;}
.bottom-nav button.selected,.bottom-nav button[aria-current=page] {color:var(--accent);}
.bottom-nav .create-pill {background:var(--accent);color:#231018;border:1px solid #ff96b188;box-shadow:0 3px 16px #f0698c21;border-radius:10px;}
.bottom-nav .create-nav {color:#f2e8eb;}
.bottom-nav button.selected .create-pill {background:#ff8ead;}
.top-tabs button {color:#bfc2c6;min-height:44px;}
.top-tabs .selected {color:#fff;}
.top-tabs .selected:after {background:var(--accent);width:22px;left:calc(50% - 11px);height:3px;}
.action-button.active {color:var(--accent);}
.avatar-circle {background:radial-gradient(circle at 30% 20%,#fff6ed,#efe1d7 58%,#c9afa5);color:#4d3438;box-shadow:0 2px 16px #0003;}
.media-caption .drama-open {color:#ffc3d2;border-color:#f0698c66;}
.playback input {accent-color:var(--accent-soft);}
.demo-badge,.caption-kicker {color:#e0e2dcaa;}
.primary-button {background:var(--accent-strong);color:#fff;border:1px solid #d2537733;box-shadow:0 5px 18px #a9285014;}
.quiet-button {color:#e0e1df;background:#ffffff06;border-color:var(--line);}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline-color:var(--accent-soft);}
.primary-button:disabled {box-shadow:none;}
.pure-navigation button,.focus-reveal {background:#222529ed;}
.toast,.admin-toast {background:#2b2d31f5;border-color:#ffffff20;color:var(--text);}
.bottom-sheet {background:linear-gradient(165deg,#25272b,#151719);}
.bottom-sheet header small,.sheet-body p {color:#b3b4b8;}
.state-lines,.template-card,.task-card,.content-card {background:#ffffff03;}
.state-lines span:last-child {color:#e4c9d1;}
.wait-orb .orb {background:radial-gradient(circle at 30% 25%,#f8eddb,#d6baaf 45%,#706362 75%);box-shadow:0 0 55px #dfbca312;}
.blocked-card {background:#191b1ef5;border-color:#ffffff24;}
.comparison blockquote {background:#191b1eee;}
.compare-divider:after,.comparison button {background:#2d3135;}

/* The JS pager owns transform, transition, and pointer handling. */
#channelViewport {position:absolute;inset:0;overflow:hidden;}
#channelTrack {display:flex;width:100%;height:100%;}
.channel-panel {position:relative;flex:0 0 100%;width:100%;height:100%;min-width:0;overflow:hidden;}
.channel-panel[data-channel=drama],.channel-panel[data-channel=square] {background:var(--bg);}
.catalog-page {position:relative;width:100%;height:100%;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:none;padding:var(--catalog-top) 16px var(--catalog-bottom);color:var(--text);-webkit-overflow-scrolling:touch;}
.catalog-page::-webkit-scrollbar,.catalog-categories::-webkit-scrollbar {display:none;}
.catalog-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 20px;}
.catalog-heading>div {min-width:0;}
.catalog-heading small {display:block;font-size:9px;font-weight:550;letter-spacing:.14em;color:#969da2;line-height:1.5;}
.catalog-heading h1 {font-size:25px;font-weight:620;letter-spacing:-.045em;line-height:1.25;margin:8px 0 0;}
.catalog-search {flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;max-width:130px;border:1px solid var(--line);border-radius:50%;color:#c3c7cb;font-size:12px;}
.catalog-search .icon {width:19px;height:19px;}
.catalog-categories {display:flex;gap:8px;align-items:center;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;white-space:nowrap;margin:0 -16px 17px;padding:0 16px;scrollbar-width:none;touch-action:pan-x;}
.catalog-categories button {min-height:44px;flex:0 0 auto;position:relative;padding:9px 13px;border:1px solid transparent;border-radius:11px;font-size:13px;font-weight:500;color:#abb0b6;background:#ffffff03;}
.catalog-categories :is(.selected,.active,[aria-pressed=true],[aria-current=page]) {background:var(--accent-tint);color:var(--accent-soft);border-color:#f0698c33;}
.catalog-banner {display:block;position:relative;width:100%;min-width:0;aspect-ratio:2.32;min-height:120px;border-radius:16px;overflow:hidden;text-align:left;background:#bdb5a5;margin:0 0 19px;padding:0;isolation:isolate;}
.catalog-banner>img {display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:cover;}
.catalog-banner:after {content:"";position:absolute;inset:0;background:linear-gradient(90deg,#e0d8c3f0,#e0d8c322 66%,transparent);z-index:-1;}
.catalog-banner>img {z-index:-2;}
.banner-copy {display:flex;position:relative;min-height:inherit;flex-direction:column;align-items:flex-start;justify-content:center;gap:9px;padding:18px;width:76%;color:#343d34;}
.banner-copy small {font-size:9px;letter-spacing:.045em;line-height:1.4;color:#53604f;}
.banner-copy strong {font-size:19px;font-weight:650;line-height:1.35;max-width:11em;letter-spacing:-.04em;}
.banner-copy>span {font-size:10px;line-height:1.4;color:#4c5848;}
.catalog-sorts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0;margin:4px 0 17px;}
.catalog-sorts button {min-height:44px;border-radius:24px;border:1px solid transparent;white-space:nowrap;padding:9px 5px;color:#adb2b7;font-size:12px;line-height:1.4;}
.catalog-sorts :is(.selected,.active,[aria-pressed=true],[aria-current=page]) {color:#ffd2de;border-color:#f0698c77;background:#f0698c0d;font-weight:600;}
.catalog-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:23px 12px;min-width:0;align-items:start;}
.square-card,.drama-card {display:block;width:100%;min-width:0;padding:0;text-align:left;color:var(--text);border-radius:12px;background:none;overflow:hidden;}
.square-card .poster-frame,.drama-card .poster-frame {display:block;position:relative;overflow:hidden;border-radius:12px;isolation:isolate;background:var(--surface-hi);}
.drama-card .poster-frame {aspect-ratio:2/3;}
.square-card .poster-frame {aspect-ratio:3/4;}
.poster-frame>img {display:block;width:100%;height:100%;object-fit:cover;position:absolute;inset:0;}
.poster-frame:after {content:"";position:absolute;inset:55% 0 0;background:linear-gradient(transparent,#0b111377);pointer-events:none;z-index:0;}
.heat-badge {position:absolute;left:9px;bottom:10px;z-index:1;display:flex;align-items:center;gap:3px;max-width:calc(100% - 18px);font-size:10px;font-weight:550;color:#fff;text-shadow:0 1px 5px #0006;line-height:1.4;}
.heat-badge .icon {width:12px;height:12px;}
.drama-card .media-duration {top:9px;bottom:auto;right:9px;padding:4px 6px;border-radius:5px;background:#0a101352;font-size:9px;}
.drama-title {display:block;margin:11px 0 6px;font-size:14px;line-height:1.45;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.02em;}
.drama-tags {display:block;font-size:10px;line-height:1.5;color:#9fa7aa;min-height:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.drama-tags>span {display:inline-block;margin-right:5px;}
.drama-tags>span:first-child:not(:only-child) {color:#b9c9c1;}
.work-title {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.65;font-weight:550;margin:9px 0 8px;letter-spacing:-.015em;}
.creator-line {display:flex;align-items:center;gap:6px;min-width:0;line-height:1.4;color:#a7afb2;}
.creator-avatar {display:block;flex:0 0 19px;width:19px;height:19px;border-radius:50%;object-fit:cover;background:#4a514c;}
.creator-name {display:block;min-width:0;font-size:10px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.media-duration,.media-stat {position:absolute;z-index:1;bottom:9px;font-size:10px;line-height:1.4;color:white;font-variant-numeric:tabular-nums;text-shadow:0 1px 5px #0006;}
.media-duration {right:9px;}
.media-stat {left:9px;display:flex;align-items:center;gap:3px;}
.media-stat .icon {width:12px;height:12px;}
.square-card.is-wide {grid-column:1/-1;}
.square-card.is-wide .poster-frame {aspect-ratio:16/9;}
.square-card.is-wide .work-title {font-size:15px;line-height:1.5;margin-top:11px;}
.square-card.is-wide .creator-line {gap:7px;}
.square-card.is-wide .creator-avatar {width:22px;height:22px;flex-basis:22px;}
.square-card.is-wide .creator-name {font-size:11px;}
.catalog-ad {grid-column:1/-1;display:block;position:relative;isolation:isolate;width:100%;min-height:116px;aspect-ratio:3/1;overflow:hidden;text-align:left;border:1px solid #ffffff13;border-radius:13px;background:#273a39;padding:0;color:#f1f0df;}
.catalog-ad>img {position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;z-index:-2;}
.catalog-ad:after {content:"";position:absolute;inset:0;background:linear-gradient(90deg,#203233ee,transparent);z-index:-1;}
.ad-label {position:absolute;z-index:1;top:10px;right:10px;border:1px solid #ebf1db66;border-radius:4px;background:#18282740;padding:2px 5px;color:#e3e8d6;font-size:9px;line-height:1.4;}
.ad-copy {display:flex;flex-direction:column;justify-content:center;gap:9px;min-height:116px;width:80%;padding:15px 17px;}
.ad-copy small {font-size:9px;line-height:1.4;color:#c0ccbf;}
.ad-copy strong {font-size:18px;letter-spacing:-.035em;font-weight:600;line-height:1.3;}
.ad-copy>span {font-size:10px;color:#d6ddc8;line-height:1.4;}
.catalog-section-title {display:flex;justify-content:space-between;align-items:center;margin:23px 0 15px;font-size:16px;font-weight:600;}
.catalog-section-title small {font-size:10px;color:var(--muted);font-weight:400;}

/* Messages always have a full, active navigation and a deliberate empty state. */
.message-tabs {display:flex;gap:6px;background:#101112fa;padding:10px 0 12px;border-bottom:1px solid var(--line);}
.message-tabs button {border-radius:0;color:#a6adb3;min-height:44px;position:relative;background:none;}
.message-tabs button.selected {color:var(--accent-soft);background:none;}
.message-tabs button.selected:after {content:"";position:absolute;bottom:0;left:calc(50% - 10px);width:20px;height:2px;background:var(--accent);border-radius:2px;}
.message-card {border:1px solid #ffffff13;border-radius:14px;background:#191b1e;margin:14px 0;}
.message-main {padding:18px;}
.message-main strong {font-size:14px;font-weight:580;line-height:1.5;color:#f4f3ef;display:block;}
.message-main small {font-size:11px;line-height:1.8;color:#a7aeb3;}
.message-main small:last-child {font-size:10px;color:#899198;margin-top:12px;}
.message-tools {border-top-color:#ffffff0c;}
.message-tools button {font-size:10px;color:#bac1c5;}
.message-tools button:first-child {color:#edb2c1;}
.message-card.is-read {background:#ffffff02;}
.message-card.is-read strong {color:#b8bdc1;}
.message-card .creator-avatar {width:36px;height:36px;}
.empty-state {margin:28px 0 0;padding:42px 18px 34px;text-align:center;border:1px solid #ffffff0e;border-radius:18px;background:#ffffff02;color:#a5adb2;line-height:1.8;font-size:13px;}
.empty-state .empty-icon {display:grid;place-items:center;margin:0 auto 23px;width:76px;height:76px;border:1px solid #ffffff1a;border-radius:24px;background:#202327;color:#b5bdc1;transform:rotate(-7deg);}
.empty-state .empty-icon .icon {width:30px;height:30px;transform:rotate(7deg);}
.empty-state h2 {font-size:19px;margin:0 0 12px;color:#e8eae5;font-weight:550;letter-spacing:-.02em;}
.empty-state p {font-size:12px;line-height:1.9;margin:0 auto 20px;color:#9ca5ab;max-width:24em;}
.empty-state .primary-button,.empty-state .quiet-button {min-height:44px;margin:6px 4px;padding:11px 18px;font-size:12px;}

/* Same visual language for operational controls; no consumer layout implied. */
.admin-body {background:#111315;}
.admin-header {background:#111315;}
.admin-header nav button.selected {border-color:var(--accent);}
.admin-notice {background:#f0698c07;color:#b9acb1;}
.preset-item.selected {background:#f0698c09;border-color:#f0698c55;}
.field {color:#aeb6bb;}
.field input,.field select,.field textarea,.component-row input[type=number],.component-row select,.component-extra input[type=text] {background:#1c1f22;color:#eceee8;border-color:#ffffff1a;}
.code-label {color:#899198;}
.component-row,.feedback {background:#ffffff02;}
.feedback {color:#b9c0c3;}
.advanced,.check-row {color:#b4bcc1;}
.advanced textarea,.admin-body pre {background:#0e1012;color:#b9c5c4;}
.preview-device {border-color:#ffffff24;}
.catalog-config-section {margin:23px 0;padding:20px;border:1px solid var(--line);border-radius:15px;background:#191b1e;}
.catalog-config-section h2 {font-size:16px;margin:0 0 16px;}
.catalog-config-section .field {margin:14px 0;}
.catalog-config-section .check-row {min-height:44px;margin:8px 0;}
.catalog-config-row {display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #ffffff0c;flex-wrap:wrap;}
.catalog-config-row input {min-width:0;max-width:100%;}
.catalog-config-row input[type=number] {max-width:75px;}
.catalog-config-note {font-size:11px;line-height:1.8;color:#99a3a9;}

@media(max-width:350px) {
  .catalog-page {padding-left:12px;padding-right:12px;}
  .catalog-heading h1 {font-size:23px;}
  .catalog-categories {margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px;gap:6px;}
  .catalog-grid {gap:20px 9px;}
  .catalog-banner {border-radius:13px;}
  .banner-copy {padding:15px;width:80%;}
  .banner-copy strong {font-size:17px;}
  .catalog-sorts {gap:3px;}
  .catalog-sorts button {font-size:11px;}
  .drama-title {font-size:13px;}
  .work-title {font-size:12px;}
  .creator-avatar {width:17px;height:17px;flex-basis:17px;}
  .creator-name {font-size:9px;}
  .ad-copy strong {font-size:16px;}
  .message-main {padding:15px;}
}
@media(max-height:600px) {
  :root {--catalog-top:86px;--catalog-bottom:94px;}
  .catalog-heading {margin-bottom:14px;}
  .catalog-heading h1 {font-size:23px;}
  .catalog-banner {min-height:110px;}
  .banner-copy {gap:7px;padding-top:14px;padding-bottom:14px;}
}
@media(prefers-reduced-motion:no-preference) {
  .catalog-categories button,.catalog-sorts button {transition:color .18s,background .18s,border-color .18s;}
  .square-card:active .poster-frame,.drama-card:active .poster-frame {transform:scale(.985);transition:transform .18s;}
}
/* ENG-003 integration additions, based on actual catalog.mjs markup.
   Panel is the sole vertical scroll owner so per-channel scrollTop persists. */
.channel-panel:not(.recommend-panel) {overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:none;}
.catalog-page {height:auto;min-height:100%;overflow:visible;}
.catalog-heading .eyebrow {font-size:8px;letter-spacing:.12em;margin:0;line-height:1.5;}
.catalog-count {font-size:9px;line-height:1.7;color:#9ba4aa;white-space:nowrap;}
.catalog-heading>.quiet-button {font-size:11px;padding:10px 12px;min-height:42px;white-space:nowrap;}
label.catalog-search,form.catalog-search {width:100%;max-width:none;min-height:48px;justify-content:flex-start;gap:10px;border:1px solid #ffffff18;border-radius:24px;padding:2px 5px 2px 14px;margin:0 0 14px;background:#1c1f22;color:#b8c0c6;}
.catalog-search .catalog-search-icon {width:22px;height:22px;flex:0 0 22px;}
.catalog-search input {display:block;flex:1;min-width:0;width:0;height:44px;color:#e7e9e5;font-size:16px;border:0;background:none;outline-offset:0;}
.catalog-search input::placeholder {color:#818d94;}
.catalog-search .catalog-search-submit {position:relative;isolation:isolate;flex:0 0 auto;min-width:64px;min-height:44px;padding:8px 14px;border:0;border-radius:22px;background:transparent;color:#253039;font-size:13px;font-weight:600;line-height:1.4;}
.catalog-search .catalog-search-submit:before {content:"";position:absolute;inset:4px 0;z-index:-1;border-radius:18px;background:radial-gradient(ellipse at 20% 50%,#ffdece9c,transparent 60%),radial-gradient(ellipse at 85% 50%,#b8f4fcbd,transparent 65%),#f8faf9;}
form.catalog-search.flow-surface {border-radius:24px;box-shadow:inset 0 1px #ffffff06;}
form.catalog-search.flow-surface .flow-input {border:0!important;border-radius:0;outline:none!important;box-shadow:none!important;background:transparent!important;}
form.catalog-search:focus-within {outline:1px solid #c5d4dc50!important;outline-offset:0;border-color:#c5d4dc50!important;}
.catalog-intro {font-size:11px;color:#a0a8ad;line-height:1.8;margin:-8px 0 23px;}
.catalog-banner {background:#d2c9b8;}
.catalog-banner>img {object-position:70% 40%;opacity:.8;width:58%;left:auto;right:0;}
.catalog-banner:after {background:linear-gradient(90deg,#d8d0bff7,#d8d0bfcc 45%,transparent 85%);}
.banner-copy {min-height:120px;width:80%;}
.episode-count {position:absolute;top:9px;right:9px;z-index:1;display:block;padding:4px 6px;border-radius:5px;background:#0a101352;font-size:9px;line-height:1.4;color:#fff;}
.wide-label {position:absolute;left:9px;top:9px;z-index:1;padding:4px 6px;border-radius:5px;background:#17232177;font-size:9px;line-height:1.4;color:#e6eee2;}
.square-card>.media-stat {display:block;position:static;margin-top:7px;font-size:9px;line-height:1.4;color:#818c94;text-shadow:none;}
span.creator-avatar {display:grid;place-items:center;font-size:10px;background:#c9c6b1;color:#3e5047;}
.square-card:nth-child(3n+2) span.creator-avatar {background:#b7c8c7;color:#3b555f;}
.square-card:nth-child(3n) span.creator-avatar {background:#cdbeb0;color:#63483f;}
.catalog-ad>div:not(.ad-copy) {padding:25px 18px 18px;max-width:82%;min-height:116px;display:flex;justify-content:center;flex-direction:column;gap:8px;}
.catalog-ad>div:not(.ad-copy)>strong {font-size:17px;line-height:1.4;letter-spacing:-.025em;font-weight:550;}
.catalog-ad>div:not(.ad-copy)>p {font-size:9px;color:#bdcdc0;line-height:1.5;margin:0;}
.catalog-ad .ad-mark {position:absolute;right:18px;bottom:13px;font-size:26px;font-weight:400;letter-spacing:.1em;color:#a5b9a16b;}
.catalog-grid>.empty-state {grid-column:1/-1;}
.catalog-config-row label.catalog-config-row {border:0;margin:0;}
@media(max-width:350px) {.catalog-heading h1{font-size:21px}.catalog-count{font-size:8px}.catalog-heading>.quiet-button{font-size:10px;padding:8px}.catalog-ad>div:not(.ad-copy)>strong{font-size:15px}.catalog-banner .banner-copy strong{font-size:16px}}
/* Shared translucent background for the top navigation in all three channels. */
.feed-header::before {
  content:"";position:absolute;z-index:-1;pointer-events:none;
  left:-18px;right:-18px;top:calc(-22px - env(safe-area-inset-top,0px));bottom:-6px;
  background:rgba(16,17,18,0.2);border-bottom:1px solid #ffffff08;
}
.bottom-nav {background:#101112;}
@supports(overflow:clip) {#channelViewport,.phone {overflow:clip;}}
@media(max-height:600px) {
  .feed-header::before {top:-16px;bottom:-10px;}
}

/* UI-011 · reviewed public media; these cards use actual published image/video bytes. */
.public-works-section {padding:0 0 25px;margin:0 0 25px;border-bottom:1px solid #ffffff16;min-width:0;}
.public-works-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-width:0;margin:0 0 14px;}
.public-works-heading h2 {font-size:17px;font-weight:550;line-height:1.7;color:#f0eeeb;margin:0;overflow-wrap:anywhere;min-width:0;}
.public-works-section>.public-work-status {font-size:11px!important;line-height:1.9!important;overflow-wrap:anywhere;}
.public-work-card {min-width:0;}
.public-work-card .poster-frame {border:1px solid #ffffff18;background:#17191c;aspect-ratio:var(--public-work-ratio,3/4);}
.public-work-card .poster-frame>:is(img,video) {position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:#101214;}
.public-work-kind {display:inline-flex;align-items:center;max-width:100%;padding:4px 7px;border:1px solid #f2b5c530;border-radius:6px;background:#281c23eb;color:#f4c1cf;font-size:10px;font-weight:500;line-height:1.6;overflow-wrap:anywhere;}
.poster-frame>.public-work-kind {position:absolute;z-index:1;top:8px;left:8px;max-width:calc(100% - 16px);}
.public-work-card .work-title {font-size:13px;line-height:1.7;overflow-wrap:anywhere;}
.public-work-card .creator-line {flex-wrap:wrap;gap:6px;}
.public-work-card .creator-name {font-size:11px;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
.public-official-avatar {background:#d8b9c3!important;color:#613744!important;border:1px solid #edc4d155;font-size:10px;}
.public-work-review {display:inline-flex;align-items:center;min-width:0;padding:2px 5px;border:1px solid #c3cfbc2b;border-radius:4px;color:#bfcebb;background:#c3cfbc07;font-size:9px;line-height:1.6;overflow-wrap:anywhere;}
.public-work-caption {display:block;color:#a7afb5;font-size:10px;line-height:1.8;overflow-wrap:anywhere;margin:8px 0 0;}
.public-work-card:focus-visible {outline:2px solid #ffb6c9;outline-offset:4px;}
.public-work-player .media-layer>:is(img,video)[data-role=current] {object-fit:contain!important;background:#101112;}
.public-work-player .demo-badge {max-width:calc(100% - 40px);font-size:10px;line-height:1.7;color:#e8dce1;overflow-wrap:anywhere;}
.public-work-player .media-caption h2 {font-size:24px;line-height:1.5;overflow-wrap:anywhere;}
.public-work-player .media-caption p {font-size:11px;line-height:1.8;overflow-wrap:anywhere;}
.phone:has(.public-work-player[data-public-state=ready]) .reminder-dock {display:none;}
@media(max-width:350px){.public-work-card .work-title{font-size:12px}.public-work-card .creator-name{font-size:10px}.poster-frame>.public-work-kind{top:6px;left:6px;max-width:calc(100% - 12px)}}

/* UI-016 · compare exit follows the existing handle; clamp only the exit button near the edges. */
.comparison {--compare-handle-top:45%;--compare-handle-size:36px;--compare-exit-gap:50px;--compare-exit-width:min(112px,calc(100% - 16px));}
.comparison .compare-divider:after {top:var(--compare-handle-top);left:calc(var(--compare-handle-size) / -2);width:var(--compare-handle-size);height:var(--compare-handle-size);}
.comparison #closeCompare {position:absolute;top:calc(var(--compare-handle-top) + var(--compare-handle-size) + var(--compare-exit-gap));left:clamp(8px,calc(var(--split,50%) - var(--compare-exit-width) / 2),calc(100% - var(--compare-exit-width) - 8px));right:auto;bottom:auto;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:var(--compare-exit-width);min-width:0;min-height:44px;padding:11px 14px;border:0;border-radius:12px;background:var(--lavender,#b9afd1);color:#292331;font-size:13px;font-weight:600;line-height:1.5;box-shadow:0 4px 18px #0004;pointer-events:auto;}

/* R45 · collection and per-work failures remain visible beside retained cards. */
.public-works-section .public-works-feedback {display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin:0 0 16px;}
.public-works-section .public-works-feedback.has-error {padding:0;border:0;background:none;color:#dfc4a2;}
.public-works-section .public-works-feedback>.public-work-status {flex:1;min-width:0;font-size:12px;line-height:1.7;margin:0;overflow-wrap:anywhere;color:inherit;}
.public-works-section .public-work-retry {flex:0 0 auto;min-height:44px;min-width:72px;max-width:45%;padding:9px 12px;font-size:12px;line-height:1.5;white-space:normal;word-break:normal;overflow-wrap:anywhere;border-radius:9px;color:#ead6b9;border-color:#dfb47c35;}
.public-works-section .public-work-retry:disabled {opacity:.55;cursor:wait;}

/* R53 · configurable promotion images stay in img elements, never CSS URLs. */
.catalog-banner>.catalog-promotion-image {width:100%;left:0;right:0;object-fit:cover;object-position:center;opacity:1;}
.catalog-banner:after {background:linear-gradient(90deg,#e0d8c3f7 0%,#e0d8c3df 55%,#e0d8c355 100%);}
.catalog-ad {text-decoration:none;}
.catalog-ad:after {background:linear-gradient(90deg,#172323ed 0%,#172323bd 60%,#17232350 100%);}
.catalog-ad .ad-copy {min-width:0;max-width:100%;}
.catalog-ad .ad-copy>* {overflow-wrap:anywhere;}
.catalog-promotion-image[hidden] {display:none!important;}
.catalog-banner:focus-visible,.catalog-ad:focus-visible {outline:2px solid var(--accent-soft,#ffd2de);outline-offset:3px;}
.public-works-feedback-copy {flex:1;min-width:0;}
.public-works-feedback-copy>.public-work-status {font-size:12px;line-height:1.7;margin:0;overflow-wrap:anywhere;color:inherit;}
.public-work-failure-reason {font-size:10px;line-height:1.6;margin:4px 0 0;color:#b6a38b;overflow-wrap:anywhere;}

/* Full-image advertisements keep their intrinsic ratio, including slim banners. */
.catalog-banner[data-presentation="image"],.catalog-ad[data-presentation="image"] {aspect-ratio:auto;min-height:0;height:auto;line-height:0;}
.catalog-banner[data-presentation="image"]>.catalog-promotion-image,.catalog-ad[data-presentation="image"]>.catalog-promotion-image {position:relative;inset:auto;display:block;width:100%;height:auto;object-fit:contain;opacity:1;z-index:0;}
.catalog-banner[data-presentation="image"]:after,.catalog-ad[data-presentation="image"]:after,.catalog-banner[data-presentation="image"]>.banner-copy,.catalog-ad[data-presentation="image"]>.ad-copy {display:none;}
.catalog-ad[data-presentation="image"]>.ad-label {z-index:2;line-height:1.4;}

.catalog-banner[data-presentation="image"] {border:0;}
