.mood-board-body {
  --mb-ink: #111;
  --mb-muted: #6b6b6b;
  --mb-line: #d9d9d9;
  --mb-bg: #fff;
  --mb-stage: #ffffff;
  background: #fff;
  font-family: Inter, system-ui, sans-serif;
  color: var(--mb-ink);
}

.mb-app {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  min-height: calc(100vh - 64px);
  background: #fff;
}

.mb-sidebar {
  border-right: 1px solid var(--mb-line);
  background: #fff;
  position: relative;
  z-index: 2;
}

.mb-sidebar-scroll {
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 22px 18px 40px;
  scrollbar-width: thin;
}

.mb-title {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  line-height: 1.15;
}

.mb-hint-line {
  margin: 0 0 18px;
  color: var(--mb-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.mb-focus-panel {
  border: 1px solid var(--mb-line);
  border-radius: 8px;
  padding: 12px 12px 10px;
  background: #f7f7f7;
}

.mb-focus-name {
  display: none;
}

.mb-focus-meta {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: var(--mb-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  word-break: break-all;
}

.mb-focus-meta span:first-child {
  color: #222;
  font-weight: 600;
  font-size: 0.84rem;
}

.mb-focus-panel textarea {
  width: 100%;
  border: 1px solid var(--mb-line);
  border-radius: 4px;
  padding: 10px;
  font: inherit;
  font-size: 0.86rem;
  resize: vertical;
  min-height: 88px;
  margin-bottom: 8px;
  background: #fff;
}

.mb-focus-panel .mb-btn-outline {
  width: 100%;
  margin-bottom: 6px;
}

.mb-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 18px;
}

.mb-btn-primary {
  flex: 1;
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
}

.mb-btn-primary:hover {
  background: #222;
}

.mb-section > .mb-btn-primary {
  display: block;
  width: 100%;
  margin: 0 0 8px;
}

#btn-export-viewer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mb-vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 12px;
  margin-left: 5px;
  background: none;
  border: 0;
  border-radius: 0;
  color: #d4a017;
  vertical-align: -1px;
  flex-shrink: 0;
}

.mb-vip-badge svg {
  display: block;
  width: 14px;
  height: 12px;
}

.mb-vip-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--mb-muted);
  line-height: 1.35;
}

.mb-select-wrap {
  position: relative;
}

.mb-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid var(--mb-line);
  background: #fff;
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  text-align: left;
}

.mb-select-trigger:hover {
  border-color: #bbb;
}

.mb-select-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #333;
  margin-left: 8px;
}

