/*
 * Studio controls — final desktop material pass based on Figma node 6:62.
 * The SVG supplies the only perimeter. Native borders, inset rings and
 * elevation are deliberately suppressed so controls never look double-lined.
 */
:root {
  --flowjam-ui-font: var(--fj-ui-font);
  --control-doodle-line: var(--fj-ui-line);
  --control-doodle-paper: var(--fj-ui-paper);
  --control-doodle-selected: var(--fj-ui-selected);
  --control-doodle-ice: var(--fj-ui-ice);
  --control-doodle-ink: var(--fj-ui-ink);
  --control-doodle-muted: var(--fj-ui-muted);
  --control-doodle-focus: var(--fj-ui-line-focus);
  --control-doodle-pill: var(--fj-shape-pill);
  --control-doodle-pill-fill: url("./assets/ui/doodle-pill-fill.svg");
  --control-doodle-pill-outline: url("./assets/ui/doodle-pill-outline.svg");
  --control-doodle-pill-selected: var(--fj-shape-pill-selected);
  --control-doodle-pill-selected-focus: var(--fj-shape-pill-selected-focus);
  --control-doodle-pill-coral: var(--fj-shape-pill-coral);
  --control-doodle-segment: var(--fj-shape-segment);
  --control-doodle-segment-selected: var(--fj-shape-segment-selected);
  --control-doodle-segment-selected-focus: var(--fj-shape-segment-selected-focus);
  --control-doodle-segment-coral: var(--fj-shape-segment-coral);
  --control-doodle-segment-coral-focus: url("./assets/ui/doodle-segment-coral-focus.svg");
  --control-doodle-segment-pending: url("./assets/ui/doodle-segment-pending.svg");
  --control-doodle-segment-pending-focus: url("./assets/ui/doodle-segment-pending-focus.svg");
  --control-doodle-segment-hover: url("./assets/ui/doodle-segment-ice.svg");
  --control-doodle-circle: var(--fj-shape-circle);
  --control-doodle-circle-ice: var(--fj-shape-circle-hover);
  --control-doodle-circle-selected: var(--fj-shape-circle-selected);
  --control-doodle-circle-selected-focus: var(--fj-shape-circle-selected-focus);
  --control-doodle-circle-coral: var(--fj-shape-circle-coral);
  --control-doodle-circle-coral-focus: var(--fj-shape-circle-coral-focus);
  --control-doodle-card: var(--fj-shape-card);
  --control-doodle-card-selected: var(--fj-shape-card-selected);
  --control-doodle-card-outline: var(--fj-shape-card-outline);
  --control-doodle-window: var(--fj-shape-window);
  --control-doodle-segment-focus: var(--fj-shape-segment-focus);
  --control-doodle-circle-focus: var(--fj-shape-circle-focus);
  --control-doodle-pill-focus: var(--fj-shape-pill-focus);
  --control-doodle-pill-hover: var(--fj-shape-pill-hover);
  --control-doodle-rounded-fill: url("./assets/ui/doodle-rounded-control-fill.svg");
  --control-doodle-rounded-outline: url("./assets/ui/doodle-rounded-control-outline.svg");
  --control-doodle-rainbow-circle: url("./assets/ui/doodle-rainbow-circle.svg");
  --control-doodle-island: var(--fj-shape-island);
}

/* Edit photo: complete-image preview and one explicit Image -> Prompt flow. */
html body:not(.home-open) #photoInspector[data-kind="photo"] .item-inspector-common {
  display: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-head {
  align-items: center !important;
  margin-bottom: 12px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-head h2 {
  margin: 0 !important;
  font: 650 19px/1.15 var(--flowjam-ui-font) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-preview {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  padding: 10px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 16px 13px 18px 14px / 14px 18px 13px 17px !important;
  background: color-mix(in srgb, var(--control-doodle-ice) 42%, var(--control-doodle-paper)) !important;
  box-shadow: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-preview-art {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  filter: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"][data-cutout="false"][data-photo-presentation="polaroid"] .photo-inspector-preview-art {
  width: auto !important;
  height: 92% !important;
  max-width: 92% !important;
  max-height: 92% !important;
  aspect-ratio: var(--photo-frame-aspect, 1.12) !important;
  padding: 6px 6px 18px !important;
  background: var(--photo-frame-colour, var(--control-doodle-paper)) !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--control-doodle-ink) 16%, transparent),
    0 4px 10px rgba(66, 47, 14, .12) !important;
  transform: rotate(-.8deg) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-preview img {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 8px 6px 9px 7px !important;
  filter: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"][data-cutout="false"][data-photo-presentation="polaroid"] .photo-inspector-preview img {
  object-fit: cover !important;
  border-radius: 0 !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-inspector-fields {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 7px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-control {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-control {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-control[hidden] {
  display: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-control > span {
  color: var(--control-doodle-muted) !important;
  font: 650 10px/1.2 var(--flowjam-ui-font) !important;
  letter-spacing: .04em !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-options {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(7, 23px) !important;
  justify-content: end !important;
  gap: 4px !important;
  padding: 4px !important;
  overflow: visible !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-options :is(.inspector-colour-swatch, .inspector-custom-trigger) {
  width: 23px !important;
  height: 23px !important;
  min-width: 23px !important;
  padding: 0 !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-editor {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-frame-colour-editor[hidden] {
  display: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-control > span,
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(.photo-reading-head > span, .photo-sound-label label) {
  color: var(--control-doodle-muted) !important;
  font: 650 10px/1.2 var(--flowjam-ui-font) !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent var(--control-doodle-pill-outline) center / 100% 100% no-repeat !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > button,
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > button:hover {
  min-width: 0 !important;
  min-height: 30px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 999px !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--control-doodle-ink) !important;
  font: 550 10px/1 var(--flowjam-ui-font) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > button[aria-pressed="true"] {
  background: var(--control-doodle-ice) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > button:focus-visible {
  outline: 2px solid var(--control-doodle-focus) !important;
  outline-offset: -2px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-reading-card {
  margin: 1px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt),
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt):focus {
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 96px !important;
  box-sizing: border-box !important;
  margin: 5px 0 0 !important;
  padding: 10px 14px !important;
  border: 1.5px solid var(--control-doodle-line) !important;
  border-radius: 17px 15px 18px 16px / 16px 18px 15px 17px !important;
  outline: 0 !important;
  background: var(--control-doodle-paper) !important;
  box-shadow: none !important;
  color: var(--control-doodle-ink) !important;
  font: 500 11px/1.35 var(--flowjam-ui-font) !important;
  resize: none !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--studio-scroll-thumb, var(--control-doodle-focus)) transparent !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt)::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt)::-webkit-scrollbar-track {
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt)::-webkit-scrollbar-thumb {
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--studio-scroll-thumb, var(--control-doodle-focus)) !important;
  background-clip: border-box !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] :is(#photoInspectorScene, #photoInspectorPrompt):focus {
  border-color: var(--control-doodle-focus) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow,
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow:hover {
  justify-self: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: grid !important;
  place-items: center !important;
  margin: -1px 0 -2px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background: transparent var(--control-doodle-circle-ice) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: var(--fj-blue) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow:focus-visible {
  background-image: var(--control-doodle-circle-focus) !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow:disabled {
  opacity: .42 !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow.pending {
  opacity: .68 !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-map-arrow svg {
  width: 25px !important;
  height: 25px !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.35 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-sound-label {
  min-height: 0 !important;
  margin: -1px 0 -3px !important;
}
html body:not(.home-open) .item-photo .photo-original-art {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
html body:not(.home-open) .item-photo .photo-original-art img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 5px 4px 7px 6px !important;
}
html body:not(.home-open) .item-photo:not(.cutout)[data-photo-presentation="polaroid"] .card-face {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--control-doodle-ink) 15%, transparent),
    0 3px 7px rgba(66, 47, 14, .10) !important;
}
html body:not(.home-open) :is(.item-note.text-tape, .drag-ghost .idea-tape-preview) {
  font-family: var(--flowjam-ui-font) !important;
}

/* Placed emoji are paper stickers, not floating tiles. Keep only a thin
   white cut edge and a near-contact shadow on the artwork itself. */
html body:not(.home-open) :is(.item.item-instrument, .item.item-note.ambience-item) {
  box-shadow: none !important;
  filter: none !important;
}
html body:not(.home-open) .item.item-instrument .inst-emoji,
html body:not(.home-open) .item.item-note.ambience-item .ambience-emoji-art {
  display: block !important;
  filter:
    drop-shadow(1.25px 0 0 rgba(255, 255, 255, .9))
    drop-shadow(-1.25px 0 0 rgba(255, 255, 255, .9))
    drop-shadow(0 1.25px 0 rgba(255, 255, 255, .9))
    drop-shadow(0 -1.25px 0 rgba(255, 255, 255, .9))
    drop-shadow(0 1px .6px rgba(35, 40, 44, .065)) !important;
}

/* Keys: circular octave controls and a flat, blue, hand-drawn keyboard. */
@media (min-width: 1100px) {
  html body.mode-keys:not(.home-open) {
    --studio-p3-keys-height: 156px;
  }
  html body.mode-keys:not(.home-open) #keysDock.dock:not(.is-positioned) {
    height: var(--studio-p3-keys-height) !important;
  }
  html body.mode-keys:not(.home-open) #keysDock.dock:not(.is-positioned) .midi-chassis {
    height: var(--studio-p3-keys-height) !important;
    min-height: var(--studio-p3-keys-height) !important;
    grid-template-rows: 28px 32px var(--studio-p3-keyboard-height) !important;
    gap: 4px !important;
    padding: 8px 13px 16px !important;
    box-shadow: none !important;
  }
}
html body.mode-keys:not(.home-open) #keysDock .keyboard {
  align-items: end !important;
}
html body.mode-keys:not(.home-open) #keysDock .octave-bank {
  width: 56px !important;
  height: 61px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body.mode-keys:not(.home-open) #keysDock .oct-key,
html body.mode-keys:not(.home-open) #keysDock .oct-key:hover {
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  aspect-ratio: 1 !important;
  flex: 0 0 24px !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: var(--control-doodle-circle) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  box-shadow: none !important;
}
html body.mode-keys:not(.home-open) #keysDock .pkey,
html body.mode-keys:not(.home-open) #keysDock .pkey:hover {
  border: 1.25px solid color-mix(in srgb, var(--control-doodle-line) 62%, white) !important;
  border-radius: 5px 4px 7px 6px / 4px 6px 5px 7px !important;
  background: var(--control-doodle-paper) !important;
  box-shadow: none !important;
}
html body.mode-keys:not(.home-open) #keysDock .pkey.black,
html body.mode-keys:not(.home-open) #keysDock .pkey.black:nth-child(even),
html body.mode-keys:not(.home-open) #keysDock .pkey.black:hover {
  border: 1.25px solid color-mix(in srgb, var(--fj-blue) 68%, var(--control-doodle-focus)) !important;
  border-radius: 4px 3px 6px 5px / 3px 5px 4px 6px !important;
  background: var(--fj-blue) !important;
  box-shadow: none !important;
  color: var(--control-doodle-paper) !important;
}
html body.mode-keys:not(.home-open) #keysDock .pkey.black .pk-bind {
  color: var(--control-doodle-paper) !important;
  opacity: .9 !important;
}
html body.mode-keys:not(.home-open) #keysDock .pkey.active,
html body.mode-keys:not(.home-open) #keysDock .pkey.black.active {
  border-color: var(--control-doodle-focus) !important;
  background: var(--fj-pool) !important;
  box-shadow: none !important;
}

/* Edit text: one clear title, rounded fields, circular colour language. */
html body:not(.home-open) #photoInspector:not([data-kind="photo"]) .photo-inspector-head {
  align-items: center !important;
  margin-bottom: 20px !important;
}
html body:not(.home-open) #photoInspector:not([data-kind="photo"]) .photo-inspector-head h2 {
  margin: 0 !important;
  font: 650 19px/1.15 var(--flowjam-ui-font) !important;
}
html body:not(.home-open) #photoInspector:not([data-kind="photo"]) .item-inspector-common {
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 0 !important;
}
html body:not(.home-open) #photoInspector .item-inspector-text-field {
  gap: 8px !important;
}
html body:not(.home-open) #photoInspector .item-inspector-text-field > span {
  color: var(--control-doodle-muted) !important;
  font: 650 9px/1.2 var(--flowjam-ui-font) !important;
  letter-spacing: .09em !important;
}
html body:not(.home-open) #photoInspector #itemInspectorText,
html body:not(.home-open) #photoInspector #itemInspectorText:focus {
  width: 100% !important;
  height: 42px !important;
  box-sizing: border-box !important;
  padding: 8px 18px 9px !important;
  overflow: hidden !important;
  border: 1.5px solid var(--control-doodle-line) !important;
  border-radius: 20px !important;
  outline: 0 !important;
  background-color: var(--control-doodle-paper) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--control-doodle-ink) !important;
  font: 550 12px/1.2 var(--flowjam-ui-font) !important;
}
html body:not(.home-open) #photoInspector #itemInspectorText:focus {
  border-color: var(--control-doodle-focus) !important;
}
html body:not(.home-open) #photoInspector .item-inspector-colors .inspector-color-field {
  overflow: visible !important;
}
html body:not(.home-open) #photoInspector .item-inspector-colors .inspector-color-reference {
  gap: 10px !important;
  padding: 4px 3px 5px !important;
  overflow: visible !important;
}
html body:not(.home-open) #photoInspector .item-inspector-colors :is(
  .inspector-colour-swatch.on,
  .inspector-colour-swatch[aria-pressed="true"]
)::after {
  content: "" !important;
  position: absolute !important;
  z-index: 3 !important;
  inset: -4px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  border: 3px solid var(--control-doodle-focus) !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  transform: rotate(-2deg) !important;
  pointer-events: none !important;
}
html body:not(.home-open) #photoInspector .inspector-custom-trigger,
html body:not(.home-open) #photoInspector .inspector-custom-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  aspect-ratio: 1 !important;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1.35px solid var(--control-doodle-line) !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background-color: var(--control-doodle-paper) !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}
html body:not(.home-open) #photoInspector .inspector-custom-trigger[aria-expanded="true"] {
  border-color: var(--control-doodle-focus) !important;
  border-width: 2px !important;
}
html body:not(.home-open) #photoInspector .inspector-custom-trigger.on::after,
html body:not(.home-open) #photoInspector .inspector-custom-trigger[aria-pressed="true"]::after {
  content: "" !important;
  position: absolute !important;
  z-index: 3 !important;
  inset: -4px !important;
  display: block !important;
  border: 3px solid var(--control-doodle-focus) !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
}
html body:not(.home-open) #photoInspector .inspector-rainbow-plus,
html body:not(.home-open) #photoInspector .inspector-custom-trigger:is(:hover, [aria-expanded="true"]) .inspector-rainbow-plus {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  display: block !important;
  position: relative !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  text-align: center !important;
  text-shadow: none !important;
  transform: none !important;
}
html body:not(.home-open) #photoInspector .inspector-rainbow-plus::before,
html body:not(.home-open) #photoInspector .inspector-rainbow-plus::after {
  content: "" !important;
  position: absolute !important;
  z-index: 2 !important;
  left: 50% !important;
  top: 50% !important;
  border-radius: 999px !important;
  background: var(--control-doodle-ink) !important;
  transform: translate(-50%, -50%) !important;
}
html body:not(.home-open) #photoInspector .inspector-rainbow-plus::before { width: 14px !important; height: 2.5px !important; }
html body:not(.home-open) #photoInspector .inspector-rainbow-plus::after { width: 2.5px !important; height: 14px !important; }
html body:not(.home-open) #photoInspector .inspector-inline-palette {
  grid-template-columns: 104px minmax(0, 1fr) !important;
  gap: 14px 16px !important;
  margin-top: 12px !important;
  padding: 20px 18px 18px !important;
  overflow: visible !important;
}
html body:not(.home-open) #photoInspector .inspector-inline-palette > label,
html body:not(.home-open) #photoInspector .item-inspector-colors .inspector-inline-palette > label {
  width: 104px !important;
  gap: 7px !important;
}
html body:not(.home-open) #photoInspector .inspector-inline-palette > label input,
html body:not(.home-open) #photoInspector .item-inspector-colors .inspector-inline-palette > label input {
  width: 104px !important;
  height: 38px !important;
  box-sizing: border-box !important;
  padding: 7px 12px 8px !important;
  border: 1.5px solid var(--control-doodle-line) !important;
  border-radius: 18px !important;
  background-color: var(--control-doodle-paper) !important;
  background-image: none !important;
  font-size: 11px !important;
}
html body:not(.home-open) #photoInspector .inspector-hue-strip {
  height: 18px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  border: 2px solid var(--control-doodle-paper) !important;
  border-radius: 999px !important;
  outline: 1.5px solid var(--control-doodle-line) !important;
  outline-offset: -1px !important;
  box-shadow: none !important;
}
html body:not(.home-open) #photoInspector .inspector-hue-strip > span {
  width: 17px !important;
  height: 17px !important;
  box-sizing: border-box !important;
  border: 2px solid var(--control-doodle-focus) !important;
  border-radius: 50% !important;
  background-color: var(--control-doodle-paper) !important;
  background-image: none !important;
  box-shadow: 0 0 0 2px var(--control-doodle-paper) !important;
}
html body:not(.home-open) #photoInspector .inspector-tone-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  padding: 2px 3px !important;
  overflow: visible !important;
}
html body:not(.home-open) #photoInspector .inspector-tone {
  width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  aspect-ratio: 1 !important;
  padding: 0 !important;
  border: 1.35px solid color-mix(in srgb, var(--control-doodle-line) 74%, white) !important;
  border-radius: 50% !important;
  background-color: var(--swatch) !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}
html body:not(.home-open) #photoInspector #itemTextStyle {
  min-height: 42px !important;
  grid-template-columns: minmax(0, 1fr) 64px 64px !important;
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 0 !important;
}
html body:not(.home-open) #photoInspector #itemTextStyle > span {
  color: var(--control-doodle-muted) !important;
  font: 650 10px/1.2 var(--flowjam-ui-font) !important;
  letter-spacing: .03em !important;
}
html body:not(.home-open) #photoInspector #itemTextStyle > button,
html body:not(.home-open) #photoInspector #itemTextStyle > button:is(:hover, :focus-visible, .on, [aria-pressed="true"]) {
  min-width: 64px !important;
  min-height: 36px !important;
  padding: 7px 13px 8px !important;
  overflow: visible !important;
  border: 1.5px solid transparent !important;
  border-radius: 17px !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--control-doodle-ink) !important;
  transform: none !important;
}
html body:not(.home-open) #photoInspector #itemTextStyle > button:is(.on, [aria-pressed="true"]) {
  border-color: var(--control-doodle-focus) !important;
  background-color: color-mix(in srgb, var(--control-doodle-ice) 38%, var(--control-doodle-paper)) !important;
}


/* Element artwork scales, but its editing affordances stay screen-sized. */
html body:not(.home-open) .item .item-transform-handle,
html body:not(.home-open) .item > .remove {
  scale: var(--item-control-scale, 1) !important;
  transform-origin: center !important;
}
/* Sticker artwork may intentionally use white ink. Editing affordances keep
   their own dark UI ink so they remain visible on the white control circles. */
html body:not(.home-open) .item-deco > .remove,
html body:not(.home-open) .item-deco .item-rotate-handle {
  color: var(--control-doodle-ink) !important;
}
html body:not(.home-open) .item-deco .item-rotate-handle .round-icon-rotate > path {
  stroke: currentColor !important;
}
html body:not(.home-open) .item .item-rotate-handle {
  top: calc(-10px - 26px * var(--item-control-scale, 1)) !important;
}
html body:not(.home-open) .item > .remove {
  top: calc(-10px - 26px * var(--item-control-scale, 1)) !important;
  right: calc(-10px + 2px * var(--item-control-scale, 1)) !important;
}
html body:not(.home-open) .item-note.text-tape .item-rotate-handle,
html body:not(.home-open) .item-note.text-tape > .remove {
  top: calc(-10px - 17px * var(--item-control-scale, 1)) !important;
}
html body:not(.home-open) .item-note.text-tape > .remove {
  right: calc(-10px - 2px * var(--item-control-scale, 1)) !important;
}
html body:not(.home-open) .item .item-scale-nw {
  top: calc(13px * var(--item-control-scale, 1) - 13px) !important;
  left: calc(13px * var(--item-control-scale, 1) - 13px) !important;
}
html body:not(.home-open) .item .item-scale-ne {
  top: calc(13px * var(--item-control-scale, 1) - 13px) !important;
  right: calc(13px * var(--item-control-scale, 1) - 13px) !important;
  left: auto !important;
}
html body:not(.home-open) .item .item-scale-se {
  right: calc(13px * var(--item-control-scale, 1) - 13px) !important;
  bottom: calc(13px * var(--item-control-scale, 1) - 13px) !important;
}
html body:not(.home-open) .item .item-scale-sw {
  bottom: calc(13px * var(--item-control-scale, 1) - 13px) !important;
  left: calc(13px * var(--item-control-scale, 1) - 13px) !important;
}

