/* One presentation contract for the account workspace and the public demo.
   The two roots own their layout; components below own their typography,
   surfaces and control geometry. No demo-specific palette or widget rules. */
:is(#shell,.demoLayout).collectionWorkspace {
  --workspace-action-height:2rem;
  --workspace-action-pad:5px;
  --workspace-action-text:.8125rem;
  --workspace-action-weight:600;
  --workspace-action-radius:var(--kogi-control-radius,.5rem);
  --workspace-label:.8125rem;
  --workspace-field-text:.875rem;
  color:var(--ink,#202b3e);
  font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:16px;
  font-weight:400;
  line-height:1.5;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionMain {min-width:0}
.collectionWorkspace[hidden],.collectionWorkspace [hidden] {display:none!important}

/* Page heading and ordinary content panels. */
:is(#shell,.demoLayout).collectionWorkspace .collectionWorkspaceHeader {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:16px;margin:0 0 20px;padding:0;border:0;border-radius:0;
  background:transparent;box-shadow:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionWorkspaceHeader :is(h1,[data-ui=workspace-title]) {
  margin:8px 0 0;color:var(--ink,#202b3e);font-size:32px;
  font-weight:550;line-height:1.25;letter-spacing:-.025em;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionPanel {
  min-width:0;margin:22px 0 0;padding:24px;
  border:1px solid var(--line,#e1e6ee);border-radius:20px;
  background:var(--surface,#fff);color:var(--ink,#202b3e);
  box-shadow:0 2px 6px #101b3004;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionPanel h2 {
  margin:0 0 12px;color:var(--ink,#202b3e);font-size:21px;
  font-weight:550;line-height:1.25;letter-spacing:-.025em;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionPanel>p {
  color:var(--muted,#667287);font-size:16px;line-height:1.6;
}

:is(#shell,.demoLayout).collectionWorkspace .collectionPanel .panelHead {display:flex;justify-content:space-between;gap:20px;min-width:0}
:is(#shell,.demoLayout).collectionWorkspace .collectionPanel .panelHead p {margin:0;color:var(--muted,#667287);font-size:13px;line-height:1.6}

/* The same three summary cards in both entry points. */
:is(#shell,.demoLayout).collectionWorkspace .collectionStats {
  display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:16px;
  min-width:0;margin:0;padding:0;border:0;background:transparent;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat.stat {
  display:block;min-width:0;margin:0;padding:22px 24px;
  border:1px solid var(--line,#e1e6ee);border-radius:20px;
  background:var(--surface,#fff);color:var(--ink,#202b3e);
  box-shadow:0 2px 6px #101b3004;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat.primary {
  background:var(--surface-raised,#edf2fc);
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=label] {
  display:block;margin:0;color:var(--muted,#667287);
  font-size:13px;font-weight:400;line-height:1.5;letter-spacing:normal;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=value] {
  display:block;margin:14px 0 10px;color:var(--ink,#202b3e);
  font-size:clamp(30px,3vw,42px);font-weight:700;line-height:1.25;
  letter-spacing:-.025em;overflow-wrap:anywhere;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat.primary>[data-ui=value] {
  color:var(--accent,var(--green,#315ddb));
}
:is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=detail] {
  display:block;margin:0;color:var(--muted,#667287);
  font-size:12px;font-weight:400;line-height:1.7;letter-spacing:normal;
}

/* Only the workspace navigation items, not the page header or mobile dock. */
:is(#shell,.demoLayout).collectionWorkspace .collectionSidebar nav {
  display:grid;gap:6px;align-content:start;margin:24px 0 0;padding:4px;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionNavItem {
  display:flex;align-items:center;justify-content:flex-start;gap:10px;
  min-width:0;min-height:48px;margin:0;padding:12px;
  border:1px solid transparent;border-radius:12px;background:transparent;
  color:var(--muted,#667287);font-family:inherit;font-size:16px;
  font-weight:500;line-height:20px;text-align:left;text-decoration:none;
  white-space:normal;overflow-wrap:anywhere;box-sizing:border-box;
  box-shadow:none;cursor:pointer;filter:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionNavItem:is(.active,[aria-current=page]) {
  border-color:var(--line,#e1e6ee);background:var(--surface-raised,#edf2fc);
  color:var(--accent,var(--green,#315ddb));font-weight:600;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionNavItem:hover:not(.active):not([aria-current=page]) {
  background:var(--surface-inset,#f3f6fa);filter:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionNavItem .navIcon {
  display:block;flex:0 0 18px;width:18px;height:18px;
  margin:0;align-self:center;pointer-events:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionNavItem .navLabel {
  display:block;min-width:0;color:inherit;font:inherit;
  line-height:20px;white-space:normal;overflow-wrap:break-word;pointer-events:none;
}

/* The private app keeps its existing viewport positioning; the demo dock is
   confined to its own frame. Only appearance and item geometry are shared. */
:is(#shell,.demoLayout).collectionWorkspace .collectionMobileNav {display:none}

/* Header actions use the same control contract in both workspaces. */
:is(#shell,.demoLayout).collectionWorkspace .collectionButton{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--workspace-action-height);max-width:100%;padding:var(--workspace-action-pad) 12px;border:1px solid #315ddb;border-radius:var(--workspace-action-radius);font-family:inherit;font-size:var(--workspace-action-text);font-weight:var(--workspace-action-weight);line-height:20px;letter-spacing:normal;white-space:normal;overflow-wrap:anywhere;background:#315ddb;color:#fff;cursor:pointer;box-shadow:none}
:is(#shell,.demoLayout).collectionWorkspace .collectionButton.secondary{background:var(--surface-inset,#f3f6fa);color:var(--ink,#202b3e);border-color:var(--line,#e1e6ee)}
:is(#shell,.demoLayout).collectionWorkspace .collectionButton:focus-visible{outline:3px solid var(--accent,var(--green,#315ddb));outline-offset:3px}
:is(#shell,.demoLayout).collectionWorkspace .collectionButton:disabled{opacity:.5;cursor:not-allowed}
/* Wrap whole actions onto another row before breaking their labels. */
:is(#shell,.demoLayout).collectionWorkspace :is(.collectionHeaderTools,.selectionToolbar) > button {
  flex:0 1 auto;width:auto;max-width:100%;
}
/* Toolbar controls share dimensions without relying on their IDs. */
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar.toolbar {
  display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));
  align-items:stretch;gap:12px;min-width:0;margin:0 0 12px;padding:0;
  border:0;background:transparent;box-shadow:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar :is(input,select,button),
:is(#shell,.demoLayout).collectionWorkspace .collectionStat :is(button,a.button) {
  box-sizing:border-box;min-width:0;max-width:100%;margin:0;border:1px solid var(--line,#e1e6ee);
  border-radius:10px;font-family:inherit;font-size:var(--workspace-field-text);font-weight:400;
  line-height:20px;letter-spacing:normal;
  background:var(--surface,#fff);color:var(--ink,#202b3e);
  box-shadow:0 1px 2px #22334a03;
}
/* Dashboard links and collection controls serve different layouts. */
:is(#shell,.demoLayout).collectionWorkspace .collectionStat :is(button,a.button) {
  min-height:44px;padding:9px 14px;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar :is(input,select,button) {
  min-height:var(--workspace-action-height);padding:var(--workspace-action-pad) 12px;
  border-radius:var(--workspace-action-radius);font-size:var(--workspace-action-text);
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar :is(input,select) {
  display:block;width:100%;height:var(--workspace-action-height);
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar input::placeholder {
  color:var(--muted,#667287);opacity:1;
}
/* Native WebKit select chrome paints over the theme and consumes additional
   vertical padding. Keep the native choice list, but own its closed control. */
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar select {
  appearance:none;-webkit-appearance:none;padding-right:32px;font-weight:var(--workspace-action-weight);
  background-image:linear-gradient(45deg,transparent 50%,var(--muted,#667287) 50%),linear-gradient(135deg,var(--muted,#667287) 50%,transparent 50%);
  background-repeat:no-repeat;background-position:calc(100% - 19px) center,calc(100% - 14px) center;background-size:5px 5px;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar button,
:is(#shell,.demoLayout).collectionWorkspace .collectionStat :is(button,a.button) {
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--surface-inset,#f3f6fa);font-weight:600;
  text-align:center;text-decoration:none;white-space:normal;
  overflow-wrap:anywhere;cursor:pointer;filter:none;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionToolbar button:disabled,
:is(#shell,.demoLayout).collectionWorkspace .collectionStat button:disabled {
  opacity:.5;cursor:not-allowed;
}

/* One card DOM and one set of intrinsic dimensions. Selection state belongs
   to each data adapter; its presentation is shared. */
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.cardGrid {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,172px),1fr));
  gap:10px;min-width:0;margin:0;padding:0;border:0;background:transparent;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid>.empty {grid-column:1/-1;margin:0;padding:32px 20px;border:1px dashed var(--line,#e1e6ee);border-radius:14px;background:var(--surface,#fff);color:var(--muted,#667287);font-size:16px;line-height:1.65;text-align:center}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard.cardTile {
  display:block;position:relative;isolation:isolate;min-width:0;
  margin:0;padding:12px;border:1px solid var(--line,#e1e6ee);
  border-radius:12px;background:var(--surface,#fff);
  color:var(--ink,#202b3e);text-align:left;box-shadow:0 2px 6px #101b3004;
  transition:border-color .15s,box-shadow .15s;cursor:pointer;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard.cardTile:hover {
  border-color:var(--accent,var(--green,#315ddb));
  background:var(--surface,#fff);box-shadow:0 6px 20px #1025440c;transform:none;
}
/* The artwork, game, name, print details and value each share a track with
   their neighbours. Full names and editions can wrap to as many lines as needed. */
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid:not(.collectionListMode)>.collectionCard {
  --tile-padding:12px;
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;
  grid-row:span 5;align-items:start;row-gap:0;padding:0 var(--tile-padding) var(--tile-padding);
}
:is(#shell,.demoLayout).collectionWorkspace .collectionArtwork {
  display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;
  height:145px;margin:0 calc(0px - var(--tile-padding)) 8px;
  border-radius:11px 11px 0 0;overflow:hidden;
  background:var(--surface-inset,#f3f6fa);
  background:color-mix(in srgb,var(--art-tint,#8093b8) 15%,var(--surface-inset,#f3f6fa));
}
.collectionCard[data-game="Pokémon"] .collectionArtwork {--art-tint:#c2a277}
.collectionCard[data-game="Yu-Gi-Oh!"] .collectionArtwork {--art-tint:#a58cba}
.collectionCard[data-game^="Magic"] .collectionArtwork {--art-tint:#80a598}
.collectionCard[data-game^="One Piece"] .collectionArtwork {--art-tint:#739fbd}
:is(#shell,.demoLayout).collectionWorkspace .collectionArtwork>[data-ui=photo] {
  grid-area:1/1;display:block;width:90%;max-width:100%;height:90%;max-height:none;
  padding:0;margin:0;border:0;border-radius:3px;object-fit:contain;background:transparent;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardBack {
  grid-area:1/1;display:grid;align-content:center;justify-items:center;gap:3px;
  box-sizing:border-box;height:84%;max-width:90%;aspect-ratio:5/7;
  border:2px solid #7186a3;border-radius:5px;color:#ecf2fd;
  background:repeating-linear-gradient(135deg,transparent 0 7px,#ffffff0c 7px 8px),
    linear-gradient(145deg,#374f70,#23354e);
  box-shadow:inset 0 0 0 3px #2c405c,0 2px 5px #14243a26;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardBack b {font-size:.8rem;line-height:1.2;letter-spacing:-.04em}
:is(#shell,.demoLayout).collectionWorkspace .collectionNoPhoto {font-size:.72rem;line-height:1.3}
:is(#shell,.demoLayout).collectionWorkspace .collectionArtwork>img:not([hidden])+.collectionCardBack {display:none}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter {min-width:0}

:is(#shell,.demoLayout).collectionWorkspace .collectionCard>[data-ui=game] {
  display:inline-block;width:fit-content;max-width:100%;margin:0;
  padding:2px 6px;border:1px solid var(--line,#e1e6ee);border-radius:5px;
  background:var(--surface-inset,#f3f6fa);color:var(--muted,#667287);
  font-size:.75rem;font-weight:500;line-height:1.4;letter-spacing:normal;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard>h3 {
  min-width:0;margin:4px 0;color:var(--ink,#202b3e);font-size:.9375rem;
  font-weight:550;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .cardOpen[data-ui=name] {
  display:block;width:100%;min-width:0;min-height:1.75rem;max-width:100%;
  margin:0;padding:4px 0;border:0;border-radius:4px;background:transparent;
  color:inherit;font:inherit;line-height:inherit;text-align:left;
  text-decoration:none;white-space:normal;overflow-wrap:anywhere;
  box-shadow:none;filter:none;cursor:pointer;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .cardOpen[data-ui=name]:hover {text-decoration:underline}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard>[data-ui=details] {
  display:block;margin:0;color:var(--muted,#667287);
  font-size:.75rem;font-weight:400;line-height:1.45;letter-spacing:normal;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>[data-ui=value] {
  display:block;margin:6px 0 0;color:var(--accent,var(--green,#315ddb));
  font-size:1.0625rem;font-weight:700;line-height:1.35;letter-spacing:normal;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>[data-ui=value]:is(.referenceValue,.rawReference),
:is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=value].rawReference {color:#966015}
html[data-theme=dark] :is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>[data-ui=value]:is(.referenceValue,.rawReference),
html[data-theme=dark] :is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=value].rawReference {color:#f6bd6f}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>.priceSource.labelWithInfo {
  display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;
  width:fit-content;max-width:100%;min-width:0;gap:2px 5px;margin:3px 0 0;
  color:var(--muted,#667287);font-size:.75rem;font-weight:400;
  line-height:1.45;letter-spacing:normal;text-align:left;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard [data-ui=priceLabel] {
  min-width:0;color:inherit;font:inherit;overflow-wrap:anywhere;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>.collectionCardSlot:empty {display:none}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .priceChange {
  gap:4px;margin:3px 0;font-size:.75rem;line-height:1.4;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .trendSymbol {min-width:0;font-size:1rem}
:is(#shell,.demoLayout).collectionWorkspace :is(.collectionNavItem,.collectionCard,.collectionToolbar input,.collectionToolbar select,.collectionToolbar button,.collectionCard :is(button,a,input,[tabindex]),.collectionStat :is(button,a)):focus-visible {
  outline:3px solid var(--accent,var(--green,#315ddb));outline-offset:3px;
}


/* Selection remains controlled by the collection adapter; its presentation is
   identical when the demo selects its own in-memory examples. */
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.selectionMode .collectionCard.isSelected {
  border-color:#d05b6c;background:#fff0f2;
  box-shadow:0 0 0 1px #ef6879,0 6px 22px #280b1259;
}
html[data-theme=dark] :is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.selectionMode .collectionCard.isSelected {background:var(--surface-raised,#233149)}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.selectionMode .collectionCard.isSelected::after {
  content:"";position:absolute;inset:0;z-index:2;pointer-events:none;border-radius:inherit;
  background:linear-gradient(to bottom right,transparent 49.65%,#ff7b89 49.85%,#ff7b89 50.15%,transparent 50.35%),rgba(154,39,58,.13);
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.selectionMode .collectionCard.isSelected>.collectionArtwork {opacity:.78}

/* Help has the same compact trigger and scrollable top-layer panel in each
   workspace. workspaceInfo follows a fallback popup when it is portalled. */
:is(#shell,.demoLayout).collectionWorkspace [data-ui=priceInfo] {display:inline-flex;flex:0 0 auto}
:is(#shell,.demoLayout).collectionWorkspace .infoHelp {
  display:inline-flex;align-items:center;justify-content:center;position:relative;
  flex:0 0 auto;margin:0;vertical-align:middle;text-align:left;
  font-size:13px;font-weight:400;line-height:1;letter-spacing:normal;
}
:is(#shell,.demoLayout).collectionWorkspace .infoButton {
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  box-sizing:border-box;flex:0 0 28px;width:28px;height:28px;min-width:28px;min-height:28px;
  margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;
  font-family:inherit;font-size:16px;line-height:1;letter-spacing:0;
  box-shadow:none;filter:none;cursor:help;
}
:is(#shell,.demoLayout).collectionWorkspace .infoButton::before {
  content:"";position:absolute;width:20px;height:20px;box-sizing:border-box;
  border:1px solid currentColor;border-radius:50%;opacity:.6;pointer-events:none;
}
:is(#shell,.demoLayout).collectionWorkspace .infoButton svg {
  position:relative;width:12px;height:12px;pointer-events:none;
}
:is(#shell,.demoLayout).collectionWorkspace .infoContent:not(.floatingInfo) {display:none}
:is(#shell,.demoLayout).collectionWorkspace .infoContent:not(.floatingInfo),
.infoContent.workspaceInfo.floatingInfo {
  box-sizing:border-box;padding:16px 18px;border:1px solid var(--line,#e1e6ee);
  border-radius:12px;background:var(--surface,#fff);color:var(--ink,#202b3e);
  box-shadow:0 12px 44px #0003;font-family:Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:13px;font-weight:400;line-height:1.65;letter-spacing:normal;
  white-space:normal;overflow-wrap:anywhere;text-align:left;
}
.infoContent.workspaceInfo.floatingInfo {
  display:block;position:fixed;inset:auto;margin:0;z-index:2147483647;
  width:380px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);
  overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
  touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch;pointer-events:auto;
  --info-safe-top:env(safe-area-inset-top,0px);--info-safe-right:env(safe-area-inset-right,0px);
  --info-safe-bottom:env(safe-area-inset-bottom,0px);--info-safe-left:env(safe-area-inset-left,0px);
}
.infoContent.workspaceInfo.floatingInfo::backdrop {background:transparent;pointer-events:none}
.infoContent.workspaceInfo.floatingInfo :is(p,li,small,.small) {color:inherit;font-size:inherit;line-height:inherit}
.infoContent.workspaceInfo.floatingInfo p {margin:0 0 10px}
.infoContent.workspaceInfo.floatingInfo p:last-child {margin-bottom:0}
.infoContent.workspaceInfo.floatingInfo a {color:var(--accent,var(--green,#315ddb));text-decoration:underline;text-underline-offset:.15em}
.infoContent.workspaceInfo.floatingInfo:focus-visible {outline:3px solid var(--accent,var(--green,#315ddb));outline-offset:3px}

@media(max-width:1100px) {
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar.toolbar {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:700px) {
  :is(#shell,.demoLayout).collectionWorkspace .collectionWorkspaceHeader {align-items:flex-start;gap:12px;margin-bottom:16px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionWorkspaceHeader :is(h1,[data-ui=workspace-title]) {font-size:25px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionPanel {padding:18px;border-radius:16px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionStats {grid-template-columns:1fr 1fr;gap:12px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionStat.stat {padding:18px;border-radius:16px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionStat.primary {grid-column:1/-1}
  :is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=label] {font-size:12px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionStat>[data-ui=value] {font-size:30px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionNavItem {justify-content:center;flex-direction:column;gap:6px;font-size:12px;padding:10px 7px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionNavItem .navLabel {line-height:1.35;text-align:center}
  :is(#shell,.demoLayout).collectionWorkspace .collectionMobileNav {
    display:flex;align-items:stretch;justify-content:space-around;gap:4px;
    margin:0;padding:6px max(10px,var(--mobile-safe-right,env(safe-area-inset-right,0px))) calc(6px + var(--mobile-safe-bottom,env(safe-area-inset-bottom,0px))) max(10px,var(--mobile-safe-left,env(safe-area-inset-left,0px)));
    border:0;border-top:1px solid var(--line,#e1e6ee);
    background:var(--surface,#fff);box-shadow:0 -3px 15px #0f172a0c;
  }
  :is(#shell,.demoLayout).collectionWorkspace .collectionMobileNav .collectionNavItem {
    flex:1;flex-direction:column;align-items:center;justify-content:center;
    min-width:0;min-height:56px;margin:0;padding:7px 3px;border-radius:10px;
    gap:4px;font-size:12px;line-height:1.2;
  }
  :is(#shell,.demoLayout).collectionWorkspace .collectionMobileNav .navLabel {line-height:1.2;white-space:normal;overflow-wrap:normal}
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar.toolbar {grid-template-columns:minmax(0,1fr) auto;gap:6px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar button {font-size:var(--workspace-action-text);padding-inline:10px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar>[data-ui=search] {grid-column:1/-1}
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar>[data-ui=sort] {grid-column:1/-1;order:4}
  :is(#shell,.demoLayout).collectionWorkspace .infoButton {flex-basis:32px;width:32px;height:32px;min-width:32px;min-height:32px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.cardGrid {
    grid-template-columns:repeat(auto-fill,minmax(min(100%,138px),1fr));gap:8px;
  }
  :is(#shell,.demoLayout).collectionWorkspace .collectionCard.cardTile {padding:9px;border-radius:10px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid:not(.collectionListMode)>.collectionCard {--tile-padding:9px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionArtwork {height:108px;margin-bottom:6px;border-radius:9px 9px 0 0}
  :is(#shell,.demoLayout).collectionWorkspace .collectionCard>h3 {margin:2px 0;font-size:.875rem}
  :is(#shell,.demoLayout).collectionWorkspace .collectionCard .cardOpen[data-ui=name] {min-height:2rem}
  :is(#shell,.demoLayout).collectionWorkspace .collectionCardFooter>.priceSource.labelWithInfo {width:100%;flex-wrap:nowrap;column-gap:4px}
}
@media(max-width:349px){
  :is(#shell,.demoLayout).collectionWorkspace .collectionCardGrid.cardGrid {
    grid-template-columns:repeat(auto-fill,minmax(min(100%,116px),1fr));
  }
}
@media(max-width:700px),(max-width:1000px) and (max-height:500px) {
  .infoContent.workspaceInfo.floatingInfo {font-size:15px;line-height:1.6;padding:16px}
}
@media(max-width:360px) {
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar.toolbar {grid-template-columns:minmax(0,1fr)}
  .demoLayout.collectionWorkspace .collectionHeaderTools {gap:6px}
  :is(#shell,.demoLayout).collectionWorkspace .collectionHeaderTools > .collectionButton {padding-inline:8px}
}
@media(prefers-reduced-motion:reduce) {
  :is(#shell,.demoLayout).collectionWorkspace .collectionCard.cardTile {transition:none}
}

/* The collection modes change presentation in place; sorting and selection stay put. */
#collection .collectionViewBar,
#collection .collectionViewActions,
#collection .collectionViewSwitch {
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;
}
#collection .collectionViewBar {justify-content:space-between;margin:10px 0}
#collection .collectionViewBar #filterCount {margin:0;color:var(--muted,#667287)}
#collection .collectionViewSwitch {flex-wrap:nowrap;gap:0;padding:0;border:0;border-radius:var(--workspace-action-radius);background:var(--surface-inset,#f3f6fa)}
#collection .collectionViewActions button {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:var(--workspace-action-height);margin:0;padding:var(--workspace-action-pad) 12px;border:1px solid var(--line,#e1e6ee);
  border-radius:var(--workspace-action-radius);background:var(--surface,#fff);color:var(--ink,#202b3e);
  font-family:inherit;font-size:var(--workspace-action-text);font-weight:var(--workspace-action-weight);line-height:20px;
}
#collection .collectionViewSwitch button {background:transparent;color:var(--muted,#667287)}
#collection .collectionViewSwitch button:first-child {--control-radius:var(--workspace-action-radius) 0 0 var(--workspace-action-radius);border-radius:var(--control-radius)}
#collection .collectionViewSwitch button:last-child {--control-radius:0 var(--workspace-action-radius) var(--workspace-action-radius) 0;border-radius:var(--control-radius);margin-inline-start:-1px}
#collection .collectionViewSwitch button:focus-visible {position:relative;z-index:1}
#collection .collectionViewSwitch button[aria-pressed=true] {border-color:var(--line,#e1e6ee);background:var(--surface,#fff);color:var(--accent,var(--green,#315ddb))}
#collection .collectionViewSwitch svg {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
#collection .collectionViewActions button:focus-visible {outline:3px solid var(--accent,var(--green,#315ddb));outline-offset:2px}
:is(#shell,.demoLayout).collectionWorkspace .collectionSidebar .collectionNavItem:is(.active,[aria-current=page]) {
  box-shadow:inset 3px 0 var(--accent,var(--green,#315ddb));
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .cardOpen[data-ui=name] {
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionCard .cardOpen::after {
  content:"";flex:none;width:.43em;height:.43em;border-block-start:2px solid currentColor;
  border-inline-end:2px solid currentColor;transform:rotate(45deg);color:var(--muted,#667287);
}
:is(#shell,.demoLayout).collectionWorkspace .selectionMode .collectionCard .cardOpen::after {display:none}
#shell.collectionWorkspace #cardList.collectionListMode {grid-template-columns:minmax(0,1fr);gap:5px}
#shell.collectionWorkspace #cardList.collectionListMode .cardTile {
  display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(120px,.75fr);
  gap:2px 12px;align-items:center;padding:7px 12px;min-width:0;
}
#shell.collectionWorkspace #cardList.collectionListMode .cardTile>.collectionArtwork {display:none}
#shell.collectionWorkspace #cardList.collectionListMode .collectionCardFooter {display:contents}
#shell.collectionWorkspace #cardList.collectionListMode .cardTile>[data-ui=game] {grid-area:1/1;margin:0}
#shell.collectionWorkspace #cardList.collectionListMode .cardTile>h3 {grid-area:2/1;margin:0}
#shell.collectionWorkspace #cardList.collectionListMode .cardTile>[data-ui=details] {grid-area:1/2/3/3}
#shell.collectionWorkspace #cardList.collectionListMode .collectionCardFooter>[data-ui=value] {grid-area:1/3;margin:0}
#shell.collectionWorkspace #cardList.collectionListMode .collectionCardFooter>.priceSource {grid-area:2/3;margin:0}
#shell.collectionWorkspace #cardList.collectionListMode .collectionCardSlot:not([hidden]) {grid-column:1/-1}
@media(max-width:700px){
  #shell.collectionWorkspace #cardList.collectionListMode .cardTile {grid-template-columns:minmax(0,1fr) minmax(80px,.6fr);gap:2px 9px;padding:8px 10px}
  #shell.collectionWorkspace #cardList.collectionListMode .cardTile>[data-ui=details] {grid-area:3/1/auto/-1}
  #shell.collectionWorkspace #cardList.collectionListMode .collectionCardFooter>[data-ui=value] {grid-area:1/2;justify-self:end}
  #shell.collectionWorkspace #cardList.collectionListMode .collectionCardFooter>.priceSource {grid-area:2/2;justify-self:end}
  #collection .collectionViewBar {gap:6px}
  #collection .collectionViewActions {gap:6px}
  #collection .experienceCollectionControls {gap:8px;margin-bottom:8px}
}
:is(#shell,.demoLayout).collectionWorkspace .collectionSidebar .collectionNavItem {
  min-height:var(--workspace-action-height);padding:var(--workspace-action-pad) 12px;
  font-size:var(--workspace-label);font-weight:550;line-height:1.4;
  border-radius:10px;gap:10px;
}
:is(#shell,.demoLayout).collectionWorkspace .collectionSidebar .collectionNavItem:hover:not(.active):not([aria-current=page]) {
  border-color:var(--line,#e1e6ee);color:var(--ink,#202b3e);
}
@media(max-width:700px){
  :is(#shell,.demoLayout).collectionWorkspace .collectionMobileNav .collectionNavItem:is(.active,[aria-current=page]) {
    border-color:transparent;background:var(--surface-raised,#edf2fc);
    box-shadow:inset 0 2px var(--accent,var(--green,#315ddb));
  }
}

@media(min-width:701px){
  .experienceApp #shell.collectionWorkspace > main:has(> .displayControls){padding-top:16px}
  #shell.collectionWorkspace > main > .displayControls{
    position:static!important;inset:auto!important;justify-content:flex-end;
    margin:0 0 16px;z-index:auto;
  }
}

/* The private collection actions use the same scale as the shared toolbar. */
#collection {
  --control-height:var(--workspace-action-height);
  --control-pad-y:var(--workspace-action-pad);
  --control-pad-x:12px;
  --control-font:var(--workspace-action-text);
  --control-line:20px;
  --control-radius:var(--workspace-action-radius);
}
#collection :is(input,select) {--control-font:var(--workspace-field-text)}
#collection .experienceSecondaryControls > details.panel > summary {
  min-height:var(--workspace-action-height);
  padding:var(--workspace-action-pad) 12px;
  font-size:var(--workspace-action-text);font-weight:var(--workspace-action-weight);line-height:20px;
  border-radius:var(--workspace-action-radius);
}
@media(max-width:360px) {
  #collection .experienceSecondaryControls {column-gap:4px}
  #collection .experienceSecondaryControls > details.panel > summary {padding-inline:4px;gap:3px}
  #collection .experienceSecondaryControls > details.panel > summary::before {flex-basis:10px;width:10px}
}
#collection .collectionViewSwitch button {--control-font:var(--workspace-label)}
#collection #filterCount {font-size:var(--workspace-label)}
@media(max-width:700px),(any-pointer:coarse) {
  :is(#shell,.demoLayout).collectionWorkspace {
    --workspace-action-height:2.25rem;
    --workspace-action-pad:5px;
    --workspace-field-text:1rem;
  }
  :is(#shell,.demoLayout).collectionWorkspace .collectionToolbar :is(input,select) {font-size:var(--workspace-field-text)}
}
