/* Layout: the website's existing decorative grid track and Terra host dimensions. */
.tc-artwork-host { position:relative; grid-column:2; grid-row:1; width:100%; max-width:380px; aspect-ratio:1.3; justify-self:end; min-width:0; overflow:hidden; isolation:isolate; pointer-events:none; user-select:none; }
.tc-artwork-host[data-tc-page="lander"] { max-width:250px; }
.tc-artwork-host[hidden], .tc-artwork-preview[hidden] { display:none; }
/* Components: previews share the portable runtime without affecting Admin geometry. */
.tc-artwork-preview { width:100%; height:180px; overflow:hidden; isolation:isolate; pointer-events:none; }
.tc-artwork-assignment { min-width:0; }
.tc-artwork-assignment .fields { align-items:start; }
.tc-artwork-catalog { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:18px; }
.tc-artwork-catalog article { min-width:0; }
.tc-artwork-details { overflow-wrap:anywhere; }
.tc-artwork-assignment output { display:block; }
/* Admin components: compact destinations, decorative live thumbnails and picker. */
.portfolio-admin .tc-artwork-thumbnail { width:100%; height:220px; max-height:220px; min-height:0; background:#dce2de; overflow:hidden; isolation:isolate; pointer-events:none; user-select:none; }
.portfolio-admin :is(.tc-artwork-thumbnail,.tc-artwork-preview,.tc-canvas-viewer-art)[data-tc-ready="failed"] { display:flex; align-items:center; justify-content:center; box-sizing:border-box; padding:8px; color:var(--text-secondary); background:var(--surface-muted); text-align:center; font-size:var(--admin-font-small); }
.portfolio-admin .tc-card-actions { display:flex; flex-wrap:wrap; gap:8px; }
.portfolio-admin .tc-destination { padding:16px; }
.portfolio-admin .tc-destination > summary { display:flex; align-items:center; gap:16px; cursor:pointer; list-style:revert; }
.portfolio-admin .tc-destination > summary strong { min-width:90px; }
.portfolio-admin .tc-destination > summary > [data-tc-row-summary] { flex:1; overflow-wrap:anywhere; }
.portfolio-admin .tc-row-thumbnail { width:132px; flex-shrink:0; }
.portfolio-admin .tc-row-thumbnail .tc-artwork-thumbnail { height:88px; max-height:88px; }
.portfolio-admin .tc-change-thumbnail { display:block; width:120px; margin:8px 0; }
.portfolio-admin .tc-change-thumbnail .tc-artwork-thumbnail { height:80px; max-height:80px; }
.portfolio-admin .tc-selected-canvas { display:flex; align-items:center; gap:20px; margin:16px 0; }
.portfolio-admin .tc-selected-canvas .tc-artwork-preview { width:min(420px,50%); height:240px; max-height:35vh; flex-shrink:0; background:#dce2de; }
.portfolio-admin .tc-draft-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; position:sticky; bottom:12px; padding:16px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--surface-raised); z-index:5; }
.portfolio-admin .tc-draft-actions p { flex:1; margin:0; }
.portfolio-admin .tc-canvas-picker { box-sizing:border-box; width:min(960px,calc(100% - 24px)); max-width:calc(100% - 24px); max-height:85vh; padding:20px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--surface-raised); color:var(--text-primary); overflow:auto; }
.portfolio-admin .tc-canvas-picker::backdrop { background:rgb(0 0 0 / .55); }
.portfolio-admin .tc-canvas-picker header { display:flex; gap:16px; justify-content:space-between; align-items:center; }
.portfolio-admin .tc-canvas-option { display:flex; flex-direction:column; gap:8px; width:100%; min-width:0; padding:16px; background:transparent; color:inherit; border:1px solid var(--border-subtle); border-radius:10px; text-align:left; cursor:pointer; overflow-wrap:anywhere; }
.portfolio-admin .tc-canvas-option[aria-pressed="true"] { outline:3px solid var(--green,currentColor); outline-offset:-3px; }
.portfolio-admin :is(.tc-canvas-option,.tc-destination summary):focus-visible { outline:3px solid var(--green,currentColor); outline-offset:3px; }
.portfolio-admin [data-tc-canvas-controls][hidden], .portfolio-admin [data-tc-filter][hidden] { display:none; }
@media(max-width:600px) {
  .portfolio-admin .tc-destination > summary { gap:8px; flex-wrap:wrap; }
  .portfolio-admin .tc-destination > summary > [data-tc-row-summary] { flex-basis:50%; }
  .portfolio-admin .tc-selected-canvas { flex-wrap:wrap; }
  .portfolio-admin .tc-selected-canvas .tc-artwork-preview { width:100%; }
  .portfolio-admin .tc-draft-actions { bottom:0; }
}
/* Responsive: all public Canvas hosts follow site.css's shared 860px stack.
   The server emits this host identity only for Canvas; Admin/Legacy are separate. */
@media(max-width:860px) {
  body:not(.portfolio-admin) .tc-artwork-host[data-tc-page] { display:none; }
}
