[hidden] { display: none !important; }
:root { --material-gray: #efefef; --board-accent: #505050; }
button { background: none; border: 0; }
select, textarea { color: inherit; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.nav-guide {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem 0;
  min-width: max-content;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.nav-guide .triangle { opacity: 0; margin-left: -.875rem; }
.nav-guide:hover .triangle, .nav-guide:focus-visible .triangle { opacity: 1; margin-left: 0; }
.navigation { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.navigation .nav-button { text-transform: inherit; letter-spacing: inherit; }
.nav-signup:hover { background: #30302e; }
.search-field input::placeholder { color: var(--ink); opacity: 1; }
.search-field input:focus::placeholder { opacity: .35; }
.landing-hero.is-drop-target:not(.is-photo-drop) .search-bar { outline: 2px solid var(--ink); outline-offset: 5px; }
.landing-hero.is-photo-drop .upload-entry { outline: 2px solid var(--ink); outline-offset: 5px; }

.still-group :is(img, .material-preview) { aspect-ratio: var(--ratio, 3/2); }
.still-group img { object-fit: cover; background: var(--image-ground, #d9d4c8); }
.still-group :is(img, .material-preview):is(:nth-child(1), :nth-child(4), :nth-child(5), :nth-child(6), :nth-child(8)) { --ratio: 1; }
.still-group img:nth-child(1) { object-position: 50% 27%; }
.still-group img.cannes-hero { object-position: 50% 81%; }
.still-group img.cannes-mid-hero { object-fit: contain; object-position: center; background: #ebebeb; }
.still-group img[data-cutout] { padding: 8%; object-fit: contain; }
.still-group img:nth-child(2) { --image-ground: #c6d5be; }
.still-group img:nth-child(4) { --image-ground: #edc74d; }
.still-group img:nth-child(6) { --image-ground: #c5c7bc; }
.still-group img:nth-child(9) { --image-ground: #ded3b8; }

#board-screen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  min-height: 550px;
  --line: #e2e1dc;
  --muted: #666760;
  --surface: #fff;
  font: 14px/1.4 Arial, sans-serif;
}

.board-heading {
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.board-title-group { display: flex; align-items: center; gap: 16px; min-width: 0; }
.board-home { display: grid; flex: none; place-items: center; min-height: 34px; padding-right: 16px; border-right: 1px solid var(--line); }
.board-home svg { display: block; width: 28px; height: auto; }
.canvas-tools {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .045em;
}

.board-heading h1 { min-width: 0; font: 500 clamp(19px, 2.3vw, 28px)/1.1 Swizzy, Arial, sans-serif; letter-spacing: -.035em; margin: 0; }
.board-heading h1:focus { outline: none; }
#board-title, #board-title-input { display: block; max-width: 100%; border: 0; padding: 0; text-align: left; letter-spacing: inherit; }
#board-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
#board-title:hover { text-decoration: underline; text-decoration-color: #bcbcbc; text-decoration-thickness: 1px; text-underline-offset: 4px; }
#board-title:focus-visible { outline-offset: 2px; }
#board-title-input { width: 18ch; background: transparent; outline: none; box-shadow: 0 1px #adadad; }
.board-heading-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.board-action { min-height: 34px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; font-size: 13px; }
.board-action:hover { background: var(--grid-paper); }
.board-new { background: var(--ink); color: var(--paper); }
.board-new:hover { background: #353530; }
.board-new span { margin-right: 2px; }
.variation-form select { max-width: 100%; border: 0; border-radius: 0; background: transparent; font: 11px/1 var(--mono); }

#board-viewport {
  --board-grid: calc(40px * var(--board-scale, 1));
  position: relative;
  min-width: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background-color: var(--grid-paper);
  background-image: linear-gradient(0deg, #14141410 1px, transparent 1px), linear-gradient(90deg, #14141410 1px, transparent 1px);
  background-size: 100% var(--board-grid), var(--board-grid) 100%;
  background-position: 0 var(--grid-y, 0px), var(--grid-x, 0px) 0;
  cursor: grab;
}

#board-viewport:focus-visible { outline-offset: -3px; }
#board-viewport.is-moving { cursor: grabbing; }
#board-viewport.is-resizing { cursor: nwse-resize; }
#board-viewport.is-drop-target { box-shadow: inset 0 0 0 2px var(--board-accent); }
.canvas-world { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; transform-origin: 0 0; }
.connections { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.connection { fill: none; stroke: var(--board-accent); stroke-width: 1.65; stroke-dasharray: .7 4.8; stroke-linecap: round; opacity: .72; }
.connection.is-selected { opacity: 1; }
#connection-preview { fill: none; stroke: var(--board-accent); stroke-width: 1.6; stroke-dasharray: 1 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.connection-link:focus { outline: none; }
.connection-link.is-waiting { display: none; }
.connection-hit { fill: none; stroke: transparent; stroke-width: 18; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.connection-remove { visibility: hidden; transform: scale(var(--connection-control-scale, 1)); cursor: pointer; }
.connection-remove circle { fill: white; stroke: #bdbdbd; pointer-events: visible; }
.connection-remove path { fill: none; stroke: var(--board-accent); stroke-width: 1.5; stroke-linecap: round; }
.connection-link:is(:focus-visible, .is-active) .connection { opacity: 1; stroke-width: 2.3; }
.connection-link:is(:focus-visible, .is-active) .connection-remove { visibility: visible; }
.connection-link:focus-visible .connection-remove circle { stroke: var(--board-accent); stroke-width: 2; }
@media (hover: hover) {
  .connection-link:hover .connection { opacity: 1; stroke-width: 2.3; }
  .connection-link:hover .connection-remove { visibility: visible; }
}

.canvas-tools {
  position: absolute;
  bottom: 14px;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  box-shadow: 0 2px 7px #1414140a;
}

.canvas-tools button { min-height: 27px; min-width: 27px; border-radius: 4px; padding: 0 6px; font: inherit; text-transform: inherit; }
.canvas-tools button:hover { background: var(--grid-paper); }
.canvas-icon-button { display: grid; place-items: center; color: var(--board-accent); }
.canvas-tools output { min-width: 36px; text-align: center; }
.board-node {
  position: absolute;
  display: flow-root;
  border: 1px solid #e0e0dc;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 4px 14px #14141409;
  cursor: default;
}

.board-node.is-selected:not(.is-touch-dragging) { border-color: var(--board-accent); box-shadow: 0 0 0 1px #50505018, 0 4px 14px #1414140d; }
.connection-port {
  position: absolute;
  z-index: 1;
  width: 30px;
  height: 30px;
  padding: 0;
  transform: translate(-50%, -50%) scale(var(--connection-control-scale, 1));
  color: var(--board-accent);
  opacity: 0;
  pointer-events: none;
  cursor: crosshair;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.connection-port::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: white;
}
.connection-port[data-side="top"] { left: 50%; top: -1px; }
.connection-port[data-side="right"] { left: calc(100% + 1px); top: 50%; }
.connection-port[data-side="bottom"] { left: 50%; top: calc(100% + 1px); }
.connection-port[data-side="left"] { left: -1px; top: 50%; }
.board-node:is(.has-ports, :focus-visible) > .connection-port,
.connection-port:is(:focus-visible, .is-link-anchor) { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  #board-viewport:not(.is-moving, .is-resizing, .is-link-dragging) .board-node:hover > .connection-port { opacity: 1; pointer-events: auto; }
}
.connection-port:is(:hover, :focus-visible, .is-link-anchor)::before { background: var(--board-accent); }
#board-viewport.is-linking, #board-viewport.is-linking .board-node { cursor: crosshair; }
#board-viewport.is-linking :is(.board-node > :not(.connection-port), .connection-hit, .connection-remove circle) { pointer-events: none; }
.board-node:is(.is-link-source, .is-link-target) { border-color: #9e9e9e; }
.board-node.is-new { animation: card-in .32s var(--node-delay) cubic-bezier(.21,.61,.35,1) both; transform-origin: left top; }
@keyframes card-in { from { opacity: 0; scale: .9; } to { opacity: 1; scale: 1; } }
.board-node.is-new :is(.reference-image, .cannes-reference, .swatch-sample, .viewer-wrap, .pattern-preview) { animation: still-in .7s var(--node-delay) cubic-bezier(.22,.61,.36,1) both; }
.board-node.is-new .cannes-photo-layer .reference-image { animation: none; }
@keyframes still-in { from { opacity: 0; scale: 0; } to { opacity: 1; scale: 1; } }
.node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 42px;
  padding: 6px 11px 5px 13px;
  cursor: grab;
  user-select: none;
}

.node-kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 16px/1.1 Swizzy, Arial, sans-serif; letter-spacing: -.02em; }
.node-actions { display: flex; gap: 4px; flex: none; }
.node-action { min-height: 28px; padding: 4px 6px; border-radius: 5px; color: #656660; font-size: 12px; white-space: nowrap; }
a.node-action { display: inline-flex; align-items: center; }
.node-action:hover, .node-action:focus-visible { color: var(--ink); background: var(--grid-paper); }
.node-action[aria-pressed="true"] { color: var(--board-accent); background: #ededed; }
.icon-action { display: grid; place-items: center; min-width: 28px; }
.icon { display: block; width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tool-icon { color: var(--board-accent); }
.node-body { padding: 0 10px 10px; }

.board-node[data-kind="note"] { display: flex; flex-direction: column; z-index: 2; border-color: #d8d8d8; border-radius: 7px; box-shadow: 0 5px 16px #14141418; }
.board-node[data-kind="note"]:is(:focus-within, .is-touch-dragging, .is-resizing) { z-index: 3; }
.board-node[data-kind="note"]:has(.note-text:focus) { border-color: #adadad; }
.board-node[data-kind="note"] .node-head { position: relative; justify-content: end; min-height: 31px; padding: 2px 5px; }
.note-grip { position: absolute; left: 50%; top: 1px; display: grid; place-items: center; width: 48px; height: 27px; transform: translateX(-50%); }
.note-grip::before { width: 17px; height: 5px; border-top: 1px solid #a6a6a6; border-bottom: 1px solid #a6a6a6; opacity: 0; content: ""; }
@media (hover: hover) {
  .note-grip:hover::before { opacity: 1; }
}
.note-delete, .video-delete { font: 19px/1 Arial, sans-serif; }
.note-resize {
  position: absolute;
  bottom: 0;
  right: 0;
  display: grid;
  place-items: end;
  width: 28px;
  height: 28px;
  padding: 5px;
  color: #848484;
  cursor: nwse-resize;
}
.note-text {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  margin-bottom: 28px;
  padding: 4px 13px;
  border: 0;
  background: transparent;
  color: var(--ink);
  resize: none;
  font: var(--search-type)/1.35 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.note-text:focus { outline: none; }
.note-text::placeholder { color: #757575; }

.board-node[data-kind="loading"] .node-head { min-height: 62px; padding: 12px 13px; }
.loading-skeleton { display: grid; width: 100%; gap: 5px; }
.loading-skeleton span {
  width: 90%;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, #e5e5e5 25%, #f3f3f3 50%, #e5e5e5 75%) 100% 0 / 200% 100%;
  animation: loading-sweep 1.8s linear infinite;
}
.loading-skeleton span + span { width: 58%; animation-delay: .16s; }
@keyframes loading-sweep { to { background-position: -100% 0; } }

.reference-image { display: block; width: 100%; height: 276px; object-fit: contain; background: var(--material-gray); }
.reference-photos { display: flex; gap: 8px; }
.reference-photos figure { flex: 1; min-width: 0; margin: 0; }
.reference-photos img { height: 142px; border-radius: 7px; }
.reference-photos figcaption, .photo-viewer-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.reference-name { margin: 0; padding: 18px 5px; font-size: 17px; overflow-wrap: anywhere; }
.cannes-reference { position: relative; height: 289px; overflow: hidden; border-radius: 1rem; background: var(--material-gray); }
.cannes-photo-layer { position: absolute; inset: 82% 0 auto; aspect-ratio: 1264 / 1580; transform: translateY(-82%); }
.cannes-photo-layer .reference-image { width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: contain; }
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.swatch { position: relative; min-width: 0; }
.swatch-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  min-width: 28px;
  padding: 0;
  border-radius: 50%;
  background: #ffffffd9;
  font: 17px/1 Arial, sans-serif;
  outline-offset: -1px;
}
@media (hover: hover) and (pointer: fine) {
  .swatch:not(:hover) .swatch-remove:not(:focus-visible) { opacity: 0; }
}
.swatches-empty { margin: 0; padding: 10px 3px; color: var(--muted); font-size: 12px; }
.swatch-sample { display: block; width: 100%; height: 79px; overflow: hidden; background: var(--material-gray); }
.swatch-sample .material-preview { width: 100%; height: 100%; }
.material-preview { display: grid; place-items: center; background: var(--material-gray); }
.material-object { position: relative; display: block; }
.material-object.is-fabric {
  width: 55%;
  aspect-ratio: 4 / 3;
  max-height: 57%;
  rotate: -8deg;
  border: 1px solid #14141426;
  border-radius: 3px 2px 4px 3px;
  background: linear-gradient(142deg,#ffffff28,#14141428),
    repeating-linear-gradient(44deg,#14141418 0 1px,transparent 1px 3px),
    repeating-linear-gradient(136deg,#ffffff21 0 1px,transparent 1px 4px), var(--swatch-tone);
  box-shadow: 1px 2px 3px #14141428, inset -1px -1px 2px #1414142e;
}
.material-object.is-fabric::after { position: absolute; inset: 3px; border: 1px dashed #ffffff32; border-radius: 1px; content: ""; }
.material-object.is-embossed { background: repeating-linear-gradient(3deg,transparent 0 6px,#21201953 6px 7px), repeating-linear-gradient(97deg,transparent 0 7px,#2219123a 7px 8px), linear-gradient(145deg,#ffffff28,#14141426), var(--swatch-tone); }
.material-object.is-cannes-texture { background: var(--swatch-tone) url('assets/cannes-mini.png') 50% 77% / 355% auto; }
.material-object.is-empty { width: 31%; border: 1px dashed #c7c7c7; background: transparent; box-shadow: none; }
.material-object.is-empty::after { display: none; }
.material-object.is-zipper { width: 61%; height: 17%; min-height: 7px; rotate: -30deg; border-radius: 1px; background: repeating-linear-gradient(90deg,#3a3935 0 2px,#33322e 2px 3px); box-shadow: 2px 2px 3px #14141425; }
.material-object.is-zipper::before { position: absolute; inset: 38% 1px; background: repeating-linear-gradient(90deg,#c7c3b5 0 1px,#77746a 1px 2px); content: ""; }
.material-object.is-zipper i { position: absolute; top: 31%; left: 72%; width: 14%; height: 40%; border-radius: 2px; background: #dbd8cd; box-shadow: 0 1px 1px #0005; }
.material-object.is-zipper i::after { position: absolute; left: 75%; top: -25%; width: 160%; height: 130%; border: 1px solid #9d9a8e; border-radius: 2px; background: #c6c3b75c; content: ""; }
.material-object.is-buckle { width: 38%; max-height: 50%; aspect-ratio: 1.15; rotate: -14deg; border: clamp(2px,.19vw,4px) solid #9b9a8e; border-radius: 6px; box-shadow: 1px 2px 2px #14141421, inset 0 0 0 1px #fff8; }
.material-object.is-buckle::before { position: absolute; top: 47%; left: -1px; width: 100%; height: 2px; border-radius: 2px; background: #858479; content: ""; }
.material-object.is-spool { width: 35%; max-height: 49%; aspect-ratio: .91; rotate: 13deg; border-radius: 31% / 11%; background: linear-gradient(90deg,#1414143b,#ffffff2c 30%,transparent 70%,#14141445), repeating-linear-gradient(0deg,#ffffff29 0 1px,transparent 1px 2px), var(--swatch-tone); box-shadow: 1px 3px 3px #14141426; }
.material-object.is-spool::before, .material-object.is-spool::after { position: absolute; inset: auto -7% -2% -7%; height: 14%; border-radius: 50%; background: #aca798; content: ""; }
.material-object.is-spool::before { top: -3%; bottom: auto; background: radial-gradient(ellipse at center,#777269 0 13%,#beb9a9 15% 54%,#a5a091 55%); }
.swatch-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 2px 0;
  cursor: pointer;
}
.swatch-circle {
  display: grid;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #787a73;
  border-radius: 50%;
  background: var(--paper);
  color: var(--paper);
}
.swatch-circle .icon { width: 12px; height: 12px; stroke-width: 2; opacity: 0; }
.swatch-check:hover .swatch-circle { border-color: var(--ink); }
.swatch-check input:focus-visible + .swatch-circle { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch-check input:checked + .swatch-circle { border-color: var(--ink); background: var(--ink); }
.swatch-check input:checked + .swatch-circle .icon { opacity: 1; }
.swatch-check input:checked ~ .swatch-label { text-decoration: line-through; }
.swatch-label { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

.viewer-wrap { position: relative; border-radius: 6px; overflow: hidden; background: #e5e5e5; }
.video-player { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--ink); }
.video-player :is(iframe, video) { display: block; width: 100%; height: 100%; border: 0; }
.video-poster { position: relative; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-poster:focus-visible { outline-offset: -3px; }
.video-play-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #141414cc; color: var(--paper); }
.video-poster:hover .video-play-icon { background: var(--ink); }
.video-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.viewer-canvas { display: block; width: 100%; height: 210px; touch-action: none; cursor: grab; }
.viewer-canvas:active { cursor: grabbing; }
.pattern-preview { display: grid; place-items: center; height: 230px; overflow: hidden; padding: 9px; background: #fff; }
.pattern-preview svg { width: 100%; height: 100%; }
#nodes:has(> [data-node="pattern"]) [data-action="draft-photo-pattern"] { display: none; }
.reference-image, .swatch-sample, .viewer-wrap, .pattern-preview { border-radius: 1rem; }
.node-steps { list-style: none; padding: 0; margin: 0; }
.node-steps label { display: flex; align-items: start; gap: 7px; min-height: 30px; padding: 5px 0; cursor: pointer; }
.node-steps li:last-child label { border-bottom: 0; }
.node-steps input { flex: none; margin: 2px 0 0; accent-color: var(--board-accent); }
.node-steps input:checked + span { text-decoration: line-through; color: #656660; }

.board-dock {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 550px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 1.5rem;
  border-top: 1px solid var(--line);
  background: #fbfbf9;
}

.dock-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.tool-button { display: inline-flex; align-items: center; gap: 6px; min-height: 35px; padding: 7px 9px; border: 1px solid #e7e7e2; border-radius: 6px; background: var(--paper); color: var(--ink); font: 12px/1.2 Arial, sans-serif; white-space: nowrap; cursor: grab; }
.tool-button:hover { border-color: #bdbdbd; background: #f4f4f4; }
.tool-button:active { cursor: grabbing; }
.tool-button[aria-disabled="true"], .variation-form button[aria-disabled="true"] { opacity: .55; cursor: default; }
.tool-button .icon { width: 14px; height: 14px; }
.tool-button[data-tool="viewer"] { position: relative; }
.tool-pro {
  position: absolute;
  inset-block-start: -5px;
  inset-inline-end: -3px;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font: .5625rem/1 var(--mono);
  letter-spacing: .06em;
}
.tool-button.board-undo { justify-content: center; min-width: 35px; cursor: pointer; }
.tool-button.board-undo:disabled { opacity: .45; cursor: default; }

.variation-form { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 22px; background: #e7e7e2; }
.variation-form input { flex: 1; min-width: 0; min-height: 32px; border: 0; padding: 0 6px 0 0; background: transparent; font-size: 13px; }
.variation-form select { border-left: 1px solid #cdcec7; padding: 3px 5px; margin-right: 4px; }
.variation-form button { min-height: 33px; padding-inline: 11px; border-radius: 20px; background: var(--ink); color: white; font: 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.variation-form button:disabled, .primary-button:disabled, .search-bar button:disabled { cursor: wait; opacity: .55; }
.dock-status { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); width: max-content; max-width: min(90%, 360px); margin: 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--paper); text-align: center; font-size: 12px; pointer-events: none; }
.dock-status:empty { display: none; }
#board-screen:has(.is-linking) .dock-status { bottom: calc(100% + 62px); }

.board-dialog {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid #d8d9d4;
  border-radius: 12px;
  padding: 20px;
  background: #fcfcfa;
  color: var(--ink);
  box-shadow: 0 14px 90px #14141435;
  font: 14px/1.45 Arial, sans-serif;
}

.board-dialog::backdrop { background: #14141453; backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.dialog-head h2 { margin: 0; font: 500 29px/1 Swizzy, Arial, sans-serif; letter-spacing: -.035em; }
.close-button { min-width: 30px; min-height: 30px; border-radius: 50%; background: #edece7; font-size: 21px; line-height: 1; }
#photo-dialog .close-button:focus-visible { outline: none; background: #d8d6cf; }
.board-dialog label { display: grid; gap: 5px; margin: 10px 0; }
.board-dialog input:not([type="file"]), .board-dialog textarea, .board-dialog select { width: 100%; min-height: 38px; border: 1px solid #deded8; border-radius: 5px; padding: 7px 9px; background: white; }
.board-dialog textarea { resize: vertical; }
.image-input input { max-width: 100%; font-size: 13px; }
.dialog-status, .dialog-description { color: #5b5d55; margin: 10px 0; }
.primary-button { min-height: 37px; border-radius: 6px; padding: 8px 11px; background: var(--ink); color: white; font: 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.primary-button:hover { background: #31332e; }
.reference-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.dialog-link { width: fit-content; padding: 2px 0; color: #555651; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.photo-pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.board-dialog .photo-picker { position: relative; gap: 7px; margin: 0; cursor: pointer; font-weight: 600; }
.photo-picker small { color: #666760; font-size: 11px; font-weight: 400; }
.photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-picker:focus-within .photo-tile { outline: 2px solid var(--ink); outline-offset: 2px; }
.photo-tile { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid #d8d9d4; border-radius: 8px; background: #f1f1ee; color: #555651; font-size: 12px; font-weight: 400; }
.photo-picker:hover .photo-tile { border-color: #81817b; }
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-tile { position: relative; }
.photo-tile .photo-guide { position: absolute; inset: 9% 11%; width: 78%; height: 82%; color: #bdbeb7; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.photo-tile > span { position: relative; padding: 5px 9px; border-radius: 4px; background: #f1f1eee8; }
.photo-tile:has(img:not([hidden])) .photo-guide, .photo-tile > span:empty { display: none; }
.photo-pickers .dialog-link { margin-top: 5px; }
#photo-status:empty { display: none; }
#product-status:empty { display: none; }
.product-loading { gap: 9px; padding: 12px 0 9px; }
.product-loading span { height: 8px; }
.product-alternatives { margin-top: 14px; }
.product-options { margin-top: 12px; }
.product-options > summary { cursor: pointer; }
.product-options > .reference-actions { margin-top: 8px; }
.product-source { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.product-source p { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.product-source button { flex: none; }
.product-views { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 12px 0 8px; }
.product-views [data-view] { min-height: 32px; padding: 4px 9px; border: 1px solid #deded8; border-radius: 6px; font-size: 12px; }
.product-views [aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.product-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.product-gallery button { position: relative; padding: 0; overflow: hidden; background: #eee; border: 1px solid #dbdbd6; border-radius: 7px; aspect-ratio: 4 / 5; }
.product-gallery button:hover, .product-gallery [aria-pressed="true"] { border-color: var(--ink); }
.product-gallery img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-gallery span { position: absolute; bottom: 4px; left: 4px; padding: 2px 5px; border-radius: 4px; background: var(--ink); color: white; font-size: 11px; }
.photo-fit-inputs .measure-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; padding: 0; margin: 0 0 9px; }
.photo-fit-inputs legend { padding: 0; font-size: 13px; }
.photo-fit-inputs .measure-fields label { margin-top: 3px; font-size: 12px; }
.board-dialog input[type="range"] { padding: 0; accent-color: var(--ink); }
.viewer-wrap canvas:focus-visible { outline-offset: -3px; }
.viewer-load-status { margin: 0; padding: 16px; font-size: 13px; }
.dialog-link:disabled { opacity: .55; }
.measure-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.measure-fields label { margin: 4px 0 10px; }
.guide-steps { margin: 0 0 15px; padding-left: 20px; }
.guide-steps li { padding-left: 3px; margin-bottom: 8px; }

.details-dialog details { border-top: 1px solid #e4e4de; }
.details-dialog summary { padding-block: 11px; cursor: pointer; font-weight: 600; }
.detail-section { padding: 0 0 12px 14px; color: #4d4e48; }
.detail-section p { margin: 8px 0 0; }
.detail-section p:first-child { margin-top: 0; }
.detail-section a { color: var(--board-accent); text-decoration: underline; text-underline-offset: 2px; }
.details-request { color: #4d4e48; margin: 0 0 12px; }
.details-note { color: #61625a; font-size: 13px; }
.node-fields { display: grid; grid-template-columns: minmax(64px, 105px) minmax(0, 1fr); gap: 6px 9px; margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.node-fields dt { color: #61625a; }
.node-fields dd { margin: 0; }
.details-dialog .node-steps label { display: flex; margin: 0; }
.project-switch select { width: 100%; min-height: 34px; padding: 4px; border: 1px solid #deded8; border-radius: 5px; background: white; }

@media (max-width: 720px) {
  .board-dock { grid-template-columns: 1fr; row-gap: 7px; }
}

@media (max-width: 991px) {
  .hero-copy { grid-column: 1/-1; }
  .board-heading, .board-dock { padding-inline: .75rem; }
  .canvas-tools { right: .75rem; }
  .reference-image, .cannes-reference, .swatch-sample, .viewer-wrap, .pattern-preview { border-radius: .5rem; }
}

@media (max-width: 560px) {
  .board-heading { min-height: 53px; gap: 9px; padding-block: 8px; }
  .board-title-group { gap: 9px; }
  .board-home { padding-right: 9px; }
  .board-home svg { width: 24px; }
  .board-heading-actions { gap: 3px; }
  .board-action { padding-inline: 6px; font-size: 12px; }
  .tool-button { padding: 6px 7px; font-size: 12px; }
  .variation-form { padding-left: 8px; }
  .variation-form select { max-width: 142px; font-size: 10px; }
  .variation-form input { font-size: 12px; }
  .variation-form button { padding-inline: 8px; }
}

@media (max-width: 767px), (pointer: coarse) {
  .search-field input,
  .variation-form :is(input, select),
  .board-dialog :is(input:not([type="checkbox"], [type="file"], [type="range"]), textarea, select),
  .note-text { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .board-node.is-new, .board-node.is-new :is(.reference-image, .cannes-reference, .swatch-sample, .viewer-wrap, .pattern-preview), .loading-skeleton span { animation: none; }
  .connection[mask] { mask: none; }
}

.pattern-upload-options { margin-bottom: 12px; }
.pattern-upload-options input { max-width: 110px; }
.pattern-upload-options p { margin-block: 5px; }
.pattern-width { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pattern-width input { max-width: 80px; }

.pattern-pages { margin: 0; }
.pattern-pages canvas { display: block; width: 100%; height: 228px; object-fit: contain; background: #fff; border-radius: 5px; }
.pattern-pages canvas[hidden] { display: none; }
.pattern-pages figcaption { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0; font-size: 12px; }
.pattern-pages .node-action { min-width: 32px; min-height: 32px; font-size: 20px; }