.mb-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--mb-line);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.mb-select-menu li {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.mb-select-menu li:hover {
  background: #f5f5f5;
}

.mb-select-menu li.is-selected {
  font-weight: 600;
  background: #f0f0f0;
}

.mb-select-menu li[aria-disabled="true"] {
  color: #999;
  cursor: not-allowed;
}

.mb-select-menu li[aria-disabled="true"]:hover {
  background: transparent;
}

.mb-canvas-color {
  margin-top: 14px;
}

.mb-swatches {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.mb-swatch {
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.mb-swatch:hover {
  outline: 2px solid #bbb;
  outline-offset: 1px;
}

.mb-swatch.is-active {
  outline: 2px solid #111;
  outline-offset: 1px;
}

.mb-swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.mb-btn-vip {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

#btn-clear-bg-image,
#btn-clear-stickers,
#btn-clear-music {
  text-align: center;
}

.mb-stage.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.mb-btn-icon {
  width: 44px;
  border: 1px solid var(--mb-line);
  background: #fff;
  border-radius: 4px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.mb-btn-outline {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid var(--mb-line);
  background: #fff;
  border-radius: 4px;
  padding: 11px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.mb-btn-outline:hover {
  border-color: #bbb;
  background: #fafafa;
}

.mb-section {
  margin: 18px 0;
}

.mb-section-label,
.mb-field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--mb-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.mb-slider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.mb-slider span {
  color: #222;
}

.mb-slider strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.mb-slider input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: #111;
  margin: 0;
}

.mb-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.mb-switch {
  min-width: 48px;
  border: 1px solid var(--mb-line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mb-switch[data-on="true"] {
  background: #111;
  color: #fff;
  border-color: #111;
}

.mb-details {
  border-top: 1px solid var(--mb-line);
  border-bottom: 1px solid var(--mb-line);
  padding: 10px 0;
  margin: 14px 0;
}

.mb-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
}

.mb-details-project summary {
  position: relative;
  text-align: center;
  padding: 2px 18px;
}

.mb-details summary::-webkit-details-marker {
  display: none;
}

.mb-details summary::after {
  content: "+";
  float: right;
  font-weight: 500;
  color: #666;
}

.mb-details-project summary::after {
  float: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.mb-details[open] summary::after {
  content: "−";
}

.mb-details > *:not(summary) {
  margin-top: 12px;
}

.mb-seg {
  display: flex;
  border: 1px solid var(--mb-line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mb-seg-wrap {
  flex-wrap: wrap;
}

.mb-seg-btn {
  flex: 1;
  border: 0;
  background: #fff;
  padding: 9px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-right: 1px solid var(--mb-line);
}

.mb-seg-wrap .mb-seg-btn {
  flex: 1 1 45%;
  border-bottom: 1px solid var(--mb-line);
}

.mb-seg-btn:last-child {
  border-right: 0;
}

.mb-seg-btn.is-active {
  background: #111;
  color: #fff;
}

.mb-field {
  margin: 10px 0 12px;
}

.mb-field select {
  width: 100%;
  border: 1px solid var(--mb-line);
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  font-size: 0.9rem;
}

.mb-btn-pro-sub {
  width: 100%;
  margin-top: 18px;
  gap: 6px !important;
}

#pro-sub-status {
  margin-top: 6px;
  min-height: 1.1em;
}

.mb-stats {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  font-size: 0.95rem;
}

.mb-stats strong {
  font-size: 1.35rem;
  display: inline-block;
  margin-right: 4px;
}

.mb-hint {
  min-height: 1.2em;
  font-size: 0.8rem;
  color: var(--mb-muted);
  margin: 8px 0 0;
}

.mb-pricing-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
}

.mb-stage {
  position: relative;
  background: var(--mb-stage);
  overflow: hidden;
  min-height: calc(100vh - 64px);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.mb-sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.mb-sticker {
  position: absolute;
  width: 96px;
  height: auto;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.mb-sticker.is-dragging {
  cursor: grabbing;
  z-index: 46;
}

.mb-sticker.is-selected {
  z-index: 48;
}

.mb-sticker.is-fused {
  z-index: 5;
  pointer-events: none;
}

.mb-sticker.is-fused.is-releasing {
  pointer-events: auto;
  cursor: grab;
}

.mb-sticker.is-hidden-flip {
  visibility: hidden;
}

.mb-sticker img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.mb-sticker-ui {
  display: none;
}

.mb-sticker.is-selected .mb-sticker-ui {
  display: block;
  position: absolute;
  inset: -8px;
  border: 1.5px dashed rgba(17, 17, 17, 0.55);
  border-radius: 6px;
  pointer-events: none;
}

.mb-sticker-delete,
.mb-sticker-corner {
  position: absolute;
  pointer-events: auto;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
}

.mb-sticker-delete {
  top: -14px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.mb-sticker-delete svg {
  width: 14px;
  height: 14px;
  display: block;
}

.mb-sticker-delete:hover {
  background: #be123c;
}

.mb-sticker-corner {
  right: -12px;
  bottom: -12px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #111;
  box-shadow: 0 0 0 2px #fff;
  cursor: grab;
}

.mb-card.is-fuse-target,
.mb-flat-card.is-fuse-target {
  box-shadow: 0 0 0 4px #f6d76a, 0 0 0 9px rgba(232, 185, 35, 0.55);
}

#btn-fuse-sticker,
#btn-unfuse-sticker {
  text-align: center;
}

#btn-fuse-sticker.is-active,
#btn-unfuse-sticker.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.mb-music-toggle,
.mb-focus-delete {
  position: absolute;
  z-index: 60;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mb-music-toggle {
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
}

.mb-music-toggle.is-muted {
  color: #666;
  opacity: 0.48;
  filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.75)) saturate(0.3);
}

.mb-music-toggle svg {
  width: 26px;
  height: 26px;
  display: block;
}

.mb-focus-delete {
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.mb-focus-delete svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mb-music-slash {
  display: none;
}

.mb-music-toggle.is-muted .mb-music-slash {
  display: block;
}

.mb-focus-delete:hover {
  background: #be123c;
}

.mb-focus-delete[hidden],
.mb-music-toggle[hidden] {
  display: none !important;
}

.mb-stage img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.mb-stage.is-drag-over {
  outline: 2px dashed #111;
  outline-offset: -12px;
}

.mb-stage-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.mb-cloud-world {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.mb-cloud-pivot {
  position: relative;
  width: 0;
  height: 0;
  will-change: transform;
}

.mb-card {
  position: absolute;
  left: 0;
  top: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  cursor: grab;
  will-change: transform, opacity;
  transform-origin: center center;
  user-select: none;
  -webkit-user-select: none;
}

.mb-card-flip {
  width: 100%;
  height: 100%;
  perspective: 900px;
}

.mb-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.05, 0.2, 1);
}

.mb-card.is-flipped .mb-card-inner,
.mb-flat-card.is-flipped .mb-card-inner {
  transform: rotateY(180deg);
}

.mb-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: #fff;
  border: 5px solid #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
}

.mb-card.no-border .mb-card-face,
.mb-flat-card.no-border .mb-card-face {
  border-width: 0;
  background: transparent;
}

.mb-card.no-border .mb-card-face--back,
.mb-flat-card.no-border .mb-card-face--back {
  background: #fff;
  border: 5px solid #fff;
}

.mb-card.no-shadow .mb-card-face,
.mb-flat-card.no-shadow .mb-card-face {
  box-shadow: none;
}

.mb-card-face--back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px 10px;
  color: #111;
  background: #fff;
}

.mb-card.no-border {
  border-width: 0;
  background: transparent;
}

.mb-card.no-shadow {
  box-shadow: none;
}

.mb-stage.is-many .mb-card:not(.no-shadow) .mb-card-face {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.mb-card.is-focused {
  z-index: 2000 !important;
  cursor: pointer;
}

.mb-card.is-focused .mb-card-face {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.mb-card.is-dimmed,
.mb-flat-card.is-dimmed {
  pointer-events: none;
}

.mb-stage.is-focusing .mb-card:not(.is-focused),
.mb-stage.is-focusing .mb-flat-card:not(.is-focused) {
  cursor: default;
  pointer-events: none;
}

.mb-card.is-marked .mb-card-face--front::after,
.mb-flat-card.is-marked .mb-card-face--front::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #111;
  z-index: 3;
  pointer-events: none;
}

.mb-flat-card.is-focused {
  /* Shadow lives on the face (like Cloud) so flip doesn't leave a flat white ghost.
     Stacking comes from the card's layer, so a click or drag can stay in front. */
  box-shadow: none;
}

/* Focus clears the card shadow; keep the bond ring while the photo is enlarged */
.mb-flat-card.is-focused.is-fuse-target {
  box-shadow: 0 0 0 4px #f6d76a, 0 0 0 9px rgba(232, 185, 35, 0.55);
}

.mb-flat-card.is-focused .mb-card-face {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

/* Only the visible face casts shadow — kills mid-flip white residue */
.mb-card.is-flipped .mb-card-face--front,
.mb-flat-card.is-flipped .mb-card-face--front,
.mb-card:not(.is-flipped) .mb-card-face--back,
.mb-flat-card:not(.is-flipped) .mb-card-face--back {
  box-shadow: none;
}

.mb-notes-face {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  text-align: left;
}

.mb-notes-face h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.mb-notes-face p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #444;
  flex: 1;
  overflow: auto;
}

.mb-notes-face .mb-notes-file {
  margin-top: 10px;
  font-size: 0.68rem;
  color: #aaa;
  word-break: break-all;
}

.mb-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.mb-card.is-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #ececec,
    #ececec 8px,
    #f6f6f6 8px,
    #f6f6f6 16px
  );
  color: #777;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}

.mb-flat-board {
  position: absolute;
  inset: 0;
  /* Trap card z-index inside the board, same as the 3D pivot, so the sticker layer stays on top */
  isolation: isolate;
  overflow: auto;
  background-color: #f3f3f3;
  background-image:
    linear-gradient(#e8e8e8 1px, transparent 1px),
    linear-gradient(90deg, #e8e8e8 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 28px;
}

.mb-flat-inner {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}

.mb-flat-card {
  position: absolute;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: center center;
  will-change: transform, opacity;
}

.mb-flat-card .mb-card-flip {
  width: 100%;
  height: 100%;
}

.mb-flat-card.no-border {
  /* faces handle chrome via .mb-card-face rules */
}

.mb-flat-card.no-shadow {
  /* faces handle chrome via .mb-card-face rules */
}

.mb-flat-card.is-dragging .mb-card-face {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.mb-flat-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.mb-flat-card.is-dragging {
  cursor: grabbing;
  z-index: 20;
  opacity: 0.95;
}

.mb-flat-card.is-swap-target {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.mb-ctx {
  position: fixed;
  z-index: 1000;
  min-width: 140px;
  padding: 4px;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.mb-ctx button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 4px;
  color: #111;
}

.mb-ctx button:hover {
  background: #f3f3f3;
}

.mb-ctx button.is-danger {
  color: #b00020;
}

.mb-flat-card.is-placeholder {
  background: repeating-linear-gradient(
    45deg,
    #ececec,
    #ececec 8px,
    #f6f6f6 8px,
    #f6f6f6 16px
  );
  color: #777;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}

/* Mobile: floating chrome toggle; when collapsed hide entire site-top */
.mb-chrome-toggle {
  display: none;
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 80;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.mb-chrome-toggle:hover {
  color: var(--glow, #e8a87c);
  border-color: rgba(232, 168, 124, 0.55);
}

@media (max-width: 900px) {
  .mood-board-body {
    --mb-site-top-h: 108px;
    --mb-sidebar-scroll-gap: 72px;
  }

  .mood-board-body.is-chrome-collapsed {
    --mb-site-top-h: 0px;
  }

  .mood-board-body.is-chrome-collapsed .site-top {
    display: none;
  }

  .mood-board-body .mb-chrome-toggle {
    display: inline-flex;
  }

  /* Expanded: JS parks − under cart; keep dark chip style */
  .mood-board-body:not(.is-chrome-collapsed) .mb-chrome-toggle {
    background: rgba(26, 38, 52, 0.92);
    color: #f6f3ee;
    border-color: rgba(246, 243, 238, 0.28);
    box-shadow: none;
  }

  .mb-app {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    min-height: calc(100dvh - var(--mb-site-top-h, 108px));
    height: calc(100dvh - var(--mb-site-top-h, 108px));
  }

  .mb-sidebar {
    order: 2;
    flex: 0 0 auto;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--mb-line);
  }

  /* Whole control panel: right padding = finger scroll safe zone; ~1/3 shorter */
  .mb-sidebar-scroll {
    height: auto;
    max-height: 28vh;
    min-width: 0;
    padding: 6px var(--mb-sidebar-scroll-gap) 8px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .mb-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .mb-hint-line {
    display: none;
  }

  .mb-stage {
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .mb-shape-section > .mb-section-label {
    display: none;
  }

  .mb-shape-section .mb-slider {
    grid-template-columns: minmax(0, 1fr) 2.6rem;
    gap: 0 6px;
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  .mb-shape-section .mb-slider strong {
    font-size: 0.72rem;
  }

  .mb-shape-section .mb-slider span {
    font-size: 0.72rem;
  }

  .mb-sidebar-scroll input[type="range"] {
    touch-action: pan-x;
  }

  /* Trash matches + size; when chrome collapsed, park it under the + */
  .mb-focus-delete {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  }

  .mb-focus-delete svg {
    width: 16px;
    height: 16px;
  }

  .mood-board-body.is-chrome-collapsed .mb-focus-delete {
    position: fixed;
    top: calc(max(10px, env(safe-area-inset-top, 0px)) + 36px + 8px);
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 79;
  }
}

@media (max-width: 640px) {
  .mood-board-body {
    --mb-sidebar-scroll-gap: 72px;
  }

  .mb-sidebar-scroll {
    max-height: 25vh;
  }

  .mb-shape-section .mb-slider {
    margin-bottom: 2px;
  }
}