/* Camera DJ guide: keep the instructions fully inside one calm utility card. */
html body:not(.home-open) #camLegend.cam-legend {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
}
html body:not(.home-open) #camLegend .cam-legend-toggle,
html body:not(.home-open) #camLegend.is-compact .cam-legend-toggle,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .cam-legend-toggle {
  min-height: 40px !important;
  box-sizing: border-box !important;
  grid-template-columns: 23px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 10px 16px 5px !important;
  font: 650 11px/1.25 var(--flowjam-ui-font) !important;
}
html body:not(.home-open) #camLegend .cam-guide-mark {
  width: 23px !important;
  height: 23px !important;
  color: var(--control-doodle-focus) !important;
}
html body:not(.home-open) #camLegend .cam-guide-mark svg {
  width: 21px !important;
  height: 21px !important;
}
html body:not(.home-open) #camLegend .cam-legend-list,
html body:not(.home-open) #camLegend.is-compact .cam-legend-list,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .cam-legend-list {
  position: relative !important;
  max-height: none !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  gap: 2px !important;
  padding: 7px 16px 10px !important;
  overflow: visible !important;
  border-top: 0 !important;
}
html body:not(.home-open) #camLegend .cam-legend-list::before {
  content: "" !important;
  position: absolute !important;
  z-index: 0 !important;
  top: 0 !important;
  right: 16px !important;
  left: 16px !important;
  height: 2px !important;
  background: repeating-linear-gradient(
    91deg,
    var(--control-doodle-focus) 0 9px,
    transparent 9px 14px
  ) !important;
  opacity: .48 !important;
  transform: rotate(-.25deg) !important;
  transform-origin: center !important;
  pointer-events: none !important;
}
html body:not(.home-open) #camLegend .dj-row,
html body:not(.home-open) #camLegend.is-compact .dj-row,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .dj-row {
  min-width: 0 !important;
  height: auto !important;
  min-height: 22px !important;
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: 23px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  color: var(--control-doodle-ink) !important;
  font: 550 10px/1.2 var(--flowjam-ui-font) !important;
  opacity: .9 !important;
}
html body:not(.home-open) #camLegend .dj-row span:last-child {
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
html body:not(.home-open) #camLegend .dj-ico {
  width: 23px !important;
  display: grid !important;
  place-items: center !important;
  color: var(--control-doodle-focus) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}


