/* Shared type, scale and navigation */
:root {--page:1320px; --reading-ink:var(--muted); --control:35px; --curve:8px}
.site-main {padding-top:clamp(18px,2vw,30px)}
.gallery-head h1 {font-size:clamp(27px,2.4vw,38px);line-height:1.12;letter-spacing:-.05em}
.gallery-head p {font-size:13px;margin-top:7px}
/* The compact rail keeps the same navigation and tab order as the expanded one. */
:root {--rail-width:68px}
.app-rail {gap:8px;padding-top:10px}
.rail-toggle {
  position:absolute;top:18px;right:-11px;z-index:1;display:grid;place-items:center;
  width:23px;height:25px;padding:0;border:1px solid var(--line);border-radius:7px;
  color:var(--muted);background:var(--bg)
}
.rail-toggle:hover,.rail-toggle:focus-visible {color:var(--strong);background:var(--raised)}
.rail-toggle .ico {width:15px;height:15px}
.rail-links {gap:4px;padding-block:3px 6px}
.rail-heading {width:22px;margin:4px auto;min-height:1px;flex:none;background:var(--line);height:1px;overflow:hidden;font-size:0}
:root:not([data-rail=open]) .rail-heading:first-child {display:none}
.app-rail .rail-btn {width:42px;height:42px;flex:none;color:var(--muted);border-radius:11px}
.app-rail .rail-btn .ico {width:21px;height:21px}
:root:not([data-rail=open]) .rail-btn small {display:none}
.app-rail .rail-compose {color:var(--accent-text);background:var(--accent)}
.app-rail .rail-btn[aria-current],.app-rail .rail-selected,.rail-links:has(#product-topics:popover-open) #open-products {
  color:var(--strong);background:var(--selected);box-shadow:none
}
.rail-avatar {
  width:25px;height:25px;flex:none;display:grid;place-items:center;
  border-radius:50%;background:var(--selected);color:var(--strong);font:650 12px/1 Inter,sans-serif
}
.app-rail .rail-avatar .ico {width:16px;height:16px}
.rail-hint {
  position:fixed;left:calc(var(--rail-width) + 7px);max-width:min(240px,calc(100vw - var(--rail-width) - 18px));
  overflow-wrap:anywhere;z-index:2;padding:5px 9px;border-radius:6px;background:var(--strong);color:var(--bg);
  font:550 12px/1.45 Inter,sans-serif;pointer-events:none
}
:root[data-rail=open] .rail-hint {display:none}
:root[data-rail=open] .rail-toggle .ico {transform:scaleX(-1)}
:root[data-rail=open] .app-rail {width:190px;align-items:stretch;padding:12px 9px 9px;gap:4px}
:root[data-rail=open] .rail-brand {margin-left:3px}
:root[data-rail=open] .rail-toggle {top:19px;right:12px}
:root[data-rail=open] .rail-heading {width:auto;align-self:stretch;height:auto;background:none;margin:11px 10px 3px;color:var(--muted);font:600 11px/1.4 Inter,sans-serif}
:root[data-rail=open] .rail-btn {flex-direction:row;justify-content:flex-start;gap:11px;padding:0 12px;height:36px;width:100%}
:root[data-rail=open] .rail-btn small {font-size:12.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis}
:root[data-rail=open] .rail-links,:root[data-rail=open] .rail-account {align-items:stretch}
:root[data-rail=open] .rail-account::before {width:100%}
:root[data-rail=open] .rail-links hr {margin:8px 0;width:100%}
@media (hover:hover) {
  .app-rail .rail-btn:hover {color:var(--strong);background:var(--selected)}
  .app-rail .rail-compose:hover {background:color-mix(in srgb,var(--accent) 90%,var(--muted));color:var(--accent-text)}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .app-rail .rail-btn,.rail-toggle {transition:color 140ms ease,background-color 140ms ease}
  .rail-btn > .ico,.rail-avatar {transition:transform 140ms ease}
  .rail-btn:hover > .ico,.rail-btn:hover .rail-avatar {transform:translateY(-1px)}
}
@media(max-width:636px){
  :root {--rail-width:53px}
  .rail-toggle {top:16px;right:-7px;width:19px;height:24px}
  .app-rail .rail-btn {width:40px;height:40px}
}
.create-flyout {inset:clamp(70px,16vh,136px) auto auto calc(var(--rail-width) + 10px);width:min(248px,calc(100vw - var(--rail-width) - 18px))}
.create-flyout nav {display:grid;gap:3px}
.create-flyout a {display:flex;align-items:center;gap:11px;padding:9px 8px;border-radius:5px}
.create-flyout a:hover,.create-flyout a:focus-visible {background:var(--raised)}
@media(min-width:761px){:root[data-rail=open] {--rail-width:190px}}
@media(max-width:760px){:root[data-rail=open] .app-rail {box-shadow:12px 0 32px #0003} :root[data-rail=open] #product-topics {left:min(197px,25vw);top:13dvh}}
/* Product cards use the same structure in both views. */
.cover-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:26px clamp(12px,1.4vw,22px)}
.gallery-item {min-width:0}
.gallery-cover,.gallery-item .gallery-cover {aspect-ratio:2/1;border-radius:var(--curve)}
.gallery-info {padding:11px 1px 0;display:flex;flex-direction:column;flex:1;min-width:0}
.card-context,.license-line {display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.card-context {margin-bottom:4px;font-weight:510}
.card-context span[aria-hidden] {color:var(--faint)}
.card-context a:hover,.creator-link:hover {text-decoration:underline;text-underline-offset:3px}
.gallery-name h2 {font-size:clamp(17px,1.45vw,22px);line-height:1.22;letter-spacing:-.045em;font-weight:675;overflow-wrap:anywhere}
.gallery-price {font:610 12px Inter,sans-serif;color:var(--strong);text-align:right;white-space:normal;line-height:1.3}
.gallery-info > p {font-size:13px;line-height:1.55;margin:6px 0 8px;color:var(--reading-ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.license-line {margin-top:auto;min-height:19px}
.license-line .ico {width:13px;height:13px}
.gallery-info footer {margin-top:8px;padding-top:7px;align-items:center;gap:5px}
.creator-link {display:inline-flex;align-items:center;gap:6px;min-width:0;font-size:12px;font-weight:550;color:var(--strong);overflow-wrap:anywhere}
.creator-link > span,.creator-avatar {display:grid;place-items:center;background:var(--raised);border-radius:50%;font-weight:650}
.creator-link > span {width:22px;height:22px;font-size:10px}
.gallery-info footer .action {min-height:30px;min-width:29px;gap:3px;font-variant-numeric:tabular-nums;border-radius:5px}
.gallery-info footer .action:hover,.action:focus-visible,.card-tools .is-on {background:var(--raised);color:var(--strong)}
.view-switch {display:flex;margin-left:auto;gap:2px;padding:2px;background:var(--raised);border-radius:6px}
.view-switch button {width:31px;height:27px;display:grid;place-items:center;color:var(--muted);border-radius:4px}
.view-switch .ico {width:15px;height:15px}
.view-switch [aria-pressed=true] {background:var(--surface);color:var(--strong)}
.gallery-count {min-height:31px;margin:9px 0 12px}
.reset-filters {text-decoration:underline;text-underline-offset:3px;margin-left:5px}
.cover-grid[data-view=list] {grid-template-columns:1fr;gap:0}
.cover-grid[data-view=list] .gallery-item {display:grid;grid-template-columns:minmax(120px,21%) minmax(0,1fr);align-items:center;gap:clamp(12px,2vw,26px);padding:14px 0;border-top:1px solid var(--hair)}
.cover-grid[data-view=list] .gallery-info {padding:0}
.cover-grid[data-view=list] .gallery-info footer {border:0;padding-top:0}
.cover-pending::after {content:"";position:absolute;inset:0;background:var(--raised);animation:market-pulse 1.2s ease-in-out infinite alternate}
@keyframes market-pulse {to{background:var(--selected)}}
@media(max-width:1000px){.cover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.cover-grid{grid-template-columns:minmax(0,1fr)}.cover-grid[data-view=list] .gallery-item{grid-template-columns:minmax(69px,26%) minmax(0,1fr);align-items:start}.cover-grid[data-view=list] .gallery-price{font-size:11px}.gallery-options{flex-wrap:wrap}.gallery-head{padding-top:0}.browse-types{padding-bottom:10px}.gallery-toolbar{margin:10px 0 0}.card-context{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.cover-pending::after {animation:none}}
/* Product detail, editor and private collections */
.detail-page {max-width:900px}
.product-sections {display:flex;flex-wrap:wrap;gap:8px 18px;margin:18px 0;padding:10px 0;border-block:1px solid var(--hair)}
.product-sections a,.detail-link,.collection-remove button {font-size:13px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.shot-main {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:thin}
.shot-main figure {margin:0;flex:0 0 100%;min-width:0;scroll-snap-align:start}
.shot-main img {display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:var(--raised);border-radius:8px}
.shot-main figcaption {padding:6px 0;font-size:12px;color:var(--muted)}
.shot-gallery nav {display:flex;gap:5px;justify-content:flex-end}
.shot-gallery nav a {display:grid;place-items:center;min-width:32px;min-height:28px;border-radius:4px;background:var(--raised);color:var(--muted)}
.shot-gallery [aria-current=true] {background:var(--accent);color:var(--accent-text)}
.product-specs {display:grid;grid-template-columns:1fr 1fr;gap:10px 28px;margin:18px 0}
.product-specs:empty {display:none}
.product-specs section {padding:12px 0;border-top:1px solid var(--hair)}
.product-specs h2,#demo h2 {font-size:17px;margin:0 0 6px;letter-spacing:-.025em}
.product-specs p,.product-specs ul {font-size:14px;line-height:1.65;color:var(--muted);margin:0;overflow-wrap:anywhere}
.product-specs ul {padding-left:19px}
.product-specs #changes {grid-column:1/-1}
#demo {margin:20px 0}
.product-profile .facts {justify-content:flex-start}
.product-profile .facts .primary,.product-profile .facts > form {margin-left:0}
.creator-fields {border:0;border-top:1px solid var(--hair);padding:12px 0 5px;margin:5px 0;display:grid;gap:13px;min-width:0}
.creator-fields legend {padding-right:12px;font-size:16px;font-weight:650}
.creator-fields input[type=checkbox] {width:auto}
.creator-profile {align-items:center;justify-content:flex-start}
.creator-avatar {width:48px;height:48px;flex:none;font-size:21px}
.collection-create,.collection-index>div,.collection-index a {display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.collection-create {align-items:flex-end;margin:12px 0 22px}
.collection-create label {min-width:0;max-width:360px;flex:1 1 240px}
.collection-index>div {border-top:1px solid var(--line);padding:14px 0;justify-content:space-between}
.collection-index small {color:var(--muted)}
.collection-remove {margin-top:6px}
@media(max-width:620px){.product-specs{grid-template-columns:1fr}.product-profile .facts{gap:7px}}

.product-profile {padding:clamp(12px,1.8vw,24px);border-radius:var(--curve)}
.product-profile .product-distribution {align-items:flex-start;flex-direction:column;gap:12px}
.product-terms,.distribution-actions {display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px}
.product-terms {font-size:13px;color:var(--muted)}
.product-terms a {color:var(--strong);text-decoration:underline;text-underline-offset:3px}
.distribution-actions .primary,.distribution-actions .secondary {white-space:normal}
.gallery-item.card {display:flex;flex-direction:column}
.gallery-cover {flex-shrink:0}
.creator-link > span {flex-shrink:0}
@media(max-width:680px) {
  .browse-types {flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;scroll-padding-inline:6px;padding:4px 2px 8px}
  .browse-types a {white-space:nowrap;flex:none;padding-inline:11px}
  .gallery-toolbar {gap:6px}
  .gallery-count {margin:5px 0 8px}
  .gallery-options .secondary,.sort-form select,.view-switch button {min-height:34px}
  .cover-grid[data-view=list] .gallery-info footer {align-items:flex-start;row-gap:4px}
  .cover-grid[data-view=list] .gallery-info footer .action {min-width:32px}
  .gallery-head {gap:8px;padding-bottom:10px}
  .gallery-head p {line-height:1.45}
}
@media(max-width:636px) {
  .gallery-info footer .action {min-height:34px;min-width:30px}
}

.gallery-filters .filter-field {flex:1 1 130px;min-width:0}
.gallery-filters .filter-field label {display:block}