/* Scope the type system to application chrome, never to canvas artwork. */
body:not(.home-open) :is(
  .topbar, #archiveShell, #photoInspector, #keysDock, #camLegend,
  #recordsDrawer, #mixerPanel, #confirmDialog, #takeReview
) {
  --body: var(--flowjam-ui-font);
  --hand: var(--flowjam-ui-font);
  --home-ui: var(--flowjam-ui-font);
  --home-hand: var(--flowjam-ui-font);
  --display: var(--flowjam-ui-font);
  font-family: var(--flowjam-ui-font) !important;
}
body:not(.home-open) .topbar :is(.now-time, .rec-time) {
  font-family: var(--flowjam-ui-font) !important;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 761px) {
  /* The native hidden contract must win over the legacy flex declaration. */
  body:not(.home-open) #tagForm[hidden] {
    display: none !important;
  }
  body:not(.home-open) .studio-mixer-toggle {
    position: relative !important;
    isolation: isolate !important;
    z-index: 3 !important;
    width: 70px !important;
    min-width: 70px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 4px 8px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: var(--studio-doodle-island-fill) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
    font: 650 9px/1 var(--flowjam-ui-font) !important;
    pointer-events: auto !important;
  }
  body:not(.home-open) .studio-mixer-toggle::after {
    content: "" !important;
    position: absolute !important;
    z-index: 20 !important;
    inset: 0 !important;
    display: block !important;
    background: var(--studio-doodle-island-outline) center / 100% 100% no-repeat !important;
    pointer-events: none !important;
  }
  body:not(.home-open) .studio-mixer-toggle > * { position: relative; z-index: 1; }
  body:not(.home-open) .studio-mixer-toggle svg {
    width: 18px !important;
    height: 18px !important;
    overflow: visible !important;
    fill: var(--control-doodle-paper) !important;
    stroke: var(--control-doodle-ink) !important;
    stroke-width: 1.6 !important;
    stroke-linecap: round !important;
  }
  body:not(.home-open) .studio-mixer-toggle:is(:hover, [aria-expanded="true"]) {
    background-image: var(--studio-doodle-island-fill) !important;
    color: var(--control-doodle-ink) !important;
  }
  body:not(.home-open) .studio-mixer-toggle[aria-expanded="true"]::before {
    content: "" !important;
    position: absolute !important;
    z-index: 0 !important;
    inset: 6px !important;
    border-radius: 999px !important;
    background: var(--control-doodle-selected) !important;
  }
  body:not(.home-open) .studio-mixer-toggle:focus-visible {
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--control-doodle-focus) 72%, transparent)) !important;
  }

  body:not(.home-open) #mixerPanel :is(.mixer-panel-head, .mixer-panel-note, .mixer-rows, .mixer-empty) {
    position: relative !important;
    z-index: 1 !important;
  }
  body:not(.home-open) #mixerPanel .mixer-panel-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin: 0 0 5px !important;
  }
  body:not(.home-open) #mixerPanel .mixer-panel-head > div > span {
    display: block !important;
    margin-bottom: 3px !important;
    color: var(--control-doodle-muted) !important;
    font: 700 7px/1 var(--flowjam-ui-font) !important;
    letter-spacing: .12em !important;
  }
  body:not(.home-open) #mixerPanel .mixer-panel-head h2 {
    margin: 0 !important;
    color: var(--control-doodle-ink) !important;
    font: 700 17px/1.08 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #mixerPanel #mixerClose {
    position: relative !important;
    z-index: 2 !important;
    width: 29px !important;
    height: 29px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 50% !important;
    background: var(--control-doodle-circle) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
    font: 600 15px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #mixerPanel #mixerClose:hover { background-image: var(--control-doodle-circle-ice) !important; }
  body:not(.home-open) #mixerPanel #mixerClose:focus-visible { background-image: var(--control-doodle-circle-focus) !important; }
  body:not(.home-open) #mixerPanel .mixer-panel-note {
    margin: 0 0 11px !important;
    color: var(--control-doodle-muted) !important;
    font: 500 11px/1.35 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #mixerPanel .mixer-rows {
    display: grid !important;
    gap: 7px !important;
  }
  body:not(.home-open) #mixerPanel .mixer-empty {
    margin: 10px 2px 0 !important;
    color: var(--control-doodle-muted) !important;
    font: 500 11px/1.4 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row {
    display: grid !important;
    grid-template-columns: 25px minmax(0, 1fr) 34px !important;
    grid-template-rows: 18px 14px !important;
    align-items: center !important;
    column-gap: 7px !important;
    min-width: 0 !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row-mark {
    grid-row: 1 / -1 !important;
    width: 25px !important;
    height: 25px !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--control-doodle-ice) !important;
    color: var(--control-doodle-ink) !important;
    font: 650 9px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row-name {
    min-width: 0 !important;
    overflow: hidden !important;
    color: var(--control-doodle-ink) !important;
    font: 600 10px/1 var(--flowjam-ui-font) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row-value {
    justify-self: end !important;
    color: var(--control-doodle-muted) !important;
    font: 650 10px/1 var(--flowjam-ui-font) !important;
    font-variant-numeric: tabular-nums !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row input[type="range"] {
    --mixer-share: calc((var(--value, 50) - 0) * 1%);
    grid-column: 2 / -1 !important;
    width: 100% !important;
    height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    appearance: none !important;
    background: transparent !important;
    cursor: ew-resize !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row input[type="range"]::-webkit-slider-runnable-track {
    height: 3px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--control-doodle-line) 72%, white) !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row input[type="range"]::-webkit-slider-thumb {
    width: 14px !important;
    height: 14px !important;
    margin-top: -5.5px !important;
    border: 1.5px solid var(--control-doodle-line) !important;
    border-radius: 48% 52% 49% 51% !important;
    appearance: none !important;
    background: var(--control-doodle-selected) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row input[type="range"]:focus-visible::-webkit-slider-thumb {
    border-color: var(--control-doodle-focus) !important;
    box-shadow: 0 0 0 2px var(--control-doodle-paper), 0 0 0 3px var(--control-doodle-focus) !important;
  }
  body:not(.home-open) #mixerPanel .mixer-row input[type="range"]:disabled { opacity: .55 !important; cursor: default !important; }

  @media (max-width: 1099px) {
    body:not(.home-open) .studio-mixer-toggle { width: 44px !important; min-width: 44px !important; padding: 4px !important; }
    body:not(.home-open) .studio-mixer-toggle > span { display: none !important; }
    body:not(.home-open) .studio-control-cluster { gap: 6px !important; }
  }
  /* Transport: JS may replace textContent, so the visible glyphs stay pseudo-elements. */
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn) {
    position: relative !important;
    width: 31px !important;
    min-width: 31px !important;
    height: 31px !important;
    flex: 0 0 31px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    color: transparent !important;
    font-size: 0 !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #playPause {
    width: 34px !important; min-width: 34px !important; flex-basis: 34px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn):hover:not(:disabled) {
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-ice) !important;
    transform: translateY(-1px) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn):focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #playPause:focus-visible {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn):disabled { opacity: .38 !important; }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn)::before,
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn)::after {
    content: "" !important; position: absolute !important; display: block !important; left: 50% !important; top: 50% !important; pointer-events: none !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #stopBtn::before {
    width: 8px !important; height: 8px !important; border: 0 !important; border-radius: 3px 2px 3px 2px !important;
    background: #86a9c7 !important; clip-path: polygon(7% 8%, 95% 2%, 100% 91%, 10% 100%) !important;
    transform: translate(-50%, -50%) rotate(-2deg) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #playPause::before {
    width: 11px !important; height: 13px !important; margin: 0 !important; border: 0 !important;
    background: #6191ba !important; clip-path: polygon(8% 2%, 98% 48%, 13% 98%) !important;
    transform: translate(-42%, -50%) rotate(-2deg) !important;
  }
  body.transport-playing:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #playPause::before {
    width: 11px !important; height: 13px !important; border: 0 !important; clip-path: none !important;
    background: linear-gradient(90deg, #6191ba 0 34%, transparent 34% 66%, #6191ba 66%) !important;
    transform: translate(-50%, -50%) rotate(-1deg) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #recBtn::before {
    width: 10px !important; height: 10px !important; border: 0 !important; border-radius: 50% !important;
    background: #d98a91 !important; clip-path: none !important; transform: translate(-50%, -50%) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #recBtn.recording::before {
    border-radius: 3px 2px 3px 2px !important; transform: translate(-50%, -50%) rotate(2deg) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > :is(#stopBtn, #playPause, #recBtn)::after { content: none !important; }

  /* Reusable pill controls. Selected controls keep the same single perimeter. */
  body:not(.home-open) :is(
    .base-template-tabs button, .appearance-palette-toggle,
    .snap-mode-button, .photo-add-files, .photo-add-popover button,
    .item-inspector-segment button, .photo-edge-control button, .photo-auto-match-card button,
    .keys-toggle, .keys-refresh, .keys-window-close, .records-drawer-close,
    .confirm-actions button, .take-actions button, .modal-close,
    .download-trigger, .download-option, .tag-ok
  ) {
    border: 0 !important; outline: 0 !important; border-radius: 999px !important;
    background-color: transparent !important; background-image: var(--control-doodle-segment) !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: 100% 100% !important;
    box-shadow: none !important; color: var(--control-doodle-ink) !important;
  }
  body:not(.home-open) :is(
    .base-template-tabs button.on, .snap-mode-button.on, .item-inspector-segment button.on,
    .photo-edge-control button.on, .photo-edge-control button[aria-pressed="true"],
    .keys-toggle.on, .keys-toggle[aria-pressed="true"], .camera-power.on
  ) { background-color: transparent !important; background-image: var(--control-doodle-segment-selected) !important; box-shadow: none !important; }
  body:not(.home-open) :is(
    .base-template-tabs button, .appearance-palette-toggle,
    .snap-mode-button, .photo-add-files, .photo-add-popover button,
    .item-inspector-segment button, .photo-edge-control button, .photo-auto-match-card button,
    .keys-toggle, .keys-refresh, .keys-window-close, .records-drawer-close,
    .confirm-actions button, .take-actions button, .modal-close,
    .download-trigger, .download-option, .tag-ok
  ):focus-visible { outline: 0 !important; background-image: var(--control-doodle-segment-focus) !important; }
  body:not(.home-open) :is(
    .base-template-tabs button.on, .snap-mode-button.on, .item-inspector-segment button.on,
    .photo-edge-control button.on, .photo-edge-control button[aria-pressed="true"],
    .keys-toggle.on, .keys-toggle[aria-pressed="true"]
  ):focus-visible { background-image: var(--control-doodle-segment-selected-focus) !important; }

  /* Segmented choices repeat the exact Figma construction: one outside path,
     no inner path on the idle choice, one green/path layer on the selection. */
  body:not(.home-open) .base-template-tabs {
    min-height: 44px !important;
    box-sizing: border-box !important;
    padding: 6px !important;
    gap: 1px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .base-template-tabs > button {
    height: 32px !important;
  }
  body:not(.home-open) .base-template-tabs > button:not(.on),
  body:not(.home-open) .base-template-tabs > button:not(.on):hover {
    background-color: transparent !important;
    background-image: none !important;
  }
  body:not(.home-open) :is(.item-inspector-segment, .photo-edge-control) > button:not(.on):not([aria-pressed="true"]),
  body:not(.home-open) :is(.item-inspector-segment, .photo-edge-control) > button:not(.on):not([aria-pressed="true"]):hover {
    background-color: transparent !important;
    background-image: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:is(.on, [aria-pressed="true"]) {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
  }
  /* The legacy topbar rule is more specific than the shared selected-state
     selector above. Keep Camera DJ on the same green selected surface once
     camera startup succeeds, including while the pointer remains over it. */
  body:not(.home-open) .topbar .studio-performance-island #camBtn:is(.on, [aria-pressed="true"]),
  body:not(.home-open) .topbar .studio-performance-island #camBtn:is(.on, [aria-pressed="true"]):hover {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-segment-focus) !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:is(.on, [aria-pressed="true"]):focus-visible {
    background-image: var(--control-doodle-segment-selected-focus) !important;
  }
  body:not(.home-open) .topbar .studio-performance-island #camBtn:is(.on, [aria-pressed="true"]):focus-visible {
    background-image: var(--control-doodle-segment-selected-focus) !important;
  }

  /* Photo capture: simple drawn round controls, no industrial rings. */
  body:not(.home-open) :is(.camera-power, .photo-polaroid .snap-go) {
    border: 0 !important; outline: 0 !important; border-radius: 50% !important; background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important; background-repeat: no-repeat !important;
    background-position: center !important; background-size: 100% 100% !important; box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
  }
  body:not(.home-open) .photo-polaroid:not(.camera-on) .camera-power { background-color: transparent !important; background-image: var(--control-doodle-circle) !important; }
  body:not(.home-open) .photo-polaroid .snap-go:not(:disabled) { background-color: transparent !important; background-image: var(--control-doodle-circle-coral) !important; }
  body:not(.home-open) :is(.camera-power, .photo-polaroid .snap-go):focus-visible { outline: 0 !important; background-image: var(--control-doodle-circle-focus) !important; }
  body:not(.home-open) .photo-polaroid:not(.camera-on) .camera-power:focus-visible { background-image: var(--control-doodle-circle-focus) !important; }
  body:not(.home-open) .photo-polaroid .snap-go:not(:disabled):focus-visible { background-image: var(--control-doodle-circle-coral-focus) !important; }
  body:not(.home-open) .snap-shutter-dot, body:not(.home-open) .snap-shutter-dot::after { border: 0 !important; box-shadow: none !important; }

  body:not(.home-open) .snap-mode-pick {
    box-sizing: border-box !important;
    padding: 3px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .snap-mode-pick > .snap-mode-button:not(.on) {
    background-image: none !important;
  }
  /* The compact Add control is circular; stretching the wide segment asset
     into this square clipped its lower path. Match geometry to the artwork. */
  body:not(.home-open) #photoAddMenuToggle.photo-add-files {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #photoAddMenuToggle.photo-add-files:hover {
    background-image: var(--control-doodle-circle-ice) !important;
  }
  body:not(.home-open) #photoAddMenuToggle.photo-add-files[aria-expanded="true"] {
    background-image: var(--control-doodle-circle-selected) !important;
  }
  body:not(.home-open) #photoAddMenuToggle.photo-add-files:focus-visible {
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body:not(.home-open) .booth-printer-slot {
    height: 12px !important;
    margin-inline: 13px !important;
    overflow: hidden !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: url("./assets/ui/doodle-printer-slot.svg?v=2") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 10px !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .booth-printer-slot::after {
    content: none !important;
    display: none !important;
  }
  body:not(.home-open) .booth-printer-indicator,
  body:not(.home-open) .booth-printer-indicator > span {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .booth-printer-indicator {
    display: none !important;
    background: transparent !important;
  }
  body:not(.home-open) .booth-printer-indicator > span {
    background: var(--control-doodle-selected) !important;
  }
  body:not(.home-open) #photoTray .tray-empty {
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }

  /* Swatches are visual samples. Selection is a single light-blue doodle bed, never inset + outline. */
  body:not(.home-open) :is(.appearance-swatch, .base-pattern-swatch, .inspector-colour-swatch, .inspector-custom-trigger, .inspector-tone) {
    border: 0 !important; outline: 0 !important; box-shadow: none !important;
  }
  body:not(.home-open) :is(.inspector-custom-trigger.on, .inspector-tone.on) {
    border: 0 !important; outline: 0 !important; background-color: transparent !important; background-image: var(--control-doodle-card-selected) !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) :is(.inspector-custom-trigger.on, .inspector-tone.on)::before {
    border: 0 !important; outline: 0 !important; box-shadow: none !important;
  }
  body:not(.home-open) .appearance-swatch::before {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) :is(.appearance-swatch, .base-pattern-swatch),
  body:not(.home-open) :is(.appearance-swatch, .base-pattern-swatch):is(:hover, .on) {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open) :is(.appearance-swatch, .base-pattern-swatch, .inspector-custom-trigger, .inspector-tone):focus-visible {
    outline: 0 !important;
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--control-doodle-focus) 78%, transparent)) !important;
  }
  body:not(.home-open) .appearance-reference-swatches {
    gap: 4px 8px !important;
    padding-top: 2px !important;
  }
  body:not(.home-open) .appearance-reference-swatches .appearance-swatch {
    min-height: 84px !important;
    height: 84px !important;
    gap: 5px !important;
    transform: none !important;
  }
  body:not(.home-open) .appearance-reference-swatches .appearance-swatch:is(:hover, .on) {
    transform: translateY(-1px) !important;
  }
  body:not(.home-open) .appearance-reference-swatches .appearance-swatch::before {
    width: 66px !important;
    height: 66px !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .base-pattern-swatch i,
  body:not(.home-open) .base-pattern-swatch i::after,
  body:not(.home-open) .inspector-colour-swatch {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }

  /* Edit colours are real colour samples, not tiny selected-card assets.
     Every chip keeps the same closed perimeter (so white remains visible);
     selection is communicated by one small check without hiding the colour. */
  body:not(.home-open) .item-inspector-colors .inspector-colour-swatch {
    position: relative !important;
    isolation: isolate !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 50% !important;
    outline: 0 !important;
    background-color: var(--swatch) !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .item-inspector-colors :is(
    .inspector-colour-swatch,
    .inspector-colour-swatch.on,
    .inspector-colour-swatch[aria-pressed="true"]
  )::before {
    content: "" !important;
    position: absolute !important;
    z-index: 1 !important;
    inset: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    border: 1.35px solid color-mix(in srgb, var(--control-doodle-line) 72%, white) !important;
    border-radius: 49% 51% 48% 52% / 52% 48% 51% 49% !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: rotate(-1.2deg) !important;
    pointer-events: none !important;
  }
  body:not(.home-open) .item-inspector-colors :is(
    .inspector-colour-swatch.on,
    .inspector-colour-swatch[aria-pressed="true"]
  )::after {
    content: "✓" !important;
    position: absolute !important;
    z-index: 2 !important;
    right: -3px !important;
    bottom: -2px !important;
    width: 13px !important;
    height: 13px !important;
    display: grid !important;
    place-items: center !important;
    border: 1.25px solid var(--control-doodle-paper) !important;
    border-radius: 48% 52% 53% 47% / 52% 47% 53% 48% !important;
    outline: 0 !important;
    background: var(--control-doodle-focus) !important;
    box-shadow: none !important;
    color: white !important;
    font: 800 8px/1 var(--flowjam-ui-font) !important;
    transform: rotate(-6deg) !important;
    pointer-events: none !important;
  }
  body:not(.home-open) .item-inspector-colors .inspector-colour-swatch:focus-visible::before {
    border-color: var(--control-doodle-focus) !important;
    border-width: 2px !important;
  }

  /* Small internal cards/popovers use one low-amplitude perimeter. */
  body:not(.home-open) :is(
    .photo-add-popover, .appearance-custom-editor, .inspector-inline-palette,
    .photo-recognition-card, .photo-auto-match-card,
    .keys-choice-popover, .cam-legend, .download-menu, .records-empty-guide
  ) {
    border: 0 !important; outline: 0 !important; border-radius: 0 !important;
    background-color: var(--control-doodle-paper) !important; background-image: var(--control-doodle-card) !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .appearance-custom-editor.on { box-shadow: none !important; }
  body:not(.home-open) #recordsDrawer .records-empty-record {
    min-height: 34px !important;
    padding: 0 14px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
  }
  body:not(.home-open) #recordsDrawer .records-empty-record:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-pill-selected-focus) !important;
  }

  /* Inputs retain their meaning while adopting the same paper edge. */
  body:not(.home-open) :is(
    #itemInspectorText, #itemInspectorFill, #itemInspectorInk,
    #photoInspectorPrompt, #photoInspectorScene, .tag-input, .take-title
  ) {
    border: 0 !important; outline: 0 !important; border-radius: 999px !important;
    background-color: var(--control-doodle-paper) !important; background-image: var(--control-doodle-pill) !important;
    background-repeat: no-repeat !important; background-position: center !important; background-size: 100% 100% !important; box-shadow: none !important;
  }
  body:not(.home-open) :is(#photoInspectorPrompt, #photoInspectorScene) { border-radius: 18px !important; background-image: var(--control-doodle-card) !important; }
  body:not(.home-open) :is(#itemInspectorText, #itemInspectorFill, #itemInspectorInk, .tag-input, .take-title):focus {
    outline: 0 !important; background-image: var(--control-doodle-pill-focus) !important;
  }
  body:not(.home-open) :is(#photoInspectorPrompt, #photoInspectorScene):focus {
    outline: 0 !important; background-image: var(--control-doodle-card-focus) !important;
  }
  body:not(.home-open) .inspector-field-error {
    margin: 4px 4px 0 !important;
    color: #986268 !important;
    font: 500 9px/1.3 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) .inspector-color-field + .inspector-color-field {
    border-top: 0 !important;
  }
  body:not(.home-open) #boardTitle,
  body:not(.home-open) #boardTitle:hover {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #boardTitle:focus {
    outline: 0 !important;
    background-color: color-mix(in srgb, var(--control-doodle-ice) 72%, transparent) !important;
  }

  /* Header close controls are quiet circles, not square utility buttons. */
  body:not(.home-open) :is(.photo-inspector-head > button, .keys-window-close, .records-drawer-close, .modal-close) {
    width: 30px !important; min-width: 30px !important; height: 30px !important; padding: 0 !important;
    background-image: var(--control-doodle-circle) !important; background-color: transparent !important;
  }

  /* Modal actions keep semantics; destructive actions use a soft coral fill. */
  body:not(.home-open) :is(.confirm-accept, .take-discard) { background-color: transparent !important; background-image: var(--control-doodle-segment-coral) !important; color: #7b4147 !important; }
  body:not(.home-open) :is(.confirm-cancel, .take-keep) { background-color: transparent !important; background-image: var(--control-doodle-segment-selected) !important; color: var(--control-doodle-ink) !important; }

  /* P1 control polish ------------------------------------------------------
   * These rules style application controls only. Collage assets, the optical
   * disc and playable piano keys stay outside this selector set. */

  /* The floating Sources strip inherits the same friendly face as its panels. */
  body:not(.home-open) .source-toolbar,
  body:not(.home-open) .source-toolbar button {
    font-family: var(--flowjam-ui-font) !important;
    font-variation-settings: normal !important;
  }
  body:not(.home-open) .base-template-tabs > button,
  body:not(.home-open) .appearance-reference-swatches .appearance-swatch > span,
  body:not(.home-open) .appearance-more-palette .appearance-swatch > span,
  body:not(.home-open) .base-pattern-swatch > span,
  body:not(.home-open) .appearance-palette-toggle {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }
  body:not(.home-open) .base-template-tabs > button {
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }
  body:not(.home-open) :is(.appearance-reference-swatches, .appearance-more-palette) .appearance-swatch > span,
  body:not(.home-open) .base-pattern-swatch > span {
    font-weight: 550 !important;
  }
  body:not(.home-open) .studio-canvas-choice > button,
  body:not(.home-open) .studio-canvas-choice > button > span,
  body:not(.home-open) .studio-performance-island .perform-name,
  body:not(.home-open) #recordsDrawer .records-tab-label,
  body.mode-keys:not(.home-open) .keys-window-title {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  /* Performance states replace legacy inset bars, dots and dark error fills. */
  body:not(.home-open) .studio-performance-island .rail-tool-btn::after {
    content: none !important;
    display: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:hover:not(.on):not([aria-pressed="true"]):not(.pending):not(.err):not(.recording) {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-hover) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn.pending {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-pending) !important;
    color: #6f613d !important;
    box-shadow: none !important;
    animation: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:is(.err, .recording) {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-coral) !important;
    color: #824b4f !important;
    box-shadow: none !important;
    animation: none !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn.pending:focus-visible {
    background-image: var(--control-doodle-segment-pending-focus) !important;
  }
  body:not(.home-open) .studio-performance-island .rail-tool-btn:is(.err, .recording):focus-visible {
    background-image: var(--control-doodle-segment-coral-focus) !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #recBtn.recording,
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #recBtn.recording:hover {
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-coral) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .topbar .machine-top-transport.studio-playback-island > #recBtn.recording:focus-visible {
    background-image: var(--control-doodle-circle-coral-focus) !important;
  }
  body:not(.home-open) .topbar .rec-time {
    min-height: 20px !important;
    box-sizing: border-box !important;
    padding: 4px 9px !important;
    border: 0 !important;
    /* The SVG owns both fill and outline; a second capsule clips its blue edge. */
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill-coral) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: #824b4f !important;
    box-shadow: none !important;
    font: 600 11px/1 var(--flowjam-ui-font) !important;
  }

  /* Start Camera is an idle action. Green is reserved for an active camera. */
  body:not(.home-open) .photo-polaroid .camera-power[aria-pressed="false"],
  body:not(.home-open) .photo-polaroid:not(.camera-on) .camera-power {
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .photo-polaroid .camera-power[aria-pressed="false"]:hover,
  body:not(.home-open) .photo-polaroid:not(.camera-on) .camera-power:hover {
    background-image: var(--control-doodle-circle-ice) !important;
  }
  body:not(.home-open) .photo-polaroid.camera-on .camera-power.on,
  body:not(.home-open) .photo-polaroid .camera-power[aria-pressed="true"] {
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) .photo-polaroid .camera-power[aria-pressed="false"]:focus-visible {
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body:not(.home-open) .photo-polaroid .camera-power[aria-pressed="true"]:focus-visible {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }

  /* Edit and floating-window close controls have one drawn perimeter only. */
  body:not(.home-open) #photoInspector .photo-inspector-head > button,
  body:not(.home-open) #photoInspector .photo-inspector-head > button:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    transform: none !important;
  }
  body:not(.home-open) #photoInspector .photo-inspector-head > button:hover {
    background-image: var(--control-doodle-circle-ice) !important;
  }
  body:not(.home-open) #photoInspector .photo-inspector-head > button:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-circle-focus) !important;
  }

  /* Keys chrome is light and drawn; the actual white/black keys are untouched. */
  body.mode-keys:not(.home-open) :is(.keys-window-bar, .midi-panel) {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) :is(.keys-window-title, .key-volume, .keys-toggle, .keys-refresh, .midi-status, .oct-key) {
    font-family: var(--flowjam-ui-font) !important;
    font-variation-settings: normal !important;
  }
  body.mode-keys:not(.home-open) .key-volume {
    position: relative !important;
    isolation: isolate !important;
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    height: 32px !important;
    min-height: 32px !important;
    box-sizing: border-box !important;
    justify-self: end !important;
    grid-template-columns: auto minmax(58px, 1fr) auto !important;
    gap: 7px !important;
    padding: 0 12px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill-fill) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-muted, #547462) !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume::after {
    content: "" !important;
    position: absolute !important;
    z-index: 3 !important;
    inset: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--control-doodle-pill-outline) center / 100% 100% no-repeat !important;
    pointer-events: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume > * {
    position: relative !important;
    z-index: 1 !important;
  }
  body.mode-keys:not(.home-open) .key-volume > span,
  body.mode-keys:not(.home-open) .key-volume output {
    color: var(--control-doodle-ink) !important;
    font: 550 10px/1 var(--flowjam-ui-font) !important;
    text-transform: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume output {
    min-width: 26px !important;
  }
  body.mode-keys:not(.home-open) :is(.keys-toggle, .keys-refresh) {
    min-height: 28px !important;
    padding-inline: 9px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }
  body.mode-keys:not(.home-open) .grain-icon {
    font-size: 13px !important;
  }
  body.mode-keys:not(.home-open) .midi-status:not(:empty) {
    max-width: 72px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"] {
    width: 100% !important;
    min-width: 58px !important;
    height: 16px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    accent-color: var(--control-doodle-selected) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]::-webkit-slider-runnable-track {
    height: 3px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--control-doodle-line) !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]::-webkit-slider-thumb {
    width: 14px !important;
    height: 14px !important;
    margin-top: -5.5px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]:focus-visible::-webkit-slider-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]::-moz-range-track {
    height: 3px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--control-doodle-line) !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]::-moz-range-progress {
    height: 3px !important;
    border-radius: 999px !important;
    background: var(--control-doodle-selected) !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]::-moz-range-thumb {
    width: 14px !important;
    height: 14px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .key-volume input[type="range"]:focus-visible::-moz-range-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body.mode-keys:not(.home-open) :is(.keys-toggle, .keys-refresh):hover:not(:disabled):not(.on):not([aria-pressed="true"]):not(.waiting):not(.blocked):not(.busy) {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-hover) !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) :is(.midi-connect.waiting, .keys-refresh.busy) {
    border: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-pending) !important;
    color: #6f613d !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .midi-connect.blocked {
    border: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-coral) !important;
    color: #824b4f !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) :is(.midi-connect.waiting, .keys-refresh.busy):focus-visible {
    background-image: var(--control-doodle-segment-pending-focus) !important;
  }
  body.mode-keys:not(.home-open) .midi-connect.blocked:focus-visible {
    background-image: var(--control-doodle-segment-coral-focus) !important;
  }
  body.mode-keys:not(.home-open) .octave-bank {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .oct-key,
  body.mode-keys:not(.home-open) .oct-key:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
  }
  body.mode-keys:not(.home-open) .oct-key:hover { background-image: var(--control-doodle-circle-ice) !important; }
  body.mode-keys:not(.home-open) .oct-key:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body.mode-keys:not(.home-open) .keys-window-close,
  body.mode-keys:not(.home-open) .keys-window-close:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }
  body.mode-keys:not(.home-open) .keys-window-close:hover { background-image: var(--control-doodle-circle-ice) !important; }
  body.mode-keys:not(.home-open) .keys-window-close:focus-visible { background-image: var(--control-doodle-circle-focus) !important; }
  body:not(.home-open) #recordsDrawer .records-drawer-close,
  body:not(.home-open) #recordsDrawer .records-drawer-close:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }
  body:not(.home-open) #recordsDrawer .records-drawer-close:hover { background-image: var(--control-doodle-circle-ice) !important; }
  body:not(.home-open) #recordsDrawer .records-drawer-close:focus-visible { background-image: var(--control-doodle-circle-focus) !important; }

  /* Creation Review: gentle drawn controls around untouched media content. */
  body:not(.home-open) #takeReview .take-sheet {
    font-family: var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .take-media.is-audio {
    border: 0 !important;
    border-radius: 24px 20px 25px 21px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-card) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-media.is-video {
    border: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-media.is-video::after {
    content: "" !important;
    position: absolute !important;
    z-index: 2 !important;
    inset: 0 !important;
    display: block !important;
    pointer-events: none !important;
    background: var(--control-doodle-card-outline) center / 100% 100% no-repeat !important;
  }
  body:not(.home-open) #takeReview .take-audio-stamp {
    padding: 6px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill-coral) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: #824b4f !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    font: 600 11px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .take-player {
    background: transparent !important;
  }
  body:not(.home-open) #takeReview .take-preview-play,
  body:not(.home-open) #takeReview .take-preview-play:hover {
    position: relative !important;
    width: 43px !important;
    height: 43px !important;
    padding: 0 0 0 2px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: transparent !important;
    box-shadow: none !important;
    font-size: 0 !important;
  }
  body:not(.home-open) #takeReview .take-preview-play::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 12px !important;
    height: 14px !important;
    display: block !important;
    background: var(--control-doodle-ink) !important;
    clip-path: polygon(8% 2%, 98% 48%, 13% 98%) !important;
    transform: translate(-42%, -50%) rotate(-2deg) !important;
    pointer-events: none !important;
  }
  body:not(.home-open) #takeReview .take-preview-play.is-playing,
  body:not(.home-open) #takeReview .take-preview-play.is-playing:hover {
    padding-left: 0 !important;
    background-image: var(--control-doodle-circle-coral) !important;
  }
  body:not(.home-open) #takeReview .take-preview-play.is-playing::before {
    width: 12px !important;
    height: 14px !important;
    background: linear-gradient(90deg, var(--control-doodle-ink) 0 34%, transparent 34% 66%, var(--control-doodle-ink) 66%) !important;
    clip-path: none !important;
    transform: translate(-50%, -50%) rotate(-1deg) !important;
  }
  body:not(.home-open) #takeReview .take-preview-play:focus-visible {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) #takeReview .take-preview-play.is-playing:focus-visible {
    background-image: var(--control-doodle-circle-coral-focus) !important;
  }
  body:not(.home-open) #takeReview .take-preview-play:disabled { opacity: .48 !important; cursor: wait !important; }
  body:not(.home-open) #takeReview .modal-close,
  body:not(.home-open) #takeReview .modal-close:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    transform: none !important;
  }
  body:not(.home-open) #takeReview .modal-close:hover {
    background-image: var(--control-doodle-circle-ice) !important;
  }
  body:not(.home-open) #takeReview .modal-close:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body:not(.home-open) #takeReview .take-progress {
    height: 18px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-progress::-webkit-slider-runnable-track {
    height: var(--fj-player-track-height) !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(to right, var(--control-doodle-selected) 0 var(--played), var(--control-doodle-line) var(--played) 100%) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-progress::-webkit-slider-thumb {
    width: var(--fj-player-thumb-size) !important;
    height: var(--fj-player-thumb-size) !important;
    margin-top: calc((var(--fj-player-track-height) - var(--fj-player-thumb-size)) / 2) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
  }
  body:not(.home-open) #takeReview .take-progress:focus-visible::-webkit-slider-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) #takeReview .take-progress::-moz-range-track {
    height: var(--fj-player-track-height) !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--control-doodle-line) !important;
  }
  body:not(.home-open) #takeReview .take-progress::-moz-range-progress {
    height: var(--fj-player-track-height) !important;
    border-radius: 999px !important;
    background: var(--control-doodle-selected) !important;
  }
  body:not(.home-open) #takeReview .take-progress::-moz-range-thumb {
    width: var(--fj-player-thumb-size) !important;
    height: var(--fj-player-thumb-size) !important;
    border: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-progress:focus-visible::-moz-range-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) #takeReview :is(.take-player-label, .take-player-time, .take-copy, .take-title-label, .take-meta) {
    font-family: var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .take-player-label.is-error { color: #824b4f !important; }
  body:not(.home-open) #takeReview .take-elements span {
    max-width: 160px !important;
    padding: 7px 11px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-hover) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
    font: 550 11px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .take-actions button:hover {
    box-shadow: none !important;
    transform: translateY(-1px) !important;
  }
  body:not(.home-open) #takeReview .take-discard:focus-visible {
    background-image: var(--control-doodle-segment-coral-focus) !important;
  }
  body:not(.home-open) #takeReview .take-keep:focus-visible {
    background-image: var(--control-doodle-segment-selected-focus) !important;
  }
  body:not(.home-open) #takeReview .take-download-slot .download-trigger {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
    font-family: var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .take-download-slot .download-trigger:focus-visible {
    background-image: var(--control-doodle-segment-selected-focus) !important;
  }
  body:not(.home-open) #takeReview .download-menu {
    padding: 8px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-card) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .download-menu .download-option {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
    font-family: var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #takeReview .download-menu .download-option:hover {
    background-image: var(--control-doodle-segment-hover) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
  }
  body:not(.home-open) #takeReview .download-menu .download-option:focus-visible {
    background-image: var(--control-doodle-segment-focus) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
  }
  body:not(.home-open) #takeReview .download-option-badge {
    padding: 5px 8px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
    font: 550 11px/1 var(--flowjam-ui-font) !important;
  }

  /* P2 line audit --------------------------------------------------------
   * Old one-pixel dividers sat beside the two-pixel SVG controls and made
   * the editor look randomly weighted. Structural groups are now open; only
   * the actual control owns a perimeter, and that perimeter is one SVG. */
  body:not(.home-open) .topbar .studio-playback-island .now-time {
    font: 550 11px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #photoInspector :is(
    .photo-reading-card, .photo-prompt-share
  ) {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #photoInspector :is(
    .photo-reading-card, .photo-prompt-share
  ) {
    background-color: transparent !important;
    background-image: none !important;
  }
  body:not(.home-open) #photoInspector .photo-reading-card {
    padding-top: 8px !important;
  }
  body:not(.home-open) #photoInspector .photo-prompt-share {
    padding-top: 5px !important;
  }
  body:not(.home-open) #photoInspector :is(
    .photo-reading-head > span, .photo-reading-head > small,
    .photo-sound-label label, .photo-sound-label small,
    .photo-edge-control > span, .photo-prompt-share > span,
    .photo-prompt-share output
  ) {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorRemap,
  body:not(.home-open) #photoInspector #photoInspectorRemap:hover {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-circle) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    color: var(--control-doodle-ink) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorRemap:hover {
    background-image: var(--control-doodle-circle-ice) !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorRemap:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-circle-focus) !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorRemap svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2 !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix {
    height: 20px !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix::-webkit-slider-runnable-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--control-doodle-line) !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix::-webkit-slider-thumb {
    width: 16px !important;
    height: 16px !important;
    margin-top: -6px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent var(--control-doodle-circle-selected) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix:focus-visible::-webkit-slider-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix::-moz-range-track {
    height: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--control-doodle-line) !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix::-moz-range-progress {
    height: 4px !important;
    border-radius: 999px !important;
    background: var(--control-doodle-selected) !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix::-moz-range-thumb {
    width: 16px !important;
    height: 16px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent var(--control-doodle-circle-selected) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #photoInspector #photoInspectorMix:focus-visible::-moz-range-thumb {
    background-image: var(--control-doodle-circle-selected-focus) !important;
  }
  body:not(.home-open) #photoInspector .pipeline-retry-button {
    min-height: 30px !important;
    padding-inline: 10px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-segment) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    font: 600 11px/1 var(--flowjam-ui-font) !important;
  }
  body:not(.home-open) #photoInspector .pipeline-retry-button:hover {
    background-image: var(--control-doodle-segment-hover) !important;
  }
  body:not(.home-open) #photoInspector .pipeline-retry-button:focus-visible {
    outline: 0 !important;
    background-image: var(--control-doodle-segment-focus) !important;
  }

  /* Reviews and confirmation sheets own exactly one window perimeter. */
  body:not(.home-open) #takeReview .take-sheet,
  body:not(.home-open) #confirmDialog .confirm-sheet {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #takeReview .take-elements span,
  body:not(.home-open) #takeReview .download-option-badge,
  body:not(.home-open) #takeReview :is(.take-actions button, .download-trigger, .download-option),
  body:not(.home-open) #confirmDialog .confirm-actions button {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }
  body:not(.home-open) #confirmDialog .confirm-cancel,
  body:not(.home-open) #takeReview .take-keep {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-selected) !important;
    color: var(--control-doodle-ink) !important;
  }
  body:not(.home-open) #confirmDialog .confirm-accept,
  body:not(.home-open) #takeReview .take-discard {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-coral) !important;
    color: #7b4147 !important;
  }
  body:not(.home-open) #confirmDialog .confirm-cancel:focus-visible,
  body:not(.home-open) #takeReview .take-keep:focus-visible {
    background-image: var(--control-doodle-segment-selected-focus) !important;
  }
  body:not(.home-open) #confirmDialog .confirm-accept:focus-visible,
  body:not(.home-open) #takeReview .take-discard:focus-visible {
    background-image: var(--control-doodle-segment-coral-focus) !important;
  }
  body:not(.home-open) #recordsDrawer .records-empty-guide :is(h3, p),
  body:not(.home-open) #recordsDrawer .records-empty-record {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }
  body:not(.home-open) #recordsDrawer :is(.records-drawer-head p, .eyebrow, .rack-label) {
    font-family: var(--flowjam-ui-font) !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
  }
  body:not(.home-open) .studio-performance-island #camBtn,
  body:not(.home-open) .studio-performance-island #camBtn:is(:hover, :focus-visible, .on, .pending, .err) {
    border: 0 !important;
  }

  /* True content geometry (the CD, placed collage, piano keys and native
     media controls) is intentionally not selected anywhere in this file. */
}

@media (forced-colors: active) and (min-width: 761px) {
  body:not(.home-open) :is(
    .base-template-tabs button, .snap-mode-button, .photo-add-files,
    .item-inspector-segment button, .photo-edge-control button, .keys-toggle, .keys-refresh,
    .confirm-actions button, .take-actions button, .download-trigger, .download-option,
    .camera-power, .photo-polaroid .snap-go, .take-preview-play, .oct-key
  ) { background-image: none !important; border: 2px solid ButtonText !important; background-color: Canvas !important; color: ButtonText !important; }
  body:not(.home-open) :is(.key-volume, .download-menu, .take-elements span) {
    background-image: none !important;
    border: 2px solid ButtonText !important;
    background-color: Canvas !important;
    color: ButtonText !important;
  }
}

/* Studio identity line ----------------------------------------------------
 * The logo is a loose collage object; the editable name owns the only line.
 * Kept last because several legacy desktop rules target this exact cluster.
 */
@media (min-width: 761px) {
  html body:not(.home-open) header.topbar > div.studio-file-island,
  html body:not(.home-open) header.topbar > div.studio-file-island:hover {
    position: absolute !important;
    inset: 8px auto auto 16px !important;
    width: min(322px, calc(42vw - 18px)) !important;
    height: 56px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }

  body:not(.home-open) .studio-file-island .brand {
    width: 56px !important;
    min-width: 56px !important;
    height: 56px !important;
    min-height: 56px !important;
    flex: 0 0 56px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    cursor: pointer !important;
  }
  body:not(.home-open) .studio-file-island .brand-mark {
    width: 54px !important;
    min-width: 54px !important;
    height: 54px !important;
    display: block !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  body:not(.home-open) .studio-file-island .brand-img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: contain !important;
    opacity: 1 !important;
    transform: rotate(0deg);
    transform-origin: 50% 50% !important;
    filter: drop-shadow(0 4px 5px rgba(37, 83, 63, .06)) !important;
  }
  body:not(.home-open) .studio-file-island .brand:is(:hover, :focus-visible) .brand-img {
    animation: studio-brand-disc-spin 5.8s linear infinite !important;
  }
  body:not(.home-open) .studio-file-island .brand:focus-visible {
    outline: 0 !important;
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--control-doodle-focus) 78%, transparent)) !important;
  }
  body:not(.home-open) .studio-file-island .brand-word,
  body:not(.home-open) .studio-file-island .studio-island-divider {
    display: none !important;
  }

  body:not(.home-open) .studio-file-island #boardTitle,
  body:not(.home-open) .studio-file-island #boardTitle:hover,
  body:not(.home-open) .studio-file-island #boardTitle:focus {
    field-sizing: content !important;
    inline-size: auto !important;
    width: auto !important;
    min-width: 7ch !important;
    min-inline-size: 7ch !important;
    max-width: calc(100% - 70px) !important;
    max-inline-size: calc(100% - 70px) !important;
    height: 38px !important;
    flex: 0 1 auto !important;
    box-sizing: border-box !important;
    padding: 2px 6px 10px !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: url("./assets/ui/doodle-underline.svg") !important;
    background-repeat: no-repeat !important;
    background-position: left bottom !important;
    background-size: 100% 8px !important;
    box-shadow: none !important;
    color: var(--control-doodle-ink) !important;
    font: 550 12px/1.2 var(--home-hand, sans-serif) !important;
    text-align: left !important;
    overflow: hidden !important;
  }
  body:not(.home-open) .studio-file-island #boardTitle:focus {
    background-image: url("./assets/ui/doodle-underline-focus.svg") !important;
  }
  html[data-canvas-type="card"].canvas-title-contrast body:not(.home-open) .studio-file-island #boardTitle,
  html[data-canvas-type="card"].canvas-title-contrast body:not(.home-open) .studio-file-island #boardTitle:hover {
    background-image: url("./assets/ui/doodle-title-underline.svg") !important;
  }
  html[data-canvas-type="card"].canvas-title-contrast body:not(.home-open) .studio-file-island #boardTitle:focus {
    background-image: url("./assets/ui/doodle-title-underline-focus.svg") !important;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  body:not(.home-open) .studio-file-island {
    inset: 7px auto auto 12px !important;
    width: 222px !important;
    height: 54px !important;
  }
  body:not(.home-open) .studio-file-island .brand {
    width: 52px !important; min-width: 52px !important; height: 52px !important; min-height: 52px !important; flex-basis: 52px !important;
  }
  body:not(.home-open) .studio-file-island .brand-mark { width: 50px !important; min-width: 50px !important; height: 50px !important; }
}

@keyframes studio-brand-disc-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  body:not(.home-open) .studio-file-island .brand:is(:hover, :focus-visible) .brand-img { animation: none !important; }
}

/* Window content safety --------------------------------------------------
 * Window outlines live in doodle-studio-shell.css and always paint above
 * these descendants. Only the inner content viewport scrolls; no paper card
 * here is allowed to cover, replace, or clip that outer path. */
@media (min-width: 761px) {
  body:not(.home-open) {
    --studio-safe-inline: 18px;
    --studio-safe-block: 18px;
    --studio-scroll-track: color-mix(in srgb, var(--control-doodle-line) 42%, transparent);
    --studio-scroll-thumb: color-mix(in srgb, var(--control-doodle-focus) 76%, var(--control-doodle-line));
  }

  /* All real inner scrollers share one quiet, four-pixel sketch-blue bar. */
  body:not(.home-open) :is(
    #archiveShell .archive-strip.is-open > .archive-strip-body,
    #photoInspector .photo-inspector-card,
    #recordsRack .records-row,
    #takeReview .take-sheet,
    #camLegend .cam-legend-list
  ) {
    scrollbar-width: thin !important;
    scrollbar-color: var(--studio-scroll-thumb) var(--studio-scroll-track) !important;
  }
  body:not(.home-open) :is(
    #archiveShell .archive-strip.is-open > .archive-strip-body,
    #photoInspector .photo-inspector-card,
    #recordsRack .records-row,
    #takeReview .take-sheet,
    #camLegend .cam-legend-list
  )::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
  }
  body:not(.home-open) :is(
    #archiveShell .archive-strip.is-open > .archive-strip-body,
    #photoInspector .photo-inspector-card,
    #recordsRack .records-row,
    #takeReview .take-sheet,
    #camLegend .cam-legend-list
  )::-webkit-scrollbar-track {
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--studio-scroll-track) !important;
  }
  body:not(.home-open) :is(
    #archiveShell .archive-strip.is-open > .archive-strip-body,
    #photoInspector .photo-inspector-card,
    #recordsRack .records-row,
    #takeReview .take-sheet,
    #camLegend .cam-legend-list
  )::-webkit-scrollbar-thumb {
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--studio-scroll-thumb) !important;
    background-clip: border-box !important;
  }

  /* Source windows: one transparent content layer with a protected 18px
     inset. The right gutter keeps the scrollbar inside the drawn outline. */
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] > #archiveContents,
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open {
    min-height: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body {
    width: calc(100% - 10px) !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    margin: 0 6px 0 4px !important;
    padding: 0 4px 0 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scroll-padding: var(--studio-safe-block) 0 !important;
    scrollbar-gutter: auto !important;
    background: transparent !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body > .rail-panel.on {
    width: 100% !important;
    min-height: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 20px 14px 24px 14px !important;
    overflow: visible !important;
    background: transparent !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .rail-panel.on > :first-child {
    margin-top: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .rail-panel.on > :last-child {
    margin-bottom: 0 !important;
  }

  /* Appearance intentionally uses a shorter shell. Its content remains full
     size and scrolls instead of being compressed or cut by the bottom path. */
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="appearance"] .archive-strip-body > .rail-panel.on {
    padding-bottom: 28px !important;
  }

  /* Photos: the camera is an independent device, but it stays fully inside
     the source window. The photo tray follows in the same scrolling flow. */
  body:not(.home-open):not(.archive-collapsed) #archivePhotos .photo-drawer-head {
    padding-right: 34px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archivePhotos #snapPanel.photo-polaroid {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    margin-inline: 0 !important;
    padding: 14px 14px 16px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archivePhotos #snapPanel.photo-polaroid > :is(.snap-stage, .snap-row, .booth-printer) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archivePhotos #photoTray {
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
    padding-bottom: 4px !important;
  }

  /* Words: the write form belongs to the scrollable document and always has
     its own bottom breathing room. It never floats through the window path. */
  body:not(.home-open):not(.archive-collapsed) #archiveVibes .vibes-instruments,
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagAdder,
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagForm {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagAdder {
    margin: 24px 0 0 !important;
    padding: 0 0 6px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagForm {
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 3px 0 !important;
    position: relative !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagInput {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagForm > button {
    flex: 0 0 auto !important;
  }

  /* Edit: the outer frame is only the fixed outline. The card is the single
     scroll viewport and stays transparent so it cannot erase the outline. */
  body:not(.home-open) #photoInspector .photo-inspector-frame {
    padding: 0 !important;
  }
  body:not(.home-open) #photoInspector .photo-inspector-card,
  body:not(.home-open) #photoInspector[data-kind] .photo-inspector-card {
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 18px 18px 22px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scroll-padding: 18px 0 22px !important;
    scrollbar-gutter: auto !important;
    background: transparent !important;
  }
  body:not(.home-open) #photoInspector .photo-inspector-head {
    margin: 0 0 14px !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }
  body:not(.home-open) #photoInspector .photo-inspector-card > :last-child {
    margin-bottom: 0 !important;
  }

  /* Keys has no scrolling content: protect its title and controls, allow the
     real piano key group to retain its native geometry. */
  body.mode-keys:not(.home-open) #keysDock .midi-chassis {
    box-sizing: border-box !important;
    padding: 8px 13px !important;
  }
  body.mode-keys:not(.home-open) #keysDock :is(.keys-window-bar, .midi-panel, .keys-row, .keyboard) {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body.mode-keys:not(.home-open) #keysDock .keys-window-bar {
    padding-inline: 2px !important;
  }
  body.mode-keys:not(.home-open) #keysDock .midi-panel {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
  }
  body.mode-keys:not(.home-open) #keysDock .keys-row {
    grid-template-columns: 168px auto auto auto !important;
    justify-content: end !important;
    gap: 4px !important;
  }
  body.mode-keys:not(.home-open) #keysDock .midi-connect {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.mode-keys:not(.home-open) #keysDock .midi-status {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  body.mode-keys:not(.home-open) #keysDock .oct-key {
    width: 17px !important;
    height: 24px !important;
  }

  /* Creations: only the row scrolls. The empty message is open content, not a
     second card inside an already outlined window. */
  body:not(.home-open) #recordsRack.records-drawer {
    box-sizing: border-box !important;
    padding: 18px 18px 20px !important;
  }
  body:not(.home-open) #recordsRack .records-drawer-head {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }
  body:not(.home-open) #recordsRack .records-row {
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 4px 2px 8px !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: auto !important;
  }
  body:not(.home-open) #recordsRack .records-empty-guide {
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 8px 2px !important;
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  /* Modal sheets: the inner article is transparent and scrollable while the
     fixed frame keeps the only outer path in front. */
  body:not(.home-open) #confirmDialog .confirm-sheet {
    max-height: calc(100dvh - 36px) !important;
    box-sizing: border-box !important;
    padding: 22px 22px 20px !important;
    overflow: hidden !important;
  }
  body:not(.home-open) #confirmDialog .confirm-actions {
    margin-top: 8px !important;
  }
  body:not(.home-open) #takeReview .take-sheet-frame {
    padding: 0 !important;
  }
  body:not(.home-open) #takeReview .take-sheet {
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 22px 24px 26px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scroll-padding: 22px 0 26px !important;
    scrollbar-gutter: auto !important;
    background: transparent !important;
  }
  body:not(.home-open) #takeReview .take-head {
    margin-bottom: 18px !important;
  }
  body:not(.home-open) #takeReview .take-actions {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Popovers are independent controls. Their paper fill stays below the
     foreground outline and their content never touches its edge. */
  body:not(.home-open) :is(
    .photo-add-popover, .appearance-custom-editor, .inspector-inline-palette,
    .keys-choice-popover, .download-menu
  ) {
    box-sizing: border-box !important;
    padding: 12px !important;
    overflow: hidden !important;
    background-color: transparent !important;
  }
  body:not(.home-open) #photoAddMenu.photo-add-popover { padding: 8px !important; }
  body:not(.home-open) #appearanceMorePalette.appearance-custom-editor { padding: 10px !important; }
  body:not(.home-open) #takeReview .download-menu {
    padding: 10px !important;
    background-color: transparent !important;
    background-image: var(--studio-doodle-card-fill, none) !important;
  }
  body:not(.home-open) #camLegend.cam-legend { padding: 0 !important; }
  body:not(.home-open) #camLegend .cam-legend-list {
    max-height: min(280px, calc(100dvh - 80px)) !important;
    box-sizing: border-box !important;
    padding: 10px 14px 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  /* Segmented groups keep their single perimeter in a foreground pseudo-
     layer. Selected children are inset and can never erase the outer stroke. */
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick, .studio-canvas-choice) {
    isolation: isolate !important;
    box-sizing: border-box !important;
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: var(--studio-doodle-pill-fill, none) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) .studio-canvas-choice {
    background-color: transparent !important;
    background-image: var(--studio-doodle-pill-fill, none) !important;
  }
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick) {
    position: relative !important;
  }
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick, .studio-canvas-choice)::after {
    content: "" !important;
    position: absolute !important;
    z-index: 20 !important;
    inset: 0 !important;
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--studio-doodle-pill-outline, none) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick, .studio-canvas-choice) > button {
    position: relative !important;
    z-index: 1 !important;
    min-width: 0 !important;
    max-height: calc(100% - 8px) !important;
    margin-block: auto !important;
    box-sizing: border-box !important;
    background-clip: padding-box !important;
  }
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick, .studio-canvas-choice) > button:is(.on, .is-selected, [aria-pressed="true"], [aria-checked="true"]) {
    background-color: transparent !important;
    background-image: var(--control-doodle-segment-selected) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
  }
  /* The photo-style group already has one foreground pill outline. Its two
     children only need a soft selected fill, never another stroked SVG. */
  body:not(.home-open) #snapPanel .snap-mode-pick > .snap-mode-button,
  body:not(.home-open) #snapPanel .snap-mode-pick > .snap-mode-button:hover {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #snapPanel .snap-mode-pick > .snap-mode-button:is(.on, [aria-pressed="true"]),
  body:not(.home-open) #snapPanel .snap-mode-pick > .snap-mode-button:is(.on, [aria-pressed="true"]):hover {
    background-color: var(--control-doodle-selected) !important;
    background-image: none !important;
  }
  body:not(.home-open) #snapPanel .snap-mode-pick > .snap-mode-button:focus-visible {
    outline: 2px solid var(--control-doodle-focus) !important;
    outline-offset: -3px !important;
    background-image: none !important;
  }
  body:not(.home-open) .base-template-tabs { padding: 6px !important; }
  body:not(.home-open) .snap-mode-pick { padding: 4px !important; }
  body:not(.home-open) .studio-canvas-choice { padding: 6px 5px !important; }
}

/* Compact source-workspace geometry --------------------------------------
 * The five source flyouts share one center in the workspace below the
 * logo/title line. Longer libraries scroll inside their foreground outline. */
@media (min-width: 761px) {
  body:not(.home-open) {
    --source-flyout-width: clamp(296px, 20vw, 304px);
    --source-workspace-center: calc(50dvh + 28px);
    --source-window-max-height: calc(100dvh - 104px);
  }

  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] {
    top: var(--source-workspace-center) !important;
    bottom: auto !important;
    width: var(--source-flyout-width) !important;
    max-height: var(--source-window-max-height) !important;
    transform: translateY(-50%) !important;
    transform-origin: left center !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="appearance"] {
    height: min(480px, var(--source-window-max-height)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] {
    height: min(500px, var(--source-window-max-height)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"]:has(.booth-printer.has-print) {
    height: min(540px, var(--source-window-max-height)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="vibes"] {
    height: min(450px, var(--source-window-max-height)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="ambience"] {
    height: min(200px, var(--source-window-max-height)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="doodles"] {
    height: min(240px, var(--source-window-max-height)) !important;
  }

  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body {
    width: calc(100% - 16px) !important;
    margin: 0 9px 0 7px !important;
    padding: 0 3px 0 0 !important;
    scroll-padding: 26px 0 28px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body > .rail-panel.on {
    min-height: 0 !important;
    padding: 26px 21px 28px !important;
    gap: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .rail-panel.on > .shelf-head {
    margin: 0 0 6px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .rail-panel.on > .block-note {
    margin: 0 0 14px !important;
  }

  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 5px 7px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker {
    --idea-tape: #f7e9b2;
    --idea-ink: var(--control-doodle-ink);
    --idea-turn: -.35deg;
    --idea-width: 98%;
    --idea-shift: -1px;
    --idea-height: 30px;
    --idea-clip: polygon(
      2% 4%, 37% 1%, 68% 3%, 98% 2%, 100% 49%,
      98% 96%, 63% 99%, 31% 97%, 1% 99%, 0 52%
    );
    position: relative !important;
    isolation: isolate !important;
    width: var(--idea-width) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-self: center !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: var(--idea-height) !important;
    padding: 5px 9px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: var(--idea-tape) !important;
    background-image: linear-gradient(92deg, rgba(255,255,255,.18), transparent 17%, transparent 84%, rgba(66,47,14,.025)) !important;
    box-shadow: none !important;
    clip-path: var(--idea-clip) !important;
    color: var(--idea-ink) !important;
    filter: drop-shadow(0 1px .45px rgba(66,47,14,.07)) !important;
    transform: translateX(var(--idea-shift)) rotate(var(--idea-turn)) !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
    transition: transform var(--fj-ui-motion-fast) var(--fj-ui-ease), filter var(--fj-ui-motion-fast) var(--fj-ui-ease) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n + 1) {
    --idea-tape: #f7e9b2; --idea-turn: -.35deg; --idea-width: 98%; --idea-shift: -1px; --idea-height: 30px;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n + 2) {
    --idea-tape: #dceec8; --idea-turn: .28deg; --idea-width: 96%; --idea-shift: 2px; --idea-height: 31px;
    --idea-clip: polygon(1% 2%, 34% 4%, 66% 1%, 98% 3%, 99% 51%, 98% 98%, 65% 96%, 33% 99%, 2% 98%, 0 49%);
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n + 3) {
    --idea-tape: #dceaf5; --idea-turn: .16deg; --idea-width: 99%; --idea-shift: 1px; --idea-height: 30px;
    --idea-clip: polygon(2% 3%, 35% 2%, 67% 0, 99% 2%, 98% 48%, 97% 97%, 66% 99%, 32% 97%, 1% 98%, 0 52%);
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n + 4) {
    --idea-tape: #f6d8d9; --idea-turn: -.24deg; --idea-width: 97%; --idea-shift: -2px; --idea-height: 31px;
    --idea-clip: polygon(1% 4%, 33% 1%, 65% 3%, 98% 4%, 100% 52%, 98% 97%, 67% 99%, 34% 96%, 2% 97%, 0 48%);
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n + 5) {
    --idea-tape: #e9dced; --idea-turn: .32deg; --idea-width: 95%; --idea-shift: 2px; --idea-height: 30px;
    --idea-clip: polygon(2% 2%, 36% 4%, 69% 1%, 98% 2%, 100% 50%, 99% 97%, 66% 96%, 32% 99%, 1% 98%, 0 51%);
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:nth-child(6n) {
    --idea-tape: #f7dacb; --idea-turn: -.18deg; --idea-width: 98%; --idea-shift: 1px; --idea-height: 31px;
    --idea-clip: polygon(1% 3%, 34% 1%, 67% 3%, 99% 2%, 98% 51%, 98% 98%, 65% 97%, 32% 99%, 2% 98%, 0 49%);
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:hover {
    background-color: var(--idea-tape) !important;
    filter: saturate(1.04) !important;
    transform: translateX(var(--idea-shift)) translateY(-1px) rotate(var(--idea-turn)) !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker:focus-visible {
    outline: 2px solid var(--control-doodle-focus) !important;
    outline-offset: 2px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker.has-actions {
    padding: 4px 4px 4px 8px !important;
    gap: 3px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker.has-actions > .sticker-place {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #stickerTray > .sticker.has-actions > .sticker-del {
    flex: 0 0 20px !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: color-mix(in srgb, white 48%, transparent) !important;
    color: inherit !important;
    line-height: 20px !important;
  }
  body:not(.home-open) .drag-ghost .idea-tape-preview {
    padding: 6px 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--idea-tape) !important;
    clip-path: var(--idea-clip, polygon(2% 4%, 20% 1%, 40% 4%, 60% 0, 80% 3%, 98% 2%, 99% 24%, 98% 48%, 100% 72%, 98% 97%, 80% 99%, 60% 96%, 40% 100%, 20% 97%, 2% 98%, 0 75%, 2% 52%, 0 28%)) !important;
    color: var(--idea-ink) !important;
    box-shadow: none !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes .vibes-instruments {
    margin-top: 18px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes .vibes-instruments .shelf-head {
    margin: 0 0 8px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #instrumentTray {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #instrumentTray > .instrument {
    width: 44px !important;
    height: 44px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #instrumentTray .inst-emoji {
    font-size: 29px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagAdder {
    margin: 16px 0 0 !important;
    padding: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveVibes #addNote { padding: 4px 0 !important; }
  body:not(.home-open):not(.archive-collapsed) #archivePhotos #photoTray { min-height: 64px !important; }
  body:not(.home-open):not(.archive-collapsed) #archiveDoodles #decoTray {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

/* Photos has a deliberately narrower, symmetrical content column. The
   generic source scroller reserves a larger right gutter for long libraries;
   that made this short camera drawer read off-centre. */
@media (min-width: 761px) {
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] {
    width: 304px !important;
  }
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"]
    .archive-strip.is-open > #archivePhotos.archive-strip-body {
    width: calc(100% - 20px) !important;
    height: calc(100% - 20px) !important;
    margin: 10px !important;
    padding: 0 !important;
  }
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"]
    #archivePhotos > .rail-panel.on {
    width: 100% !important;
    padding: 24px 14px 50px !important;
  }
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"]
    #archivePhotos .photo-drawer-head {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-inline: 0 !important;
    padding-right: 0 !important;
  }
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"]
    #archivePhotos :is(.photo-instruction, #snapPanel.photo-polaroid, #photoTray) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-inline: 0 !important;
  }
}

/* Saved creation review — compact desktop composition. The fixed foreground
   SVG remains the only perimeter; content keeps a clear inset from it. */
@media (min-width: 761px) {
  html body:not(.home-open) #takeReview.modal-layer {
    box-sizing: border-box !important;
    padding: 24px !important;
  }
  html body:not(.home-open) #takeReview .take-sheet-frame {
    width: min(940px, calc(100vw - 48px)) !important;
    height: min(650px, calc(100dvh - 48px)) !important;
    max-height: calc(100dvh - 48px) !important;
    overflow: hidden !important;
  }
  html body:not(.home-open) #takeReview .take-sheet {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    box-sizing: border-box !important;
    padding: 28px 32px 30px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
  }
  html body:not(.home-open) #takeReview .take-head {
    min-width: 0 !important;
    align-items: flex-start !important;
    gap: 18px !important;
    margin: 0 0 20px !important;
    padding: 0 2px !important;
  }
  html body:not(.home-open) #takeReview .take-head > div {
    min-width: 0 !important;
    padding: 0 !important;
  }
  html body:not(.home-open) #takeReview .eyebrow {
    margin: 0 0 5px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }
  html body:not(.home-open) #takeReview .take-head h2 {
    max-width: 720px !important;
    margin: 0 !important;
    overflow: hidden !important;
    font-size: clamp(25px, 2.4vw, 32px) !important;
    line-height: 1.08 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body:not(.home-open) #takeReview .modal-close {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }
  html body:not(.home-open) #takeReview .take-layout {
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.18fr) minmax(288px, .82fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 32px !important;
  }
  html body:not(.home-open) #takeReview .take-media {
    min-width: 0 !important;
    min-height: 0 !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-audio {
    width: 100% !important;
    height: 100% !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    box-sizing: border-box !important;
    padding: 14px 14px 12px !important;
    overflow: hidden !important;
  }
  html body:not(.home-open) #takeReview .take-audio-cover {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--control-doodle-ice) 15%, var(--control-doodle-paper)) !important;
  }
  html body:not(.home-open) #takeReview .take-media[data-canvas-type="disc"] .take-audio-cover {
    background: transparent !important;
  }
  html body:not(.home-open) #takeReview .take-timeline-canvas,
  html body:not(.home-open) #takeReview .take-audio-cover > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  html body:not(.home-open) #takeReview .take-audio-stamp {
    top: 14px !important;
    left: 14px !important;
    font-size: 8px !important;
  }
  html body:not(.home-open) #takeReview .take-player {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 10px 4px 0 !important;
  }
  html body:not(.home-open) #takeReview .take-preview-play {
    width: 38px !important;
    height: 38px !important;
  }
  html body:not(.home-open) #takeReview .take-details {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 10px 4px 4px !important;
  }
  html body:not(.home-open) #takeReview .take-copy {
    margin: 0 0 24px !important;
    font-size: 12px !important;
    line-height: 1.55 !important;
  }
  html body:not(.home-open) #takeReview .take-title-label {
    margin: 0 0 8px !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
  }
  html body:not(.home-open) #takeReview .take-title {
    width: 100% !important;
    height: 40px !important;
    box-sizing: border-box !important;
    padding: 7px 14px 8px !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
  }
  html body:not(.home-open) #takeReview .take-meta {
    margin: 10px 3px 16px !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
  }
  html body:not(.home-open) #takeReview .take-elements {
    gap: 6px !important;
    margin: 0 0 18px !important;
  }
  html body:not(.home-open) #takeReview .take-actions {
    width: 100% !important;
    min-width: 0 !important;
    gap: 10px !important;
    margin: auto 0 0 !important;
  }
  html body:not(.home-open) #takeReview .take-actions > :is(button, .take-download-slot) {
    min-width: 0 !important;
  }
  html body:not(.home-open) #takeReview .take-discard {
    flex: 0 0 64px !important;
  }
  html body:not(.home-open) #takeReview .take-download-slot {
    flex: 1 1 112px !important;
  }
  html body:not(.home-open) #takeReview .take-keep {
    flex: 1 1 112px !important;
  }
  html body:not(.home-open) #takeReview :is(.take-actions button, .download-trigger) {
    min-height: 38px !important;
  }
}

/* Continuous top-chrome outlines ----------------------------------------
 * CSS radii were clipping the irregular SVG at all four corners. The three
 * top controls now use one fill-only base and one uncropped foreground path. */
@media (min-width: 761px) {
  html body:not(.home-open) :is(
    .studio-canvas-choice,
    .topbar .studio-playback-island,
    .topbar .studio-performance-island
  ),
  html body:not(.home-open) :is(
    .studio-canvas-choice,
    .topbar .studio-playback-island,
    .topbar .studio-performance-island
  ):hover {
    isolation: isolate !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: var(--studio-doodle-island-fill) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
  }

  html body:not(.home-open) :is(
    .studio-canvas-choice,
    .topbar .studio-playback-island,
    .topbar .studio-performance-island
  )::after {
    content: "" !important;
    position: absolute !important;
    z-index: 20 !important;
    inset: 0 !important;
    display: block !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: var(--studio-doodle-island-outline) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }
  html body:not(.home-open) .studio-canvas-choice::after,
  html body:not(.home-open) .topbar .studio-playback-island::after,
  html body:not(.home-open) .topbar .studio-performance-island::after {
    content: "" !important;
    position: absolute !important;
    z-index: 20 !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--studio-doodle-island-outline) center / 100% 100% no-repeat !important;
    transform: none !important;
    pointer-events: none !important;
  }
  html body:not(.home-open) :is(
    .studio-canvas-choice,
    .topbar .studio-playback-island,
    .topbar .studio-performance-island
  ) > * {
    position: relative;
    z-index: 1;
  }

  /* Recording replaces the clock in-place. Keeping both nodes in the flex
     row made the transport grow into Keys / Cam DJ as soon as REC began. */
  html body:not(.home-open) .topbar .studio-playback-island > #recTime {
    position: absolute !important;
    z-index: 1 !important;
    top: 50% !important;
    left: 6px !important;
    right: auto !important;
    bottom: auto !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    transform: translateY(-50%) !important;
  }
  html body:not(.home-open) .topbar .studio-playback-island > #recTime[hidden] {
    display: none !important;
  }
  html body:not(.home-open) .topbar .studio-playback-island > #recTime:not([hidden]) + #nowTime {
    visibility: hidden !important;
  }
}

/* Rounded, continuous Studio surfaces ------------------------------------
 * SVG paths own every irregular perimeter. Content may clip to the host's
 * rectangular box, but CSS radii never crop a foreground outline. */
@media (min-width: 761px) {
  body:not(.home-open) .studio-control-cluster {
    gap: 14px !important;
  }
  body:not(.home-open) .topbar .studio-playback-island {
    position: relative !important;
    z-index: 2 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
  }
  body:not(.home-open) .topbar .studio-performance-island {
    z-index: 1 !important;
  }
  html body:not(.home-open) .source-toolbar,
  html body:not(.home-open).archive-collapsed .source-toolbar,
  html body:not(.home-open):not(.archive-collapsed) .source-toolbar {
    left: -20px !important;
    width: var(--fj-layout-source-toolbar-width) !important;
    transition: left var(--fj-ui-motion-fast) var(--fj-ui-ease) !important;
  }
  html body:not(.home-open) .source-toolbar:is(:hover, :focus-within),
  html body:not(.home-open).archive-collapsed .source-toolbar:is(:hover, :focus-within),
  html body:not(.home-open):not(.archive-collapsed) .source-toolbar:is(:hover, :focus-within) {
    left: -8px !important;
  }
  html body:not(.home-open) .source-tool :is(.tool-object, .tool-asset),
  html body:not(.home-open).archive-collapsed .source-tool :is(.tool-object, .tool-asset),
  html body:not(.home-open):not(.archive-collapsed) .source-tool :is(.tool-object, .tool-asset) {
    translate:
      calc(var(--dock-x, 0) * 1px + var(--tool-rest-x, 0px))
      var(--tool-rest-y, 0px) !important;
  }
  @media (prefers-reduced-motion: reduce) {
    html body:not(.home-open) .source-toolbar { transition: none !important; }
  }

  html body:not(.home-open) .studio-canvas-choice {
    padding: 5px !important;
    background-image: var(--studio-doodle-pill-fill) !important;
  }
  html body:not(.home-open) .studio-canvas-choice::after {
    background: var(--studio-doodle-pill-outline) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) .studio-canvas-choice > button,
  html body:not(.home-open) .studio-canvas-choice > button:hover {
    height: 30px !important;
    max-height: none !important;
    margin: auto 0 !important;
    border-radius: 999px !important;
  }

  /* Source windows use three independent layers: fill on the shell, scrolling
     on the inset body, and the SVG outline above both. Keep the tiny scroll
     thumb well clear of the right-hand path and give the final row enough
     room to scroll fully above the bottom path. */
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] {
    overflow: visible !important;
    border-radius: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel]::after {
    z-index: 1000 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    pointer-events: none !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body {
    width: calc(100% - 32px) !important;
    height: calc(100% - 20px) !important;
    margin: 10px 20px 10px 12px !important;
    padding: 0 6px 0 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-padding: 26px 0 56px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open > .archive-strip-body > .rail-panel.on {
    padding: 26px 16px 56px 18px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="appearance"] .archive-strip.is-open > .archive-strip-body > .rail-panel.on {
    padding: 12px 16px 32px 18px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches .appearance-swatch {
    height: 80px !important;
    min-height: 80px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches .appearance-swatch::before {
    width: 62px !important;
    height: 62px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches {
    row-gap: 2px !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches > :nth-child(9),
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches > :nth-child(10),
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches > :nth-child(11),
  body:not(.home-open):not(.archive-collapsed) #archiveAppearance .appearance-reference-swatches > #appearancePaletteToggle {
    margin-top: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] > #archiveContents {
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .archive-strip.is-open {
    position: relative !important;
    overflow: hidden !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .source-scroll-indicator {
    --source-scroll-size: 38px;
    --source-scroll-y: 0px;
    position: absolute !important;
    z-index: 20 !important;
    top: 28px !important;
    right: 14px !important;
    width: var(--source-scroll-size) !important;
    height: 7px !important;
    display: block !important;
    border-radius: 0 !important;
    background: url("./assets/ui/doodle-underline.svg") center / 100% 100% no-repeat !important;
    opacity: .9 !important;
    transform: translateY(var(--source-scroll-y)) rotate(-90deg) !important;
    transform-origin: top right !important;
    pointer-events: none !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel] .source-scroll-indicator[hidden] {
    display: none !important;
  }
  /* A real replaced element owns the foreground path. Chromium may omit the
     bottom edge of an SVG background on a pseudo-element inside this
     transformed fixed shell; the image layer avoids that compositor path. */
  body:not(.home-open) #archiveShell.archive-shell > .source-window-outline {
    position: absolute !important;
    z-index: 1000 !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: fill !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    pointer-events: none !important;
  }
  html body:not(.home-open) #archiveShell.archive-shell[data-active-panel]::after,
  html body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel]::after {
    content: none !important;
    display: none !important;
    background: none !important;
  }

  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick) {
    overflow: visible !important;
    border-radius: 0 !important;
  }
  body:not(.home-open) :is(.base-template-tabs, .snap-mode-pick)::after {
    overflow: visible !important;
    border-radius: 0 !important;
  }

  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel],
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel]::after,
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel.photo-polaroid,
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel.photo-polaroid::after,
  body:not(.home-open) :is(
    #photoInspector .photo-inspector-frame,
    #keysDock .midi-chassis,
    #recordsRack.records-drawer,
    #confirmDialog .confirm-sheet,
    #takeReview .take-sheet-frame,
    #camLegend.cam-legend,
    .photo-add-popover,
    .appearance-custom-editor,
    .inspector-inline-palette,
    .keys-choice-popover,
    .download-menu,
    .photo-recognition-card,
    .photo-auto-match-card
  ),
  body:not(.home-open) :is(
    #photoInspector .photo-inspector-frame,
    #keysDock .midi-chassis,
    #recordsRack.records-drawer,
    #confirmDialog .confirm-sheet,
    #takeReview .take-sheet-frame,
    #camLegend.cam-legend,
    .photo-add-popover,
    .appearance-custom-editor,
    .inspector-inline-palette,
    .keys-choice-popover,
    .download-menu,
    .photo-recognition-card,
    .photo-auto-match-card
  )::after {
    border-radius: 0 !important;
  }

  /* The single Creations launcher keeps exactly the same geometry and artwork
     while its sibling rack opens and closes. */
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab,
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab:hover,
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab:focus-visible {
    position: absolute !important;
    inset: 0 !important;
    isolation: isolate !important;
    width: 122px !important;
    min-width: 122px !important;
    max-width: 122px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    grid-template-rows: 30px !important;
    align-items: center !important;
    align-content: center !important;
    gap: 7px !important;
    padding: 6px 9px !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: var(--studio-doodle-island-fill) !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
  }
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab:focus-visible {
    filter: drop-shadow(0 0 3px color-mix(in srgb, var(--control-doodle-line) 74%, transparent)) !important;
  }
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab::before {
    content: none !important;
    display: none !important;
  }
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab::after {
    content: "" !important;
    position: absolute !important;
    z-index: 20 !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: auto !important;
    justify-self: auto !important;
    flex: none !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: var(--studio-doodle-island-outline) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none !important;
  }
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab > * {
    position: relative;
    z-index: 1;
  }
  #recordsDrawer.records-drawer-shell.open > #recordsDrawerToggle.records-tab {
    background-color: transparent !important;
    background-image: var(--studio-doodle-island-fill) !important;
  }
  #recordsDrawer.records-drawer-shell.open > #recordsDrawerToggle.records-tab::before {
    content: "" !important;
    position: absolute !important;
    z-index: 0 !important;
    inset: 6px 8px !important;
    display: block !important;
    border-radius: 999px !important;
    background: var(--control-doodle-selected) !important;
    pointer-events: none !important;
  }
  #recordsDrawer.records-drawer-shell > #recordsDrawerToggle.records-tab .records-tab-disc {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
  }

  /* My Creations is a compact record cabinet anchored above its closed tab. */
  #recordsDrawer.records-drawer-shell,
  body.records-open #recordsDrawer.records-drawer-shell,
  body.photo-inspector-open #recordsDrawer.records-drawer-shell {
    position: fixed !important;
    z-index: 182 !important;
    top: auto !important;
    right: 16px !important;
    bottom: 14px !important;
    width: 122px !important;
    height: 42px !important;
    overflow: visible !important;
  }
  html body.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open,
  html body.photo-inspector-open.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open {
    right: 16px !important;
    bottom: 14px !important;
    width: 122px !important;
    height: 42px !important;
    overflow: visible !important;
  }
  html body.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open > #recordsRack.records-drawer,
  html body.photo-inspector-open.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open > #recordsRack.records-drawer {
    position: absolute !important;
    inset: auto 0 56px auto !important;
    width: min(312px, calc(100vw - 28px)) !important;
    height: 208px !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 92px) !important;
    box-sizing: border-box !important;
    padding: 15px 18px 14px !important;
    overflow: hidden !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-image: var(--studio-doodle-window-fill) !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) #recordsRack.records-drawer::after {
    overflow: visible !important;
    border-radius: 0 !important;
  }
  body:not(.home-open) #recordsRack .records-drawer-head {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 8px 14px 0 !important;
  }
  body:not(.home-open) #recordsRack .records-drawer-head h2 {
    margin: 0 !important;
    font-family: var(--flowjam-ui-font) !important;
    font-size: 17px !important;
    line-height: 1.05 !important;
  }
  body:not(.home-open) #recordsRack .rack-label {
    display: block !important;
    margin: 2px 0 0 !important;
    color: var(--control-doodle-muted) !important;
    font-size: 9px !important;
    line-height: 1 !important;
  }
  body:not(.home-open) #recordsRack .records-row {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: flex-end !important;
    gap: 12px !important;
    box-sizing: border-box !important;
    padding: 6px 4px 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    background: url("./assets/ui/doodle-underline.svg") center calc(100% - 39px) / calc(100% - 8px) 8px no-repeat !important;
  }
  body:not(.home-open) #recordsRack .records-row::before {
    content: none !important;
    display: none !important;
  }
  body:not(.home-open) #recordsRack .creation-mini {
    position: relative !important;
    z-index: 1 !important;
    width: 84px !important;
    min-width: 84px !important;
    height: 126px !important;
    min-height: 126px !important;
    flex: 0 0 84px !important;
    display: grid !important;
    grid-template-rows: 88px 26px !important;
    place-items: end center !important;
    gap: 4px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #recordsRack .creation-mini:hover {
    transform: translateY(-2px) !important;
  }
  body:not(.home-open) #recordsRack .creation-mini:focus-visible {
    outline: 2px solid var(--control-doodle-line) !important;
    outline-offset: 3px !important;
  }
  body:not(.home-open) #recordsRack .creation-mini-visual {
    position: relative !important;
    z-index: 1 !important;
    width: 76px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 86px !important;
    align-self: end !important;
    overflow: hidden !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body:not(.home-open) #recordsRack .creation-mini[data-canvas-type="disc"] .creation-mini-visual {
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
  }
  body:not(.home-open) #recordsRack .creation-mini[data-canvas-type="disc"] .creation-mini-visual::after {
    content: none !important;
    display: none !important;
  }
  body:not(.home-open) #recordsRack .creation-mini[data-canvas-type="card"] .creation-mini-visual {
    width: 72px !important;
    aspect-ratio: 1 !important;
    max-height: 82px !important;
    border-radius: 7px !important;
    transform: rotate(-1.2deg) !important;
  }
  body:not(.home-open) #recordsRack .creation-mini:nth-child(even)[data-canvas-type="card"] .creation-mini-visual {
    transform: rotate(1deg) !important;
  }
  body:not(.home-open) #recordsRack .creation-mini[data-canvas-type="card"] .creation-mini-visual::after {
    content: none !important;
    display: none !important;
  }
  body:not(.home-open) #recordsRack .creation-mini-visual img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border-radius: inherit !important;
    object-fit: contain !important;
  }
  body:not(.home-open) #recordsRack .creation-mini-copy {
    width: 84px !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    text-align: center !important;
  }
  body:not(.home-open) #recordsRack .creation-mini-title {
    width: 100% !important;
    overflow: hidden !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body:not(.home-open) #recordsRack .creation-mini-time {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--control-doodle-muted) !important;
    font-size: 7px !important;
  }
  body:not(.home-open) #recordsRack .records-row {
    scrollbar-color: var(--studio-scroll-thumb) transparent !important;
  }
  body:not(.home-open) #recordsRack .records-row::-webkit-scrollbar-track {
    background: transparent !important;
  }
  body:not(.home-open) #recordsRack .records-empty-guide {
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-rows: 72px 22px !important;
    align-content: end !important;
    gap: 6px !important;
    box-sizing: border-box !important;
    padding: 6px 14px 6px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left !important;
  }
  body:not(.home-open) #recordsRack .records-empty-slots {
    display: flex !important;
    align-items: flex-end !important;
    gap: 14px !important;
    align-self: end !important;
  }
  body:not(.home-open) #recordsRack .records-empty-slots i {
    display: block !important;
    box-sizing: border-box !important;
    opacity: .72 !important;
    border: 1.5px dashed var(--control-doodle-line) !important;
    background: color-mix(in srgb, var(--control-doodle-ice) 18%, transparent) !important;
  }
  body:not(.home-open) #recordsRack .records-empty-disc {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
  }
  body:not(.home-open) #recordsRack .records-empty-card {
    width: 44px !important;
    height: 58px !important;
    border-radius: 7px !important;
    transform: rotate(-2deg) !important;
  }
  body:not(.home-open) #recordsRack .records-empty-guide p {
    max-width: 240px !important;
    margin: 0 !important;
    align-self: start !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
  }
  body:not(.home-open) #recordsRack .records-empty-guide {
    border: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel.photo-polaroid {
    overflow: hidden !important;
    border-radius: 0 !important;
  }
  html body:not(.home-open) #photoInspector.photo-inspector .photo-inspector-frame,
  html body:not(.home-open) #photoInspector.photo-inspector[data-kind] .photo-inspector-frame,
  html body:not(.home-open).records-open.photo-inspector-open #photoInspector.photo-inspector .photo-inspector-frame,
  html body:not(.home-open) #photoInspector.is-dragging .photo-inspector-frame,
  body.mode-keys:not(.home-open) #keysDock .midi-chassis {
    overflow: hidden !important;
    border-radius: 0 !important;
  }
  html body:not(.home-open) #photoInspector.photo-inspector .photo-inspector-frame::after,
  html body:not(.home-open) #photoInspector.photo-inspector[data-kind] .photo-inspector-frame::after,
  body.mode-keys:not(.home-open) #keysDock .midi-chassis::after {
    overflow: visible !important;
    border-radius: 0 !important;
  }
  body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel.photo-polaroid::after {
    overflow: visible !important;
    border-radius: 0 !important;
    pointer-events: none !important;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  html body.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open > #recordsRack.records-drawer,
  html body.photo-inspector-open.records-open:not(.home-open) #recordsDrawer.records-drawer-shell.open > #recordsRack.records-drawer {
    width: min(288px, calc(100vw - 28px)) !important;
    height: 202px !important;
  }
}

/* Final desktop authority for the saved-creation review. Keep the existing
   playback/focus model while preventing the review from swallowing the page. */
@media (min-width: 1100px) {
  html body:not(.home-open) #takeReview.modal-layer {
    padding: 48px !important;
  }
  html body:not(.home-open) #takeReview .take-sheet-frame {
    width: min(820px, calc(100vw - 96px)) !important;
    height: min(560px, calc(100dvh - 96px)) !important;
    max-height: calc(100dvh - 96px) !important;
  }
  html body:not(.home-open) #takeReview .take-sheet {
    padding: 25px 28px 27px !important;
  }
  html body:not(.home-open) #takeReview .take-head {
    margin-bottom: 16px !important;
  }
  html body:not(.home-open) #takeReview .eyebrow,
  html body:not(.home-open) #takeReview .take-title-label,
  html body:not(.home-open) #takeReview .take-meta {
    font-size: 10px !important;
  }
  html body:not(.home-open) #takeReview .take-head h2 {
    max-width: 650px !important;
    font-size: clamp(24px, 2.15vw, 29px) !important;
  }
  html body:not(.home-open) #takeReview .take-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(270px, .92fr) !important;
    gap: 24px !important;
  }
  html body:not(.home-open) #takeReview .take-copy {
    margin-bottom: 18px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
  }
  html body:not(.home-open) #takeReview .take-details {
    padding: 7px 2px 2px !important;
  }
}

/* Custom CD colour is an inline, full-width grid row. It must reserve its own
   space in the source drawer instead of floating over neighbouring swatches. */
body:not(.home-open) #archiveAppearance .appearance-reference-swatches > #appearanceMorePalette {
  grid-column: 1 / -1 !important;
  position: relative !important;
  z-index: 1 !important;
  inset: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 8px 0 2px !important;
  place-items: stretch !important;
  gap: 12px !important;
  padding: 15px 14px 16px !important;
  overflow: hidden !important;
  background-color: transparent !important;
  background-image: var(--studio-doodle-card-fill, var(--control-doodle-card)) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  box-shadow: none !important;
}
body:not(.home-open) #archiveAppearance #appearanceMorePalette[hidden] {
  display: none !important;
}
body:not(.home-open) #archiveAppearance #appearanceMorePalette > * {
  position: relative !important;
  z-index: 1 !important;
}
body:not(.home-open) #archiveAppearance #appearanceMorePalette::after {
  content: "" !important;
  position: absolute !important;
  z-index: 4 !important;
  inset: 0 !important;
  display: block !important;
  background: var(--studio-doodle-card-outline, var(--control-doodle-card-outline)) center / 100% 100% no-repeat !important;
  pointer-events: none !important;
}
body:not(.home-open) #archiveAppearance .disc-sv-field {
  height: 112px !important;
  border: 0 !important;
  border-radius: 10px 9px 11px 8px !important;
  outline: 1.5px solid color-mix(in srgb, var(--control-doodle-line) 82%, white) !important;
  outline-offset: -1px !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls {
  gap: 10px !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls label {
  grid-template-columns: 58px minmax(0, 1fr) 34px !important;
  gap: 8px !important;
  color: var(--control-doodle-ink) !important;
  font: 550 10px/1.2 var(--flowjam-ui-font) !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls output {
  color: var(--control-doodle-muted) !important;
  font-weight: 600 !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"] {
  width: 100% !important;
  height: 20px !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--control-doodle-line) !important;
  box-shadow: none !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"]::-webkit-slider-thumb {
  width: 17px !important;
  height: 17px !important;
  margin-top: -6.5px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent var(--control-doodle-circle-selected) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"]:focus-visible::-webkit-slider-thumb {
  background-image: var(--control-doodle-circle-selected-focus) !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"]::-moz-range-track {
  height: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--control-doodle-line) !important;
}
body:not(.home-open) #archiveAppearance .disc-channel-controls input[type="range"]::-moz-range-thumb {
  width: 17px !important;
  height: 17px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent var(--control-doodle-circle-selected) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
}
body:not(.home-open) #archiveAppearance .disc-hue-strip {
  height: 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  outline: 1.5px solid color-mix(in srgb, var(--control-doodle-line) 82%, white) !important;
  outline-offset: -1px !important;
}
body:not(.home-open) #archiveAppearance :is(.disc-sv-field, .disc-hue-strip):focus-visible {
  outline-color: var(--control-doodle-focus) !important;
  box-shadow: 0 0 0 2px var(--control-doodle-paper), 0 0 0 4px color-mix(in srgb, var(--control-doodle-focus) 70%, transparent) !important;
}

/* Camera hierarchy: a large preview followed by one three-button control row. */
body:not(.home-open) #archivePhotos .photo-style-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  min-height: 44px !important;
  margin-bottom: 12px !important;
  padding: 0 3px !important;
  color: var(--control-doodle-ink) !important;
  font: 550 10px/1 var(--flowjam-ui-font) !important;
}
body:not(.home-open) #archivePhotos .photo-style-row > span {
  flex: 0 0 auto !important;
}
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick {
  flex: 0 0 auto !important;
}
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick > .snap-mode-button,
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick > .snap-mode-button:hover {
  position: relative !important;
  z-index: 1 !important;
  border: 0 !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick > .snap-mode-button:is(.on, [aria-pressed="true"]),
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick > .snap-mode-button:is(.on, [aria-pressed="true"]):hover {
  background-color: var(--control-doodle-ice) !important;
  background-image: none !important;
}
body:not(.home-open) #archivePhotos .photo-style-row .snap-mode-pick > .snap-mode-button:focus-visible {
  outline: 2px solid var(--control-doodle-focus) !important;
  outline-offset: -3px !important;
  background-image: none !important;
}
body:not(.home-open) #snapPanel .snap-row {
  position: relative !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 36px 44px 36px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  min-height: 52px !important;
  padding: 4px 0 0 !important;
}
body:not(.home-open) #snapPanel #snapShot {
  display: grid !important;
  place-items: center !important;
  justify-self: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  flex: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--control-doodle-circle-coral) center / 100% 100% no-repeat !important;
  color: var(--control-doodle-ink) !important;
  box-shadow: none !important;
}
body:not(.home-open) #snapPanel #snapAddBtn {
  position: relative !important;
  z-index: 1 !important;
  inset: auto !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: var(--control-doodle-circle) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  color: var(--control-doodle-ink) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}
body:not(.home-open) #snapPanel #photoImportButton {
  position: relative !important;
  z-index: 1 !important;
  inset: auto !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: var(--control-doodle-circle) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  color: var(--control-doodle-ink) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font: inherit !important;
}
body:not(.home-open) #snapPanel :is(#photoImportButton, #snapAddBtn) > svg {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  margin: 0 !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  transform: translate(-50%, -50%) !important;
}
body:not(.home-open) #snapPanel #photoImportButton > .photo-add-icon {
  width: 18px !important;
  height: 18px !important;
}
body:not(.home-open) #snapPanel #snapAddBtn .camera-power-off-mark {
  display: block !important;
  stroke: var(--control-doodle-blue, #287baa) !important;
  stroke-width: 2.6 !important;
  stroke-linecap: round !important;
  vector-effect: non-scaling-stroke !important;
}
body:not(.home-open) #snapPanel.camera-on #snapAddBtn .camera-power-off-mark {
  display: none !important;
}
body:not(.home-open) #snapPanel #photoImportButton:hover {
  background-image: var(--control-doodle-circle-ice) !important;
}
body:not(.home-open) #snapPanel #photoImportButton:focus-visible {
  background-image: var(--control-doodle-circle-focus) !important;
}
body:not(.home-open) #snapPanel #snapAddBtn:hover {
  background-image: var(--control-doodle-circle-ice) !important;
}
body:not(.home-open) #snapPanel #snapAddBtn:focus-visible {
  background-image: var(--control-doodle-circle-focus) !important;
}
body:not(.home-open) #snapPanel.camera-on #snapAddBtn {
  background-image: var(--control-doodle-circle-ice) !important;
}
body:not(.home-open) #snapPanel.camera-on #snapAddBtn:focus-visible {
  background-image: var(--control-doodle-circle-focus) !important;
}
body:not(.home-open) #snapPanel #snapAddBtn::after {
  content: none !important;
  display: none !important;
}
body:not(.home-open) #snapPanel #snapShot:disabled {
  opacity: .42 !important;
}
body:not(.home-open) #snapPanel .booth-look {
  display: none !important;
}
body:not(.home-open) #snapPanel .snap-idle > svg {
  display: none !important;
}
body:not(.home-open) #snapPanel .snap-shutter-dot {
  width: 19px !important;
  height: 19px !important;
}
body:not(.home-open) #snapPanel .snap-shutter-dot::after {
  inset: 5px !important;
}
body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel .snap-stage {
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background-color: var(--control-doodle-ice) !important;
  background-image: none !important;
}
body:not(.home-open):not(.archive-collapsed) #archiveShell.archive-shell[data-active-panel="photos"] #snapPanel .snap-idle {
  background-color: var(--control-doodle-ice) !important;
  background-image: none !important;
}
body:not(.home-open) #snapPanel.camera-on .snap-stage { background-color: var(--control-doodle-paper) !important; }

/* Stickers only needs four compact icon columns. Keep its left edge aligned
   with the other Source windows and pull the unused right outline inward. */
@media (min-width: 761px) {
  html body:not(.home-open):not(.archive-collapsed)
    #archiveShell.archive-shell[data-active-panel="doodles"] {
    width: 248px !important;
  }
  html body:not(.home-open):not(.archive-collapsed)
    #archiveDoodles #decoTray {
    width: 184px !important;
    grid-template-columns: repeat(4, 40px) !important;
    gap: 8px !important;
  }
}

/* Final authority for the two compact top controls: retain their dimensions
   and use the dedicated round hand-drawn shell after all shared island rules. */
@media (min-width: 761px) {
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice,
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice:hover,
  html body:not(.home-open) #mixerToggle.studio-mixer-toggle,
  html body:not(.home-open) #mixerToggle.studio-mixer-toggle:is(:hover, [aria-expanded="true"]) {
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-rounded-fill) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
  }
  /* Keep the selected segment visibly inside the hand-drawn shell. The SVG
     strokes sit a few pixels in from both boxes, so the shell needs more than
     nominal CSS padding to leave a real optical gap on every side. */
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice,
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice:hover {
    top: 11px !important;
    width: 146px !important;
    height: 50px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2px !important;
    padding: 8px 10px !important;
  }
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice > button,
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice > button:hover {
    height: 34px !important;
  }
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice::after,
  html body:not(.home-open) #mixerToggle.studio-mixer-toggle::after {
    border-radius: 999px !important;
    background: var(--control-doodle-rounded-outline) center / 100% 100% no-repeat !important;
  }
}

/* Saved Creation detail: the work itself is the hero, not a video-card UI.
   CD recordings stay as a loose playable disc; metadata and export actions
   remain quiet, spacious controls on the right. */
@media (min-width: 761px) {
  html body:not(.home-open) #takeReview .take-sheet-frame {
    width: min(820px, calc(100vw - 72px)) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 72px) !important;
  }
  html body:not(.home-open) #takeReview .take-sheet {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 28px 32px 26px !important;
  }
  html body:not(.home-open) #takeReview .take-head {
    position: absolute !important;
    z-index: 50 !important;
    top: 24px !important;
    right: 26px !important;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body:not(.home-open) #takeReview .take-head > :not(.modal-close) {
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-layout {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr) !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    gap: 28px !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-audio {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 54px !important;
    place-items: center !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-video {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    align-self: center !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) 54px !important;
    place-items: center !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-video::before,
  html body:not(.home-open) #takeReview .take-media.is-video::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-video-cover {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    align-self: center !important;
    justify-self: center !important;
    overflow: hidden !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-video[data-canvas-type="disc"] .take-video-cover {
    width: auto !important;
    max-height: 100% !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
    clip-path: circle(49.8% at 50% 50%) !important;
  }
  html body:not(.home-open) #takeReview .take-video-cover > video {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: contain !important;
    background: transparent !important;
    cursor: pointer !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-video[data-canvas-type="disc"] .take-video-cover > video {
    object-fit: cover !important;
    object-position: center !important;
  }
  html body:not(.home-open) #takeReview .take-media.is-audio::before,
  html body:not(.home-open) #takeReview .take-media.is-audio::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-audio-cover {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) #takeReview .take-media[data-canvas-type="disc"] .take-audio-cover {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 !important;
    align-self: center !important;
    justify-self: center !important;
  }
  html body:not(.home-open) #takeReview .take-timeline-canvas,
  html body:not(.home-open) #takeReview .take-audio-cover > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  html body:not(.home-open) #takeReview .take-audio-stamp {
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-player {
    width: 100% !important;
    height: 54px !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 3px 0 !important;
    background: transparent !important;
  }
  html body:not(.home-open) #takeReview .take-preview-play,
  html body:not(.home-open) #takeReview .take-preview-play:hover {
    width: 38px !important;
    height: 38px !important;
  }
  html body:not(.home-open) #takeReview .take-player-main {
    min-width: 0 !important;
    display: grid !important;
    gap: 2px !important;
  }
  html body:not(.home-open) #takeReview .take-player-copy {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  html body:not(.home-open) #takeReview .take-player-label,
  html body:not(.home-open) #takeReview .take-player-time {
    color: var(--control-doodle-muted) !important;
    font: 550 9px/1.15 var(--flowjam-ui-font) !important;
  }
  html body:not(.home-open) #takeReview .take-progress {
    display: block !important;
    width: 100% !important;
    height: var(--fj-player-range-height) !important;
  }
  html body:not(.home-open) #takeReview .take-details {
    min-width: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 34px 2px 2px !important;
  }
  html body:not(.home-open) #takeReview .take-copy {
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-title-label,
  html body:not(.home-open) #takeReview .take-elements-label {
    margin: 0 0 9px !important;
    color: var(--control-doodle-muted) !important;
    font: 650 9px/1.2 var(--flowjam-ui-font) !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
  }
  html body:not(.home-open) #takeReview .take-title {
    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;
    padding: 8px 18px 9px !important;
    overflow: hidden !important;
    border: 1.5px solid var(--control-doodle-line) !important;
    border-radius: 18px 16px 19px 17px / 17px 19px 16px 18px !important;
    outline: 0 !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
  }
  html body:not(.home-open) #takeReview .take-title:focus {
    background-image: none !important;
    border-color: var(--control-doodle-focus) !important;
    filter: drop-shadow(0 0 2px color-mix(in srgb, var(--control-doodle-focus) 58%, transparent)) !important;
  }
  html body:not(.home-open) #takeReview .take-meta {
    margin: 10px 4px 20px !important;
    color: var(--control-doodle-muted) !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  html body:not(.home-open) #takeReview .take-elements-label[hidden] {
    display: none !important;
  }
  html body:not(.home-open) #takeReview .take-elements {
    gap: 7px !important;
    margin: 0 0 20px !important;
  }
  html body:not(.home-open) #takeReview .take-elements span {
    padding: 7px 11px !important;
  }
  html body:not(.home-open) #takeReview .take-actions {
    margin-top: auto !important;
  }
  html body:not(.home-open) #takeReview .download-menu {
    width: 250px !important;
    box-sizing: border-box !important;
    display: grid !important;
    gap: 6px !important;
    padding: 8px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 20px !important;
    outline: 0 !important;
    background-color: var(--control-doodle-paper) !important;
    background-image: none !important;
    box-shadow: 0 12px 28px rgba(66, 47, 14, .13) !important;
  }
  html body:not(.home-open) #takeReview .download-menu[hidden] {
    display: none !important;
  }
  html body:not(.home-open) #takeReview .download-menu::before,
  html body:not(.home-open) #takeReview .download-menu::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #takeReview .download-menu .download-option,
  html body:not(.home-open) #takeReview .download-menu .download-option:hover,
  html body:not(.home-open) #takeReview .download-menu .download-option:focus-visible {
    width: 100% !important;
    min-height: 58px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    padding: 10px 15px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 17px !important;
    outline: 0 !important;
    background-image: none !important;
    box-shadow: none !important;
    text-align: left !important;
    transform: none !important;
  }
  html body:not(.home-open) #takeReview .download-menu .download-option:hover,
  html body:not(.home-open) #takeReview .download-menu .download-option:focus-visible {
    background-color: var(--control-doodle-ice) !important;
  }
  html body:not(.home-open) #takeReview .download-option-copy {
    width: 100% !important;
    min-width: 0 !important;
    gap: 4px !important;
  }
  html body:not(.home-open) #takeReview .download-option-copy strong {
    font: 650 13px/1.1 var(--flowjam-ui-font) !important;
  }
  html body:not(.home-open) #takeReview .download-option-copy small {
    color: var(--control-doodle-muted) !important;
    font: 500 10px/1.15 var(--flowjam-ui-font) !important;
  }
  html body:not(.home-open) #takeReview .download-option-badge {
    display: none !important;
  }
}

/* Final icon geometry authority. Text glyphs have asymmetric font metrics, so
   close and plus marks are drawn from centered bars instead. */
.round-icon-cross {
  position: relative !important;
  width: 13px !important;
  height: 13px !important;
  display: block !important;
  flex: 0 0 13px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
  pointer-events: none !important;
}
.round-icon-cross::before,
.round-icon-cross::after {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 11px !important;
  height: 1.7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: currentColor !important;
  transform-origin: center !important;
}
.round-icon-cross::before { transform: translate(-50%, -50%) rotate(45deg) !important; }
.round-icon-cross::after { transform: translate(-50%, -50%) rotate(-45deg) !important; }
.round-icon-play {
  width: 11px !important;
  height: 13px !important;
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  background: currentColor !important;
  clip-path: polygon(8% 2%, 98% 48%, 13% 98%) !important;
  transform: translateX(1px) rotate(-2deg) !important;
  pointer-events: none !important;
}
.round-icon-pause {
  width: 11px !important;
  height: 13px !important;
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  background: linear-gradient(90deg, currentColor 0 34%, transparent 34% 66%, currentColor 66%) !important;
  transform: rotate(-1deg) !important;
  pointer-events: none !important;
}
.round-icon-rotate {
  width: 15px !important;
  height: 15px !important;
  display: block !important;
  margin: 0 !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

@media (min-width: 761px) {
  html body:not(.home-open) :is(
    #mixerClose, #photoInspectorClose, #keysClose, #recordsDrawerClose, #takeClose,
    #archiveGridClose, .item > .remove, .shelf-del, .sticker-del, .board-file-delete,
    .camera-power, .photo-polaroid .snap-go, .oct-key, .take-preview-play, .photo-add-files,
    .hum-play, .creation-play, .item-rotate-handle
  ) {
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    place-items: center !important;
    padding: 0 !important;
    text-indent: 0 !important;
    line-height: 0 !important;
  }
  html body:not(.home-open) :is(
    #mixerClose, #photoInspectorClose, #keysClose, #recordsDrawerClose, #takeClose,
    #archiveGridClose, .item > .remove, .shelf-del, .sticker-del, .board-file-delete
  ) { display: grid !important; }
  html body:not(.home-open) :is(
    #mixerClose, #photoInspectorClose, #keysClose, #recordsDrawerClose, #takeClose
  ) {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    flex: 0 0 30px !important;
    aspect-ratio: 1 !important;
    border-radius: 50% !important;
  }
  html body:not(.home-open) #mixerPanel #mixerClose {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    flex-basis: 30px !important;
  }
  html body:not(.home-open) :is(.hum-play, .creation-play, .item-rotate-handle) {
    display: grid !important;
  }
  html body:not(.home-open) :is(.camera-power, .photo-add-files) > svg {
    display: block !important;
    place-self: center !important;
    margin: 0 !important;
    transform-origin: center !important;
  }

  /* Custom colour uses a rainbow hand-drawn perimeter, with a geometrically
     centered plus. It no longer reads as another blue outlined swatch. */
  html body:not(.home-open) .appearance-reference-swatches .appearance-custom-trigger::before {
    border: 0 !important;
    outline: 0 !important;
    background: transparent var(--control-doodle-rainbow-circle) center / 100% 100% no-repeat !important;
    box-shadow: none !important;
  }
  html body:not(.home-open) .appearance-reference-swatches .appearance-custom-trigger::after {
    content: "" !important;
    position: absolute !important;
    z-index: 2 !important;
    left: 50% !important;
    top: 31px !important;
    width: 18px !important;
    height: 18px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background:
      linear-gradient(var(--control-doodle-ink), var(--control-doodle-ink)) center / 14px 2.5px no-repeat,
      linear-gradient(var(--control-doodle-ink), var(--control-doodle-ink)) center / 2.5px 14px no-repeat !important;
    box-shadow: none !important;
    transform: translate(-50%, -50%) !important;
    pointer-events: none !important;
  }
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > #appearancePaletteToggle,
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > #appearancePaletteToggle:is(:hover, .on, [aria-expanded="true"]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 62px 13px !important;
    align-content: start !important;
    justify-items: center !important;
    gap: 5px !important;
    padding: 0 !important;
    transform: none !important;
  }
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > #appearancePaletteToggle::before {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    width: 62px !important;
    height: 62px !important;
    background: transparent var(--control-doodle-rainbow-circle) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > .appearance-swatch {
    grid-template-rows: 62px 13px !important;
    align-content: start !important;
    gap: 5px !important;
  }
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > .appearance-swatch::before {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: center !important;
  }
  html[data-canvas-type="disc"] body:not(.home-open) #archiveAppearance .appearance-reference-swatches > #appearancePaletteToggle::before {
    /* The rainbow SVG keeps a small authored safe area. Scale only its visual
       artwork so its coloured perimeter matches a 62px solid CD. */
    transform: scale(1.054) !important;
    transform-origin: center !important;
  }
  html body:not(.home-open) #archiveAppearance .appearance-reference-swatches > .appearance-swatch > span {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    justify-content: center !important;
    align-self: start !important;
    justify-self: center !important;
    width: auto !important;
    margin: 0 !important;
    text-align: center !important;
  }
  html body:not(.home-open) #photoInspector .inspector-custom-trigger,
  html body:not(.home-open) #photoInspector .inspector-custom-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
    border: 0 !important;
    background: transparent var(--control-doodle-rainbow-circle) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) #photoInspector .inspector-custom-trigger.on::after,
  html body:not(.home-open) #photoInspector .inspector-custom-trigger[aria-pressed="true"]::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #photoInspector .inspector-rainbow-plus,
  html body:not(.home-open) #photoInspector .inspector-custom-trigger:is(:hover, [aria-expanded="true"]) .inspector-rainbow-plus {
    position: relative !important;
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    place-self: center !important;
    border: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }
  html body:not(.home-open) #photoInspector .inspector-rainbow-plus::before,
  html body:not(.home-open) #photoInspector .inspector-rainbow-plus::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    border-radius: 999px !important;
    background: var(--control-doodle-ink) !important;
    transform: translate(-50%, -50%) !important;
  }
  html body:not(.home-open) #photoInspector .inspector-rainbow-plus::before { width: 14px !important; height: 2.5px !important; }
  html body:not(.home-open) #photoInspector .inspector-rainbow-plus::after { width: 2.5px !important; height: 14px !important; }
}

/* Final Camera DJ guide geometry. Keep the title and the current mode's
   instructions compact instead of forcing an unnecessarily tall card. */
html body:not(.home-open) #camLegend.cam-legend {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
html body:not(.home-open) #camLegend :is(.cam-legend-toggle, .cam-legend-list),
html body:not(.home-open) #camLegend.is-compact :is(.cam-legend-toggle, .cam-legend-list),
html body.records-open.photo-inspector-open:not(.home-open) #camLegend :is(.cam-legend-toggle, .cam-legend-list) {
  height: auto !important;
  max-height: none !important;
}
html body:not(.home-open) #camLegend .cam-legend-toggle,
html body:not(.home-open) #camLegend.is-compact .cam-legend-toggle,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .cam-legend-toggle {
  min-height: 42px !important;
  padding: 11px 16px 8px !important;
}
html body:not(.home-open) #camLegend .cam-legend-list,
html body:not(.home-open) #camLegend.is-compact .cam-legend-list,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .cam-legend-list {
  grid-auto-rows: max-content !important;
  align-content: start !important;
  gap: 2px !important;
  padding: 7px 16px 10px !important;
  overflow: visible !important;
}
html body:not(.home-open) #camLegend .dj-row,
html body:not(.home-open) #camLegend.is-compact .dj-row,
html body.records-open.photo-inspector-open:not(.home-open) #camLegend .dj-row {
  height: auto !important;
  min-height: 22px !important;
  font: 550 10px/1.2 var(--flowjam-ui-font) !important;
}

/* Foreground-outline contract ------------------------------------------------
 * A control's fill and selected states always stay below a separate outline
 * node. The one-pixel inset protects every edge from host/compositor clipping. */
@media (min-width: 761px) {
  html body:not(.home-open) :is(
    .topbar-studio-tools, .studio-control-cluster,
    #mixerToggle.studio-mixer-toggle,
    #photoInspector .photo-presentation-options,
    #studioCanvasChoice.studio-canvas-choice,
    #baseTemplateTabs.base-template-tabs,
    #archivePhotos .snap-mode-pick
  ) {
    overflow: visible !important;
  }
  html body:not(.home-open) :is(
    #mixerToggle.studio-mixer-toggle,
    #photoInspector .photo-presentation-options,
    #studioCanvasChoice.studio-canvas-choice,
    #baseTemplateTabs.base-template-tabs,
    #archivePhotos .snap-mode-pick
  ) {
    position: relative !important;
    isolation: isolate !important;
  }
  html body:not(.home-open) .ui-foreground-outline {
    position: absolute !important;
    z-index: 1000 !important;
    inset: 1px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }
  html body:not(.home-open) #mixerToggle.studio-mixer-toggle::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #mixerToggle.studio-mixer-toggle > .mixer-toggle-outline {
    background-image: var(--control-doodle-rounded-outline) !important;
  }
  html body:not(.home-open) :is(
    #studioCanvasChoice.studio-canvas-choice,
    #baseTemplateTabs.base-template-tabs,
    #archivePhotos .snap-mode-pick
  )::after {
    content: none !important;
    display: none !important;
  }
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice > .canvas-choice-outline {
    background-image: var(--control-doodle-rounded-outline) !important;
  }
  html body:not(.home-open) :is(
    #baseTemplateTabs.base-template-tabs,
    #archivePhotos .snap-mode-pick
  ) > .shared-pill-outline {
    background-image: var(--control-doodle-pill-outline) !important;
  }
  html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options {
    padding: 5px !important;
    background-color: transparent !important;
    background-image: var(--control-doodle-pill-fill) !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
  }
  html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > button {
    position: relative !important;
    z-index: 1 !important;
    min-height: 28px !important;
  }
html body:not(.home-open) #photoInspector[data-kind="photo"] .photo-presentation-options > .photo-style-outline {
    background-image: var(--control-doodle-pill-outline) !important;
  }
}

/* Canvas has a single background-colour surface. Preserve the semantic
   hidden state even though the segmented-control skin uses display rules
   with higher specificity elsewhere in this final stylesheet. */
html[data-canvas-type="card"] body:not(.home-open) #baseTemplateTabs.base-template-tabs[hidden] {
  display: none !important;
}
html[data-canvas-type="card"] body:not(.home-open) #appearanceColorGroup > .appearance-swatch[data-canvas-available="false"][hidden] {
  display: none !important;
}

/* Windows/display scaling can turn a 1366px desktop into a viewport near
   1093 CSS pixels. Keep the three top zones independent throughout that
   range so the title, surface switch and playback tools cannot overlap. */
@media (min-width: 761px) and (max-width: 1143px) {
  html body:not(.home-open) header.topbar > div.studio-file-island {
    inset: 7px auto auto 12px !important;
    width: 222px !important;
    height: 54px !important;
  }

  html body:not(.home-open) .studio-file-island .brand {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    flex-basis: 52px !important;
  }

  html body:not(.home-open) .studio-file-island .brand-mark {
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
  }

  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice,
  html body:not(.home-open) #studioCanvasChoice.studio-canvas-choice:hover {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  html body:not(.home-open) .studio-control-cluster {
    right: clamp(10px, calc(42vw - 310.8px), 76px) !important;
    gap: 6px !important;
  }

  html body:not(.home-open) .topbar .studio-playback-island {
    width: 152px !important;
    flex: 0 0 152px !important;
  }

  html body:not(.home-open) .topbar .studio-performance-island {
    width: 78px !important;
    min-width: 78px !important;
    flex: 0 0 78px !important;
    gap: 2px !important;
    padding: 4px !important;
  }

  html body:not(.home-open) .topbar .studio-performance-island .perform-name {
    display: none !important;
  }

  html body:not(.home-open) .topbar .studio-performance-island .rail-tool-btn,
  html body:not(.home-open) .topbar .studio-performance-island .rail-tool-btn[data-tool="dj"] {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    flex: 0 0 34px !important;
    padding-inline: 0 !important;
  }

  html body:not(.home-open) #mixerToggle.studio-mixer-toggle {
    width: 44px !important;
    min-width: 44px !important;
    padding-inline: 4px !important;
  }

  html body:not(.home-open) #mixerToggle.studio-mixer-toggle > span {
    display: none !important;
  }
}
/* Detail polish: truthful cutout status, quiet Creations scrolling, and an
   idea field with enough room for the existing handwritten type. */
html body:not(.home-open) #photoInspectorCutoutState {
  margin-left: 7px;
  color: var(--fj-ui-line-focus);
  font: 500 10px/1.4 var(--fj-ui-font);
  white-space: nowrap;
}
html body:not(.home-open) #photoInspectorCutoutState[hidden] { display: none !important; }

html body:not(.home-open) #recordsRack #recordsRow.records-row {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding-bottom: 10px !important;
}
html body:not(.home-open) #recordsRack #recordsRow.records-row::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
/* The Source drawer's short, light sketch stroke, turned horizontally.
   This sits outside the scrolling row, so it tracks progress, not content. */
html body:not(.home-open) #recordsRack .records-scroll-indicator {
  position: absolute !important; z-index: 20 !important;
  left: var(--records-scroll-left, 22px); top: var(--records-scroll-top, 180px);
  width: var(--records-scroll-size, 38px); height: 7px;
  display: block !important; border: 0; border-radius: 0;
  background: url("./assets/ui/doodle-underline.svg") center / 100% 100% no-repeat !important;
  opacity: .9; transform: translateX(var(--records-scroll-x, 0px));
  pointer-events: auto; cursor: grab; touch-action: none;
}
html body:not(.home-open) #recordsRack .records-scroll-indicator::after {
  content: ""; position: absolute; inset: -5px -3px;
}
html body:not(.home-open) #recordsRack .records-scroll-indicator:active { cursor: grabbing; }
html body:not(.home-open) #recordsRack .records-scroll-indicator[hidden] { display: none !important; }

html body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagForm {
  gap: 7px !important;
  padding: 5px 0 !important;
}
html body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagInput {
  width: 0 !important;
  min-width: 0 !important;
  flex: 1 1 0% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 9px 15px !important;
  box-sizing: border-box !important;
  font: 450 12px/20px var(--fj-ui-font) !important;
  text-indent: 0 !important;
  box-shadow: none !important;
}
html body:not(.home-open):not(.archive-collapsed) #archiveVibes #tagInput::placeholder {
  font: inherit !important;
  opacity: 1 !important;
  color: var(--fj-ui-muted) !important;
}

/* Creation player: artwork and transport occupy separate areas. */
html body:not(.home-open) #takeReview .take-sheet-frame {
  width: min(820px, calc(100vw - 32px)) !important;
  height: auto !important; min-height: 0 !important; max-height: calc(100dvh - 32px) !important;
}
html body:not(.home-open) #takeReview .take-sheet {
  width: 100% !important; height: auto !important; min-height: 0 !important;
  max-height: calc(100dvh - 32px) !important; box-sizing: border-box !important;
  padding: 44px 32px 32px !important; overflow-y: auto !important; overflow-x: hidden !important;
}
html body:not(.home-open) #takeReview .take-head {
  position: absolute !important; top: 18px !important; right: 20px !important;
  width: 30px !important; height: 30px !important; margin: 0 !important; padding: 0 !important;
}
html body:not(.home-open) #takeReview .take-layout {
  display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(280px, .95fr) !important;
  align-items: center !important; gap: 28px !important;
}
html body:not(.home-open) #takeReview :is(.take-media.is-audio, .take-media.is-video) {
  display: block !important; width: 100% !important; height: auto !important;
  min-height: 0 !important; aspect-ratio: auto !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; outline: 0 !important;
  background: transparent !important; background-image: none !important; box-shadow: none !important;
}
html body:not(.home-open) #takeReview :is(.take-audio-cover, .take-video-cover) {
  position: relative !important; width: 100% !important; height: auto !important;
  max-width: 100% !important; max-height: none !important;
}
html body:not(.home-open) #takeReview .take-details {
  padding: 14px 0 0 !important; min-width: 0 !important; gap: 0 !important;
}
html body:not(.home-open) #takeReview .take-title {
  height: 44px !important; margin: 0 !important; padding: 5px 2px 8px !important;
  border: 0 !important; border-radius: 0 !important; color: var(--fj-ui-ink) !important;
  background: transparent !important; font: 600 23px/1.3 var(--fj-ui-font) !important;
}
html body:not(.home-open) #takeReview .take-title:is(:hover, :focus) {
  background: transparent url("./assets/ui/doodle-underline.svg") left bottom / 100% 6px no-repeat !important;
  box-shadow: none !important; filter: none !important;
}
html body:not(.home-open) #takeReview .take-meta { margin: 7px 2px 18px !important; font-size: 11px !important; }
html body:not(.home-open) #takeReview .take-player-slot { min-width: 0; margin: 0 0 20px; }
html body:not(.home-open) #takeReview .take-player {
  display: grid !important; grid-template-columns: 48px minmax(0, 1fr) 30px !important;
  align-items: center !important; gap: 10px !important; width: 100% !important;
  height: auto !important; min-height: 58px !important; padding: 6px 0 !important;
}
html body:not(.home-open) #takeReview .take-preview-play,
html body:not(.home-open) #takeReview .take-preview-play:hover { width: 48px !important; height: 48px !important; }
html body:not(.home-open) #takeReview .take-player-main { display: grid !important; gap: 7px !important; min-width: 0 !important; }
html body:not(.home-open) #takeReview .take-player-copy { gap: 8px !important; }
html body:not(.home-open) #takeReview :is(.take-player-label, .take-player-time) { font: 500 10px/1.35 var(--fj-ui-font) !important; }
html body:not(.home-open) #takeReview .take-player[data-state="playing"] .take-player-label { color: var(--fj-ui-ink) !important; }
html body:not(.home-open) #takeReview .take-preview-restart {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--fj-ui-line-focus); cursor: pointer;
}
html body:not(.home-open) #takeReview .take-preview-restart:hover { background: var(--fj-ui-ice); }
html body:not(.home-open) #takeReview .take-preview-restart:focus-visible { outline: 2px solid var(--fj-ui-line-focus); outline-offset: 2px; }
html body:not(.home-open) #takeReview .take-element-details { margin: 0 0 20px; }
html body:not(.home-open) #takeReview .take-element-details[hidden] { display: none !important; }
html body:not(.home-open) #takeReview .take-elements-label {
  width: fit-content; margin: 0 !important; padding: 6px 0; cursor: pointer;
  text-transform: none !important; letter-spacing: 0 !important; font: 500 11px/1.4 var(--fj-ui-font) !important;
}
html body:not(.home-open) #takeReview .take-elements-label:focus-visible { outline: 2px solid var(--fj-ui-line-focus); outline-offset: 3px; border-radius: 6px; }
html body:not(.home-open) #takeReview .take-elements { margin: 10px 0 0 !important; gap: 6px !important; }
html body:not(.home-open) #takeReview .take-actions { margin-top: 0 !important; }
@media (max-width: 700px) {
  html body:not(.home-open) #takeReview .take-sheet { padding: 42px 24px 26px !important; }
  html body:not(.home-open) #takeReview .take-layout { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
  html body:not(.home-open) #takeReview :is(.take-media.is-audio, .take-media.is-video) { width: min(280px, 100%) !important; justify-self: center !important; }
  html body:not(.home-open) #takeReview .take-details { padding: 0 !important; }
  html body:not(.home-open) #takeReview .take-title { font-size: 21px !important; }
}
@media (max-width: 760px) {
  html body:not(.home-open) #takeReview .take-sheet {
    border: 0 !important; border-radius: 28px !important; box-shadow: none !important;
    background: transparent var(--fj-shape-window) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) #takeReview .modal-close {
    width: 30px !important; height: 30px !important; padding: 0 !important; border: 0 !important;
    background: transparent var(--fj-shape-circle) center / 100% 100% no-repeat !important; color: var(--fj-ui-line-focus) !important;
  }
  html body:not(.home-open) #takeReview .take-preview-play {
    border: 0 !important; box-shadow: none !important; color: var(--fj-ui-ink) !important;
    background: transparent var(--fj-shape-circle-selected) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) #takeReview .take-preview-play.is-playing { background-image: var(--fj-shape-circle-coral) !important; }
  html body:not(.home-open) #takeReview .take-progress::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--fj-ui-selected) 0 var(--played), var(--fj-ui-line) var(--played) 100%) !important;
  }
  html body:not(.home-open) #takeReview .take-progress::-webkit-slider-thumb { border-color: var(--fj-ui-line) !important; background: var(--fj-ui-selected) !important; box-shadow: none !important; }
  html body:not(.home-open) #takeReview .take-progress::-moz-range-track { background: var(--fj-ui-line) !important; }
  html body:not(.home-open) #takeReview .take-progress::-moz-range-progress { background: var(--fj-ui-selected) !important; }
  html body:not(.home-open) #takeReview .take-progress::-moz-range-thumb { border-color: var(--fj-ui-line) !important; background: var(--fj-ui-selected) !important; }
  html body:not(.home-open) #takeReview :is(.take-player-label, .take-player-time, .take-meta, .take-elements-label) { color: var(--fj-ui-muted) !important; }
  html body:not(.home-open) #takeReview :is(.take-actions button, .download-trigger) {
    border: 0 !important; box-shadow: none !important; color: var(--fj-ui-ink) !important;
    background: transparent var(--fj-shape-pill) center / 100% 100% no-repeat !important;
  }
  html body:not(.home-open) #takeReview .take-discard { background-image: var(--fj-shape-pill-coral) !important; }
  html body:not(.home-open) #takeReview :is(.take-keep, .download-trigger) { background-image: var(--fj-shape-pill-selected) !important; }
  html body:not(.home-open) #takeReview .take-actions {
    display: grid !important; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, .8fr) !important; gap: 6px !important;
  }
  html body:not(.home-open) #takeReview :is(.take-actions > *, .take-download-slot, .download-control) { min-width: 0 !important; width: 100% !important; }
  html body:not(.home-open) #takeReview :is(.take-actions > button, .download-trigger) {
    width: 100% !important; min-width: 0 !important; min-height: 36px !important;
    padding: 8px 9px !important; font: 550 11px/1.3 var(--fj-ui-font) !important; box-sizing: border-box !important;
  }
  html body:not(.home-open) #takeReview .download-trigger { gap: 5px !important; }
  html body:not(.home-open) #takeReview .download-trigger-caret { width: 9px !important; height: 9px !important; flex: 0 0 9px !important; }
}
@media (max-width: 420px) {
  html body:not(.home-open) #takeReview .take-sheet { padding: 40px 24px 28px !important; }
  html body:not(.home-open) #takeReview :is(.take-media.is-audio, .take-media.is-video) { width: min(210px, 100%, 33dvh) !important; }
  html body:not(.home-open) #takeReview .take-layout { gap: 12px !important; }
  html body:not(.home-open) #takeReview .take-meta { margin-bottom: 12px !important; }
  html body:not(.home-open) #takeReview .take-player-slot,
  html body:not(.home-open) #takeReview .take-element-details { margin-bottom: 12px !important; }
}

/* Saved works play inside a CD deck: disc bay and transport share one case. */
html body:not(.home-open) #takeReview #takeMachine.take-machine {
  min-width: 0; width: 100%; box-sizing: border-box; padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 16px;
  background: transparent var(--fj-shape-device) center / 100% 100% no-repeat;
  filter: drop-shadow(0 5px 8px rgb(118 166 206 / 8%));
}
html body:not(.home-open) #takeReview .take-machine-label {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--fj-ui-ink); font: 600 12px/1.3 var(--fj-ui-font);
}
html body:not(.home-open) #takeReview .take-machine-format {
  color: var(--fj-ui-line-focus); font-size: 9px; font-weight: 500; letter-spacing: .06em;
}
html body:not(.home-open) #takeReview #takeMachine .take-disc-bay {
  position: relative; min-width: 0; padding: 9px; box-sizing: border-box;
  background: var(--fj-ui-cream); border: 1px solid var(--fj-ui-line); border-radius: 24px;
}
html body:not(.home-open) #takeReview #takeMachine[data-canvas-type="disc"] .take-disc-bay {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
}
html body:not(.home-open) #takeReview #takeMachine :is(.take-media.is-audio, .take-media.is-video) {
  width: 100% !important; height: auto !important; min-height: 0 !important;
  display: block !important; aspect-ratio: auto !important; padding: 0 !important;
  overflow: visible !important; border: 0 !important; background: transparent !important; box-shadow: none !important;
}
html body:not(.home-open) #takeReview #takeMachine :is(.take-audio-cover, .take-video-cover) {
  width: 100% !important; height: auto !important; max-width: 100% !important;
  max-height: none !important; min-height: 0 !important; overflow: hidden !important;
  clip-path: none !important; border-radius: var(--fj-player-media-radius) !important; background: transparent !important;
}
html body:not(.home-open) #takeReview #takeMachine[data-canvas-type="disc"] .take-audio-cover {
  aspect-ratio: 1 !important; border-radius: 50% !important;
}
html body:not(.home-open) #takeReview #takeMachine .take-video-cover { aspect-ratio: auto; }
html body:not(.home-open) #takeReview #takeMachine .take-video-cover > video {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  object-fit: contain !important; border-radius: 0 !important; clip-path: none !important;
}
html body:not(.home-open) #takeReview #takeMachine .take-player-slot { margin: 0 !important; width: 100%; }
html body:not(.home-open) #takeReview #takeMachine .take-player {
  grid-template-columns: var(--fj-player-button-size) minmax(0, 1fr) var(--fj-player-restart-size) !important; gap: var(--fj-player-control-gap) !important; padding: 2px 0 !important; min-height: var(--fj-player-transport-height) !important;
}
html body:not(.home-open) #takeReview #takeMachine .take-preview-play,
html body:not(.home-open) #takeReview #takeMachine .take-preview-play:hover { width: var(--fj-player-button-size) !important; height: var(--fj-player-button-size) !important; }
html body:not(.home-open) #takeReview #takeMachine .take-preview-restart { width: var(--fj-player-restart-size); height: var(--fj-player-restart-size); }
html body:not(.home-open) #takeReview #takeMachine .take-player-copy { flex-wrap: wrap; gap: 3px 6px !important; }
html body:not(.home-open) #takeReview #takeMachine .take-player-time { margin-left: auto; }
html body:not(.home-open) #takeReview .take-element-details { margin: 0 0 24px !important; }
html body:not(.home-open) #takeReview .take-elements-label { cursor: default; }
html body:not(.home-open) #takeReview .take-elements { display: flex; flex-wrap: wrap; gap: 7px !important; }
html body:not(.home-open) #takeReview .take-elements[hidden] { display: none !important; }
html body:not(.home-open) #takeReview .take-elements > span {
  max-width: 100% !important; box-sizing: border-box; padding: 8px 12px !important;
  border: 0 !important; background: transparent var(--fj-shape-pill-hover) center / 100% 100% no-repeat !important;
  color: var(--fj-ui-ink) !important; font: 500 11px/1.35 var(--fj-ui-font) !important;
}
@media (max-width: 700px) {
  html body:not(.home-open) #takeReview #takeMachine.take-machine { max-width: 310px; justify-self: center; padding: 18px; gap: 12px; }
  html body:not(.home-open) #takeReview .take-details { width: 100%; }
}
@media (max-width: 420px) {
  html body:not(.home-open) #takeReview #takeMachine.take-machine { max-width: 290px; padding: 16px; }
  html body:not(.home-open) #takeReview #takeMachine .take-disc-bay { width: min(100%, 30dvh); margin-inline: auto; }
  html body:not(.home-open) #takeReview #takeMachine .take-machine-format { font-size: 8px; }
  html body:not(.home-open) #takeReview .take-element-details { margin-bottom: 16px !important; }
}

/* Creation review refinement: a shared deck, quieter hierarchy, compact tags. */
html body:not(.home-open) #takeReview .take-sheet-frame { width: min(760px, calc(100vw - 32px)) !important; }
html body:not(.home-open) #takeReview .take-sheet { padding: 34px 28px 24px !important; }
html body:not(.home-open) #takeReview .take-layout {
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr) !important;
  align-items: start !important; gap: 24px !important;
}
html body:not(.home-open) #takeReview #takeMachine.take-machine {
  padding: var(--fj-player-pad-top) var(--fj-player-pad-inline) var(--fj-player-pad-bottom); gap: var(--fj-player-gap);
  border: var(--fj-player-border) solid var(--fj-ui-line);
  border-radius: var(--fj-player-radius);
  background: var(--fj-ui-cream); filter: none;
  box-shadow: 0 4px 0 rgb(177 208 236 / 13%);
}
html body:not(.home-open) #takeReview #takeMachine .take-machine-label { display: none; }
html body:not(.home-open) #takeReview #takeMachine .take-disc-bay {
  padding: var(--fj-player-bay-pad); border: 0; background: var(--fj-ui-paper);
}
html body:not(.home-open) #takeReview #takeMachine[data-canvas-type="card"] .take-disc-bay { border-radius: var(--fj-player-bay-radius); }
html body:not(.home-open) #takeReview #takeMachine .take-player { gap: var(--fj-player-control-gap) !important; }
html body:not(.home-open) #takeReview #takeMachine .take-player-label { font-size: var(--fj-player-status-size) !important; }
html body:not(.home-open) #takeReview #takeMachine .take-player-time { font-size: var(--fj-player-time-size) !important; }
html body:not(.home-open) #takeReview #takeMachine .take-player-main { gap: var(--fj-player-copy-gap) !important; }
html body:not(.home-open) #takeReview .take-details { padding: 16px 0 0 !important; }
html body:not(.home-open) #takeReview #takeTitle.take-title {
  display: block !important; resize: none !important; field-sizing: content;
  min-height: 38px !important; height: auto !important; max-height: none !important;
  padding: 3px 0 5px !important; margin: 0 !important; box-sizing: border-box !important;
  overflow: hidden !important; white-space: pre-wrap !important; overflow-wrap: anywhere;
  font: 600 23px/1.4 var(--fj-ui-font) !important;
}
html body:not(.home-open) #takeReview .take-meta { margin: 6px 0 18px !important; }
html body:not(.home-open) #takeReview .take-elements-label {
  padding: 0 !important; margin: 0 0 10px !important; color: var(--fj-ui-muted); font-size: 10px !important;
}
html body:not(.home-open) #takeReview .take-elements { margin: 0 !important; gap: 8px !important; align-items: flex-start; }
html body:not(.home-open) #takeReview .take-elements > span {
  display: block; flex: 0 1 auto; min-width: 0; max-width: 100% !important;
  width: auto !important; padding: 7px 12px !important; border: 0 !important; border-radius: 0 !important;
  background: transparent var(--fj-shape-pill-hover) center / 100% 100% no-repeat !important;
  white-space: normal !important; overflow-wrap: anywhere;
  overflow: visible !important; text-overflow: clip !important; font: 500 12px/1.35 var(--fj-ui-font) !important;
}
html body:not(.home-open) #takeReview .take-element-details { margin: 0 0 18px !important; }
html body:not(.home-open) #takeReview .take-actions {
  display: flex !important; flex-wrap: wrap; justify-content: flex-start; gap: 10px !important;
}
html body:not(.home-open) #takeReview .take-actions > :is(button, .take-download-slot) {
  flex: 0 0 auto !important; width: auto !important;
}
html body:not(.home-open) #takeReview .take-actions .take-keep { min-width: 84px; }
@media (max-width: 700px) {
  html body:not(.home-open) #takeReview .take-sheet { padding: 38px 24px 24px !important; }
  html body:not(.home-open) #takeReview .take-layout { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; }
  html body:not(.home-open) #takeReview #takeMachine.take-machine { max-width: 300px; padding: 16px 18px 20px; }
  html body:not(.home-open) #takeReview .take-details { padding: 0 !important; }
  html body:not(.home-open) #takeReview #takeTitle.take-title { font-size: 21px !important; }
  html body:not(.home-open) #takeReview .take-meta { margin-bottom: 18px !important; }
  html body:not(.home-open) #takeReview .take-actions {
    display: grid !important; grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr) minmax(0, .8fr) !important; gap: 6px !important;
  }
  html body:not(.home-open) #takeReview .take-actions > :is(button, .take-download-slot) { width: 100% !important; min-width: 0 !important; }
}

/* Download follows available space inside the review, without reserving a
   permanent empty row. Keep the approved paper/blue menu colors. */
html body:not(.home-open) #takeReview .download-menu {
  top: calc(100% + 8px); bottom: auto;
  width: 216px !important; min-width: 0 !important; box-sizing: border-box !important;
  display: grid !important; gap: 2px !important; padding: 6px !important;
  border: 0 !important; border-radius: 20px !important;
  background-color: var(--fj-ui-paper) !important; background-image: none !important;
  overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--fj-ui-line) transparent;
}
html body:not(.home-open) #takeReview .download-menu .download-option,
html body:not(.home-open) #takeReview .download-menu .download-option:hover,
html body:not(.home-open) #takeReview .download-menu .download-option:focus-visible {
  width: 100% !important; min-height: 44px !important; padding: 7px 12px !important;
  border: 0 !important; background-image: none !important;
}
html body:not(.home-open) #takeReview .download-control.open[data-placement="below"] .download-trigger-caret {
  transform: translateY(-2px) rotate(45deg);
}
html body:not(.home-open) #takeReview .download-menu[hidden] { display: none !important; }

/* A separate creation action in the right-hand details column; the player
   remains on its own and Elements keep their descriptive tag styling. */
html body:not(.home-open) #takeReview .take-extension {
  display: grid; gap: 9px; margin: 26px 0 24px; min-width: 0;
}
html body:not(.home-open) #takeReview .take-extension[hidden],
html body:not(.home-open) #takeReview .take-extension [hidden] { display: none !important; }
html body:not(.home-open) #takeReview .take-extension button {
  min-height: 44px; border: 0; padding: 10px 15px; box-sizing: border-box;
  background: none;
  color: var(--fj-ui-ink); font: 550 12px/1.4 var(--fj-ui-font); cursor: pointer;
}
html body:not(.home-open) #takeReview .take-extension button:focus-visible { outline: 2px solid var(--fj-ui-line-focus); outline-offset: 3px; }
html body:not(.home-open) #takeReview .take-extension button:disabled { opacity: .58; cursor: default; }
html body:not(.home-open) #takeReview .take-extension .take-extend {
  display: flex; width: 100%; min-height: 66px; align-items: center; justify-content: space-between; gap: 14px;
  border: 2px solid var(--fj-ui-line); border-radius: 12px 15px 13px 11px;
  background: var(--fj-ui-paper); text-align: left;
}
html body:not(.home-open) #takeReview .take-extension .take-extend:hover:not(:disabled) { background: var(--fj-ui-cream); border-color: var(--fj-ui-line-focus); }
html body:not(.home-open) #takeReview .take-extend-copy { display: grid; gap: 3px; min-width: 0; }
html body:not(.home-open) #takeReview #takeExtendLabel { font-size: 14px; font-weight: 600; }
html body:not(.home-open) #takeReview .take-extend-length { color: var(--fj-ui-muted); font-size: 11px; font-weight: 500; }
html body:not(.home-open) #takeReview .take-extend-arrow { width: 28px; height: 24px; flex: 0 0 28px; stroke: var(--fj-ui-line-focus); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body:not(.home-open) #takeReview .take-extension .take-extension-result {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 24px; align-items: center; gap: 14px;
  width: 100%; padding: 6px 2px; text-align: left; border-radius: 8px;
}
html body:not(.home-open) #takeReview .take-extension-result:hover { background: var(--fj-ui-cream); }
html body:not(.home-open) #takeReview .take-extension-result-art {
  display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden;
}
html body:not(.home-open) #takeReview .take-extension-result-art img {
  display: block; width: 100%; height: 100%; object-fit: contain;
}
html body:not(.home-open) #takeReview .take-extension-result[data-canvas-type="disc"] .take-extension-result-art { border-radius: 50%; }
html body:not(.home-open) #takeReview .take-extension-result[data-canvas-type="card"] .take-extension-result-art { border-radius: 7px; }
html body:not(.home-open) #takeReview .take-extension-result-copy { display: grid; gap: 5px; min-width: 0; }
html body:not(.home-open) #takeReview .take-extension-result-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
html body:not(.home-open) #takeReview .take-extension-result-meta { color: var(--fj-ui-muted); font-size: 11px; font-weight: 500; }
html body:not(.home-open) #takeReview .take-extension-result-arrow { width: 24px; height: 24px; stroke: var(--fj-ui-line-focus); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html body:not(.home-open) #takeReview :is(.take-extension-note, .take-extension-status) {
  margin: 0 3px; color: var(--fj-ui-muted); font: 500 10px/1.55 var(--fj-ui-font); overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  html body:not(.home-open) #takeReview .take-extension { margin: 20px 0; }
}
html body:not(.home-open) #takeReview .take-extension-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  list-style: none; padding: 0; margin: 0; color: var(--fj-ui-muted);
  font: 500 10px/1.4 var(--fj-ui-font);
}
html body:not(.home-open) #takeReview .take-extension-steps li { padding-top: 6px; border-top: 2px solid var(--fj-ui-line); opacity: .55; }
html body:not(.home-open) #takeReview .take-extension-steps li[aria-current] { border-color: var(--fj-ui-line-focus); opacity: 1; color: var(--fj-ui-ink); font-weight: 650; }
html body:not(.home-open) #takeReview .take-extension-steps li.is-done { border-color: var(--fj-ui-selected); opacity: 1; }
html body:not(.home-open) #takeReview .take-extension:is([data-state="active"], [data-state="checking"]) .take-extend { opacity: 1; }
html body:not(.home-open) #takeReview .take-extension:is([data-state="active"], [data-state="checking"]) .take-extend-arrow { display: none; }
html body:not(.home-open) #takeReview .take-extension[data-state="failed"] .take-extend:disabled { opacity: 1; }
html body:not(.home-open) #takeReview .take-extension[data-state="failed"] .take-extend:disabled .take-extend-arrow { display: none; }
html body:not(.home-open) #takeReview .take-extension:is([data-state="active"], [data-state="checking"]) .take-extend::after,
.song-extension-tracker:is([data-state="active"], [data-state="checking"]) .song-extension-indicator {
  content: ""; width: 17px; height: 17px; flex: 0 0 17px; box-sizing: border-box;
  border: 2px solid var(--fj-ui-line); border-top-color: var(--fj-ui-ink); border-radius: 50%;
  animation: song-extension-spin 1.2s linear infinite;
}
@keyframes song-extension-spin { to { transform: rotate(360deg); } }
.song-extension-tracker {
  position: fixed; z-index: 184; right: 16px; bottom: 70px;
  display: flex; align-items: center; width: min(320px, calc(100vw - 32px)); box-sizing: border-box;
  border: 2px solid var(--fj-ui-line); border-radius: 13px 16px 12px 15px;
  background: var(--fj-ui-paper); color: var(--fj-ui-ink); box-shadow: 0 3px 0 rgb(177 208 236 / 18%);
}
.song-extension-tracker[hidden], .song-extension-tracker [hidden], .creation-extension-status[hidden] { display: none !important; }
.song-extension-open {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 62px;
  padding: 11px 12px; border: 0; border-radius: 12px; background: none; color: inherit;
  text-align: left; font-family: var(--fj-ui-font); cursor: pointer;
}
.song-extension-open:hover { background: var(--fj-ui-ice); }
.song-extension-open:focus-visible, .song-extension-dismiss:focus-visible { outline: 2px solid var(--fj-ui-line-focus); outline-offset: 2px; }
.song-extension-tracker-copy { display: grid; gap: 4px; min-width: 0; flex: 1; }
.song-extension-tracker-copy strong { font: 600 11px/1.4 var(--fj-ui-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-extension-tracker-copy > span { font: 500 11px/1.4 var(--fj-ui-font); }
.song-extension-tracker-action { font: 600 10px/1.4 var(--fj-ui-font); white-space: nowrap; }
.song-extension-indicator { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--fj-ui-line-focus); }
.song-extension-tracker[data-state="active"] .song-extension-indicator { background: none; }
.song-extension-tracker[data-state="ready"] .song-extension-indicator { background: var(--fj-ui-selected); box-shadow: 0 0 0 1px var(--fj-ui-ink); }
.song-extension-tracker:is([data-state="failed"], [data-state="paused"]) .song-extension-indicator { background: var(--fj-ui-coral); box-shadow: 0 0 0 1px var(--fj-ui-muted); }
.song-extension-dismiss { width: 44px; min-height: 44px; flex: 0 0 44px; padding: 6px; align-self: flex-start; border: 0; background: none; color: var(--fj-ui-muted); font: 18px/1 var(--fj-ui-font); cursor: pointer; }
.creation-extension-status { display: block; color: var(--fj-ui-ink); font: 600 10px/1.4 var(--fj-ui-font); margin-top: 4px; }
html body:not(.home-open) #recordsRack .creation-mini-copy .creation-extension-status { grid-column: 1 / -1; max-width: 84px; margin: 0; font-size: 8px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mode-keys:not(.home-open) .song-extension-tracker { bottom: 190px; }
body.records-open:not(.home-open) .song-extension-tracker { bottom: auto; top: 118px; }
body.home-open .song-extension-tracker { bottom: 20px; }
@media (max-width: 700px) {
  .song-extension-tracker { right: 12px; width: min(300px, calc(100vw - 24px)); }
  body.mode-keys:not(.home-open) .song-extension-tracker { bottom: 150px; }
  body.records-open:not(.home-open) .song-extension-tracker { top: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  html body:not(.home-open) #takeReview .take-extension:is([data-state="active"], [data-state="checking"]) .take-extend::after,
  .song-extension-tracker:is([data-state="active"], [data-state="checking"]) .song-extension-indicator { animation: none; }
}
